From 3dc2068c1f9a2df15de622521eefb05cc6bbeab8 Mon Sep 17 00:00:00 2001 From: nobody Date: Wed, 17 Mar 1999 14:31:11 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'ACE-4_6_29'. --- TAO/orbsvcs/tests/AVStreams/Makefile | 25 - TAO/orbsvcs/tests/AVStreams/README | 27 - TAO/orbsvcs/tests/AVStreams/benchmark/Makefile | 875 ----- TAO/orbsvcs/tests/AVStreams/benchmark/child.cpp | 153 - TAO/orbsvcs/tests/AVStreams/benchmark/child.h | 81 - TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp | 467 --- TAO/orbsvcs/tests/AVStreams/benchmark/client.h | 162 - TAO/orbsvcs/tests/AVStreams/benchmark/clnt.conf | 49 - TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp | 257 -- TAO/orbsvcs/tests/AVStreams/benchmark/server.h | 101 - TAO/orbsvcs/tests/AVStreams/benchmark/svc.conf | 50 - TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL.UCB | 105 - TAO/orbsvcs/tests/AVStreams/mpeg/Makefile | 24 - TAO/orbsvcs/tests/AVStreams/mpeg/PatchLevel | 12 - TAO/orbsvcs/tests/AVStreams/mpeg/README | 71 - TAO/orbsvcs/tests/AVStreams/mpeg/README.MI | 39 - TAO/orbsvcs/tests/AVStreams/mpeg/README.OGI | 142 - TAO/orbsvcs/tests/AVStreams/mpeg/README.UCB | 105 - TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile | 32 - TAO/orbsvcs/tests/AVStreams/mpeg/source/TODO | 50 - .../tests/AVStreams/mpeg/source/client/Makefile | 138 - .../tests/AVStreams/mpeg/source/client/svc.conf | 49 - .../tests/AVStreams/mpeg/source/client/vcr.cpp | 465 --- .../tests/AVStreams/mpeg/source/include/common.h | 591 --- .../AVStreams/mpeg/source/mpeg_client/24bit.cpp | 218 -- .../AVStreams/mpeg/source/mpeg_client/2x2.cpp | 377 -- .../mpeg/source/mpeg_client/Command_Handler.cpp | 3223 ----------------- .../mpeg/source/mpeg_client/Command_Handler.h | 617 ---- .../AVStreams/mpeg/source/mpeg_client/Makefile | 1017 ------ .../tests/AVStreams/mpeg/source/mpeg_client/ab.cpp | 575 --- .../tests/AVStreams/mpeg/source/mpeg_client/ab.h | 161 - .../AVStreams/mpeg/source/mpeg_client/audio.cpp | 494 --- .../AVStreams/mpeg/source/mpeg_client/ctr.cpp | 995 ------ .../AVStreams/mpeg/source/mpeg_client/decoders.cpp | 937 ----- .../AVStreams/mpeg/source/mpeg_client/decoders.h | 480 --- .../AVStreams/mpeg/source/mpeg_client/dither.h | 36 - .../AVStreams/mpeg/source/mpeg_client/file.cpp | 150 - .../AVStreams/mpeg/source/mpeg_client/fs2.cpp | 398 --- .../tests/AVStreams/mpeg/source/mpeg_client/fs2.h | 33 - .../AVStreams/mpeg/source/mpeg_client/fs2fast.cpp | 300 -- .../AVStreams/mpeg/source/mpeg_client/fs4.cpp | 312 -- .../tests/AVStreams/mpeg/source/mpeg_client/fs4.h | 35 - .../AVStreams/mpeg/source/mpeg_client/global.cpp | 96 - .../AVStreams/mpeg/source/mpeg_client/global.h | 67 - .../AVStreams/mpeg/source/mpeg_client/gray.cpp | 85 - .../AVStreams/mpeg/source/mpeg_client/hybrid.cpp | 237 -- .../mpeg/source/mpeg_client/hybriderr.cpp | 360 -- .../AVStreams/mpeg/source/mpeg_client/info.cpp | 85 - .../mpeg/source/mpeg_client/interface/Info.mib | 78 - .../mpeg/source/mpeg_client/interface/MW.mib | 229 -- .../source/mpeg_client/interface/MainWindow.mib | 324 -- .../mpeg/source/mpeg_client/interface/fb.xbm | 9 - .../mpeg/source/mpeg_client/interface/ff.xbm | 8 - .../mpeg/source/mpeg_client/interface/loop.xbm | 8 - .../mpeg_client/interface/old.MainWindow.mib | 305 -- .../mpeg/source/mpeg_client/interface/play.xbm | 8 - .../mpeg/source/mpeg_client/interface/rewind.xbm | 8 - .../mpeg/source/mpeg_client/interface/step.xbm | 8 - .../mpeg/source/mpeg_client/interface/stop.xbm | 8 - .../AVStreams/mpeg/source/mpeg_client/jrevdct.cpp | 1461 -------- .../mpeg/source/mpeg_client/mb_ordered.cpp | 517 --- .../AVStreams/mpeg/source/mpeg_client/mibload.h | 155 - .../AVStreams/mpeg/source/mpeg_client/mono.cpp | 256 -- .../mpeg/source/mpeg_client/motionvector.cpp | 197 - .../AVStreams/mpeg/source/mpeg_client/newproto.h | 110 - .../AVStreams/mpeg/source/mpeg_client/ordered.cpp | 290 -- .../AVStreams/mpeg/source/mpeg_client/ordered2.cpp | 328 -- .../AVStreams/mpeg/source/mpeg_client/para.cpp | 375 -- .../mpeg/source/mpeg_client/parseblock.cpp | 461 --- .../AVStreams/mpeg/source/mpeg_client/prog.cpp | 933 ----- .../AVStreams/mpeg/source/mpeg_client/proto.h | 128 - .../tests/AVStreams/mpeg/source/mpeg_client/ui.cpp | 999 ------ .../tests/AVStreams/mpeg/source/mpeg_client/ui.h | 18 - .../AVStreams/mpeg/source/mpeg_client/util.cpp | 468 --- .../tests/AVStreams/mpeg/source/mpeg_client/util.h | 368 -- .../AVStreams/mpeg/source/mpeg_client/util32.cpp | 81 - .../tests/AVStreams/mpeg/source/mpeg_client/vb.cpp | 1129 ------ .../tests/AVStreams/mpeg/source/mpeg_client/vb.h | 265 -- .../tests/AVStreams/mpeg/source/mpeg_client/vd.cpp | 933 ----- .../AVStreams/mpeg/source/mpeg_client/video.cpp | 3761 -------------------- .../AVStreams/mpeg/source/mpeg_client/video.h | 285 -- .../tests/AVStreams/mpeg/source/mpeg_client/vp.cpp | 921 ----- .../tests/AVStreams/mpeg/source/mpeg_mib/Makefile | 314 -- .../AVStreams/mpeg/source/mpeg_mib/mibButton.cpp | 174 - .../AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp | 121 - .../AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp | 182 - .../AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp | 166 - .../AVStreams/mpeg/source/mpeg_mib/mibList.cpp | 166 - .../AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp | 250 -- .../AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp | 210 -- .../AVStreams/mpeg/source/mpeg_mib/mibScale.cpp | 204 -- .../mpeg/source/mpeg_mib/mibScrollBar.cpp | 164 - .../AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp | 147 - .../AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp | 133 - .../AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp | 192 - .../AVStreams/mpeg/source/mpeg_mib/mibload.cpp | 804 ----- .../tests/AVStreams/mpeg/source/mpeg_mib/mibload.h | 172 - .../AVStreams/mpeg/source/mpeg_mib/mibwidgets.h | 225 -- .../source/mpeg_server/Audio_Control_State.cpp | 158 - .../mpeg/source/mpeg_server/Audio_Control_State.h | 84 - .../mpeg/source/mpeg_server/Audio_Control_i.cpp | 258 -- .../mpeg/source/mpeg_server/Audio_Control_i.h | 80 - .../mpeg/source/mpeg_server/Audio_Server.cpp | 300 -- .../mpeg/source/mpeg_server/Audio_Server.h | 121 - .../AVStreams/mpeg/source/mpeg_server/Globals.cpp | 2935 --------------- .../AVStreams/mpeg/source/mpeg_server/Globals.h | 399 --- .../AVStreams/mpeg/source/mpeg_server/Makefile | 1657 --------- .../source/mpeg_server/Video_Control_State.cpp | 483 --- .../mpeg/source/mpeg_server/Video_Control_State.h | 189 - .../mpeg/source/mpeg_server/Video_Control_i.cpp | 272 -- .../mpeg/source/mpeg_server/Video_Control_i.h | 97 - .../mpeg/source/mpeg_server/Video_Server.cpp | 254 -- .../mpeg/source/mpeg_server/Video_Server.h | 152 - .../tests/AVStreams/mpeg/source/mpeg_server/as.cpp | 708 ---- .../AVStreams/mpeg/source/mpeg_server/las.cpp | 254 -- .../AVStreams/mpeg/source/mpeg_server/lvs.cpp | 413 --- .../mpeg/source/mpeg_server/server_proto.h | 63 - .../tests/AVStreams/mpeg/source/mpeg_server/vs.cpp | 2207 ------------ .../mpeg/source/mpeg_shared/Audio_Control.idl | 78 - .../mpeg/source/mpeg_shared/MMDevice_Exporter.idl | 8 - .../AVStreams/mpeg/source/mpeg_shared/Makefile | 174 - .../AVStreams/mpeg/source/mpeg_shared/Receiver.idl | 7 - .../mpeg/source/mpeg_shared/Video_Control.idl | 112 - .../AVStreams/mpeg/source/mpeg_shared/com.cpp | 2136 ----------- .../tests/AVStreams/mpeg/source/mpeg_shared/com.h | 112 - .../AVStreams/mpeg/source/mpeg_shared/fileio.cpp | 410 --- .../AVStreams/mpeg/source/mpeg_shared/fileio.h | 100 - .../AVStreams/mpeg/source/mpeg_shared/filters.cpp | 370 -- .../AVStreams/mpeg/source/mpeg_shared/filters.h | 91 - .../AVStreams/mpeg/source/mpeg_shared/routine.cpp | 522 --- .../AVStreams/mpeg/source/mpeg_shared/routine.h | 55 - .../AVStreams/mpeg/source/mpeg_shared/sendpt.cpp | 140 - .../AVStreams/mpeg/source/mpeg_shared/sendpt.h | 39 - .../mpeg/source/server/Machine_Properties.cpp | 284 -- .../mpeg/source/server/Machine_Properties.h | 97 - .../tests/AVStreams/mpeg/source/server/Makefile | 865 ----- .../mpeg/source/server/Property_Exporter.cpp | 420 --- .../mpeg/source/server/Property_Exporter.h | 211 -- .../mpeg/source/server/Video_Repository.cpp | 159 - .../mpeg/source/server/Video_Repository.h | 90 - .../mpeg/source/server/Video_Repository.idl | 32 - .../tests/AVStreams/mpeg/source/server/as.cpp | 71 - .../tests/AVStreams/mpeg/source/server/as.h | 59 - .../mpeg/source/server/augmented_server.cpp | 725 ---- .../mpeg/source/server/augmented_server.h | 303 -- .../tests/AVStreams/mpeg/source/server/server.cpp | 478 --- .../tests/AVStreams/mpeg/source/server/server.h | 196 - .../tests/AVStreams/mpeg/source/server/svc.conf | 50 - .../tests/AVStreams/mpeg/source/server/vcrs.cpp | 264 -- .../tests/AVStreams/mpeg/source/server/vs.cpp | 70 - .../tests/AVStreams/mpeg/source/server/vs.h | 60 - TAO/orbsvcs/tests/AVStreams/mpeg/vcr.1 | 610 ---- TAO/orbsvcs/tests/AVStreams/mpeg/vcrs.1 | 1 - .../tests/AVStreams/server_discovery/AV_Demo | 191 - .../tests/AVStreams/server_discovery/Makefile | 1077 ------ .../tests/AVStreams/server_discovery/Queue.java | 189 - .../tests/AVStreams/server_discovery/README | 33 - .../Server_0005fDiscovery_0005fUtil.h | 54 - .../server_discovery/Server_Discovery.cpp | 338 -- .../server_discovery/Server_Discovery.java | 142 - .../server_discovery/Server_Discovery_Browser.java | 141 - .../server_discovery/Server_Discovery_Perf.java | 145 - .../Server_Discovery_Selection.java | 291 -- .../server_discovery/Server_Discovery_Util.java | 30 - .../AVStreams/server_discovery/Strip_Chart.java | 203 -- .../AVStreams/server_discovery/Trader_Client.cpp | 455 --- .../AVStreams/server_discovery/Trader_Client.h | 156 - .../tests/AVStreams/server_discovery/graph02.gif | Bin 231 -> 0 bytes .../tests/AVStreams/server_discovery/graph09.gif | Bin 343 -> 0 bytes .../tests/AVStreams/server_discovery/main.cpp | 75 - .../tests/AVStreams/server_discovery/mmedia3.gif | Bin 321 -> 0 bytes .../tests/AVStreams/server_discovery/server01.gif | Bin 342 -> 0 bytes .../tests/AVStreams/server_discovery/server02.gif | Bin 268 -> 0 bytes .../tests/AVStreams/server_discovery/www1.gif | Bin 348 -> 0 bytes TAO/orbsvcs/tests/AVStreams/sfp/client.cpp | 89 - TAO/orbsvcs/tests/AVStreams/sfp/common.h | 12 - TAO/orbsvcs/tests/AVStreams/sfp/server.cpp | 61 - TAO/orbsvcs/tests/Concurrency/CC_client.cpp | 463 --- TAO/orbsvcs/tests/Concurrency/CC_client.dsp | 142 - TAO/orbsvcs/tests/Concurrency/CC_client.h | 143 - TAO/orbsvcs/tests/Concurrency/CC_command.cpp | 667 ---- TAO/orbsvcs/tests/Concurrency/CC_command.h | 471 --- TAO/orbsvcs/tests/Concurrency/CC_command.l | 58 - TAO/orbsvcs/tests/Concurrency/CC_command.tab.cpp | 697 ---- .../tests/Concurrency/CC_command.tab.cpp.diff | 25 - TAO/orbsvcs/tests/Concurrency/CC_command.tab.h | 29 - TAO/orbsvcs/tests/Concurrency/CC_command.y | 126 - .../tests/Concurrency/CC_naming_service.cpp | 174 - TAO/orbsvcs/tests/Concurrency/CC_naming_service.h | 87 - TAO/orbsvcs/tests/Concurrency/CC_test_utils.cpp | 70 - TAO/orbsvcs/tests/Concurrency/CC_test_utils.h | 37 - TAO/orbsvcs/tests/Concurrency/CC_tests.cpp | 373 -- TAO/orbsvcs/tests/Concurrency/CC_tests.h | 184 - TAO/orbsvcs/tests/Concurrency/Concurrency.dsw | 29 - TAO/orbsvcs/tests/Concurrency/Makefile | 968 ----- TAO/orbsvcs/tests/Concurrency/NS_client.cpp | 213 -- TAO/orbsvcs/tests/Concurrency/NS_client.h | 93 - TAO/orbsvcs/tests/Concurrency/README | 111 - TAO/orbsvcs/tests/Concurrency/lex.CC_command.cpp | 1726 --------- .../tests/Concurrency/lex.CC_command.cpp.diff | 167 - TAO/orbsvcs/tests/Concurrency/test.basic | 21 - TAO/orbsvcs/tests/Concurrency/test.dinphil | 12 - TAO/orbsvcs/tests/Concurrency/test.e1 | 2 - TAO/orbsvcs/tests/Concurrency/test.extended | 4 - TAO/orbsvcs/tests/Concurrency/test.phil1 | 6 - TAO/orbsvcs/tests/Concurrency/test.phil2 | 6 - TAO/orbsvcs/tests/Concurrency/test.phil3 | 6 - TAO/orbsvcs/tests/Concurrency/test.phil4 | 6 - TAO/orbsvcs/tests/Concurrency/test.phil5 | 6 - TAO/orbsvcs/tests/Concurrency/tmplinst.cpp | 14 - TAO/orbsvcs/tests/CosEC_Basic/CosECConsumer.cpp | 88 - TAO/orbsvcs/tests/CosEC_Basic/CosECConsumer.h | 68 - TAO/orbsvcs/tests/CosEC_Basic/CosECSupplier.cpp | 83 - TAO/orbsvcs/tests/CosEC_Basic/CosECSupplier.h | 61 - TAO/orbsvcs/tests/CosEC_Basic/CosEC_Basic.cpp | 263 -- TAO/orbsvcs/tests/CosEC_Basic/CosEC_Basic.h | 110 - TAO/orbsvcs/tests/CosEC_Basic/Makefile | 170 - TAO/orbsvcs/tests/CosEC_Basic/README | 26 - TAO/orbsvcs/tests/CosEC_Multiple/CosECConsumer.cpp | 189 - TAO/orbsvcs/tests/CosEC_Multiple/CosECConsumer.h | 80 - TAO/orbsvcs/tests/CosEC_Multiple/CosECSupplier.cpp | 184 - TAO/orbsvcs/tests/CosEC_Multiple/CosECSupplier.h | 76 - .../tests/CosEC_Multiple/CosEC_Multiple.cpp | 146 - TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.h | 78 - TAO/orbsvcs/tests/CosEC_Multiple/Makefile | 392 -- TAO/orbsvcs/tests/CosEC_Multiple/README | 77 - TAO/orbsvcs/tests/CosEC_Multiple/run_test.pl | 115 - TAO/orbsvcs/tests/CosEC_Multiple/run_test2.pl | 104 - TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp | 1184 ------ TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp | 94 - TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw | 29 - TAO/orbsvcs/tests/EC_Basic/EC_Basic.h | 354 -- TAO/orbsvcs/tests/EC_Basic/EC_Basic.i | 15 - TAO/orbsvcs/tests/EC_Basic/Makefile | 148 - TAO/orbsvcs/tests/EC_Basic/README | 12 - TAO/orbsvcs/tests/EC_Basic/run_test.pl | 10 - .../tests/EC_Custom_Marshal/ECCM_Consumer.dsp | 228 -- .../tests/EC_Custom_Marshal/ECCM_Supplier.dsp | 228 -- .../tests/EC_Custom_Marshal/ECM_Consumer.cpp | 457 --- TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h | 117 - TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.cpp | 66 - TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.h | 42 - .../tests/EC_Custom_Marshal/ECM_Supplier.cpp | 546 --- TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h | 145 - .../tests/EC_Custom_Marshal/EC_Custom_Marshal.dsw | 41 - TAO/orbsvcs/tests/EC_Custom_Marshal/Makefile | 354 -- TAO/orbsvcs/tests/EC_Custom_Marshal/README | 19 - TAO/orbsvcs/tests/EC_Custom_Marshal/data.idl | 21 - TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl | 40 - TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp | 1131 ------ TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.dsp | 96 - TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.dsw | 29 - TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h | 517 --- TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.i | 120 - TAO/orbsvcs/tests/EC_Mcast/Makefile | 178 - TAO/orbsvcs/tests/EC_Mcast/README | 21 - TAO/orbsvcs/tests/EC_Mcast/sample.cfg | 64 - TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp | 1674 --------- TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.dsp | 111 - TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.dsw | 29 - TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h | 382 -- TAO/orbsvcs/tests/EC_Multiple/Makefile | 148 - TAO/orbsvcs/tests/EC_Multiple/README | 34 - TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime1.h | 162 - TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime2.h | 160 - .../tests/EC_Multiple/Scheduler_Runtime_Dynamic.h | 1032 ------ TAO/orbsvcs/tests/EC_Multiple/dyn_plot | 77 - TAO/orbsvcs/tests/EC_Multiple/gen_dynamic | 68 - TAO/orbsvcs/tests/EC_Multiple/gen_latency | 90 - TAO/orbsvcs/tests/EC_Multiple/gen_overhead | 114 - TAO/orbsvcs/tests/EC_Multiple/gen_throughput | 43 - TAO/orbsvcs/tests/EC_Multiple/gen_utilization | 80 - TAO/orbsvcs/tests/EC_Multiple/histo.pl | 76 - TAO/orbsvcs/tests/EC_Multiple/run_dynamic | 64 - TAO/orbsvcs/tests/EC_Multiple/run_latency | 55 - TAO/orbsvcs/tests/EC_Multiple/run_overhead | 118 - TAO/orbsvcs/tests/EC_Multiple/run_schedule | 48 - TAO/orbsvcs/tests/EC_Multiple/run_test.pl | 27 - TAO/orbsvcs/tests/EC_Multiple/run_throughput | 40 - TAO/orbsvcs/tests/EC_Multiple/run_utilization | 60 - TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp | 198 -- TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.dsp | 120 - TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h | 86 - .../tests/EC_Throughput/ECT_Consumer_Driver.cpp | 332 -- .../tests/EC_Throughput/ECT_Consumer_Driver.h | 93 - TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp | 46 - TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h | 79 - TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.i | 56 - .../tests/EC_Throughput/ECT_Scheduler_Info.h | 80 - TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp | 247 -- TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.dsp | 120 - TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h | 96 - .../tests/EC_Throughput/ECT_Supplier_Driver.cpp | 372 -- .../tests/EC_Throughput/ECT_Supplier_Driver.h | 92 - TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp | 676 ---- TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.dsp | 123 - TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h | 137 - TAO/orbsvcs/tests/EC_Throughput/EC_Throughput.dsw | 53 - TAO/orbsvcs/tests/EC_Throughput/Makefile | 292 -- TAO/orbsvcs/tests/EC_Throughput/README | 34 - TAO/orbsvcs/tests/EC_Throughput/run_test.pl | 32 - TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp | 983 ----- TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp | 104 - TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw | 29 - TAO/orbsvcs/tests/Event_Latency/Event_Latency.h | 253 -- TAO/orbsvcs/tests/Event_Latency/Makefile | 111 - TAO/orbsvcs/tests/Event_Latency/run_test.pl | 31 - TAO/orbsvcs/tests/Event_Latency/run_tests.sh | 67 - TAO/orbsvcs/tests/ImplRepo/Airplane.idl | 7 - TAO/orbsvcs/tests/ImplRepo/IR_Helper.cpp | 227 -- TAO/orbsvcs/tests/ImplRepo/IR_Helper.h | 74 - TAO/orbsvcs/tests/ImplRepo/ImplRepo.dsw | 77 - TAO/orbsvcs/tests/ImplRepo/Makefile | 602 ---- TAO/orbsvcs/tests/ImplRepo/Nestea.idl | 16 - TAO/orbsvcs/tests/ImplRepo/README | 10 - TAO/orbsvcs/tests/ImplRepo/Repository.cpp | 208 -- TAO/orbsvcs/tests/ImplRepo/Repository.h | 35 - TAO/orbsvcs/tests/ImplRepo/Repository_Test.cpp | 165 - TAO/orbsvcs/tests/ImplRepo/Repository_Test.dsp | 108 - TAO/orbsvcs/tests/ImplRepo/airplane_client.cpp | 21 - TAO/orbsvcs/tests/ImplRepo/airplane_client.dsp | 208 -- TAO/orbsvcs/tests/ImplRepo/airplane_client_i.cpp | 171 - TAO/orbsvcs/tests/ImplRepo/airplane_client_i.h | 78 - TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp | 95 - TAO/orbsvcs/tests/ImplRepo/airplane_i.h | 60 - TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp | 37 - TAO/orbsvcs/tests/ImplRepo/airplane_server.dsp | 224 -- TAO/orbsvcs/tests/ImplRepo/airplane_server_i.cpp | 175 - TAO/orbsvcs/tests/ImplRepo/airplane_server_i.h | 80 - TAO/orbsvcs/tests/ImplRepo/implrepo.conf | 4 - TAO/orbsvcs/tests/ImplRepo/nestea_client.cpp | 21 - TAO/orbsvcs/tests/ImplRepo/nestea_client.dsp | 208 -- TAO/orbsvcs/tests/ImplRepo/nestea_client_i.cpp | 155 - TAO/orbsvcs/tests/ImplRepo/nestea_client_i.h | 69 - TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp | 105 - TAO/orbsvcs/tests/ImplRepo/nestea_i.h | 75 - TAO/orbsvcs/tests/ImplRepo/nestea_server.cpp | 37 - TAO/orbsvcs/tests/ImplRepo/nestea_server.dsp | 224 -- TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp | 175 - TAO/orbsvcs/tests/ImplRepo/nestea_server_i.h | 80 - TAO/orbsvcs/tests/ImplRepo/run_test.pl | 155 - TAO/orbsvcs/tests/ImplRepo/svc.conf | 4 - TAO/orbsvcs/tests/Logger/Logger.dsw | 41 - TAO/orbsvcs/tests/Logger/Logging_Test.cpp | 21 - TAO/orbsvcs/tests/Logger/Logging_Test_i.cpp | 348 -- TAO/orbsvcs/tests/Logger/Logging_Test_i.h | 104 - TAO/orbsvcs/tests/Logger/Makefile | 361 -- TAO/orbsvcs/tests/Logger/README | 45 - TAO/orbsvcs/tests/Logger/client.cpp | 21 - TAO/orbsvcs/tests/Logger/client.dsp | 104 - TAO/orbsvcs/tests/Logger/client.h | 104 - TAO/orbsvcs/tests/Logger/client_i.cpp | 291 -- TAO/orbsvcs/tests/Logger/client_i.h | 102 - TAO/orbsvcs/tests/Logger/run_test.pl | 46 - TAO/orbsvcs/tests/Logger/server.cpp | 42 - TAO/orbsvcs/tests/Logger/server.dsp | 100 - TAO/orbsvcs/tests/Logger/server_i.cpp | 131 - TAO/orbsvcs/tests/Logger/server_i.h | 92 - TAO/orbsvcs/tests/Makefile | 37 - TAO/orbsvcs/tests/Property/Makefile | 340 -- TAO/orbsvcs/tests/Property/README | 37 - TAO/orbsvcs/tests/Property/client.cpp | 823 ----- TAO/orbsvcs/tests/Property/client.h | 107 - TAO/orbsvcs/tests/Property/main.cpp | 591 --- TAO/orbsvcs/tests/Property/run_test.pl | 57 - TAO/orbsvcs/tests/Property/server.cpp | 119 - TAO/orbsvcs/tests/Property/server.h | 27 - TAO/orbsvcs/tests/Sched/DynSched_Test.cpp | 288 -- TAO/orbsvcs/tests/Sched/Makefile | 131 - TAO/orbsvcs/tests/Sched_Conf/Makefile | 311 -- TAO/orbsvcs/tests/Sched_Conf/README | 42 - TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp | 443 --- TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsp | 92 - TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsw | 56 - .../tests/Sched_Conf/Sched_Conf_Anomalies.cpp | 388 -- .../tests/Sched_Conf/Sched_Conf_Anomalies.dsp | 102 - .../Sched_Conf/Sched_Conf_Anomalies_Runtime.h | 59 - .../tests/Sched_Conf/Sched_Conf_Runtime.cpp | 160 - .../tests/Sched_Conf/Sched_Conf_Runtime.dsp | 96 - TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h | 62 - TAO/orbsvcs/tests/Simple_Naming/Makefile | 327 -- TAO/orbsvcs/tests/Simple_Naming/README | 169 - TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.dsw | 29 - TAO/orbsvcs/tests/Simple_Naming/client.cpp | 1178 ------ TAO/orbsvcs/tests/Simple_Naming/client.dsp | 245 -- TAO/orbsvcs/tests/Simple_Naming/client.h | 282 -- .../tests/Simple_Naming/process-m-output.pl | 107 - TAO/orbsvcs/tests/Simple_Naming/run_test.pl | 89 - TAO/orbsvcs/tests/Simple_Naming/test_object.idl | 11 - TAO/orbsvcs/tests/Time/Client_i.cpp | 421 --- TAO/orbsvcs/tests/Time/Client_i.h | 101 - TAO/orbsvcs/tests/Time/Makefile | 63 - TAO/orbsvcs/tests/Time/README | 46 - TAO/orbsvcs/tests/Time/Time_Service_Test.dsp | 108 - TAO/orbsvcs/tests/Time/Time_Service_Test.dsw | 29 - TAO/orbsvcs/tests/Time/client.cpp | 21 - TAO/orbsvcs/tests/Time/implrepo.conf | 49 - TAO/orbsvcs/tests/Time/run_test.pl | 138 - TAO/orbsvcs/tests/Trading/Colocated_Test.dsp | 92 - TAO/orbsvcs/tests/Trading/Export_Test.dsp | 92 - TAO/orbsvcs/tests/Trading/Import_Test.dsp | 92 - TAO/orbsvcs/tests/Trading/Makefile | 221 -- TAO/orbsvcs/tests/Trading/Offer_Exporter.cpp | 638 ---- TAO/orbsvcs/tests/Trading/Offer_Exporter.h | 142 - TAO/orbsvcs/tests/Trading/Offer_Importer.cpp | 311 -- TAO/orbsvcs/tests/Trading/Offer_Importer.h | 95 - TAO/orbsvcs/tests/Trading/README | 3301 ----------------- .../tests/Trading/Service_Type_Exporter.cpp | 522 --- TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h | 121 - TAO/orbsvcs/tests/Trading/Simple_Dynamic.cpp | 30 - TAO/orbsvcs/tests/Trading/Simple_Dynamic.h | 43 - TAO/orbsvcs/tests/Trading/TT_Info.cpp | 284 -- TAO/orbsvcs/tests/Trading/TT_Info.h | 202 -- TAO/orbsvcs/tests/Trading/TTest.idl | 43 - TAO/orbsvcs/tests/Trading/Trading.dsw | 74 - TAO/orbsvcs/tests/Trading/TradingLib.dsp | 258 -- TAO/orbsvcs/tests/Trading/colocated_test.cpp | 140 - TAO/orbsvcs/tests/Trading/export_test.cpp | 137 - TAO/orbsvcs/tests/Trading/import_test.cpp | 60 - TAO/orbsvcs/tests/start_services | 108 - TAO/orbsvcs/tests/tests.dsw | 206 -- 421 files changed, 104901 deletions(-) delete mode 100644 TAO/orbsvcs/tests/AVStreams/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/README delete mode 100644 TAO/orbsvcs/tests/AVStreams/benchmark/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/benchmark/child.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/benchmark/child.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/benchmark/client.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/benchmark/clnt.conf delete mode 100644 TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/benchmark/server.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/benchmark/svc.conf delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL.UCB delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/PatchLevel delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/README delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/README.MI delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/README.OGI delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/README.UCB delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/TODO delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/client/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/client/svc.conf delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/client/vcr.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/24bit.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/2x2.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/audio.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ctr.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/file.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2fast.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/gray.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/hybrid.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/hybriderr.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/info.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/Info.mib delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MW.mib delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MainWindow.mib delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/fb.xbm delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/ff.xbm delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/loop.xbm delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/old.MainWindow.mib delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/play.xbm delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/rewind.xbm delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/step.xbm delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/stop.xbm delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/jrevdct.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mb_ordered.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mono.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/motionvector.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered2.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/para.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/parseblock.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/prog.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util32.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vd.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vp.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/as.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/las.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/lvs.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_Control.idl delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/MMDevice_Exporter.idl delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Receiver.idl delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control.idl delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.idl delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/svc.conf delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vcrs.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/vcr.1 delete mode 100644 TAO/orbsvcs/tests/AVStreams/mpeg/vcrs.1 delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/AV_Demo delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Makefile delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Queue.java delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/README delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.java delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Browser.java delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Perf.java delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Selection.java delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Util.java delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Strip_Chart.java delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/graph02.gif delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/graph09.gif delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/main.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/mmedia3.gif delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/server01.gif delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/server02.gif delete mode 100644 TAO/orbsvcs/tests/AVStreams/server_discovery/www1.gif delete mode 100644 TAO/orbsvcs/tests/AVStreams/sfp/client.cpp delete mode 100644 TAO/orbsvcs/tests/AVStreams/sfp/common.h delete mode 100644 TAO/orbsvcs/tests/AVStreams/sfp/server.cpp delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_client.cpp delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_client.dsp delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_client.h delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_command.cpp delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_command.h delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_command.l delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_command.tab.cpp delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_command.tab.cpp.diff delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_command.tab.h delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_command.y delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_naming_service.h delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_test_utils.cpp delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_test_utils.h delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_tests.cpp delete mode 100644 TAO/orbsvcs/tests/Concurrency/CC_tests.h delete mode 100644 TAO/orbsvcs/tests/Concurrency/Concurrency.dsw delete mode 100644 TAO/orbsvcs/tests/Concurrency/Makefile delete mode 100644 TAO/orbsvcs/tests/Concurrency/NS_client.cpp delete mode 100644 TAO/orbsvcs/tests/Concurrency/NS_client.h delete mode 100644 TAO/orbsvcs/tests/Concurrency/README delete mode 100644 TAO/orbsvcs/tests/Concurrency/lex.CC_command.cpp delete mode 100644 TAO/orbsvcs/tests/Concurrency/lex.CC_command.cpp.diff delete mode 100644 TAO/orbsvcs/tests/Concurrency/test.basic delete mode 100644 TAO/orbsvcs/tests/Concurrency/test.dinphil delete mode 100644 TAO/orbsvcs/tests/Concurrency/test.e1 delete mode 100644 TAO/orbsvcs/tests/Concurrency/test.extended delete mode 100644 TAO/orbsvcs/tests/Concurrency/test.phil1 delete mode 100644 TAO/orbsvcs/tests/Concurrency/test.phil2 delete mode 100644 TAO/orbsvcs/tests/Concurrency/test.phil3 delete mode 100644 TAO/orbsvcs/tests/Concurrency/test.phil4 delete mode 100644 TAO/orbsvcs/tests/Concurrency/test.phil5 delete mode 100644 TAO/orbsvcs/tests/Concurrency/tmplinst.cpp delete mode 100644 TAO/orbsvcs/tests/CosEC_Basic/CosECConsumer.cpp delete mode 100644 TAO/orbsvcs/tests/CosEC_Basic/CosECConsumer.h delete mode 100644 TAO/orbsvcs/tests/CosEC_Basic/CosECSupplier.cpp delete mode 100644 TAO/orbsvcs/tests/CosEC_Basic/CosECSupplier.h delete mode 100644 TAO/orbsvcs/tests/CosEC_Basic/CosEC_Basic.cpp delete mode 100644 TAO/orbsvcs/tests/CosEC_Basic/CosEC_Basic.h delete mode 100644 TAO/orbsvcs/tests/CosEC_Basic/Makefile delete mode 100644 TAO/orbsvcs/tests/CosEC_Basic/README delete mode 100644 TAO/orbsvcs/tests/CosEC_Multiple/CosECConsumer.cpp delete mode 100644 TAO/orbsvcs/tests/CosEC_Multiple/CosECConsumer.h delete mode 100644 TAO/orbsvcs/tests/CosEC_Multiple/CosECSupplier.cpp delete mode 100644 TAO/orbsvcs/tests/CosEC_Multiple/CosECSupplier.h delete mode 100644 TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.cpp delete mode 100644 TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.h delete mode 100644 TAO/orbsvcs/tests/CosEC_Multiple/Makefile delete mode 100644 TAO/orbsvcs/tests/CosEC_Multiple/README delete mode 100755 TAO/orbsvcs/tests/CosEC_Multiple/run_test.pl delete mode 100755 TAO/orbsvcs/tests/CosEC_Multiple/run_test2.pl delete mode 100644 TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp delete mode 100644 TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw delete mode 100644 TAO/orbsvcs/tests/EC_Basic/EC_Basic.h delete mode 100644 TAO/orbsvcs/tests/EC_Basic/EC_Basic.i delete mode 100644 TAO/orbsvcs/tests/EC_Basic/Makefile delete mode 100644 TAO/orbsvcs/tests/EC_Basic/README delete mode 100755 TAO/orbsvcs/tests/EC_Basic/run_test.pl delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Consumer.dsp delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Supplier.dsp delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.h delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/EC_Custom_Marshal.dsw delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/Makefile delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/README delete mode 100644 TAO/orbsvcs/tests/EC_Custom_Marshal/data.idl delete mode 100755 TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl delete mode 100644 TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.dsp delete mode 100644 TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.dsw delete mode 100644 TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h delete mode 100644 TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.i delete mode 100644 TAO/orbsvcs/tests/EC_Mcast/Makefile delete mode 100644 TAO/orbsvcs/tests/EC_Mcast/README delete mode 100644 TAO/orbsvcs/tests/EC_Mcast/sample.cfg delete mode 100644 TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.dsp delete mode 100644 TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.dsw delete mode 100644 TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h delete mode 100644 TAO/orbsvcs/tests/EC_Multiple/Makefile delete mode 100644 TAO/orbsvcs/tests/EC_Multiple/README delete mode 100644 TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime1.h delete mode 100644 TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime2.h delete mode 100644 TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime_Dynamic.h delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/dyn_plot delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/gen_dynamic delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/gen_latency delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/gen_overhead delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/gen_throughput delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/gen_utilization delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/histo.pl delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/run_dynamic delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/run_latency delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/run_overhead delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/run_schedule delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/run_test.pl delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/run_throughput delete mode 100755 TAO/orbsvcs/tests/EC_Multiple/run_utilization delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.dsp delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.i delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Scheduler_Info.h delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.dsp delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.dsp delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/EC_Throughput.dsw delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/Makefile delete mode 100644 TAO/orbsvcs/tests/EC_Throughput/README delete mode 100755 TAO/orbsvcs/tests/EC_Throughput/run_test.pl delete mode 100644 TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp delete mode 100644 TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp delete mode 100644 TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw delete mode 100644 TAO/orbsvcs/tests/Event_Latency/Event_Latency.h delete mode 100644 TAO/orbsvcs/tests/Event_Latency/Makefile delete mode 100755 TAO/orbsvcs/tests/Event_Latency/run_test.pl delete mode 100755 TAO/orbsvcs/tests/Event_Latency/run_tests.sh delete mode 100644 TAO/orbsvcs/tests/ImplRepo/Airplane.idl delete mode 100644 TAO/orbsvcs/tests/ImplRepo/IR_Helper.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/IR_Helper.h delete mode 100644 TAO/orbsvcs/tests/ImplRepo/ImplRepo.dsw delete mode 100644 TAO/orbsvcs/tests/ImplRepo/Makefile delete mode 100644 TAO/orbsvcs/tests/ImplRepo/Nestea.idl delete mode 100644 TAO/orbsvcs/tests/ImplRepo/README delete mode 100644 TAO/orbsvcs/tests/ImplRepo/Repository.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/Repository.h delete mode 100644 TAO/orbsvcs/tests/ImplRepo/Repository_Test.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/Repository_Test.dsp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/airplane_client.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/airplane_client.dsp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/airplane_client_i.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/airplane_client_i.h delete mode 100644 TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/airplane_i.h delete mode 100644 TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/airplane_server.dsp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/airplane_server_i.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/airplane_server_i.h delete mode 100644 TAO/orbsvcs/tests/ImplRepo/implrepo.conf delete mode 100644 TAO/orbsvcs/tests/ImplRepo/nestea_client.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/nestea_client.dsp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/nestea_client_i.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/nestea_client_i.h delete mode 100644 TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/nestea_i.h delete mode 100644 TAO/orbsvcs/tests/ImplRepo/nestea_server.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/nestea_server.dsp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp delete mode 100644 TAO/orbsvcs/tests/ImplRepo/nestea_server_i.h delete mode 100755 TAO/orbsvcs/tests/ImplRepo/run_test.pl delete mode 100644 TAO/orbsvcs/tests/ImplRepo/svc.conf delete mode 100644 TAO/orbsvcs/tests/Logger/Logger.dsw delete mode 100644 TAO/orbsvcs/tests/Logger/Logging_Test.cpp delete mode 100644 TAO/orbsvcs/tests/Logger/Logging_Test_i.cpp delete mode 100644 TAO/orbsvcs/tests/Logger/Logging_Test_i.h delete mode 100644 TAO/orbsvcs/tests/Logger/Makefile delete mode 100644 TAO/orbsvcs/tests/Logger/README delete mode 100644 TAO/orbsvcs/tests/Logger/client.cpp delete mode 100644 TAO/orbsvcs/tests/Logger/client.dsp delete mode 100644 TAO/orbsvcs/tests/Logger/client.h delete mode 100644 TAO/orbsvcs/tests/Logger/client_i.cpp delete mode 100644 TAO/orbsvcs/tests/Logger/client_i.h delete mode 100755 TAO/orbsvcs/tests/Logger/run_test.pl delete mode 100644 TAO/orbsvcs/tests/Logger/server.cpp delete mode 100644 TAO/orbsvcs/tests/Logger/server.dsp delete mode 100644 TAO/orbsvcs/tests/Logger/server_i.cpp delete mode 100644 TAO/orbsvcs/tests/Logger/server_i.h delete mode 100644 TAO/orbsvcs/tests/Makefile delete mode 100644 TAO/orbsvcs/tests/Property/Makefile delete mode 100644 TAO/orbsvcs/tests/Property/README delete mode 100644 TAO/orbsvcs/tests/Property/client.cpp delete mode 100644 TAO/orbsvcs/tests/Property/client.h delete mode 100644 TAO/orbsvcs/tests/Property/main.cpp delete mode 100755 TAO/orbsvcs/tests/Property/run_test.pl delete mode 100644 TAO/orbsvcs/tests/Property/server.cpp delete mode 100644 TAO/orbsvcs/tests/Property/server.h delete mode 100644 TAO/orbsvcs/tests/Sched/DynSched_Test.cpp delete mode 100644 TAO/orbsvcs/tests/Sched/Makefile delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/Makefile delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/README delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsp delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsw delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies.cpp delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies.dsp delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies_Runtime.h delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.cpp delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.dsp delete mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h delete mode 100644 TAO/orbsvcs/tests/Simple_Naming/Makefile delete mode 100644 TAO/orbsvcs/tests/Simple_Naming/README delete mode 100644 TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.dsw delete mode 100644 TAO/orbsvcs/tests/Simple_Naming/client.cpp delete mode 100644 TAO/orbsvcs/tests/Simple_Naming/client.dsp delete mode 100644 TAO/orbsvcs/tests/Simple_Naming/client.h delete mode 100755 TAO/orbsvcs/tests/Simple_Naming/process-m-output.pl delete mode 100755 TAO/orbsvcs/tests/Simple_Naming/run_test.pl delete mode 100644 TAO/orbsvcs/tests/Simple_Naming/test_object.idl delete mode 100644 TAO/orbsvcs/tests/Time/Client_i.cpp delete mode 100644 TAO/orbsvcs/tests/Time/Client_i.h delete mode 100644 TAO/orbsvcs/tests/Time/Makefile delete mode 100644 TAO/orbsvcs/tests/Time/README delete mode 100644 TAO/orbsvcs/tests/Time/Time_Service_Test.dsp delete mode 100644 TAO/orbsvcs/tests/Time/Time_Service_Test.dsw delete mode 100644 TAO/orbsvcs/tests/Time/client.cpp delete mode 100644 TAO/orbsvcs/tests/Time/implrepo.conf delete mode 100755 TAO/orbsvcs/tests/Time/run_test.pl delete mode 100644 TAO/orbsvcs/tests/Trading/Colocated_Test.dsp delete mode 100644 TAO/orbsvcs/tests/Trading/Export_Test.dsp delete mode 100644 TAO/orbsvcs/tests/Trading/Import_Test.dsp delete mode 100644 TAO/orbsvcs/tests/Trading/Makefile delete mode 100644 TAO/orbsvcs/tests/Trading/Offer_Exporter.cpp delete mode 100644 TAO/orbsvcs/tests/Trading/Offer_Exporter.h delete mode 100644 TAO/orbsvcs/tests/Trading/Offer_Importer.cpp delete mode 100644 TAO/orbsvcs/tests/Trading/Offer_Importer.h delete mode 100644 TAO/orbsvcs/tests/Trading/README delete mode 100644 TAO/orbsvcs/tests/Trading/Service_Type_Exporter.cpp delete mode 100644 TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h delete mode 100644 TAO/orbsvcs/tests/Trading/Simple_Dynamic.cpp delete mode 100644 TAO/orbsvcs/tests/Trading/Simple_Dynamic.h delete mode 100644 TAO/orbsvcs/tests/Trading/TT_Info.cpp delete mode 100644 TAO/orbsvcs/tests/Trading/TT_Info.h delete mode 100644 TAO/orbsvcs/tests/Trading/TTest.idl delete mode 100644 TAO/orbsvcs/tests/Trading/Trading.dsw delete mode 100644 TAO/orbsvcs/tests/Trading/TradingLib.dsp delete mode 100644 TAO/orbsvcs/tests/Trading/colocated_test.cpp delete mode 100644 TAO/orbsvcs/tests/Trading/export_test.cpp delete mode 100644 TAO/orbsvcs/tests/Trading/import_test.cpp delete mode 100755 TAO/orbsvcs/tests/start_services delete mode 100644 TAO/orbsvcs/tests/tests.dsw (limited to 'TAO/orbsvcs/tests') diff --git a/TAO/orbsvcs/tests/AVStreams/Makefile b/TAO/orbsvcs/tests/AVStreams/Makefile deleted file mode 100644 index b6329eed1a2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = benchmark \ - mpeg \ - server_discovery \ - sfp \ - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU - diff --git a/TAO/orbsvcs/tests/AVStreams/README b/TAO/orbsvcs/tests/AVStreams/README deleted file mode 100644 index 442ede23384..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/README +++ /dev/null @@ -1,27 +0,0 @@ -// $Id$ - -TAO Audio/Video Streaming service ---------------------------------- - -This directory contains a complete distributed audio/video streaming -application. This application uses interfaces and interactions -defined in the OMG "Control and Management of A/V streams" -specification, which is available at the OMG web site. An -implementation of the A/V Streaming specification is available for TAO -in the following directory. - -$TAO_ROOT/orbsvcs/orbsvcs/AV/ - -Subsequent directories contain README files that describe the -compilation and installation process of this application. - -The TAO application is a modified version of a streaming application -developed at the Oregon Graduate Institute. - -Members of the TAO A/V Streaming team include the following - -Sumedh Mungee -Seth Widoff -Nagarajan Surendran -Alexander Arulanthu - diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/Makefile b/TAO/orbsvcs/tests/AVStreams/benchmark/Makefile deleted file mode 100644 index e6f9849b48a..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/Makefile +++ /dev/null @@ -1,875 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -# -# Top-level Makefile for Benchmarking of AVStreams of TAO. -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -LDLIBS = -lorbsvcs -lTAO - -SERVER_OBJS = server.o child.o -CLIENT_OBJS = client.o -CHILD_OBJS = child.o - -BIN = server client #child -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -FILES = client server child -DEFS = $(addsuffix .h,$(FILES)) -LSRC = $(addsuffix .cpp,$(FILES)) - - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -DCFLAGS = -g -LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) $(TSS_ORB_FLAG) - - -server:$(addprefix $(VDIR),$(SERVER_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -client:$(addprefix $(VDIR),$(CLIENT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -child:$(addprefix $(VDIR),$(CHILD_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -realclean: clean - -/bin/rm -rf - - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/client.o .obj/client.so .shobj/client.o .shobj/client.so: client.cpp client.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/ARGV.h \ - $(ACE_ROOT)/ace/ARGV.i \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(TAO_ROOT)/tao/Align.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.i \ - $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/IIOP_Object.h \ - $(TAO_ROOT)/tao/IIOP_Object.i \ - $(TAO_ROOT)/tao/IIOP_ORB.h \ - $(TAO_ROOT)/tao/IIOP_ORB.i \ - $(TAO_ROOT)/tao/CDR_Interpreter.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i -.obj/server.o .obj/server.so .shobj/server.o .shobj/server.so: server.cpp server.h \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(TAO_ROOT)/tao/Align.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.i \ - $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/IIOP_Object.h \ - $(TAO_ROOT)/tao/IIOP_Object.i \ - $(TAO_ROOT)/tao/IIOP_ORB.h \ - $(TAO_ROOT)/tao/IIOP_ORB.i \ - $(TAO_ROOT)/tao/CDR_Interpreter.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - client.h $(ACE_ROOT)/ace/ARGV.h \ - $(ACE_ROOT)/ace/ARGV.i \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - child.h -.obj/child.o .obj/child.so .shobj/child.o .shobj/child.so: child.cpp child.h \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(TAO_ROOT)/tao/Align.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.i \ - $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/IIOP_Object.h \ - $(TAO_ROOT)/tao/IIOP_Object.i \ - $(TAO_ROOT)/tao/IIOP_ORB.h \ - $(TAO_ROOT)/tao/IIOP_ORB.i \ - $(TAO_ROOT)/tao/CDR_Interpreter.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - client.h $(ACE_ROOT)/ace/ARGV.h \ - $(ACE_ROOT)/ace/ARGV.i \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/child.cpp b/TAO/orbsvcs/tests/AVStreams/benchmark/child.cpp deleted file mode 100644 index 564aa586bd3..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/child.cpp +++ /dev/null @@ -1,153 +0,0 @@ -// $Id$ - -#include "child.h" - -ACE_RCSID(benchmark, child, "$Id$") - -// Bench_Server_StreamEndPoint methods. - -Bench_Server_StreamEndPoint::Bench_Server_StreamEndPoint (void) -{ -} - -int -Bench_Server_StreamEndPoint::handle_open (void) -{ - return 0; -} - -int -Bench_Server_StreamEndPoint::handle_close (void) -{ - // called when streamendpoint is being destructed - return 0; -} - -int -Bench_Server_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return 0; -} - -int -Bench_Server_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return 0; -} - -int -Bench_Server_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return 0; -} - -CORBA::Boolean -Bench_Server_StreamEndPoint::handle_connection_requested (AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Bench_Server_StreamEndPoint::handle_connection_requested:() length =%d\n", - the_spec.length ())); - - return 1; - - ACE_INET_Addr client_addr (the_spec [0]); - u_short local_port = 0; - ACE_INET_Addr local_addr (local_port,"merengue-atm.cs.wustl.edu"); - - if (this->connector_.connect (this->tcp_stream_, - client_addr, - 0, - local_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Connection to server failed: %p\n", - "connect"), - 0); - ACE_DEBUG ((LM_DEBUG,"(%P|%t) tcp connect succeeded %d\n",this->tcp_stream_.get_handle ())); - - int sndbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; - int rcvbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; - - if (this->tcp_stream_.set_option (SOL_SOCKET, - SO_SNDBUF, - (void *) &sndbufsize, - sizeof (sndbufsize)) == -1 - && errno != ENOTSUP) - return -1; - else if (this->tcp_stream_.set_option (SOL_SOCKET, - SO_RCVBUF, - (void *) &rcvbufsize, - sizeof (rcvbufsize)) == -1 - && errno != ENOTSUP) - return -1; - - int one = 1; - if (this->tcp_stream_.set_option (SOL_SOCKET, - TCP_NODELAY, - (char *)& one, - sizeof (one)) == -1 ) - return -1; - - ACE_NEW_RETURN (this->stream_handler_, - ttcp_Stream_Handler (this->tcp_stream_.get_handle ()), - 0); - int result; - - result = TAO_ORB_Core_instance ()->reactor ()->register_handler (this->stream_handler_, - ACE_Event_Handler::READ_MASK); - if (result < 0) - return 0; - - ACE_DEBUG ((LM_DEBUG,"(%P|%t) register handler for tcp_Stream success\n")); - return 1; -} - -ttcp_Stream_Handler::ttcp_Stream_Handler (int control_fd) - : control_handle_ (control_fd) -{ -} - -// Called by the reactor to extract the handle associated with this handler. -ACE_HANDLE -ttcp_Stream_Handler::get_handle (void) const -{ - return this->control_handle_ ; -} - -// Called by the Reactor when data is ready to be read from the -// video control handle, which indicates a control message from the client. -int -ttcp_Stream_Handler::handle_input (ACE_HANDLE handle) -{ - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Bench_Server_StreamEndPoint::handle_input ()\n")); - - char buf[BUFSIZ]; - int result =ACE_OS::read (this->control_handle_,buf,BUFSIZ); - if (result < 0 ) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Bench_Server_StreamEndPoint::handle_input ()\n"), - -1); - - if (result == 0) - return 0; - return 0; -} - - -// -------------------------------------------------------------------------------- - - -// int -// main (int argc, char **argv) -// { -// TAO_AV_Child_Process_B bench_child; - -// if (bench_child.init (argc,argv) == -1) -// return 1; -// if (bench_child.run () == -1) -// return 2; - -// return 0; -// } diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/child.h b/TAO/orbsvcs/tests/AVStreams/benchmark/child.h deleted file mode 100644 index 3baf5852d47..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/child.h +++ /dev/null @@ -1,81 +0,0 @@ -// $Id$ - -#ifndef TAO_AV_BENCH_CHILD_H -#define TAO_AV_BENCH_CHILD_H - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_CODgram.h" -#include "ace/Select_Reactor.h" -#include "orbsvcs/orbsvcs/Naming/Naming_Utils.h" -#include "orbsvcs/AV/AVStreams_i.h" -#include "ace/SOCK_Connector.h" -#include "client.h" - - -class ttcp_Stream_Handler : public virtual ACE_Event_Handler -{ - // = TITLE - // Defines the event handler class for the Video Control. - // - // = DESCRIPTION - // This class makes use of a TCP socket.It contains a pointer to - // the current state which is implemented using the state pattern. -public: - - ttcp_Stream_Handler (int ttcp_Stream_fd); - // Construct this handler with a control (TCP) fd - // %% use sock stream instead of fd - - virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); - // Called when input events occur (e.g., connection or data). - - virtual ACE_HANDLE get_handle (void) const; - // Returns the handle used by the event_handler. -private: - ACE_HANDLE control_handle_; -}; - -class Bench_Server_StreamEndPoint - :public TAO_Server_StreamEndPoint -{ -public: - Bench_Server_StreamEndPoint (void); - - virtual int handle_open (void) ; - // called when streamendpoint is instantiated - - virtual int handle_close (void) ; - // called when streamendpoint is being destructed - - virtual int handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - // Application needs to define this - - virtual int handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - // Application needs to define this - - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - // Application needs to define this - - virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; -private: - ACE_SOCK_Connector connector_; - ACE_SOCK_Stream tcp_stream_; - ttcp_Stream_Handler *stream_handler_; -}; - - -#endif /* TAO_AV_BENCH_CHILD_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp b/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp deleted file mode 100644 index 08494218d07..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp +++ /dev/null @@ -1,467 +0,0 @@ -// $Id$ - -#include "client.h" - -ACE_RCSID(benchmark, client, "$Id$") - -Client_StreamEndPoint::Client_StreamEndPoint (void) -{ -} - - -int -Client_StreamEndPoint::handle_open (void) -{ - return 0; -} - -int -Client_StreamEndPoint::handle_close (void) -{ - return 0; -} - -// called by the framework before calling connect. Here we create our -// flow spec which is nothing but hostname::port_number of the -// datagram. -CORBA::Boolean -Client_StreamEndPoint::handle_preconnect (AVStreams::flowSpec &the_spec) -{ - // return 1; - the_spec.length (0); - ACE_DEBUG ((LM_DEBUG,"(%P|%t) handle_preconnect called\n")); - return 0; -} - -// called by the A/V framework after calling connect. Passes the -// server streamendpoints' flowspec which we use to connect our -// datagram socket. -CORBA::Boolean -Client_StreamEndPoint::handle_postconnect (AVStreams::flowSpec& server_spec) -{ - // return 1; - ACE_DEBUG ((LM_DEBUG,"(%P|%t) handle_postconnect called \n")); - return 0; -} - -int -Client_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) - -{ - return -1; -} - -int -Client_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) - -{ - return -1; -} - -int -Client_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) - -{ - return -1; -} - -// ---------------------------------------------------------------------- - -ttcp_Acceptor::ttcp_Acceptor (ttcp_Client_StreamEndPoint *endpoint) - :endpoint_ (endpoint) -{ -} - -int -ttcp_Acceptor::make_svc_handler (ttcp_Client_StreamEndPoint *&sh) -{ - sh = this->endpoint_; - return 0; -} - -//------------------------------------------------------------ - -ttcp_Client_StreamEndPoint::ttcp_Client_StreamEndPoint (Client *client) - :acceptor_ (this), - client_ (client) -{ -} - -CORBA::Boolean -ttcp_Client_StreamEndPoint::handle_preconnect (AVStreams::flowSpec &the_spec) -{ - // listen for the tcp socket. - - ACE_INET_Addr tcp_addr; - - // tcp_addr.set (TCP_PORT,"mambo-atm.cs.wustl.edu"); - tcp_addr.set (TCP_PORT); - - if (this->acceptor_.open (tcp_addr, - TAO_ORB_Core_instance ()->reactor ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"%p\n","open"),-1); - ACE_INET_Addr local_addr; - - if (this->acceptor_.acceptor ().get_local_addr (local_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t)acceptor get local addr failed %p"),-1); - - char client_address_string [BUFSIZ]; - ::sprintf (client_address_string, - "%s:%d", - // local_addr.get_host_name (), - "mambo-atm.cs.wustl.edu", - local_addr.get_port_number ()); - the_spec.length (1); - the_spec [0] = CORBA::string_dup (client_address_string); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) client flow spec is %s\n", - client_address_string)); - - return 1; -} - -CORBA::Boolean -ttcp_Client_StreamEndPoint::handle_postconnect (AVStreams::flowSpec& server_spec) -{ - ACE_DEBUG ((LM_DEBUG,"ttcp_Client_StreamEndPoint::handle_postconnect \n")); - this->client_->set_stream (this->peer ()); - return 1; -} - -int -ttcp_Client_StreamEndPoint::open (void *) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) ttcp_Client_StreamEndPoint::open () called\n")); - return 0; -} - -Client::Client (int argc, char **argv, ACE_Barrier *barrier) - : reactive_strategy_ (&orb_manager_), - // :reactive_strategy_ (&orb_manager_,this), - client_mmdevice_ (&reactive_strategy_), - argc_ (argc), - argv_ (argv), - block_size_ (1), - number_ (10), - barrier_ (barrier) -{ -} - -void -Client::set_stream (ACE_SOCK_Stream & control) -{ - this->stream_ = control; -} - -int -Client::parse_args (int argc, - char **argv) -{ - ACE_Get_Opt opts (argc,argv,"b:"); - - int c; - - while ((c = opts ()) != -1) - switch (c) - { - case 'b': - this->block_size_ = ACE_OS::atoi (opts.optarg); - break; -// case 'n': -// this->number_ = ACE_OS::atoi (opts.optarg); -// break; - case '?': - ACE_DEBUG ((LM_DEBUG,"Usage %s [-b block_size] [-n number_of times]", - argv[0])); - break; - } - return 0; -} - -int -Client::svc (void) -{ - // Now start pumping data. - ACE_High_Res_Timer timer; - ACE_Time_Value tv1,tv2; - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Thread created\n")); - - if (this->parse_args (this->argc_, - this->argv_) == -1) - return -1; - TAO_TRY - { - this->orb_manager_.init (this->argc_, - this->argv_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - // activate the client MMDevice with the ORB - this->orb_manager_.activate (&this->client_mmdevice_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->bind_to_server () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Error binding to the naming service\n"), - -1); - - // wait for the other clients to finish binding - this->barrier_->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) All threads finished, starting tests.\n")); - - ACE_Time_Value tv (0); - this->orb_manager_.run (TAO_TRY_ENV,&tv); - TAO_CHECK_ENV; - AVStreams::streamQoS_var the_qos (new AVStreams::streamQoS); - AVStreams::flowSpec_var the_flows (new AVStreams::flowSpec); - // Bind the client and server mmdevices. - - timer.start (); - this->streamctrl_.bind_devs - (this->client_mmdevice_._this (TAO_TRY_ENV), - this->server_mmdevice_.in (), - the_qos.inout (), - the_flows.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - timer.stop (); - timer.elapsed_time (tv1); - long time_taken = tv1.sec () + tv1.usec () /1000000; - tv1.dump (); - //ACE_DEBUG ((LM_DEBUG,"(%P|%t)time taken is %ld \n", - // time_taken )); - - return 0; - - int sndbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; - int rcvbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; - - if (this->stream_.set_option (SOL_SOCKET, - SO_SNDBUF, - (void *) &sndbufsize, - sizeof (sndbufsize)) == -1 - && errno != ENOTSUP) - return -1; - else if (this->stream_.set_option (SOL_SOCKET, - SO_RCVBUF, - (void *) &rcvbufsize, - sizeof (rcvbufsize)) == -1 - && errno != ENOTSUP) - return -1; - - int one = 1; - if (this->stream_.set_option (SOL_SOCKET, - TCP_NODELAY, - (char *)& one, - sizeof (one)) == -1 ) - return -1; - - char *buffer; - long buffer_siz = this->block_size_*1024; - - ACE_NEW_RETURN (buffer, - char [buffer_siz], - -1); - timer.start (); - long number = 64 *1024/this->block_size_; - for (int i=0;istream_.send_n (buffer,buffer_siz); - timer.stop (); - timer.elapsed_time (tv2); - double total_time = tv2.sec ()+tv2.usec ()/1000000.0; - double total_data = 64*1024*1024; - ACE_DEBUG ((LM_DEBUG,"Total data = %f , Total time = %f \n", - total_data,total_time)); - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Thruput for block size is:%d\t%f Mb/s \n", - buffer_siz,total_data/(total_time*1024.0*1024.0))); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("streamctrl.bind_devs:"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -int -Client::bind_to_server (void) -{ - TAO_TRY - { - /* - CORBA::Object_var naming_obj = - this->orb_manager_.orb ()->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to resolve the Name Service.\n"), - -1); - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - */ - - // Initialize the naming services - if (my_name_client_.init (this->orb_manager_.orb ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - CosNaming::Name server_mmdevice_name (1); - - server_mmdevice_name.length (1); - server_mmdevice_name [0].id = CORBA::string_dup ("Bench_Server_MMDevice"); - CORBA::Object_var server_mmdevice_obj = - my_name_client_->resolve (server_mmdevice_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->server_mmdevice_ = - AVStreams::MMDevice::_narrow (server_mmdevice_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (this->server_mmdevice_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " could not resolve Server_Mmdevice in Naming service <%s>\n"), - -1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Command_Handler::resolve_reference"); - return -1; - } - TAO_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) MMDevice successfully resolved.\n")); - return 0; -} - -int -Client::establish_stream (void) -{ - - AVStreams::streamQoS_var the_qos (new AVStreams::streamQoS); - AVStreams::flowSpec_var the_flows (new AVStreams::flowSpec); - // Bind the client and server mmdevices. - - TAO_TRY - { - this->streamctrl_.bind_devs - (this->client_mmdevice_._this (TAO_TRY_ENV), - this->server_mmdevice_.in (), - the_qos.inout (), - the_flows.in (), - TAO_TRY_ENV); - - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("streamctrl.bind_devs:"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -// ---------------------------------------------------------------------- - -int -main (int argc, char **argv) -{ - ACE_Get_Opt opts (argc, argv, "T:"); - int thread_count = 1; - -int c; -while ((c = opts ()) != -1) - switch (c) - { - case 'T': - thread_count = (u_int) ACE_OS::atoi (opts.optarg); - continue; - default: -// ACE_DEBUG ((LM_DEBUG, -// "Usage: %s -t number_of_threads\n", -// argv [0])); - break; - } - - ACE_Barrier *barrier; - ACE_NEW_RETURN (barrier, - ACE_Barrier (thread_count + 1), - -1); - for (int i = 0; i < thread_count; i++) - { - Client *client; - ACE_NEW_RETURN (client, - Client (argc, - argv, - barrier), - -1); - - if (client->activate (THR_BOUND) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Error in activate: %p", - "activate"), - -1); - } - - // wait for all the threads to finish starting up - barrier->wait (); - ACE_DEBUG ((LM_DEBUG, - "(%t) All threads started, waiting for test completion\n")); - - ACE_Thread_Manager::instance ()->wait (); - -} - -// ----------------------------------------------------------- -// Video_Endpoint_Reactive_Strategy_A methods - -ttcp_Endpoint_Reactive_Strategy_A::ttcp_Endpoint_Reactive_Strategy_A (TAO_ORB_Manager *orb_manager, - Client *client) - : TAO_AV_Endpoint_Reactive_Strategy_A (orb_manager), - client_ (client) -{ -} - -int -ttcp_Endpoint_Reactive_Strategy_A::make_stream_endpoint (ttcp_Client_StreamEndPoint *&endpoint) -{ - ACE_NEW_RETURN (endpoint, - ttcp_Client_StreamEndPoint (this->client_), - -1); - - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class TAO_AV_Endpoint_Reactive_Strategy; -template class TAO_AV_Endpoint_Reactive_Strategy; -template class TAO_AV_Endpoint_Reactive_Strategy_A; -template class TAO_AV_Endpoint_Reactive_Strategy_A; -template class ACE_Acceptor ; -template class ACE_Svc_Handler ; -template class ACE_Task; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy -#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy -#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy_A -#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy_A -#pragma instantiate ACE_Acceptor -#pragma instantiate ACE_Svc_Handler -#pragma instantiate ACE_Task -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/client.h b/TAO/orbsvcs/tests/AVStreams/benchmark/client.h deleted file mode 100644 index 6d4b8cdbc7a..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/client.h +++ /dev/null @@ -1,162 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// NOTE: If you encounter trouble resolving the Naming Service, try -// running the Naming Service and the server in the same window. [MJB] - -#ifndef TAO_AV_BENCH_CLIENT_H -#define TAO_AV_BENCH_CLIENT_H - -#include "ace/Reactor.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Event_Handler.h" -#include "ace/ARGV.h" -#include "tao/TAO.h" -#include "orbsvcs/CosNamingC.h" -#include "ace/SOCK_Dgram.h" -#include "orbsvcs/AV/AVStreams_i.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/Synch.h" -#include "ace/High_Res_Timer.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -#define TCP_PORT 5000 - -class Client_StreamEndPoint - : public TAO_Client_StreamEndPoint -{ - // = TITLE - // Defines a client StreamEndpoint class - // = DESCRIPTION - // Makes use of a connected dgram to receive data from the server - // side stream endpoint. -public: - Client_StreamEndPoint (void); - - virtual int handle_open (void); - // called when streamendpoint is instantiated - - virtual int handle_close (void); - // called when streamendpoint is being destructed - - virtual CORBA::Boolean handle_preconnect (AVStreams::flowSpec &the_spec); - // called before connecting - - virtual CORBA::Boolean handle_postconnect (AVStreams::flowSpec &the_spec); - // called after connecting - - virtual int handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - - virtual int handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - -}; - -class ttcp_Client_StreamEndPoint; - -class ttcp_Acceptor - :public virtual ACE_Acceptor -{ -public: - ttcp_Acceptor (ttcp_Client_StreamEndPoint *endpoint); - - virtual int make_svc_handler (ttcp_Client_StreamEndPoint *&sh); -private: - ttcp_Client_StreamEndPoint *endpoint_; -}; - -class Client; - -class ttcp_Client_StreamEndPoint - :public Client_StreamEndPoint, - public virtual ACE_Svc_Handler -{ -public: - ttcp_Client_StreamEndPoint (Client *client =0); - // constructor - virtual CORBA::Boolean handle_preconnect (AVStreams::flowSpec &the_spec); - // called before connecting - - virtual CORBA::Boolean handle_postconnect (AVStreams::flowSpec &the_spec); - // called after connecting - - virtual int open (void *); - // called when server connects to us. -private: - ttcp_Acceptor acceptor_; - // The Acceptor. - - Client *client_; -}; -class ttcp_Endpoint_Reactive_Strategy_A - : public TAO_AV_Endpoint_Reactive_Strategy_A -{ -public: - ttcp_Endpoint_Reactive_Strategy_A (TAO_ORB_Manager *orb_manager, - Client *client_ptr); - // constructor . The orb manager is needed for the TAO_AV_Endpoint_Reactive_Strategy_A. - - virtual int make_stream_endpoint (ttcp_Client_StreamEndPoint *& endpoint); - // hook to make our streamendpoint taking a Client pointer -private: - Client *client_; - // pointer to command handler object -}; - - -class Client : public ACE_Task -// one of these per client thread -{ -public: - Client (int argc, char **argv, ACE_Barrier *barrier); - - virtual int svc (void); - - void set_stream (ACE_SOCK_Stream & stream); -private: - - int parse_args (int argc,char **argv); - int bind_to_server (void); - - int establish_stream (void); - - - TAO_ORB_Manager orb_manager_; - - TAO_Naming_Client my_name_client_; - - // ttcp_Endpoint_Reactive_Strategy_A reactive_strategy_; - - TAO_AV_Endpoint_Reactive_Strategy_A reactive_strategy_; - - AVStreams::MMDevice_var server_mmdevice_; - - TAO_MMDevice client_mmdevice_; - - TAO_StreamCtrl streamctrl_; - // Video stream controller - - int argc_; - - char **argv_; - - int block_size_; - // size of the block to be sent in Kilobytes. - - int number_; - // number of times to send the block - - ACE_Barrier *barrier_; - - ACE_SOCK_Stream stream_; -}; - -#endif /* TAO_AV_BENCH_CLIENT_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/clnt.conf b/TAO/orbsvcs/tests/AVStreams/benchmark/clnt.conf deleted file mode 100644 index 9cf02c946d4..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/clnt.conf +++ /dev/null @@ -1,49 +0,0 @@ -# -# This file contains a sample ACE_Service_Config configuration -# file specifying the strategy factories utilized by an application -# using TAO. There are currently only two possible factories: -# Client_Strategy_Factory and Server_Strategy_Factory. These names -# must be used as the second argument to their corresponding line, -# because that's what the ORB uses to find the desired factory. -# -# Note that there are two unordinary characteristics of the way *this* -# file is set up: -# - both client and server strategies are specified in the same -# file, which would only make sense for co-located clients & servers -# - both of the factories are actually sourced out of libTAO.so -# (TAO.DLL on Win32), and they would normally be in a separate -# dll from the TAO ORB Core. -# -# The options which can be passed to the Resource Factory are: -# -# -ORBresources -# where can be 'global' to specify globally-held resources, -# or 'tss' to specify thread-specific resources. -# -# The options which can be passed to the Client are: -# -# -# The options which can be passed to the Server are: -# -# -ORBconcurrency -# where can be 'thread-per-connection' to specify -# use of the ACE_Threaded_Strategy concurrency strategy, -# or 'reactive' to specify use of the ACE_Reactive_Strategy -# concurrency strategy. -# -# -ORBthreadflags -# specifies the default thread flags to use, where is a -# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP, -# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid -# on every platform. -# -# -ORBdemuxstrategy -# where can be one of 'dynamic', 'linear', 'active', or 'user', -# and specifies the type of object lookup strategy used internally. -# -ORBtablesize -# specifies the size of the object table -# -dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources tss" -dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBsystemidpolicydemuxstrategy dynamic -ORBtablesize 128" - diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp b/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp deleted file mode 100644 index 2a785294dd2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp +++ /dev/null @@ -1,257 +0,0 @@ -// $Id$ - -#include "server.h" -#include "tao/Timeprobe.h" - -ACE_RCSID(benchmark, server, "$Id$") - -// AV_Server_Sig_Handler routines - -AV_Server_Sig_Handler::AV_Server_Sig_Handler (void) -{ -} - -int -AV_Server_Sig_Handler::register_handler (void) -{ - // Assign the Sig_Handler a dummy I/O descriptor. Note that even - // though we open this file "Write Only" we still need to use the - // ACE_Event_Handler::NULL_MASK when registering this with the - // ACE_Reactor (see below). - this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY); - ACE_ASSERT (this->handle_ != -1); - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) sig_handler == %d\n",this->handle_)); - - // Register signal handler object. Note that NULL_MASK is used to - // keep the ACE_Reactor from calling us back on the "/dev/null" - // descriptor. - - if (TAO_ORB_Core_instance ()->reactor ()->register_handler - (this, ACE_Event_Handler::NULL_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - - // handles these signals. - // this->sig_set.fill_set (); - this->sig_set.sig_add (SIGCHLD); - this->sig_set.sig_add (SIGBUS); - this->sig_set.sig_add (SIGINT); - this->sig_set.sig_add (SIGTERM); - - // Register the signal handler object to catch the signals. if - if (TAO_ORB_Core_instance ()->reactor ()->register_handler - (this->sig_set, this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - return 0; -} - -// Called by the ACE_Reactor to extract the fd. -ACE_HANDLE -AV_Server_Sig_Handler::get_handle (void) const -{ - return this->handle_; -} - -int -AV_Server_Sig_Handler::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n")); - return 0; -} - -int -AV_Server_Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n")); - return 0; -} - -// This method handles all the signals that are being caught by this -// object. In our simple example, we are simply catching SIGALRM, -// SIGINT, and SIGQUIT. Anything else is logged and ignored. -// -// There are several advantages to using this approach. First, -// the behavior triggered by the signal is handled in the main event -// loop, rather than in the signal handler. Second, the ACE_Reactor's -// signal handling mechanism eliminates the need to use global signal -// handler functions and data. - -int -AV_Server_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum)); - - // switch (signum) -// { -// case SIGCHLD: -// // Handle the death of child signal. -// this->clear_child (SIGCHLD); -// break; -// case SIGBUS: -// // Handle the Bus error signal -// case SIGINT: -// // Handle the interrupt signal -// case SIGTERM: -// // Handle the process termination signal. -// this->int_handler (signum); -// break; -// default: -// // ACE_DEBUG ((LM_DEBUG, "(%P|%t) %S: not handled, returning to program\n", signum)); -// break; -// } - return 0; -} - -AV_Server_Sig_Handler::~AV_Server_Sig_Handler (void) -{ - TAO_ORB_Core_instance ()->reactor ()->remove_handler (this->sig_set); -} - - -//------------------------------------------------------------ -Server::Server (void) - // :process_strategy_ (&process_options_) - :reactive_strategy_(&orb_manager_) -{ - this->process_options_.command_line ("./child -ORBport 0 -ORBobjrefstyle url"); -} - - -// Initializes the mpeg server -int -Server::init (int argc, - char *argv[], - CORBA::Environment& env) -{ - int result; - - // Initialize the orb_manager - this->orb_manager_.init_child_poa (argc, - argv, - "child_poa", - env); - TAO_CHECK_ENV_RETURN (env, - -1); - - CORBA::ORB_var orb = - this->orb_manager_.orb (); - - PortableServer::POA_var child_poa = - this->orb_manager_.child_poa (); - - // Initialize the naming services - - if (my_name_client_.init (orb.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - // Register the video mmdevice object with the ORB - ACE_NEW_RETURN (this->mmdevice_, - // TAO_MMDevice (&this->process_strategy_), - TAO_MMDevice (&this->reactive_strategy_), - -1); - - // create the video server mmdevice with the naming service pointer. - this->orb_manager_.activate_under_child_poa ("Bench_Server_MMDevice", - this->mmdevice_, - env); - TAO_CHECK_ENV_RETURN (env,-1); - - // Register the mmdevice with the naming service. - CosNaming::Name server_mmdevice_name (1); - server_mmdevice_name.length (1); - server_mmdevice_name [0].id = CORBA::string_dup ("Bench_Server_MMDevice"); - - // Register the video control object with the naming server. - this->my_name_client_->bind (server_mmdevice_name, - this->mmdevice_->_this (env), - env); - - if (env.exception () != 0) - { - env.clear (); - this->my_name_client_->rebind (server_mmdevice_name, - this->mmdevice_->_this (env), - env); - TAO_CHECK_ENV_RETURN (env,-1); - } -// result = this->signal_handler_.register_handler (); - -// if (result < 0) -// ACE_ERROR_RETURN ((LM_ERROR, -// "(%P|%t) Error registering signal handler"), -// -1); - return 0; -} - -// Runs the mpeg server -int -Server::run (CORBA::Environment& env) -{ - int result; - // Run the ORB event loop - while (1) - { - this->orb_manager_.run (env); - if (errno== EINTR) - continue; - else - break; - } - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Server::run () " - "came out of the (ORB) " - "event loop %p\n", - "run_event_loop")); - return 0; - -} - -Server::~Server (void) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Server: Removing handlers from the Reactor\n")); - - if (this->mmdevice_ != 0) - delete this->mmdevice_; - -} - - -int -main (int argc, char **argv) -{ - Server server; - TAO_TRY - { - if (server.init (argc, argv, TAO_TRY_ENV) == -1) - return 1; - TAO_CHECK_ENV; - - server.run (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Bench_Server::Exception"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class TAO_AV_Endpoint_Reactive_Strategy; -template class TAO_AV_Endpoint_Reactive_Strategy_B; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy_B -#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/server.h b/TAO/orbsvcs/tests/AVStreams/benchmark/server.h deleted file mode 100644 index d311a84a357..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/server.h +++ /dev/null @@ -1,101 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -// NOTE: If you encounter trouble resolving the Naming Service, try -// running the Naming Service and the server in the same window. [MJB] - - -#ifndef TAO_AV_BENCH_SERVER_H -#define TAO_AV_BENCH_SERVER_H - - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_CODgram.h" -#include "ace/Select_Reactor.h" -#include "orbsvcs/orbsvcs/Naming/Naming_Utils.h" -#include "orbsvcs/AV/AVStreams_i.h" -#include "orbsvcs/AV/Endpoint_Strategy.h" -#include "client.h" -#include "child.h" - -class AV_Server_Sig_Handler - : public virtual ACE_Event_Handler -{ -public: - AV_Server_Sig_Handler (void); - - virtual ACE_HANDLE get_handle (void) const; - - int register_handler (void); - // this will register this sig_handler - // with the reactor for SIGCHLD,SIGTERM,SIGINT - - virtual int shutdown (ACE_HANDLE, - ACE_Reactor_Mask); - - virtual int handle_input (ACE_HANDLE); - // handle input on the dummy handle. - - virtual int handle_signal (ACE_HANDLE signum, - siginfo_t * = 0, - ucontext_t* = 0); - // handles the SIGCHLD,SIGTERM,SIGINT for the parent process i.e - // the main thread.. - ~AV_Server_Sig_Handler (void); - // Destructor - -private: - ACE_HANDLE handle_; - // dummy handle for the sig handler. - ACE_Sig_Set sig_set; -}; - -class Server -{ -public: - Server (void); - // Default constructor - - int init (int argc, - char **argv, - CORBA::Environment& env); - - int run (CORBA::Environment& env); - - ~Server (void); -private: - TAO_ORB_Manager orb_manager_; - // the TAO ORB manager. - - TAO_Naming_Client my_name_client_; - // The TAO Naming server - - //CosNaming::NamingContext_var naming_context_; - // The root naming context of the naming service - - // AV_Server_Sig_Handler signal_handler_; - - ACE_Process_Options process_options_; - // The process options for the process to be spawned by the process strategy - - // TAO_AV_Endpoint_Process_Strategy_B process_strategy_; - // The proces strategy for the video. - - TAO_AV_Endpoint_Reactive_Strategy_B reactive_strategy_; - // Reactive strategy - - TAO_MMDevice *mmdevice_; - // The video server multimedia device -}; - -#endif /* TAO_AV_BENCH_SERVER_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/svc.conf b/TAO/orbsvcs/tests/AVStreams/benchmark/svc.conf deleted file mode 100644 index d1b13ee07cd..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/svc.conf +++ /dev/null @@ -1,50 +0,0 @@ -# $Id$ -# -# This file contains a sample ACE_Service_Config configuration -# file specifying the strategy factories utilized by an application -# using TAO. There are currently only two possible factories: -# Client_Strategy_Factory and Server_Strategy_Factory. These names -# must be used as the second argument to their corresponding line, -# because that's what the ORB uses to find the desired factory. -# -# Note that there are two unordinary characteristics of the way *this* -# file is set up: -# - both client and server strategies are specified in the same -# file, which would only make sense for co-located clients & servers -# - both of the factories are actually sourced out of libTAO.so -# (TAO.DLL on Win32), and they would normally be in a separate -# dll from the TAO ORB Core. -# -# The options which can be passed to the Resource Factory are: -# -# -ORBresources -# where can be 'global' to specify globally-held resources, -# or 'tss' to specify thread-specific resources. -# -# The options which can be passed to the Client are: -# -# -# The options which can be passed to the Server are: -# -# -ORBconcurrency -# where can be 'thread-per-connection' to specify -# use of the ACE_Threaded_Strategy concurrency strategy, -# or 'reactive' to specify use of the ACE_Reactive_Strategy -# concurrency strategy. -# -# -ORBthreadflags -# specifies the default thread flags to use, where is a -# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP, -# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid -# on every platform. -# -# -ORBsystemidpolicydemuxstrategy -# where can be one of 'dynamic', 'linear', 'active', or 'user', -# and specifies the type of object lookup strategy used internally. -# -ORBtablesize -# specifies the size of the object table -# -dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global" -dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency thread-per-connection -ORBsystemidpolicydemuxstrategy dynamic -ORBtablesize 128" - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL.UCB b/TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL.UCB deleted file mode 100644 index 38a656a538b..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/INSTALL.UCB +++ /dev/null @@ -1,105 +0,0 @@ -These are the instructions for compiling mpeg_play, the software MPEG -decoder and player. - -1) Untar the file mpeg_play.tar.Z. This is best done by creating a new -directory for the files involved, moving the tar file into this directory -and invoking the command: - - zcat mpeg_play-2.0.tar.Z | tar xvf - - -2) Create and customize the Makefile. Do this by copying the file -Makefile.proto to Makefile. Then edit Makefile for your particular needs. - -In the makefile the CFLAGS definition is multiply defined for a couple of -different machines, uncomment the one you want to use, or define your own -if necessary. - -The INCLUDEDIR variable should be set to include the paths leading to the -standard header files such as stdio.h as well as to X11/Xlib.h (on most -systems, this is /usr/include). To do this set the INCLUDEDIR variable to --I followed by the pathname. For example, if the path is /usr/local/include, -edit the Makefile to look like this: - - INCLUDEDIR = -I/usr/local/include - -If more than one pathname is necessary, simply prepend -I to each path. -For example if you needed to include /usr/local/include and /usr/X11/include, -the variable definition would look like: - - INCLUDEDIR = -I/usr/local/include -I/usr/X11/include - -Finally, make sure the LIBS variable is set to the path and name of your X11 -library. For example: - - LIBS = /usr/lib/X11/libX11.a - -3) Type make all. - -4) To remove .o files, type make clean - -5) Add yourself to the mailing list by sending mail to - mpeg-list-request@roger-rabbit.cs.berkeley.edu with the subject line - "ADD" (you can delete yourself by sending the subject line "DEL"). - If you are a uunet user, you can use the mail path - 'uunet!ucbvax!roger-rabbit.cs!mpeg-list-request' - - mail mpeg-list-request@roger-rabbit.cs.berkeley.edu - Subject: ADD - ^D - -6) Try it out! You can ftp some sample data files from the same site - you got this player from. Data files usually end in .mpg or .mpeg - The command line for the player is described in the man page, but - is basically: - - mpeg_play [options] [file_name] - -7) If you want the player to collect statistics on size of frames, - macroblocks, time to decode, etc., add the following to the - definition of CFLAGS in the Makefile: - -DANALYSIS - Remove all .o files with "make clean" and remake with "make all" - The player will now print summarized statistics at the end of the - video clip and can be made to print frame by frame statistics with - the use of the -eachstat flag. Read man page for more info. ------------------------------------------------------------------------- - -Using Imake - -We have included an Imakefile for use with Imake. Since we do not use -Imake ourselves and the file was provided by someone else, we can not -give any specific instructions on how to use it. Please, consult -someone more experienced with Imake. -Thanks. - ------------------------------------------------------------------------- -NOTES - -It seems that much of the time is spent converting the 24 bit MPEG image -to an 8 bit color space. This process is called "dithering". We've included -several dithering algorithms. Read the man pages for more instructions. - -The data files available are produced by XING. These images are -usually small (~160X120). XING data does not take advantage -of P or B frames (ie, frames with motion compensation). The data is simply -a series of I frames. Performance of the player on XING data is -significantly lower (half or less) of the performance when motion compensated -MPEG data is decoded. - -Reporting bugs: - If you find any bugs in this software, please send them to - mpeg-bugs@roger-rabbit.cs.berkeley.edu. Since this software - is unsupported, we make no guarantees about how long it will - take to fix the bug, or if it will be fixed at all. Bug fixes - will be cheerfully accepted. Please include as much detailed - information as possible, including: - - 1) the version number of the program you are using (cf. VERSION) - 2) the data file that caused the bug (if possible) - 3) the OS version and machine type you ran the program on - 4) the compiler used to compile the program - - - - - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/Makefile deleted file mode 100644 index 1ef96ee944e..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -#$Id$ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 -# -# Makefile for MPEG stuff -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -INFO = README - -DIRS = source \ - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/PatchLevel b/TAO/orbsvcs/tests/AVStreams/mpeg/PatchLevel deleted file mode 100644 index fc8384029fb..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/PatchLevel +++ /dev/null @@ -1,12 +0,0 @@ - -1. Current patch level: version 2.0, patch level 1 - -Sun Jun 9 12:26:16 PDT 1996 - -(1). Port to linux 1.3 -(2). Reduce the number of semaphores used in the client to ONE. -(3). Various bug fix - -2. Patch level: version 2.0, patch level 0 - -Tue Nov 28 14:14:58 PST 1995 diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/README b/TAO/orbsvcs/tests/AVStreams/mpeg/README deleted file mode 100644 index 10a6a29e7d6..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/README +++ /dev/null @@ -1,71 +0,0 @@ -TAO MPEG Player -========================== - -This directory contains the source code for TAO's Audio/Video Mpeg -player. This is written using the TAO's Audio/Video streaming service. - -This is a modified version of the Distributed Audio/video Mpeg player -developed at the Oregon Graduate Institute. For more information about -the original player read README.OGI. - -The MPEG-1 player requires X windows and hence may not work on Windows -platforms. - -To run: -====== - -1. Start the Naming service. - -2. Start mpeg/source/server/server - -3. You can start the player - mpeg/source/client/vcr - -The video and audio files can be either specified on the command line -or be read from a file in - - ~/.vcr/vcrPrograms - -The format of the entries should be like this -Three Stooges-1 -/project/merengue/MPEG_movies/ts1_v.mpg -/project/merengue/MPEG_movies/ts1_a.au - -i.e -Name of the Movie. -Video file path -Audio file path. - -You can download some of the MPEG-1 audio and video files from this -URL. - http://www.cs.wustl.edu/~naga/MPEG_movies - -You can also download the .Info files used by the server to store the -information about the MPEG files. - -If you have the ~/.vcr/vcrPrograms then you can select the Prog button -on the player and select the movie. - -You can also give the audio and video files on the command line like - -vcr -v video_file_path -a audio_file_path. - -Using the Trading Service: -========================== - -The mpeg client can also be run using the Trading service to find the -server which can give the best QoS and other properties. - -But in this case follow the steps in 'To run' above but instead of step 2 do the following two steps: - -1. Start the Trading Service -2. Start the mpeg/source/server/augmented_server - -The files for the Trader Agent are in -$TAO_ROOT/orbsvcs/tests/AVStreams/server_discovery. - -For more instructions read the $TAO_ROOT/orbsvcs/tests/AVStreams/server_discovery/README. - - -Nagarajan Surendran (naga@cs.wustl.edu) -Yamuna Krishnamurthy (yamuna@cs.wustl.edu) diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/README.MI b/TAO/orbsvcs/tests/AVStreams/mpeg/README.MI deleted file mode 100644 index 85a3069e979..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/README.MI +++ /dev/null @@ -1,39 +0,0 @@ -Hello animation addicts, - -I'll be brief. This is the modified source of mpeg_play that has a new motif -user interface (finally!). I hope you will enjoy spending many hours using it! -This is a very rough first release and the source files + make files are not -particularly well organized. You might have to do a lot of hand tweaking to get -it to compile. - -Here are some helpful hints: - -/mib directory contains the source for my mib interface construction toolkit - which is really just a wrapper around motif. This is the majority of the - new code and is the same toolkit I used for the X11 version of Geomview - (3d visualization program), also available via ftp from geom.umn.edu. - -/interface directory contains the bitmaps for buttons, and the interface - geometry specified with .mib files. - -ui.c file contains the code which sets up the interface and processes button - callbacks. - -More minor modifications were made to gdith.c util.c util32.c and video.c. - -To compile you will need a decent compiler (gcc works the best!), as well as -the X11, Xt, and Xm (motif) libraries. - -You must first get mib/libmib.a to be created. The Makefile in /mib should take -care of this when properly tweaked. The main makefile should handle linking the -library into the mpeg_play binary. - -If you have any questions or need help with the compile feel free to send me -mail, but I may take a while to respond. I tend to correspond with quite a -few people about many different things. - -best wishes, - -Daeron Meyer - -daeron@geom.umn.edu diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/README.OGI b/TAO/orbsvcs/tests/AVStreams/mpeg/README.OGI deleted file mode 100644 index 26a835dac7f..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/README.OGI +++ /dev/null @@ -1,142 +0,0 @@ - Distributed real-time MPEG video audio player v2.0 - - Distributed Systems Research Group - Department of Computer Science and Engineering - Oregon Graduate Institute of Science & Technology - November, 1995 - - -This directory contains a freely available software distributed -real-time MPEG video and audio player, for use across the -Internet. Please install it, run it, play movies and music, and have -fun ! - -The player features common VCR functionalities like synchronized video -and audio play back, play speed change on the fly, fast-forward, rewind, -step forward, random Positioning, and more. - -This version of the player plays MPEG1 video (elementary stream) and -Sun Sparc format (mu-law) audio. It does not play MPEG1 system streams -or MPEG2 streams yet. - -The player is of server/client architecture, with audio/video servers -and a client distributed across the Internet. The server manages audio -video file retrieval and distribution. The client decodes video -frames, plays video and audio streams, and provides a Motif style user -interface. - -The servers stream out media data to clients, so there is NO NEED to -download all bits beforehand. - -Some important characteristics of Internet are resource sharing, -highly dynamic workload, no resource reservation facility, and lack of -a common clock. This player uses novel software feedback mechanisms -to synchronize servers and clients, and to adapt playback quality to -the current Internet workload. - - -As compared to version 1.0, this version has following improvements: - - - UDP/TCP video audio data connection choice - - support of both native audio device and AudioFile - - client invocable from web browser - - better organized source code tree - - bug fix - - and more... - - -The player has been compiled and tested on following architectures: - - HP-UX 09.03 - SunOS 4.1.3_U1 (sparc) - Solaris 2.3 (sparc) - Solaris 2.4 (i86pc) - Solaris 2.4 (sparc) - Ultrix 4.x - FreeBSD 2.0.5 - LINUX 1.3 - -If you decide to port the player to a new architecture, please let -us know so that we can incorporate the changes into our sources. - - -The player is publicly available via anonymous ftp from: - - ftp.cse.ogi.edu (129.29.20.2) in /pub/dsrg/Player/ - -or through following WWW pointer: - - http://cse.ogi.edu/DISC/projects/synthetix/Player/ - -To install the player, ftp file vcr.tar.Z to local host, move it to a -suitable directory (best to create a new directory for this software), -uncompress and untar the .Z file, and see INSTALL for instructions. -Following is an example of steps to ftp and untar the package: - - % mkdir vcr - % cd vcr - % ftp ftp.cse.ogi.edu - *** login as anonymous and your email address as passwd *** - ftp> cd pub/dsrg/Player - ftp> binary - ftp> get README - ftp> get vcr.tar.Z - ftp> quit - % gunzip vcr.tar.Z (or you may also use 'uncompress vcr.tar.Z') - % tar xf vcr.tar - -Binary code for platforms HPUX, Solaris 2.4 for x86, Solaris 2.x for -Sparc, SunOS4.1.3 and FreeBSD are also available in directory -/pub/dsrg/Player/binaries/. - - -This software is covered by copyrights. It contains code contributed -by the author and several other parties. Please see the beginning of -source files and copyright file(s) in the root directory of the source -tree for more information. - - -Please add yourself to our mailing list by sending a mail (with your -name and address) to following address, so that we can keep you -informed of software upgrade and bug fix. - - scen@cse.ogi.edu - - -We would highly appreciate it if you can share with us the performance -result you get when you play movies retrieved from the OGI -server. Please let us know following information: - - - The platform you use for the client. - - - How many hops from your site to OGI, and what is the - estimated bandwidth, - - - Which picture size (320x240, 256x192, 128x96 or 64x48) - works best for you, and on average how many - frames-per-second can be displayed. - - - Questions, comments, suggestions, and bug report. - -Information can also be sent to: scen@cse.ogi.edu Thank you! - - -ACKNOWLEDGMENT - -We gratefully thank ARPA and the National Science Foundation for their -financial support, and thank Tektronix, Hewlett-Packard and the -Portland Trail Blazers for their donations. - -We also want to thank following people for their code: - - Lawrence A. Rowe, Ketan Patel, and Brian Smith of Computer Science - Division-EECS, Univ. of Calif. at Berkeley. The MPEG decoder used by - the client of the player is originated from their MPEG decoder 2.0 - - Thomas M. Levergood, Andrew C. Payne, James Gettys, G. Winfield - Treese, and Lawrence C. Stewart of Cambridge Research Lab, Digital - Equipment Corporation. The player uses AudioFile as audio output. - - Daeron Meyer of the Geometry Center, University of Minnesota. The - Motif user interface is based on his version. - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/README.UCB b/TAO/orbsvcs/tests/AVStreams/mpeg/README.UCB deleted file mode 100644 index 3c122f92421..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/README.UCB +++ /dev/null @@ -1,105 +0,0 @@ - MPEG Video Software Decoder - (Version 2.0; Jan 27, 1993) - - Lawrence A. Rowe, Ketan Patel, and Brian Smith - Computer Science Division-EECS, Univ. of Calif. at Berkeley - -This directory contains a public domain MPEG video software -decoder. The decoder is implemented as a library that will -take a video stream and display it in an X window on an 8, 24 -or 32 bit deep display. The main routine is supplied to -demonstrate the use of the decoder library. Several dithering -algorithms are supplied based on the Floyd-Steinberg, ordered -dither, and half-toning algorithms that tradeoff quality and -performance. Neither the library nor the main routine handle -real-time synchronization or audio streams. - -The decoder implements the standard described in the Committee -Draft ISO/IEC CD 11172 dated December 6, 1991 which is -sometimes refered to as "Paris Format." The code has been -compiled and tested on the following platforms: - - HP PA-RISC (HP/UX 8.X, X11R4) (i.e., HP 9000/7XX and 9000/3XX) - Sun Sparc (SunOS 4.X, X11R5) - DECstation 5000 and Alpha - IBM RS6000 - Silicon Graphics Indigo - MIPS RISC/os 4.51 - Sequent Symmetry - Sony NEWS - and more than we can list here. - -If you decide to port the code to a new architecture, please let -us know so that we can incorporate the changes into our sources. - -This directory contains everything required to build and -display video. We have included source code, a makefile, an Imakefile, -installation instructions, and a man page. Data files can -be obtained from the same ftp site this was located in. -See the INSTALL file for instructions on how to -compile and run the decoder. - -The data files were produced by XING. XING data does not take -advantage of P or B frames (ie, frames with motion compensation). -Performance of the player on XING data is significantly slower -(half or less) than the performance when motion compensated MPEG -data is decoded. We are very interested in running the software -on other MPEG streams. Please contact us if you have a stream -that does not decode correctly. Also, please send us new streams -produced by others that do utilize P and B frames. - -NOTE: One particular XING data file: raiders.mpg, is not a -valid MPEG stream since it does not contain a sequence -header. - -We have established several mailing lists for messages about -the decoder: - -mpeg-list-dist@CS.Berkeley.EDU - General information on the decoder for everyone interested - should be sent to this list. This should become active after - 11/20/92 - -mpeg-list-request@CS.Berkeley.EDU - Requests to join or leave the list should be sent to this - address. The subject line should contain the single word - ADD or DELETE. - -mpeg-bugs@CS.Berkeley.EDU - Problems, questions, or patches should be sent to this address. - -Our future plans include porting the decoder to run on other -platforms, integrating it into a video playback system that -supports real-time synchronization and audio streams, and -further experiments to improve the performance of the -decoder. Vendors or other organizations interested in supporting -this research or discussing other aspects of this project should -contact Larry Rowe at Rowe@CS.Berkeley.EDU. - -We also plan on producing an MPEG encoder. The encoder will NOT be -a real time digitizer, but will be intended for offline processing -of video data. - -ACKNOWLEDGEMENTS: - We gratefully thank Hewlett-Packard, Fujitsu, the Semiconductor - Research Corporation for financial support. - - We also want to thank the following people for their help: - - Tom Lane of the Independent JPEG Group provided us with - the basic inverse DCT code used by our player. - (tom_lane@g.gp.cs.cmu.edu) - - Reid Judd of Sun Microsystems provided advice and assistance. - - Todd Brunhoff of NVR provided advise and assistance. - - Toshihiko Kawai of Sony provided advise and assistance. - - - - - - - - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile deleted file mode 100644 index 87bb8105ba2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -## $Id$ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 -# -# Makefile for MPEG stuff -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -INFO = README - -DIRS = mpeg_shared \ - mpeg_mib \ - mpeg_server \ - mpeg_client \ - client \ - server - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU - - - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/TODO b/TAO/orbsvcs/tests/AVStreams/mpeg/source/TODO deleted file mode 100644 index 83369830726..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/TODO +++ /dev/null @@ -1,50 +0,0 @@ -$Id$ - -Use - for things to do, * for urgent things, and + for things that -have been done. - - -Bugs ----- - -+ States problem -- pressing play twice screws up, position is not working -+ client blocks forever while exiting sometimes (often after the above) -+ vs, as don't die as a result of the above -+ server segfaults if addr is already in use - - -- IF peer i.e client aborts connection for some reason the as and vs -processes should die. It currently prints the message peer probably -aborted connection in which case we can try to exit the process. - -Things to do ------------- - -"Simple" things - - -- Make #define's into enums in common.h/globals.h - -+ try compiling ACE and the application with fast=1 to see if - performance improves - -- Rename "play", "play_send" etc. appropriately - - - -"Not-so-simple" things - - -+ Logic for Video_Server is convoluted!! - -+ Need to modularize Audio_Server - -+ Seperate command parsing in its own class - -Naga: ----- -- handle leaks on the server side. - -+ handle leak on the client side due to Naming Service. - - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/Makefile deleted file mode 100644 index a87e5ee911f..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/Makefile +++ /dev/null @@ -1,138 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -MAKEFILE = Makefile -BIN = vcr - -BUILD = $(BIN) - -# On non-Windows environment, we should at least define -# the export_include IDL flag. -FILES= vcr - -DEFS = $(addsuffix .h,$(FILES)) -LSRC = $(addsuffix .cpp,$(FILES)) - - -LIBS += -lTAO -lACE -lorbsvcs -MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source -CPPFLAGS += -I$(MPEG_ROOT) - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets (and local hacks) -#---------------------------------------------------------------------------- - -LDFLAGS += -lmpeg_shared -lmpeg_mib -lmpeg_client -lXm -lXext -lXt -lSM -lICE -lX11 -lsocket -lnsl -ldl -CPPFLAGS += -i -DSH_MEM -DNDEBUG -I/project/doc/pkg/X11/include -L/project/doc/pkg/X11/lib - -clean: - -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state - -realclean: clean - -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES)) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/vcr.o .obj/vcr.so .shobj/vcr.o .shobj/vcr.so: vcr.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/svc.conf b/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/svc.conf deleted file mode 100644 index 8351e282782..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/svc.conf +++ /dev/null @@ -1,49 +0,0 @@ -# $Id$ -# -# This file contains a sample ACE_Service_Config configuration -# file specifying the strategy factories utilized by an application -# using TAO. There are currently only two possible factories: -# Client_Strategy_Factory and Server_Strategy_Factory. These names -# must be used as the second argument to their corresponding line, -# because that's what the ORB uses to find the desired factory. -# -# Note that there are two unordinary characteristics of the way *this* -# file is set up: -# - both client and server strategies are specified in the same -# file, which would only make sense for co-located clients & servers -# - both of the factories are actually sourced out of libTAO.so -# (TAO.DLL on Win32), and they would normally be in a separate -# dll from the TAO ORB Core. -# -# The options which can be passed to the Resource Factory are: -# -# -ORBresources -# where can be 'global' to specify globally-held resources, -# or 'tss' to specify thread-specific resources. -# -# The options which can be passed to the Client are: -# -# -# The options which can be passed to the Server are: -# -# -ORBconcurrency -# where can be 'thread-per-connection' to specify -# use of the ACE_Threaded_Strategy concurrency strategy, -# or 'reactive' to specify use of the ACE_Reactive_Strategy -# concurrency strategy. -# -# -ORBthreadflags -# specifies the default thread flags to use, where is a -# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP, -# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid -# on every platform. -# -# -ORBsystemidpolicydemuxstrategy -# where can be one of 'dynamic', 'linear', 'active', or 'user', -# and specifies the type of object lookup strategy used internally. -# -ORBtablesize -# specifies the size of the object table -# -dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global" -dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBsystemidpolicydemuxstrategy dynamic -ORBtablesize 128" diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/vcr.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/vcr.cpp deleted file mode 100644 index 728d3c5103b..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/client/vcr.cpp +++ /dev/null @@ -1,465 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#include -#include -#include -#include -#include -#include -#include -#ifndef MIPS -#include -#else -#include -#endif -#if defined(sun) || defined(FreeBSD) -#include -#endif -#include -#include -#include -#include -#include - -#include "include/common.h" - -#include "mpeg_client/video.h" -#include "mpeg_client/proto.h" -#include "mpeg_client/newproto.h" -#include "mpeg_client/global.h" - -#include "mpeg_client/util.h" -#include "mpeg_client/dither.h" - -#include "mpeg_shared/routine.h" -#include "mpeg_client/ab.h" - -ACE_RCSID(client, vcr, "$Id$") - -static int mainPid; -int orig_argc; -char **orig_argv; - -static time_t start_time; -/* - *-------------------------------------------------------------- - * - * usage -- - * - * Print mpeg_play usage - * - * Results: - * None. - * - * Side effects: - * exits with a return value -1 - * - *-------------------------------------------------------------- - */ - -void -usage(char *s) /* program name */ -{ - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "%s [-rt] [-shmem] [-rmsem]\n", s); - fprintf(stderr, " [-dither ordered|ordered2|fs4|fs2|fs2fast|hybrid|\n"); - fprintf(stderr, " hybrid2|2x2|gray|color|mono|threshold]\n"); - fprintf(stderr, " [X-window options]\n"); - fprintf(stderr, " [-v video_file_name]\n"); - fprintf(stderr, " [-a audio_file_name]\n"); - - fprintf(stderr, " [-p movie_file_name]\n"); - fprintf(stderr, " [-l movie_list_file_name]\n"); - - fprintf(stderr, " [-help]\n"); - fprintf(stderr, " [-quiet]\n"); - - exit (-1); -} - -/* - *-------------------------------------------------------------- - * - * int_handler -- - * - * Handles Cntl-C interupts.. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -static int on_exit_tag = 1; -extern AudioBuffer *abuffer; -extern VideoBuffer *vbuffer; - -void set_exit_routine_tag(int tag) -{ - on_exit_tag = tag; -} - -void on_exit_routine(void) -{ - ACE_DEBUG ((LM_DEBUG,"(%P)on_exit_routine")); - if (!on_exit_tag) - return; - if (mainPid ==ACE_OS::getpid ()) - { - extern void delete_semaphore(); - abuffer->ABdeleteSem (); - vbuffer->VBdeleteSem (); - VDdeleteSem(); - delete_semaphore(); - if (getuid() != DEVELOPER_UID) - { - FILE * fp; - char *buf = (char *)ACE_OS::malloc(100); - char *tbuf; - if (buf != NULL) { - sprintf(buf, "%s%s", LOG_DIR, "vcrSession.log"); - if ((fp = fopen(buf, "a")) != NULL) { - time_t val =ACE_OS::time (NULL); - get_hostname(buf, 100); - buf[99] = 0; - tbuf = ACE_OS::ctime (&start_time); - tbuf[strlen(tbuf) - 1] = 0; - fprintf(fp, "User %d on %s at %s %dm%ds\n", ACE_OS::getuid (), buf, - tbuf, (val - start_time) / 60, (val - start_time) % 60); - } - ACE_OS::free (buf); - } - } - } - on_exit_tag = 0; - cerr << "Main process sending SIGINT\n"; - ACE_OS::kill (0, SIGINT); -} - -static void int_handler(int sig) -{ - ACE_OS::exit (0); -} - -static void clear_child(int sig) -{ - int pid; - int status; - - while ((pid = ACE_OS::waitpid (-1, &status, WNOHANG)) > 0) - { - if (status == 0) { - continue; - } - fprintf(stderr, "VCR: child %d (status %d) ", pid, status); - if (WIFEXITED(status)) { - fprintf(stderr, "exited with status %d\n", WEXITSTATUS(status)); - } - else if (WIFSIGNALED(status)) { -#if defined(_HPUX_SOURCE) || defined(__svr4__) || defined(IRIX) - fprintf(stderr, "terminated at signal %d%s.\n", WTERMSIG(status), - WCOREDUMP(status) ? ", core dumped" : ""); -#else - fprintf(stderr, "terminated at signal %d.\n", WTERMSIG(status)); -#endif - } - else if (WIFSTOPPED(status)) { - fprintf(stderr, "stopped at signal %d\n", WSTOPSIG(status)); - } - - } -} - -/* - *-------------------------------------------------------------- - * - * main -- - * - * Parses command line, starts decoding and displaying. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -int main(int argc, char ** argv) -{ - - int mark; - int rmsemFlag = 0; - - argc_share = argc; - argv_share = argv; - - orig_argc = argc; - orig_argv = argv; - mark = 1; - argc--; - - displayName[0] = 0; - ditherType = ORDERED2_DITHER; - LUM_RANGE = 8; - CR_RANGE = CB_RANGE = 4; - noDisplayFlag = 0; - -#ifdef SH_MEM - shmemFlag = 0; -#endif - - while (argc) { - if (ACE_OS::strcmp (argv[mark], "-rt") == 0) { - realTimeFlag = 1; - argc--; mark++; - } - else if (ACE_OS::strcmp (argv[mark], "-rt1") == 0) { - realTimeFlag = 2; - argc--; mark++; - } - else if (ACE_OS::strcmp (argv[mark], "-rt2") == 0) { - realTimeFlag = 3; - argc--; mark++; - } - else if (ACE_OS::strcmp (argv[mark], "-shmem") == 0) { - argc--; mark++; - shmemFlag = 1; - } - else if (ACE_OS::strcmp (argv[mark], "-rmsem") == 0) { - argc--; mark++; - rmsemFlag = 1; - } -#if 0 - else if (ACE_OS::strcmp (argv[mark], "-nop") == 0) { - TogglePFlag(); - argc--; mark++; - } else if (ACE_OS::strcmp (argv[mark], "-nob") == 0) { - ToggleBFlag(); - argc--; mark++; - } -#endif - else if (ACE_OS::strcmp (argv[mark], "-l") == 0) { /* program list file name */ - strcpy(proglistName, argv[++mark]); - argc -= 2; mark++; - - } else if (ACE_OS::strcmp (argv[mark], "-display") == 0) { - strcpy(displayName,argv[++mark]); - argc -= 2; mark++; - } else if (ACE_OS::strcmp (argv[mark], "-dither") == 0) { - argc--; mark++; - if (argc < 1) { - perror("Must specify dither option after -dither flag"); - usage(argv[0]); - } - if (ACE_OS::strcmp (argv[mark], "hybrid") == 0) { - argc--; mark++; - ditherType = HYBRID_DITHER; - } else if (ACE_OS::strcmp (argv[mark], "hybrid2") == 0) { - argc--; mark++; - ditherType = HYBRID2_DITHER; - } else if (ACE_OS::strcmp (argv[mark], "fs4") == 0) { - argc--; mark++; - ditherType = FS4_DITHER; - } else if (ACE_OS::strcmp (argv[mark], "fs2") == 0) { - argc--; mark++; - ditherType = FS2_DITHER; - } else if (ACE_OS::strcmp (argv[mark], "fs2fast") == 0) { - argc--; mark++; - ditherType = FS2FAST_DITHER; - } else if (ACE_OS::strcmp (argv[mark], "hybrid2") == 0) { - argc--; mark++; - ditherType = HYBRID2_DITHER; - } else if (ACE_OS::strcmp (argv[mark], "2x2") == 0) { - argc--; mark++; - ditherType = Twox2_DITHER; - } else if (ACE_OS::strcmp (argv[mark], "gray") == 0) { - argc--; mark++; - ditherType = GRAY_DITHER; - } else if (ACE_OS::strcmp (argv[mark], "color") == 0) { - argc--; mark++; - ditherType = FULL_COLOR_DITHER; - } - /* - else if (ACE_OS::strcmp (argv[mark], "none") == 0) { - argc--; mark++; - ditherType = NO_DITHER; - } - */ - else if (ACE_OS::strcmp (argv[mark], "ordered") == 0) { - argc--; mark++; - ditherType = ORDERED_DITHER; - } else if (ACE_OS::strcmp (argv[mark], "ordered2") == 0) { - argc--; mark++; - ditherType = ORDERED2_DITHER; - } - /* - else if (ACE_OS::strcmp (argv[mark], "mbordered") == 0) { - argc--; mark++; - ditherType = MBORDERED_DITHER; - } - */ - else if (ACE_OS::strcmp (argv[mark], "mono") == 0) { - argc--; mark++; - ditherType = MONO_DITHER; - } else if (ACE_OS::strcmp (argv[mark], "threshold") == 0) { - argc--; mark++; - ditherType = MONO_THRESHOLD; - } else { - perror("Illegal dither option."); - usage(argv[0]); - } - } - else if (ACE_OS::strcmp (argv[mark], "-quiet") == 0) { - argc--; mark++; - quietFlag = 1; - } - else if (ACE_OS::strcmp (argv[mark], "-l_range") == 0) { - argc--; mark++; - LUM_RANGE =ACE_OS::atoi (argv[mark]); - if (LUM_RANGE < 1) { - fprintf(stderr, "Illegal luminance range value: %d\n", LUM_RANGE); - exit(1); - } - argc--; mark++; - } - else if (ACE_OS::strcmp (argv[mark], "-cr_range") == 0) { - argc--; mark++; - CR_RANGE =ACE_OS::atoi (argv[mark]); - if (CR_RANGE < 1) { - fprintf(stderr, "Illegal cr range value: %d\n", CR_RANGE); - exit(1); - } - argc--; mark++; - } - else if (ACE_OS::strcmp (argv[mark], "-cb_range") == 0) { - argc--; mark++; - CB_RANGE =ACE_OS::atoi (argv[mark]); - if (CB_RANGE < 1) { - fprintf(stderr, "Illegal cb range value: %d\n", CB_RANGE); - exit(1); - } - argc--; mark++; - } - else if (ACE_OS::strcmp (argv[mark], "-help") == 0) { - usage(argv[0]); - } - else { - argc--; mark++; - } - /* - else if (argv[mark][0] == '-') { - fprintf(stderr, "Un-recognized flag %s\n",argv[mark]); - usage(argv[0]); - } - */ - /* the input video and audio files with options '-v', '-a' and '-p' are processed - at the end of 'ui.c' */ - } - if (ditherType == MBORDERED_DITHER) - { - fprintf(stderr, "Sorry, mbordered dithertype no longer supported.\n"); - ACE_OS::exit (1); - } - setsignal(SIGPIPE, SIG_IGN); - atexit (on_exit_routine); - - if (rmsemFlag) { - if (geteuid() == 0) { /* root, refuse to remove shm and sem ids */ - fprintf(stderr, "You are ROOT, -rmsem is ignored 'cause it's too dangerous.\n"); - } - else { - char *tmpf = tempnam("/tmp", ""); - if (tmpf != NULL) { - char buf[128]; - FILE *fp; - sprintf(buf, "ipcs >%s", tmpf); - system(buf); - if ((fp = fopen(tmpf, "r")) != NULL) { - while (fgets(buf, 128, fp) != NULL && (int)(strlen(buf)) > 10) { - int id; - sscanf(&buf[1], "%d", &id); - if (buf[0] == 'm') { - ACE_OS::shmctl (id, IPC_RMID, NULL); - } - else if (buf[0] == 's') { - union semun sem_union; - sem_union.val = 0; - ACE_OS::semctl (id, 0, IPC_RMID, sem_union); - } - } - fclose(fp); - ACE_OS::unlink (tmpf); - } - ACE_OS::free (tmpf); - } - } - } - - if (quietFlag) { - if ((freopen("/dev/null", "w", stdout) == NULL) || - (freopen("/dev/null", "w", stderr) == NULL)) { - ACE_OS::exit (10); - } - } - - start_time = ACE_OS::time (NULL); - - ACE_OS::setsid (); /* break controlling terminal and creat a new session */ - - mainPid = ACE_OS::getpid (); - - CTRmain(orig_argc,orig_argv); - - return 0; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h deleted file mode 100644 index a2fbb40b4e2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h +++ /dev/null @@ -1,591 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -#ifndef _MPEG_COMMON_H -#define _MPEG_COMMON_H - -#include "ace/OS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -extern int gethostname (char*, size_t); - -#define VERSION 200 /* version 2.00 */ - -#ifdef LITTLE_ENDIAN -#define NeedByteOrderConversion -#elif !defined(BIG_ENDIAN) -#if (defined(vax) || defined(i386) || defined(i486)) && !defined(NeedByteOrderConversion) -#define NeedByteOrderConversion -#endif -#endif - -/*following is defined so that debuging information is printed out for only - specific user (usually software developer), LOG_DIR is also defined */ - -/* -#define LOG_DIR "/home/shanweic/log/" -#define DEVELOPER_UID 8640 -*/ - -/* %% this is where the logging is done.." */ -#define LOG_DIR "./" -#define DEVELOPER_UID 1735 - -#define SFprintf if ((!getuid()) || getuid() == DEVELOPER_UID) fprintf -#define Fprintf if (shared->config.verbose) fprintf - -#define VCR_TCP_PORT 7101 -#define VCR_UNIX_PORT "/tmp/vcr_unix_port01" -#define VCR_ATM_PORT "3005" - -#define SPEEDUP_INV_SCALE 5 /* VS fast starts at 5/(5-1) normal speed */ - -#define AB_BUF_SIZE (64 * 1024) /* size of client AB buffer */ - -#if 0 -#define VB_BUF_SIZE (256 * 1024) /* Size of client VB buffer */ -#endif - -#define VB_BUF_SIZE (1024 * 1024) /* Size of client VB buffer */ - -#define VD_BUF_SIZE (1024 * 1024) /* Size of client VD buffer */ - -#define PATH_SIZE 256 -#define PATTERN_SIZE 100 -#define MAX_FRAMES 54000 /* half hour video at 30FPS */ -#define MAX_VDQUEUE_SIZE 20 -#define MAX_FB_PACKETS 20 /* max number of feedback packet info collected. */ -#define POSITION_RANGE 100 -#define MSGGAP_MIN -10 /* these are used for recording stat of - msgs received by VB */ -#define MSGGAP_MAX 50 - -#define INET_SOCKET_BUFFER_SIZE 1400 - -/* audio type constants */ - -#define AudioTypeMuLaw 0 -#define AudioTypeALaw 1 -#define AudioTypeRIFF 2 -#define AudioTypeLiner16 3 -#define AudioTypeLiner8 4 -#define AudioTypeLiner8Offset 5 - -/* Video and audio compression format */ - -#define VIDEO_MPEG1 0 -#define VIDEO_MPEG2 1 -#define VIDEO_JPEG 3 -#define VIDEO_SIF 4 - -#define AUDIO_RAW 10 -#define AUDIO_MPEG1 11 -#define AUDIO_MPEG2 12 - - -/* system configuration default values */ - -#define DEFAULT_maxFPS 60 -#define DEFAULT_maxSPS 16000 -#define DEFAULT_ffFPS 150 -#define DEFAULT_fbFPS 150 -#define DEFAULT_feedBackDelay 2000 -#define DEFAULT_audioMask 0x1 -#define DEFAULT_encodeType AudioTypeMuLaw -#define DEFAULT_channels 1 -#define DEFAULT_samplesPerSecond 8000 -#define DEFAULT_bytesPerSample 1 -#define DEFAULT_audioTimerDuration 500 -#define DEFAULT_audioBufferedIntervals 2 -#define DEFAULT_framesPerAudioPlay 4 -#define DEFAULT_audioForward 800 -#define DEFAULT_filterPara 50 -#define DEFAULT_maxSPframes 60 -#define DEFAULT_VStimeAdvance 100 - -#define DEFAULT_volume 0 - -/* audio parameter data structure */ - -typedef struct -{ - int encodeType; - int channels; - int samplesPerSecond; - int bytesPerSample; -} AudioParameter; - -/* client processes shared data structure definition */ - -typedef struct -{ - int VDframeNumber; - int VBbufId, VDbufId; - char * VBbufAddr, * VDbufAddr; - int pixelValid; - unsigned char pixel[256]; /* for transfering pixel value from VP to VD */ - - /* command and status */ - int cmd; - int cmdsn; - int cmdBusy; - - int loopBack; - - int framesPerSecond; /* Frames per second */ - int usecPerFrame; /* micro-seconds per frame, actual video speed */ - int samplesPerSecond; /* Samples per second */ - int usecPerSample; /* micro-seconds per sample, actual audio speed */ - - int volumePosition; - int balancePosition; - int speedPosition; - int locationPosition; - struct hostent audioHost; - char audioPath[PATH_SIZE]; - struct hostent videoHost; - char videoPath[PATH_SIZE]; - - int live; /* non-zero if any of the video/audio streams are live source */ - int videoFormat; - int audioFormat; - - /* video channel parameters */ - int totalFrames; - int totalGroups; - int totalHeaders; - int averageFrameSize; - double pictureRate; - int horizontalSize; - int verticalSize; - int pelAspectRatio; - int vbvBufferSize; - int firstGopFrames; - int patternSize; - char pattern[PATTERN_SIZE]; - int IframeGap; - int VStimeAdvance; - - int lastIframeDecoded; - int sendPatternGops; - char sendPattern[PATTERN_SIZE]; - float frameRateLimit; - int framesDropped; - int qosRecomputes; - - /* video channel status */ - int currentGroup; - int currentFrame; - int currentDisplay; - int nextFrame; - int nextGroup; - - /* audio channel parameters */ - int totalSamples; - AudioParameter audioPara; - - /* audio channel status */ - int nextSample; /* played by AP */ - - /* AudioFile device parameter */ - AudioParameter AFPara; - - int currentUPF; - int rtplay; /* realtime tag, -- VD needs to drop frames when needed */ - int collectStat; /* to indicate if statistics should be collected or not */ - int VBheadFrame; /* ID of last frame put to VBbuffer by VB */ - int needHeader; /* VD requests resending of systerm Header */ - int playRoundTripDelay; /* play round trip time (from issuing play/FF/FB - command to first Decoded frame showup in - VD buffer) estimated by CTR start_timer() */ - int audioMaxPktSize; /* 0 -- reliable byte stream, - >0 - non-discard mode packet stream, - <0 - discard mode packet stream */ - int videoMaxPktSize; - - /* System configuration parameters */ - struct - { - int rt; /* play as fast as possible without dropping frames, - and audio turned off when this tag is set to 0 (zero) - */ - int maxFPS; /* maximum PLAY frames-per-second, this play speed is used - during playback when speed scale is set to 100 */ - int maxSPS; /* similar to maxFPS, used when audio is played without - corresponding video - */ - int ffFPS; /* play speed when Fast forward */ - int fbFPS; /* play speed when fast rewind */ - int feedBackDelay; /* msec, delay of feedback when AB, VB received first - packet, 0 (zero) default to adaptive */ - int audioMask; /* mask for audio output device */ - AudioParameter audioPara; /* default audio parameter by system */ - int audioTimerDuration; /* for audio-only case, miliseconds */ - int audioBufferedIntervals; /* for audio-only case, - audioTimerDuration * audioBufferedIntervals - milliseconds of audio samples will be buffered - in AF buffer - */ - int framesPerAudioPlay; /* for audio-video case, each time, samples corresponding - to this number of video frames will be played */ - int audioForward; /* forward value for audio channel, in AFTime unit - (number of samples), audio channel is played ahead of video - by this number of samples. This is introduce to compensate - the dely to AF in audio channel, and usually should be less - than 1 (one) second, but greater than zero. - */ - int VStimeAdvance; /* target VB buffer level to be mentained (micro-seconds). This - is sent in INIT message to VS, to decide how many frames to - be maintained in VB buffer - */ - float frameRateLimit; /* playback frame rate limit (frames per second) */ - int collectStat; /* tag to collect statistics to file 'stat.n' when set */ - int collectFrameInfo; /* collect MPEG frame info to file 'stat.n' when set*/ - int syncEffective; /* tag to make sync mechanism effective when set */ - int qosEffective; /* tag to make QoS control effective when set */ - int audioOffset; /* offset added to audio channel 'nextSample' when play(). - usually audio and video are not recorded strictly - synchronized. This parameter is to compensate it. The - value can be any integer value. - */ - int filterPara; /* 1/R of Median, nsamples of Mean and Average */ - int maxSPframes; /* max number of frame in a sendPattern */ - int audioConn; /* tag for connection oriented audio data channel */ - int videoConn; /* tag for connection oriented video data channel */ - int verbose; - } config; - -#ifdef STAT - struct - { - unsigned VBmaxBytes; /* max fill level (bytes) in VB */ - unsigned VBdroppedFrames; /* accumulative total number of frames dropped by VB - because VB buffer full */ - unsigned VBemptyTimes; /* number of time VD fail to get a frame from VB - immediately */ - unsigned VDnoRef; /* # of frames without reference */ - unsigned VDagainstSendPattern; /* # of frames against send pattern */ - unsigned VDtooLateI; /* # of I frames dropped 'cause too late */ - unsigned VDtooLateP; /* # of P frames dropped 'cause too late */ - unsigned VDtooLateB; /* # of B frames dropped 'cause too late */ - unsigned VDlastFrameDecoded; /* ID of last frame decoded by VD */ - unsigned CTRdropLate; - unsigned CTRdropOutOrder; - unsigned CTRdispOnTime; - unsigned CTRdispLate; - unsigned fbPacketNumber; /* # packets sent by feedback mechanism */ - struct { - int frameId; - int addUsecPerFrame; - int addFrames; - int frames; - int framesDropped; - float frameRateLimit; - int advance; - } fbPackets[MAX_FB_PACKETS]; /* recording FB packet contents */ - unsigned VDqueue[MAX_VDQUEUE_SIZE]; /* record number of frames with VD queue - length of index number */ - int VBmsgGaps[MSGGAP_MAX + 1 - MSGGAP_MIN]; /* # of ind-sized gaps between msgs */ - char VBframesReceived[(MAX_FRAMES + 7)/8]; /* bit array for frames received by VB */ - char VDframesDecoded[(MAX_FRAMES + 7)/8]; /* bit array for frames decoded by VD */ - char VPframesDisplayed[(MAX_FRAMES + 7)/8]; /* bit array for frames displayed by VP */ - short VBfillLevel[MAX_FRAMES]; /* VB buffer fill level (frames) recorded by CTR */ - } stat; -#endif -} SharedData; - -/* command and reply: GUI-CTR, CTR-VS, CTR-AS */ - -/* GUI to CTR, (and also CTR to VS and/or AS) */ - -#define CmdINIT 0 /* followed by: videoHost, videoPath, audioHost, audioPath - each item is passed as a string (without 0), led with length(int) */ -#define CmdINITaudio 1 /* for CTR-AS */ -#define CmdINITvideo 2 /* for CTR-VS */ -#define CmdSTOP 3 -#define CmdFF 4 -#define CmdFB 5 -#define CmdSTEP 6 -#define CmdPLAY 7 -#define CmdREF 20 /* this is for sending REFerence frame by VS - for CmdSTEP and CmdPLAY */ -#define CmdPOSITION 8 /* followed by position */ -#define CmdPOSITIONrelease 9 /* followed by position */ -#define CmdVOLUME 10 /* followed by position */ -#define CmdBALANCE 11 /* followed by position */ -#define CmdSPEED 12 /* followed by position */ -#define CmdLOOPenable 13 -#define CmdLOOPdisable 14 -#define CmdSTATstream 23 /* reply with { | type(byte) | size(int) }+ | */ -#define CmdSTATsent 24 /* reply with { | byte }+ | */ -#define CmdCLOSE 18 -#define CmdFAIL 19 /* followed by a string */ - -#define CmdDONE 15 /* CTR to GUI: - replay for accptance and execution of Above Cmd */ - -#define CmdVPinitScreen 30 /* CTR to VP(GUI), audio-only screen clearning */ -#define CmdVPdisplayFrame 31 /* CTR to VP(GUI) to display the single frame in buffer */ -#define CmdVPclearScreen 32 /* CTR to VP(GUI), to clear all images in VD buffer */ -#define CmdVPaudioPosition 33 /* CTR to VP(GUI), in audio-only case, set position bar */ - -// to terminate the event loop -#define CmdExit 34 - - -// cmd sent by Java GUI to Controller process -#define CmdJINIT 35 - -#define EXIT 36 -#define DECODED 37 - -/* CTR-VS */ - -/* CmdINITvideo: followd by parameters of a fixed structure of 3 integers - reply with CmdINITvideo followed by reply or CmdFAIL followed by a string, -*/ -typedef struct -{ - int sn; - int version; - int nameLength; /* the length of the video file */ - /* this structure is followed by a zero-terminated file name as follows: - char videoFile[]; - */ -} INITvideoPara; - -typedef struct -{ - int live; - int format; - - int totalHeaders; - int totalFrames; - int totalGroups; - int horizontalSize; - int verticalSize; - int pelAspectRatio; - int pictureRate1000; - int vbvBufferSize; - int sizeIFrame; - int sizePFrame; - int sizeBFrame; - int sizeSystemHeader; - int sizeGop; - int averageFrameSize; - int firstGopFrames; - int patternSize; - char pattern[PATTERN_SIZE]; -} INITvideoReply; - -/* CmdPOSITION, CmdPOSITIONrelease: followed by following parameter */ -typedef struct -{ - int sn; - int nextGroup; -} POSITIONpara; - -/* CmdSTEP: followed by following parameter */ -typedef struct -{ - int sn; - int nextFrame; -} STEPpara; - -/* CmdFF, CmdFB: followed by following parameter */ -typedef struct -{ - int sn; - int nextGroup; - int usecPerFrame; - int framesPerSecond; - int VStimeAdvance; -} FFpara; - -/*CmdPLAY: followed by following parameter */ -typedef struct -{ - int sn; - int collectStat; - int nextFrame; - int usecPerFrame; - int framesPerSecond; - int frameRateLimit1000; - int VStimeAdvance; - int sendPatternGops; - char sendPattern[PATTERN_SIZE]; -} PLAYpara; - -/* CmdSPEED: parameter */ -typedef struct -{ - int sn; - int usecPerFrame; - int framesPerSecond; - int frameRateLimit1000; - int sendPatternGops; - char sendPattern[PATTERN_SIZE]; -} SPEEDpara; - -/* CmdLOOPenabe, CmdLOOPdisable, CmdSTOP: following by SN */ - - -/* video channel data packet structure */ - -typedef struct -{ - int cmd; - int cmdsn; - int sh; - int gop; - int frame; - int display; /* display frame number */ - int future; - int past; - int currentUPF; - int dataBytes; -} VideoPacket; - - -/* video channel data message structure */ - -typedef struct -{ - int packetsn; - int packetSize; - int msgsn; - int msgOffset; - int msgSize; -} VideoMessage; - - -/* Feedback parameter structure */ - -typedef struct -{ - int cmdsn; - int needHeader; - int addUsecPerFrame; - int addFrames; - int frameRateLimit1000; - int sendPatternGops; - int sendPattern[PATTERN_SIZE]; -} VideoFeedBackPara; - - - -/* audio channel commands and parameters */ - -/* CmdINITaudio parameter of fixed structure of 3 integers and a AudioPara, - replys with CmdINITaudio followed by reply or CmdFAIL followed by a string */ -typedef struct -{ - int sn; - int version; - AudioParameter para; - int nameLength; - /* char audioFile[] */ -} INITaudioPara; - -typedef struct -{ - int live; - int format; - - AudioParameter para; - int totalSamples; -} INITaudioReply; - - -/* CmdPLAY parameter */ -typedef struct -{ - int sn; - int nextSample; -#if 0 - int samplesPerSecond; /* <= shared->audioPara.samplesPerSecond */ -#endif - int samplesPerSecond; /* audio playback speed */ - int samplesPerPacket; /* Number of samples in a packet */ - int ABsamples; /* size of client VB buffer in samples */ - int spslimit; /* QoS parameter: sps supported by the audio channel */ -} PLAYaudioPara; - -/* STOP followed only by SN */ - -/* CmdSPEED parameter */ -typedef struct -{ - int sn; - int samplesPerSecond; - int samplesPerPacket; /* Number of samples in a packet */ - int spslimit; -} SPEEDaudioPara; - -/* audio packet structure */ -typedef struct -{ - int cmdsn; - int resend; - int samplesPerSecond; - int firstSample; - int samples; - int actualSamples; - int dataBytes; -} AudioPacket; - -typedef struct -{ - int firstSample; /* Id of the first sample in this packet */ - int samples; /* number of samples in current packet */ -} APdescriptor; /* audio packet decriptor */ - -/* audio feedback packet */ -typedef struct -{ - int cmdsn; - int type; /* 0 - feedback command; >=1 - Number of packets to be resent */ - union { - struct { - int addsps; - int addSamples; - } fb; - APdescriptor ap; - } data; -} AudioFeedBackPara; -/* One actual resent request may have multiple APdescriptors depending on - the value in element type, all execpt the first one follows above structure*/ - -typedef struct { - int sh, gop, frame, display, future, past; - int refcount; /* reference count */ - unsigned char * data; /* data buffer for image */ -} FrameBlock; - - -#endif /* _MPEG_COMMON_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/24bit.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/24bit.cpp deleted file mode 100644 index 87931de7f58..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/24bit.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -#include -#include -#include "video.h" -#include "dither.h" -#include "proto.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, 24bit, "$Id$") - -/* - * We'll define the "ConvertColor" macro here to do fixed point arithmetic - * that'll convert from YCrCb to RGB using: - * R = L + 1.40200*Cr; - * G = L - 0.34414*Cb - 0.71414*Cr - * B = L + 1.77200*Cb; - * - * We'll use fixed point by adding two extra bits after the decimal. - */ - -#define BITS 8 -#define ONE ((int) 1) -#define CONST_SCALE (ONE << BITS) -#define ROUND_FACTOR (ONE << (BITS-1)) - -/* Macro to convert integer to fixed. */ -#define UP(x) (((int)(x)) << BITS) - -/* Macro to convert fixed to integer (with rounding). */ -#define DOWN(x) (((x) + ROUND_FACTOR) >> BITS) - -/* Macro to convert a float to a fixed */ -#define FIX(x) ((int) ((x)*CONST_SCALE + 0.5)) - -#define CLAMP(ll,x,ul) ( ((x)<(ll)) ?(ll):( ((x)>(ul)) ?(ul):(x))) - -static int *Cb_r_tab, *Cr_g_tab, *Cb_g_tab, *Cr_b_tab; - -/* - *-------------------------------------------------------------- - * - * InitColorDither -- - * - * To get rid of the multiply and other conversions in color - * dither, we use a lookup table. - * - * Results: - * None. - * - * Side effects: - * The lookup tables are initialized. - * - *-------------------------------------------------------------- - */ - -void -InitColorDither() -{ - int CR, CB, i; - - Cr_b_tab = (int *)ACE_OS::malloc(256*sizeof(int)); - Cr_g_tab = (int *)ACE_OS::malloc(256*sizeof(int)); - Cb_g_tab = (int *)ACE_OS::malloc(256*sizeof(int)); - Cb_r_tab = (int *)ACE_OS::malloc(256*sizeof(int)); - - for (i=0; i<256; i++) { - CB = CR = i; - - CB -= 128; CR -= 128; - - Cb_r_tab[i] = FIX(1.40200) * CB; - Cr_g_tab[i] = -FIX(0.34414) * CR; - Cb_g_tab[i] = -FIX(0.71414) * CB; - Cr_b_tab[i] = FIX(1.77200) * CR; - } -} - - -/* - *-------------------------------------------------------------- - * - * ColorDitherImage -- - * - * Converts image into 24 bit color. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -ColorDitherImage(unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int rows, int cols) -{ - int L, CR, CB; - unsigned int *row1, *row2; - unsigned char *lum2; - int x, y; - unsigned int r, b, g; - int cb_r; - int cr_g; - int cb_g; - int cr_b; - - row1 = (unsigned int *)out; - row2 = row1 + cols; - lum2 = lum + cols; - for (y=0; y> BITS; - g = CLAMP(0,G,UP(255)) & 0xff00; - b = (CLAMP(0,B,UP(255)) & 0xff00) << BITS; -#else - b = CLAMP(0,B,UP(255)) >> BITS; - g = CLAMP(0,G,UP(255)) & 0xff00; - r = (CLAMP(0,R,UP(255)) & 0xff00) << BITS; -#endif - *row1++ = r | g | b; - - L = *lum++; - L = UP(L); - R = L + cb_r; - G = L + cr_g + cb_g; - B = L + cr_b; -#ifndef LITTLE_ENDIAN - r = CLAMP(0,R,UP(255)) >> BITS; - g = CLAMP(0,G,UP(255)) & 0xff00; - b = (CLAMP(0,B,UP(255)) & 0xff00) << BITS; -#else - b = CLAMP(0,B,UP(255)) >> BITS; - g = CLAMP(0,G,UP(255)) & 0xff00; - r = (CLAMP(0,R,UP(255)) & 0xff00) << BITS; -#endif - *row1++ = r | g | b; - - /* - * Now, do second row. - */ - L = *lum2++; - L = UP(L); - R = L + cb_r; - G = L + cr_g + cb_g; - B = L + cr_b; -#ifndef LITTLE_ENDIAN - r = CLAMP(0,R,UP(255)) >> BITS; - g = CLAMP(0,G,UP(255)) & 0xff00; - b = (CLAMP(0,B,UP(255)) & 0xff00) << BITS; -#else - b = CLAMP(0,B,UP(255)) >> BITS; - g = CLAMP(0,G,UP(255)) & 0xff00; - r = (CLAMP(0,R,UP(255)) & 0xff00) << BITS; -#endif - *row2++ = r | g | b; - - L = *lum2++; - L = UP(L); - R = L + cb_r; - G = L + cr_g + cb_g; - B = L + cr_b; -#ifndef LITTLE_ENDIAN - r = CLAMP(0,R,UP(255)) >> BITS; - g = CLAMP(0,G,UP(255)) & 0xff00; - b = (CLAMP(0,B,UP(255)) & 0xff00) << BITS; -#else - b = CLAMP(0,B,UP(255)) >> BITS; - g = CLAMP(0,G,UP(255)) & 0xff00; - r = (CLAMP(0,R,UP(255)) & 0xff00) << BITS; -#endif - *row2++ = r | g | b; - } - lum += cols; - lum2 += cols; - row1 += cols; - row2 += cols; - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/2x2.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/2x2.cpp deleted file mode 100644 index 06bf6ab7fac..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/2x2.cpp +++ /dev/null @@ -1,377 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -#include -#include -#include "video.h" -#include "dither.h" -#include "proto.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, 2x2, "$Id$") - -#define RAND_ERR_RANGE 7 -#define RAND_ERR_SUBVAL 3 - -/* Array containing actual pixel values for each possible 2x2 dither pattern. */ - -static unsigned char *dith_a; - -/* Arrays mapping lum, cr, and cb values to portions of dither pattern code. - The addtion of one value from each array yields a valid dither pattern - code. -*/ - -static int lval_a[256+RAND_ERR_RANGE-1]; -static int rval_a[256+RAND_ERR_RANGE-1]; -static int bval_a[256+RAND_ERR_RANGE-1]; - -/* Range of possible dither patterns in each channel. */ - -#define L_DITH_RANGE (((LUM_RANGE-1)*4)+1) -#define CR_DITH_RANGE (((CR_RANGE-1)*4)+1) -#define CB_DITH_RANGE (((CB_RANGE-1)*4)+1) - -/* Arrays of random error terms added to break up contours. */ - -static int *randval_a; -static int **randptr_a; - - -/* - *-------------------------------------------------------------- - * - * Init2x2Dither-- - * - * Initializes structures used for 2x2 dithering. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -Init2x2Dither() -{ - unsigned char *dith_ca; - int numcodes; - int l_range, cr_range, cb_range; - int p1, p2, p3, p4; - int l_dith, cr_dith, cb_dith; - int big_part, small_part; - int i, j; - - l_range = L_DITH_RANGE; - cr_range = CR_DITH_RANGE; - cb_range = CB_DITH_RANGE; - - numcodes = l_range * cr_range * cb_range; - - dith_a = (unsigned char *) ACE_OS::malloc(numcodes*4); - - dith_ca = dith_a; - - for (i=0; i 0) ? 1 : 0); - p2 = big_part + ((small_part > 2) ? 1 : 0); - p3 = big_part; - p4 = big_part + ((small_part > 1) ? 1 : 0); - - p1 *= CR_RANGE * CB_RANGE; - p2 *= CR_RANGE * CB_RANGE; - p3 *= CR_RANGE * CB_RANGE; - p4 *= CR_RANGE * CB_RANGE; - - cr_dith = (i/l_range) % cr_range; - - big_part = cr_dith / 4; - small_part = cr_dith % 4; - - p1 += (big_part + ((small_part > 0) ? 1 : 0))*CB_RANGE; - p2 += (big_part + ((small_part > 2) ? 1 : 0))*CB_RANGE; - p3 += (big_part)*CB_RANGE; - p4 += (big_part + ((small_part > 1) ? 1 : 0))*CB_RANGE; - - cb_dith = (i/(cr_range*l_range)) % cb_range; - - big_part = cb_dith / 4; - small_part = cb_dith % 4; - - p1 += (big_part + ((small_part > 0) ? 1 : 0)); - p2 += (big_part + ((small_part > 2) ? 1 : 0)); - p3 += (big_part); - p4 += (big_part + ((small_part > 1) ? 1 : 0)); - - *dith_ca++ = p1; - *dith_ca++ = p2; - *dith_ca++ = p3; - *dith_ca++ = p4; - } - - for (i=RAND_ERR_SUBVAL; i<256+RAND_ERR_SUBVAL; i++) { - j = i-RAND_ERR_SUBVAL; - lval_a[i] = (j * L_DITH_RANGE)/256; - rval_a[i] = (j * CR_DITH_RANGE)/256; - bval_a[i] = (j * CB_DITH_RANGE)/256; - - bval_a[i] *= CR_DITH_RANGE * L_DITH_RANGE * 4; - rval_a[i] *= L_DITH_RANGE * 4; - lval_a[i] *= 4; - } - - for (i=0; iremove_handlers (); - if (ACE_OS::getpid () == CTRpid) - ::remove_all_semaphores (); -} - -int -Command_Handler::parse_args (int argc,char **argv) -{ - ACE_Get_Opt get_opts (argc,argv,"h:"); - int c; - - while ((c= get_opts ()) != -1) - switch (c) - { - case 'h': - this->data_host_ = ACE_OS::strdup (get_opts.optarg); - ACE_DEBUG ((LM_DEBUG,"data_host is %s\n",this->data_host_)); - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR,"Unknown argument %c\n",c),-1); - } - return 0; -} - -TAO_ORB_Manager * -Command_Handler::orb_manager (void) -{ - return &this->orb_manager_; -} - -void -Command_Handler::wait_for_display (Suspended reason) -{ - this->command_suspended_ = reason; - TAO_ORB_Core_instance ()->reactor ()->suspend_handler (this->command_handle_); -} - -// initialize the command handler. - -int -Command_Handler::init (int argc, - char *argv[]) -{ - this->argc_ = temp_argc; - this->argv_ = temp_argv; - - // Increase the debug_level so that we can see the output - this->parse_args (argc, argv); - TAO_debug_level++; - CORBA::String_var ior; - TAO_TRY - { - this->orb_manager_.init_child_poa (this->argc_, - this->argv_, - "child_poa", - TAO_TRY_ENV); - TAO_CHECK_ENV; - // activate the client video mmdevice under the child poa. - ior = this->orb_manager_.activate (&this->receiver_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Initialize the naming services - if (my_name_client_.init (orb_manager_.orb ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - char receiver_file[BUFSIZ]; - - ACE_OS::sprintf (receiver_file, - "/tmp/receiver_ior.%d", - getuid ()); - // print the ior of the receiver to a file - FILE *fp = ACE_OS::fopen (receiver_file,"w"); - if (fp != 0) - { - ACE_OS::fprintf (fp,"%s",ior.in ()); - ACE_OS::fclose (fp); - } - - // initialize the client signal handler. - if (this->client_sig_handler_.register_handler () < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) register_handler for sig_handler failed\n"), - -1); - - if (TAO_ORB_Core_instance ()->reactor ()->register_handler (&this->notification_handler_, - ACE_Event_Handler::READ_MASK) < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) register_handler for notification handler failed\n"), - -1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Command_Handler::init"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -// Runs the ORB event loop -int -Command_Handler::run (void) -{ - int result; - TAO_TRY - { - result = this->orb_manager_.run (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("orb:run ()"); - return -1; - } - TAO_ENDTRY; - return result; -} - - -int -Command_Handler::handle_timeout (const ACE_Time_Value &, - const void *arg) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t)Command_Handler::handle_timeout called \n")); - return 0; -} - - -int -Command_Handler::resolve_audio_reference (void) -{ - TAO_TRY - { - if (this->audio_mmdevice_ior_.in ()!=0) - { - CORBA::Object_var mmdevice_obj = this->orb_manager_.orb ()->string_to_object (this->audio_mmdevice_ior_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (CORBA::is_nil (mmdevice_obj.in ()) == 0) - { - this->audio_server_mmdevice_ = AVStreams::MMDevice::_narrow (mmdevice_obj.in (), - TAO_TRY_ENV); - } - this->audio_mmdevice_ior_ = (char *)0; - return 0; - } - - CosNaming::Name audio_server_mmdevice_name (1); - - audio_server_mmdevice_name.length (1); - audio_server_mmdevice_name [0].id = CORBA::string_dup ("Audio_Server_MMDevice"); - CORBA::Object_var audio_server_mmdevice_obj = - this->my_name_client_->resolve (audio_server_mmdevice_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->audio_server_mmdevice_ = - AVStreams::MMDevice::_narrow (audio_server_mmdevice_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (this->audio_server_mmdevice_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " could not resolve Audio_Server_Mmdevice in Naming service\n"), - -1); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Audio_MMDevice successfully resolved: %s\n", - this->orb_manager_.orb ()->object_to_string (this->audio_server_mmdevice_.in (), - TAO_TRY_ENV))); - TAO_CHECK_ENV; - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Command_Handler::resolve_audio_reference"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -int -Command_Handler::resolve_video_reference (void) -{ - TAO_TRY - { - if (this->video_mmdevice_ior_.in ()!= 0) - { - CORBA::Object_var mmdevice_obj = this->orb_manager_.orb ()->string_to_object (this->video_mmdevice_ior_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (CORBA::is_nil (mmdevice_obj.in ()) == 0) - { - this->video_server_mmdevice_ = AVStreams::MMDevice::_narrow (mmdevice_obj.in (), - TAO_TRY_ENV); - } - this->video_mmdevice_ior_ = (char *) 0; - return 0; - } - CosNaming::Name video_server_mmdevice_name (1); - - video_server_mmdevice_name.length (1); - video_server_mmdevice_name [0].id = CORBA::string_dup ("Video_Server_MMDevice"); - CORBA::Object_var video_server_mmdevice_obj = - this->my_name_client_->resolve (video_server_mmdevice_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->video_server_mmdevice_ = - AVStreams::MMDevice::_narrow (video_server_mmdevice_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (this->video_server_mmdevice_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " could not resolve Video_Server_Mmdevice in Naming service\n"), - -1); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Video_MMDevice successfully resolved: %s\n", - this->orb_manager_.orb ()->object_to_string (this->video_server_mmdevice_.in (), - TAO_TRY_ENV))); - TAO_CHECK_ENV; - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Command_Handler::resolve_video_reference"); - return -1; - } - TAO_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) MMDevice successfully resolved.\n")); - return 0; -} - -ACE_HANDLE -Command_Handler::get_handle (void) const -{ - return this->command_handle_; -} - -// handle the command sent to us by the GUI process -// this is a reactor callback method -int -Command_Handler::handle_input (ACE_HANDLE fd) -{ - unsigned char cmd; - int val; - - // ACE_DEBUG ((LM_DEBUG, "handle_input, fd: %d\n", fd)); - - if (!(this->busy_)) - { - // Weird hack coming up: - if (fd == cmdSocket) - { - val = OurCmdRead ((char*)&cmd, 1); - this->busy_ = 1; - this->client_sig_handler_.TimerProcessing (); - } - // ACE_DEBUG ((LM_DEBUG, "val: %d, cmd: %d\n", val, cmd)); - // if we get an interrupt while reading we go back to the event loop - if (val == 1) - { - this->busy_ = 0; - return 0; - } - - // fprintf(stderr, "CTR: cmd received - %d\n", cmd); - TAO_TRY - { - switch (cmd) - { - case CmdINIT: - ACE_DEBUG ((LM_DEBUG,"(%P|%t) command_handler:CmdINIT received\n")); - if (this->init_av () == -1) - { - this->busy_ = 0; - ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t) init_av failed\n"),0); - } - // cerr << "init_av done\n"; - break; - case CmdSTOP: - this->stop(); - break; - case CmdFF: - this->fast_forward (); - break; - case CmdFB: - this->fast_backward (); - break; - case CmdSTEP: - this->step (); - break; - case CmdPLAY: - if (this->play (0, - TAO_TRY_ENV) < 0) - { - this->busy_ = 0; - ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t)play failed\n"),0); - } - TAO_CHECK_ENV; - break; - case CmdPOSITION: - this->position (); - break; - case CmdPOSITIONrelease: - this->position_release (); - break; - case CmdVOLUME: - this->volume (); - break; - case CmdBALANCE: - this->balance (); - break; - case CmdSPEED: - this->speed (); - break; - case CmdLOOPenable: - { - shared->loopBack = 1; - break; - } - case CmdLOOPdisable: - { - shared->loopBack = 0; - break; - } - default: - fprintf(stderr, "CTR: unexpected command from UI: cmd = %d.\n", cmd); - ACE_OS::exit (1); - break; - } - this->busy_ = 0; - // unset the busy flag,done with processing the command. - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Command_Handler::handle_input ()"); - return 0; - } - TAO_ENDTRY; - } - return 0; -} - -int -Command_Handler::init_av (void) -{ - cerr << "inside init_av \n"; - int i, j; - - /* try to stop and close previous playing */ - if (audioSocket >= 0 || videoSocket >= 0) - { - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - // this may have to be taken care of afterwards. - unsigned char tmp = CmdCLOSE; - int result = - this->stop_playing(); - if (result < 0) - return result; - - if (audioSocket >= 0) - { - if (ABpid > 0) { - ACE_DEBUG ((LM_DEBUG,"killing the abprocess\n")); - char message[BUFSIZ]; - message [0] = EXIT; - ACE_OS::write (asp[0],&message,BUFSIZ); - ABpid = -1; - } - usleep(10000); - } - if (videoSocket >= 0) - { - if (VBpid > 0) { - char message[BUFSIZ]; - message [0] = EXIT; - ACE_OS::write (vsp[0],&message,BUFSIZ); - VBpid = -1; - } - usleep(10000); - - videoSocket = -1; - while ((!vbuffer->VBbufEmpty()) || !VDbufEmpty()) { - while (VDpeekMsg() != NULL) { - VDreclaimMsg(VDgetMsg()); - } - usleep(10000); - } - usleep(10000); - } - } - this->close (); - - int result; - /* read in video/audio files */ - // set the vf and af to 0 , very important. - vf [0]= 0; - af [0]=0; - - NewCmd(CmdINIT); - - i = 0; - result = OurCmdRead((char*)&i, 4); - result = OurCmdRead(vf, i); - vf[i] = 0; - result = OurCmdRead((char*)&i, 4); - result = OurCmdRead(af, i); - af[i] = 0; - /* - fprintf(stderr, "INIT: vh-%s, vf-%s, ah-%s, af-%s\n", vh, vf, ah, af); - */ - - shared->live = 0; - shared->audioMaxPktSize = !shared->config.audioConn; - shared->videoMaxPktSize = !shared->config.videoConn; - - if (af[0] != 0) - { - int result; - if ((result =init_audio_channel(af)) > 0) - return result; - else if (result < 0) - { - audioSocket = -1; - shared->totalSamples = 0; - } - else - { - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Initialized audio\n")); - shared->nextSample = 0; - if (shared->config.maxSPS < shared->audioPara.samplesPerSecond) - shared->config.maxSPS = shared->audioPara.samplesPerSecond; - } - } - else - { - shared->totalSamples = 0; - audioSocket = -1; - } - if (vf[0] != 0) - { - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Initializing video\n")); - if (this->init_video_channel(vf) > 0) - return result; - else if (result < 0) - { - shared->totalFrames = 0; /* disable video channel */ - videoSocket = -1; - } - else - { - ACE_DEBUG ((LM_DEBUG, - "%s %d\n", - __FILE__,__LINE__)); - shared->nextFrame = 1; - shared->nextGroup = 0; - shared->currentFrame = shared->currentGroup = shared->currentDisplay = 0; - if (shared->config.maxFPS < shared->framesPerSecond) - shared->config.maxFPS = shared->framesPerSecond; - } - } - else - { - videoSocket = -1; - shared->totalFrames = 0; /* disable video channel */ - } - if (audioSocket < 0 && videoSocket < 0) /* none of video/audio channels is setup */ - { - unsigned char tmp = CmdFAIL; - CmdWrite(&tmp, 1); - /* - fprintf(stderr, "CTR initialization failed.\n"); - */ - return -1; - } - else - { - unsigned char tmp = CmdDONE; - set_speed(); - if (videoSocket >= 0) - this->wait_for_display (INIT); - } - cerr << "returning from init_av \n"; - return 0; -} - -int -Command_Handler::init_java_av (char *audio_ior, - char *video_ior, - char *audio_file, - char *video_file) -{ - if (audio_file != 0) - ACE_DEBUG ((LM_DEBUG,"%s\n",audio_file)); - if (video_file != 0) - ACE_DEBUG ((LM_DEBUG,"%s\n",video_file)); - int j; - this->audio_mmdevice_ior_ = audio_ior; - this->video_mmdevice_ior_ = video_ior; - - /* try to stop and close previous playing */ - if (audioSocket >= 0 || videoSocket >= 0) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - // this may have to be taken care of afterwards. - unsigned char tmp = CmdCLOSE; - int result = - this->stop_playing(); - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR,"stop_playing failed\n"),result); - - if (audioSocket >= 0) - { - if (ABpid > 0) { - ACE_DEBUG ((LM_DEBUG,"Killing AB Process\n")); - char message[BUFSIZ]; - message [0] = EXIT; - ACE_OS::write (asp[0],&message,BUFSIZ); - ABpid = -1; - } - usleep(10000); - } - - if (videoSocket >= 0) - { - if (VBpid > 0) { - char message[BUFSIZ]; - message [0] = EXIT; - ACE_OS::write (vsp[0],&message,BUFSIZ); - VBpid = -1; - } - usleep(10000); - - videoSocket = -1; - while ((!vbuffer->VBbufEmpty()) || !VDbufEmpty()) { - while (VDpeekMsg() != NULL) { - VDreclaimMsg(VDgetMsg()); - } - usleep(10000); - } - usleep(10000); - } - } - this->close (); - - int result; - NewCmd(CmdINIT); - - shared->live = 0; - shared->audioMaxPktSize = !shared->config.audioConn; - shared->videoMaxPktSize = !shared->config.videoConn; - - if (audio_file!= 0) - { - if (init_audio_channel(audio_file)) - { - audioSocket = -1; - shared->totalSamples = 0; - } - else - { - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Initialized audio\n")); - shared->nextSample = 0; - if (shared->config.maxSPS < shared->audioPara.samplesPerSecond) - shared->config.maxSPS = shared->audioPara.samplesPerSecond; - } - } - else - { - shared->totalSamples = 0; - audioSocket = -1; - } - if (video_file!= 0) - { - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Initializing video\n")); - if (this->init_video_channel(video_file)) - { - shared->totalFrames = 0; /* disable video channel */ - videoSocket = -1; - } - else - { - ACE_DEBUG ((LM_DEBUG, - "%s %d\n", - __FILE__,__LINE__)); - shared->nextFrame = 1; - shared->nextGroup = 0; - shared->currentFrame = shared->currentGroup = shared->currentDisplay = 0; - if (shared->config.maxFPS < shared->framesPerSecond) - shared->config.maxFPS = shared->framesPerSecond; - } - } - else - { - videoSocket = -1; - shared->totalFrames = 0; /* disable video channel */ - } - if (audioSocket < 0 && videoSocket < 0) /* none of video/audio channels is setup */ - { - unsigned char tmp = CmdFAIL; - CmdWrite(&tmp, 1); - - fprintf(stderr, "CTR initialization failed.\n"); - - return -1; - } - else - { - unsigned char tmp = CmdDONE; - set_speed(); - if (videoSocket >= 0) - this->wait_for_display (INIT); - CmdWrite(&tmp, 1); - if (videoSocket < 0) - { - tmp = CmdVPclearScreen; - CmdWrite(&tmp, 1); - } - return 0; - } - cerr << "returning from init_av \n"; - return 0; -} - - -int -Command_Handler::init_audio_channel (char *audiofile) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) init_audio_channel called\n")); - this->audio_data_handle_ = -1; - - if (!hasAudioDevice) - { - fprintf(stderr, "CTR warning: Audio device not available, Audio ignored.\n"); - return -1; - } - - if (this->connect_to_audio_server() == -1) - return -1; - - shared->audioMaxPktSize = -INET_SOCKET_BUFFER_SIZE; - /* Initialize with AS */ - { - Audio_Control::INITaudioPara_var para (new - Audio_Control::INITaudioPara); - Audio_Control::INITaudioReply_var reply (new Audio_Control::INITaudioReply); - - - para->sn = shared->cmdsn; - para->version = VERSION; - para->para.encodeType = shared->AFPara.encodeType; - para->para.channels = shared->AFPara.channels; - para->para.samplesPerSecond = shared->AFPara.samplesPerSecond; - para->para.bytesPerSample = shared->AFPara.bytesPerSample; - para->nameLength =ACE_OS::strlen (audiofile)+1; - - para->audiofile.length (strlen(audiofile)); - - for (u_int i=0;iaudiofile.length ();i++) - para->audiofile [i] = audiofile [i]; - - // CORBA call - TAO_TRY - { - CORBA::Boolean result; - result = this->audio_control_->init_audio (para.in (), - reply.out (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (result == (0)) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%) init_audio failed\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG,"(%P|%t) init_audio success \n")); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("audio_control_->init_audio (..)"); - return -1; - } - TAO_ENDTRY; - - /* - fprintf(stderr, "AF Audio para: encode %d, ch %d, sps %d, bps %d.\n", - para.para.encodeType, para.para.channels, - para.para.samplesPerSecond, para.para.bytesPerSample); - */ - { - int flag = 1; - - shared->live += reply->live; - shared->audioFormat = reply->format; - shared->audioPara.encodeType = reply->para.encodeType; - shared->audioPara.channels = reply->para.channels; - shared->audioPara.samplesPerSecond = reply->para.samplesPerSecond; - shared->audioPara.bytesPerSample = reply->para.bytesPerSample; - shared->totalSamples = reply->totalSamples; - - fprintf(stderr, "Audio: samples %d, sps %d, bps %d\n", - shared->totalSamples, shared->AFPara.samplesPerSecond, - shared->AFPara.bytesPerSample); - - SetAudioParameter(&shared->audioPara); - } - - /* create AB */ - { - if (ABpid == -1) - { - switch (ABpid = ACE_OS::fork ()) - { - case -1: - ACE_OS::perror ("CTR error on forking AB process"); - ACE_OS::exit (1); - break; - case 0: - { - if (realTimeFlag) { - SetRTpriority("AB", -1); - } - ACE_OS::free (vh); - ACE_OS::free (vf); - ACE_OS::free (ah); - ACE_OS::free (audiofile); - vbuffer->VBdeleteBuf(); - VDdeleteBuf(); - if (cmdSocket >= 0) - ACE_OS::close(cmdSocket); - if (realTimeFlag >= 2) { -#ifdef __svr4__ - if (SetRTpriority("AB", 0)) realTimeFlag = 0; -#elif defined(_HPUX_SOURCE) - if (SetRTpriority("AB", 1)) realTimeFlag = 0; -#endif - } - abuffer->ABprocess(this->audio_data_handle_); - this->remove_handlers (); - // Before shutting down the orb remove all the handlers registered with it. - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Before shutdown")); - this->orb_manager_.orb ()->shutdown (); - ACE_DEBUG ((LM_DEBUG,"(%P|%t) After shutdown")); - return 1; - } - break; - default: - abuffer->ABflushBuf(0); - break; - } - } - } - } - ACE_DEBUG ((LM_DEBUG,"(%P) Init_audio_channel done\n")); - return 0; -} - -int -Command_Handler::remove_handlers (void) -{ - int result; - result = this->client_sig_handler_.remove_handler (); - - if (TAO_ORB_Core_instance ()->reactor ()->remove_handler (&this->notification_handler_, - ACE_Event_Handler::READ_MASK) < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) remove_handler for notification handler failed\n"), - -1); - return 0; - -} - -void -Command_Handler::set_mmdevice (CORBA::Object_ptr audio_mmdevice, - const char *audio_file, - CORBA::Object_ptr video_mmdevice, - const char *video_file) - -{ - CORBA::String audio_mmdevice_ior (0); - CORBA::String video_mmdevice_ior (0); - TAO_TRY - { - audio_mmdevice_ior = - this->orb_manager_.orb ()->object_to_string (audio_mmdevice, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG,"audio_mmdevice ior is %s\n",audio_mmdevice_ior)); - video_mmdevice_ior = - this->orb_manager_.orb ()->object_to_string (video_mmdevice, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG,"audio_mmdevice ior is %s\n",video_mmdevice_ior)); - } - TAO_CATCHANY - { - ACE_ERROR ((LM_ERROR,"set_audio_mmdevice failed\n")); - } - TAO_ENDTRY; - this->init_java_av (audio_mmdevice_ior,video_mmdevice_ior,(char *)audio_file,(char *)video_file); - return; -} - -void -Command_Handler::set_video_data_handle (ACE_HANDLE data_fd) -{ - videoSocket = this->video_data_handle_= data_fd; -} - -void -Command_Handler::set_video_control (Video_Control_ptr video_control) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Setting the video control\n")); - this->video_control_ = video_control; -} - -void -Command_Handler::set_audio_data_handle (ACE_HANDLE data_fd) -{ - audioSocket = this->audio_data_handle_= data_fd; -} - -void -Command_Handler::set_audio_control (Audio_Control_ptr audio_control) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) setting the audio control\n")); - this->audio_control_ = audio_control; -} - -char* -Command_Handler::get_data_host (void) -{ - return this->data_host_; -} - -int -Command_Handler::init_video_channel (char *videofile) -{ - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n",__LINE__, __FILE__, - - fprintf (stderr," File Name is %s\n",videofile); - - if (this->connect_to_video_server () == -1) - return -1; - // set the max_pkt size for video ?? very minimum - shared->videoMaxPktSize = -INET_SOCKET_BUFFER_SIZE; - /* Initialize with VS */ - { - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - Video_Control::INITvideoPara_var para (new - Video_Control::INITvideoPara); - Video_Control::INITvideoReply *reply_ptr = 0; - Video_Control::INITvideoReply_out reply (reply_ptr); - - para->sn = shared->cmdsn; - para->version = VERSION; - para->videofile.length (strlen(videofile)); - - // string to sequence - for (int i=0;ivideofile.length ();i++) - para->videofile [i] = videofile [i]; - - // CORBA call - TAO_TRY - { - CORBA::Boolean result; - result = this->video_control_->init_video (para.in (), - reply, - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (result == (0)) - return -1; - else - ACE_DEBUG ((LM_DEBUG,"(%P|%t) init_video success \n")); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("video_control_->init_video (..)"); - return -1; - } - TAO_ENDTRY; - shared->live += reply->live; - shared->videoFormat = reply->format; - shared->totalHeaders = reply->totalHeaders; - shared->totalFrames = reply->totalFrames; - shared->totalGroups = reply->totalGroups; - shared->averageFrameSize = reply->averageFrameSize; - shared->horizontalSize = reply->horizontalSize; - shared->verticalSize = reply->verticalSize; - shared->pelAspectRatio = reply->pelAspectRatio; - shared->pictureRate = ((double)reply->pictureRate1000) / 1000.0; - shared->vbvBufferSize = reply->vbvBufferSize; - shared->firstGopFrames = reply->firstGopFrames; - shared->patternSize = reply->pattern.length (); - if (shared->patternSize == 0) { - - Fprintf(stderr, "CTR warning: patternsize %d\n", shared->patternSize); - - shared->patternSize = 1; - shared->pattern[0] = 'I'; - shared->pattern[1] = 0; - shared->IframeGap = 1; - } - else if (shared->patternSize < PATTERN_SIZE) - { - int i; - char * ptr = shared->pattern + shared->patternSize; - // strncpy(shared->pattern, reply->pattern, shared->patternSize); - for (i=0;ipatternSize;i++) - shared->pattern[i] = reply->pattern [i]; - for (i = 1; i < PATTERN_SIZE / shared->patternSize; i ++) { - // ACE_OS::memcpy (ptr, shared->pattern, shared->patternSize); - for (int j=0; j < shared->patternSize ;j++) - ptr [j] = shared->pattern [j]; - ptr += shared->patternSize; - } - shared->IframeGap = 1; - while (shared->IframeGap < shared->patternSize) - { - if (shared->pattern[shared->IframeGap] == 'I') - break; - else - shared->IframeGap ++; - } - } - else - { - fprintf(stderr, "CTR Error: patternSize %d greater than PATTERN_SIZE %d.\n", - shared->patternSize, PATTERN_SIZE); - ACE_OS::exit (1); - } - fprintf(stderr, "Video: %s, %s\n", - shared->videoFormat == VIDEO_SIF ? "SIF" : - shared->videoFormat == VIDEO_JPEG ? "JPEG" : - shared->videoFormat == VIDEO_MPEG1 ? "MPEG1" : - shared->videoFormat == VIDEO_MPEG2 ? "MPEG2" : "UNKOWN format", - reply->live ? "live source" : "stored source"); - - fprintf(stderr, "Video: numS-%d, numG-%d, numF-%d, aveFrameSize-%d\n", - reply->totalHeaders, reply->totalGroups, reply->totalFrames, - reply->averageFrameSize); - fprintf(stderr, "Video: maxS-%d, maxG-%d, maxI-%d, maxP-%d, maxB-%d\n", - reply->sizeSystemHeader, reply->sizeGop, - reply->sizeIFrame, reply->sizePFrame, reply->sizeBFrame); - fprintf(stderr, - "Video: SHinfo: hsize-%d, vsize-%d, pelAspect-%d, rate-%f, vbv-%d.\n", - reply->horizontalSize, reply->verticalSize, reply->pelAspectRatio, - shared->pictureRate, reply->vbvBufferSize); - shared->pattern[shared->patternSize] = 0; - fprintf(stderr, "Video: firstGopFrames %d, IframeGap %d\n", - reply->firstGopFrames, shared->IframeGap); - shared->pattern[shared->patternSize] = 'I'; - if (reply->totalFrames > MAX_FRAMES && (!shared->live)) - { - fprintf(stderr, - "Error: totalFrames %d > MAX_FRAMES %d, needs change and recompile.\n", - reply->totalFrames, MAX_FRAMES); - ComCloseConn(this->video_data_handle_); - // ComCloseConn(videoSocket); - videoSocket = -1; - return -1; - } - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - - /* create VB, and put INIT frame to VB*/ - { - int sp[2]; /* sp[0] is for CTR and sp[1] is for VB */ - - /* create command socket pair for sending INIT frame to VB, the pipe - should be discard/non-discard in consistent with videoSocket*/ - if (socketpair(AF_UNIX, - shared->videoMaxPktSize >= 0 ? SOCK_STREAM : - SOCK_DGRAM, 0, sp) == -1) - { - ACE_OS::perror ("CTR error on open CTR-VB socketpair"); - ACE_OS::exit (1); - } - - if (VBpid == -1) - { - switch (VBpid = ACE_OS::fork ()) - { - case -1: - ACE_OS::perror ("CTR error on forking VB process"); - ACE_OS::exit (1); - break; - case 0: - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - if (realTimeFlag) { - SetRTpriority("VB", -1); - } - ACE_OS::free (vh); - ACE_OS::free (videofile); - ACE_OS::free (ah); - ACE_OS::free (af); - ::close(sp[0]); - //::close (videoSocket); - // if (audioSocket >= 0) - // ComCloseFd(audioSocket); - ::close (audioSocket); - abuffer->ABdeleteBuf(); - VDdeleteBuf(); - if (cmdSocket >= 0) - ::close(cmdSocket); - if (realTimeFlag >= 2) { -#ifdef __svr4__ - if (SetRTpriority("VB", 0)) realTimeFlag = 0; -#elif defined(_HPUX_SOURCE) - if (SetRTpriority("VB", 1)) realTimeFlag = 0; -#endif - } - if (vbuffer->VBprocess(sp[1], this->video_data_handle_) == -1) - { - ACE_DEBUG ((LM_DEBUG,"VBprocess exiting as init failed\n")); - ACE_OS::exit (2); - } - else - { - this->remove_handlers (); - this->orb_manager_.orb ()->shutdown (); - return 1; - } - break; - default: - ::close(sp[1]); - // ::close(dataSocket); - { - int bytes, res; - /* passing all messages of INIT frame to VB here. */ - char * buf = (char *)ACE_OS::malloc(INET_SOCKET_BUFFER_SIZE); - VideoMessage *msg = (VideoMessage *)buf; - int pkts = 1, msgo = 0, msgs = 0; - - if (buf == NULL) { - ACE_OS::perror ("CTR error on ACE_OS::malloc() for INIT frame"); - ACE_OS::exit (1); - } - while (msgo + msgs < pkts) { - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - // cerr << "expecting a packet of size " << sizeof (*msg) << endl; - - VideoRead(buf, sizeof(*msg)); - //~~ we need to read the first frame from the - // data socket instead of control socket. - // SocketRecv(dataSocket, buf, size); - // ACE_DEBUG ((LM_DEBUG,"packetsn = %d,msgsn = %d\n",msg->packetsn,msg->msgsn)); - pkts = ntohl(msg->packetSize); - msgo = ntohl(msg->msgOffset); - msgs = ntohl(msg->msgSize); - if (shared->videoMaxPktSize >= 0) { /* non-discard mode */ - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - write_bytes(sp[0], buf, sizeof(*msg)); - bytes = msgs; - while (bytes > 0) { - int size = min(bytes, INET_SOCKET_BUFFER_SIZE); - VideoRead(buf, size); - write_bytes(sp[0], buf, size); - bytes -= size; - } - } - else { - // cerr << "expecting a packet of size " << msgs << endl; - - VideoRead(buf + sizeof(*msg), msgs); - bytes = sizeof(*msg) + msgs; - while ((res = ACE_OS::write (sp[0], buf, bytes)) == -1) { - if (errno == EINTR || errno == ENOBUFS) continue; - ACE_OS::perror ("CTR error on sending INIT frame to VB"); - ACE_OS::exit (1); - } - if (res < bytes) { - fprintf(stderr, "CTR warn: send() res %dB < bytes %dB\n", res, bytes); - } - /* - Fprintf(stderr, - "CTR transferred INIT frame to VB: pkts %d, msgo %d, msgs %d\n", - pkts, msgo, msgs); - */ - } - } - ACE_OS::read (sp[0], buf, 1); /* read a garbage byte, to sync with VB */ - fprintf (stderr,"(%P|%t) Command process read a garbage bytes\n"); - ::close(sp[0]); - ACE_OS::free (buf); - } - break; - } - } - } - } - return 0; -} - - -int -Command_Handler::stat_stream (CORBA::Char_out ch, - CORBA::Long_out size) -{ - return 0; -} - - -int -Command_Handler::close (void) -{ - TAO_TRY - { - if (CORBA::is_nil (this->audio_control_) == 0) - { - // one way function call. - this->audio_control_->close (TAO_TRY_ENV); - - TAO_CHECK_ENV; - if (ABpid > 0) { - char message[BUFSIZ]; - message [0] = EXIT; - ACE_OS::write (asp[0],&message,BUFSIZ); - ABpid = -1; - } - ACE_DEBUG ((LM_DEBUG,"(%P|%t) audio close done \n")); - } - - if (CORBA::is_nil (this->video_control_) == 0) - { - // one way function call. - this->video_control_->close (TAO_TRY_ENV); - TAO_CHECK_ENV; - if (VBpid > 0) { - char message[BUFSIZ]; - message [0] = EXIT; - ACE_OS::write (vsp[0],&message,BUFSIZ); - VBpid = -1; - } - ACE_DEBUG ((LM_DEBUG,"(%P|%t) video close done \n")); - } - this->orb_manager_.child_poa ()->destroy (1,0,TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG,"(%P|%t)destroy childpoa done\n")); - - this->orb_manager_.init_child_poa (argc_, - argv_, - "child_poa", - TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG,"(%P)New child poa initialized\n")); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("video_control_->close (..)"); - return -1; - } - TAO_ENDTRY; - delete this->audio_reactive_strategy_; - ACE_DEBUG ((LM_DEBUG,"(%P)%N,%l")); - delete this->audio_client_mmdevice_; - ACE_DEBUG ((LM_DEBUG,"(%P)%N,%l")); - // delete this->audio_streamctrl_; - ACE_DEBUG ((LM_DEBUG,"(%P)%N,%l")); - delete this->video_reactive_strategy_; - ACE_DEBUG ((LM_DEBUG,"(%P)%N,%l")); - delete this->video_client_mmdevice_; - ACE_DEBUG ((LM_DEBUG,"(%P)%N,%l")); - // delete this->video_streamctrl_; - ACE_DEBUG ((LM_DEBUG,"(%P)%N,%l")); - return 0; -} - - -int -Command_Handler::stat_sent (void) -{ - return 0; -} - - -int -Command_Handler::fast_forward (void) - -{ - // CORBA call - unsigned char tmp; - Video_Control::FFpara_var para (new Video_Control::FFpara); - /* - fprintf(stderr, "CTR: FF . . .\n"); - */ - if (shared->live) { - beep(); - } - else { - this->stop_playing (); - if (shared->nextGroup < 0) - shared->nextGroup = 0; - if (videoSocket >= 0 && shared->nextGroup < shared->totalGroups) - { - NewCmd(CmdFF); - shared->needHeader = 0; - shared->framesPerSecond = shared->config.ffFPS / - shared->patternSize; - shared->usecPerFrame = (int)(1000000.0 / (float)shared->config.ffFPS) * - shared->patternSize; - - shared->VStimeAdvance = - max(shared->config.VStimeAdvance, DEFAULT_VStimeAdvance) * 1000; - if (shared->VStimeAdvance < shared->usecPerFrame) - shared->VStimeAdvance = shared->usecPerFrame; - - para->VStimeAdvance = shared->VStimeAdvance; - para->sn = shared->cmdsn; - para->nextGroup = shared->nextGroup; - para->usecPerFrame = shared->usecPerFrame; - para->framesPerSecond = shared->framesPerSecond; - startTime = get_usec(); - TAO_TRY - { - CORBA::Boolean result; - result = this->video_control_->fast_forward (para.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (result == (0)) - return -1; - ACE_DEBUG ((LM_DEBUG,"(%P|%t) fast_forward done \n")); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("video_control_->fast_forward_video (..)"); - return -1; - } - TAO_ENDTRY; - start_timer(); - } - } - tmp = CmdDONE; - CmdWrite(&tmp, 1); - return 0; -} - - -int -Command_Handler::fast_backward (void) - -{ - unsigned char tmp; - Video_Control::FBpara_var para (new Video_Control::FBpara); - /* - fprintf(stderr, "CTR: FB . . .\n"); - */ - if (shared->live) { - beep(); - } - else { - this->stop_playing(); - if (shared->nextGroup >= shared->totalGroups) - shared->nextGroup = shared->totalGroups - 1; - if (videoSocket >= 0 && shared->nextGroup >= 0) - { - NewCmd(CmdFB); - shared->needHeader = 0; - shared->framesPerSecond = shared->config.fbFPS / - shared->patternSize; - shared->usecPerFrame = (int)(1000000.0 / (float)shared->config.fbFPS) * - shared->patternSize; - - shared->VStimeAdvance = - max(shared->config.VStimeAdvance, DEFAULT_VStimeAdvance) * 1000; - if (shared->VStimeAdvance < shared->usecPerFrame) - shared->VStimeAdvance = shared->usecPerFrame; - - para->VStimeAdvance = shared->VStimeAdvance; - para->sn = shared->cmdsn; - para->nextGroup = shared->nextGroup; - para->usecPerFrame = shared->usecPerFrame; - para->framesPerSecond = shared->framesPerSecond; - startTime = get_usec(); - TAO_TRY - { - CORBA::Boolean result; - result = this->video_control_->fast_backward (para.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (result == (0)) - return -1; - ACE_DEBUG ((LM_DEBUG,"(%P|%t) fast_backward done \n")); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("video_control_->fast_forward_video (..)"); - return -1; - } - TAO_ENDTRY; - - start_timer(); - } - } - tmp = CmdDONE; - CmdWrite(&tmp, 1); - return 0; -} - - -int -Command_Handler::step (void) - -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Command_Handler::step ()\n")); - Video_Control::STEPpara_var para (new Video_Control::STEPpara); - this->stop_playing (); - NewCmd (CmdSTEP); - if (videoSocket >= 0 && shared->nextFrame <= shared->totalFrames) - { /* when shared->nextFrame == shared->totalFrame, it will force VS to send a ENDSEQ, - to let VD give out the remaining frame in its ring[] buffer */ - para->sn = shared->cmdsn; - para->nextFrame = shared->nextFrame; - TAO_TRY - { - CORBA::Boolean result; - result = this->video_control_->step (para.in (), - TAO_TRY_ENV); - ACE_DEBUG ((LM_DEBUG,"(%P|%t) step done \n")); - TAO_CHECK_ENV; - if (result == (0)) - return -1; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("video_control_->step (..)"); - return -1; - } - TAO_ENDTRY; - /* - fprintf(stderr, "CTR: STEP . . . frame-%d\n", para.nextFrame); - */ - this->wait_for_display (STEP); - } -// unsigned char tmp = CmdDONE; -// CmdWrite(&tmp, 1); - return 0; -} - -int -Command_Handler::play (int auto_exp, - CORBA::Environment& env) -{ - CORBA::Long vts; - CORBA::Long ats; - CORBA::Boolean result; - unsigned char tmp; - int cmdstarted = 0; - int stuffsamples = 0; - - // this->timer_.start (); - fprintf (stderr, "CTR: PLAY . . .\n"); - - this->stop_playing (); - - if (!shared->live && !shared->config.rt && videoSocket >= 0) { - /* rtplay turned off only when video avaible and not want RT play */ - rtplay = 0; - fprintf (stderr, "VCR is not playing at in realtime mode, audio disabled\n"); - } - else { - rtplay = 1; - } - - if (shared->live) { - rtplay = 1; - shared->nextFrame = 0; - shared->nextSample = 0; - } - - shared->rtplay = rtplay; - - if (shared->nextFrame < 0) - shared->nextFrame = 0; - else if (shared->nextFrame >= shared->totalFrames) - { - shared->nextFrame = shared->totalFrames - 1; - } - - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) nextFrame=%d,totalFrames=%d", - // shared->nextFrame,shared->totalFrames)); - if (audioSocket >= 0 && shared->nextSample < shared->totalSamples && rtplay) - { - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) %s,%d\n",__FILE__,__LINE__)); - Audio_Control::PLAYPara_var para (new Audio_Control::PLAYPara); - if (cmdstarted == 0) - { - NewCmd (CmdPLAY); - if (!auto_exp) set_speed (); - cmdstarted = 1; - } - - if (videoSocket >= 0 && rtplay && !shared->live) { - /* video channel also active, recompute nextSample */ - shared->nextSample = (int) ( (double)shared->audioPara.samplesPerSecond * - ( (double)shared->nextFrame / shared->pictureRate)); - shared->nextSample += shared->config.audioOffset; - if (shared->nextSample < 0) { - stuffsamples = (- shared->nextSample); - shared->nextSample = 0; - } - else if (shared->nextSample >= shared->totalSamples) - shared->nextSample = shared->totalSamples - 1; - } - - abuffer->ABflushBuf (shared->nextSample); - - para->sn = shared->cmdsn; - para->nextSample = shared->nextSample; - para->samplesPerSecond = shared->samplesPerSecond; - para->samplesPerPacket = 1024 / shared->audioPara.bytesPerSample; - para->ABsamples = AB_BUF_SIZE / shared->audioPara.bytesPerSample; - para->spslimit = 32000; - - startTime = get_usec (); - // CORBA call. - - result =this->audio_control_->play (para.in (), - ats, - env); - - if (result == 0) - return -1; - TAO_CHECK_ENV_RETURN (env,-1); - } - if (videoSocket >= 0 && shared->nextFrame < shared->totalFrames) - { - Video_Control::PLAYpara_var para (new Video_Control::PLAYpara); - - if (cmdstarted == 0) - { - NewCmd (CmdPLAY); - if (!auto_exp) set_speed (); - cmdstarted = 1; - } - shared->VBheadFrame = -1; - shared->needHeader = 0; - { - int i = shared->config.maxSPframes; - i = (int) ( (double)i * (1000000.0 / (double)shared->usecPerFrame) / - shared->pictureRate); - shared->sendPatternGops = max (min (i, PATTERN_SIZE) / shared->patternSize, 1); - } - cmdstarted = 1; -#ifdef STAT - shared->collectStat = (shared->config.collectStat && (!shared->live)); - if (shared->collectStat) - { - int i; - memset (& (shared->stat), 0, sizeof (shared->stat)); - shared->stat.VDlastFrameDecoded = (unsigned)-1; - for (i = 0; i < MAX_FRAMES; i++) - shared->stat.VBfillLevel[i] = SHRT_MIN; - speedPtr = 0; - } -#endif - shared->VStimeAdvance = - max (shared->config.VStimeAdvance, DEFAULT_VStimeAdvance) * 1000; - if (shared->VStimeAdvance < shared->usecPerFrame) - shared->VStimeAdvance = shared->usecPerFrame; - - para->VStimeAdvance = shared->VStimeAdvance; - para->sn = shared->cmdsn; - para->nextFrame = shared->nextFrame; - para->usecPerFrame = shared->usecPerFrame; - para->framesPerSecond = shared->framesPerSecond; - para->collectStat = shared->collectStat; - frate = shared->config.frameRateLimit; - if (frate <= 0.0) { - frate = 1.0; - } - shared->frameRateLimit = frate; - para->frameRateLimit1000 = - (long) (shared->frameRateLimit * 1000.0); - compute_sendPattern (); - para->sendPatternGops = shared->sendPatternGops; - // memcpy (para->sendPattern, shared->sendPattern, PATTERN_SIZE); - - // Sequence of chars - - para->sendPattern.length (PATTERN_SIZE); - - for (int i=0; isendPattern [i] = shared->sendPattern [i]; - - startTime = get_usec (); - // CORBA call - result =this->video_control_->play (para.in (), - vts, - env); - if (result == 0) - return -1; - TAO_CHECK_ENV_RETURN (env,-1); - ACE_DEBUG ((LM_DEBUG,"(%P|%t)Reached line %d in %s",__LINE__,__FILE__)); - if (shared->config.qosEffective) { - /* - fprintf (stderr, "CTR start FeedBack with init frameRateLimit %lf\n", - frate); - */ - maxfr = frate; /* max frame rate all the time during one playback */ - minupf = (int) (1000000.0 / maxfr); /* min usec-per-frame all the time - during one playback */ - maxrate = (double)minupf / (double)max (shared->usecPerFrame, minupf); - /* this is current max frame rate in percentage against 'maxfr', - current max frame rate is the lower of 'maxfr' and play speed */ - frate = 1.0; /* current sending frame rate, in percentage against 'maxfr' - This value is set with init value as 1.0, so that if current - speed is lower than frameRateLimit, no frames are dropped, - then when play speed increases frame rate will increase - accordingly until frames are dropped*/ - adjstep = ( (double)minupf / (double)shared->usecPerFrame) / - (double)max (shared->patternSize * shared->sendPatternGops, 5); - /* adjust step for current play speed, in percentage against - 'maxfr' */ - - fbstate = 1; - fb_startup = 1; - - - fprintf (stderr, "CTR init frate: %f minupf %d, shared->upf %d\n", - frate, minupf, shared->usecPerFrame); - - } - } - - if (shared->live && (videoSocket >= 0) && (audioSocket >= 0)) { - int gap = get_duration (ats, vts); - if (gap < 0 || gap >= 5000000) { - Fprintf (stderr, "Error for live source: ats %u, vts %u, gap %d\n", - ats, vts, gap); - } - else { - int skipped = gap * shared->audioPara.samplesPerSecond / 1000000; - skipped += shared->config.audioOffset; - abuffer->ABskipSamples (skipped); - Fprintf (stderr, "Live source: skipped %d audio samples\n", skipped); - } - } - else if (stuffsamples) { - abuffer->ABskipSamples (-stuffsamples); - } - if (cmdstarted) - start_timer (); - tmp = CmdDONE; - CmdWrite (&tmp, 1); - return 0; -} - -int -Command_Handler::position_action (int operation_tag) -{ - int val; - unsigned char tmp = CmdDONE; - OurCmdRead ((char*)&val, 4); - - this->operation_tag_ = operation_tag; - this->position_val_ = val; - - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) position_action called\n")); - if (shared->live) { - beep(); - } - else { - shared->locationPosition = val; - this->stop_playing (); - NewCmd(CmdPOSITION); - if (videoSocket >= 0) - { - int gop = shared->nextGroup; - Video_Control::POSITIONpara_var para (new Video_Control::POSITIONpara); - shared->nextGroup = ((shared->totalGroups-1) * val) / POSITION_RANGE; - /* - fprintf(stderr, "CTR: POSITION%s %d (nextGop %d). . .\n", - operation_tag ? "_released" : "", val, shared->nextGroup); - */ - if (gop != shared->nextGroup || operation_tag) - { - shared->nextFrame = ((shared->totalFrames-1) * val) / POSITION_RANGE; - para->sn = shared->cmdsn; - para->nextGroup = shared->nextGroup; - tmp = CmdPOSITION; - TAO_TRY - { - CORBA::Boolean result; - result = this->video_control_->position (para.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (result == (0)) - return -1; - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) position done \n")); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("video_control_->position (..)"); - return -1; - } - TAO_ENDTRY; - if (operation_tag) /* release or LOOPrewind */ - this->wait_for_display (POSITION); - } -// if (operation_tag && audioSocket >= 0) /* needs to adjust audio position */ -// { - -// shared->nextSample = (int)((double)shared->audioPara.samplesPerSecond * -// ((double)shared->nextFrame / shared->pictureRate)); -// // ACE_DEBUG ((LM_DEBUG,"shared->nextsample = %d\n",shared->nextSample)); -// } - } -// else if (audioSocket >= 0) -// shared->nextSample = (shared->totalSamples-1) * val / POSITION_RANGE; - } -// tmp = CmdDONE; -// CmdWrite(&tmp, 1); - return 0; -} - -int -Command_Handler::position (void) - -{ - return this->position_action (0); -} - -int -Command_Handler::position_release (void) - -{ - return this->position_action (1); -} - -int -Command_Handler::volume (void) - -{ - OurCmdRead((char *)&shared->volumePosition, 4); - if (audioSocket >= 0) { - SetAudioGain(); - } - /* - unsigned char tmp = CmdDONE; - tmp = CmdDONE; - CmdWrite(&tmp, 1); - */ - return 0; -} - -int -Command_Handler::balance (void) - -{ - OurCmdRead((char *)&shared->balancePosition, 4); - /* - unsigned char tmp = CmdDONE; - tmp = CmdDONE; - CmdWrite(&tmp, 1); - */ - return 0; -} - -int -Command_Handler::speed (void) - -{ - ACE_DEBUG ((LM_DEBUG,"COmmand_Handler::speed ()\n")); - unsigned char tmp; - CORBA::Boolean result; - OurCmdRead((char *)&shared->speedPosition, 4); - set_speed(); - TAO_TRY - { - if (!shared->live && shared->cmd == CmdPLAY) - { - if (videoSocket >= 0) - { - Video_Control::SPEEDpara_var para (new Video_Control::SPEEDpara); - para->sn = shared->cmdsn; - para->usecPerFrame = shared->usecPerFrame; - para->framesPerSecond = shared->framesPerSecond; - para->frameRateLimit1000 = - (long)(shared->frameRateLimit * 1000.0); - { - int i = shared->config.maxSPframes; - i = (int) ((double)i * (1000000.0 / (double)shared->usecPerFrame) / - shared->pictureRate); - shared->sendPatternGops = max(min(i, PATTERN_SIZE) / shared->patternSize, 1); - } - compute_sendPattern(); - para->sendPatternGops = shared->sendPatternGops; - para->sendPattern.length (PATTERN_SIZE); - for (int i=0; i< PATTERN_SIZE ; i++) - para->sendPattern[i]=shared->sendPattern[i]; - // CORBA call - result = this->video_control_->speed (para.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (result == (0)) - return -1; - if (fbstate) { - maxrate = (double)minupf / (double)max(shared->usecPerFrame, minupf); - adjstep = ((double)minupf / (double)shared->usecPerFrame) / - (double)max(shared->patternSize * shared->sendPatternGops, 5); - fbstate = 1; - } - } - if (audioSocket >= 0) - { - Audio_Control::SPEEDPara_var para (new Audio_Control::SPEEDPara); - para->sn = shared->cmdsn; - para->samplesPerSecond = shared->samplesPerSecond; - para->samplesPerPacket = 1024 / shared->audioPara.bytesPerSample; - para->spslimit = 32000; - // CORBA call - result = - this->audio_control_->speed (para.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (result == (0)) - return -1; - } - } - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("audio_control->speed ()"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - - -int -Command_Handler::stop (void) - -{ -#ifdef STAT - unsigned char preCmd = shared->cmd; -#endif - /* - fprintf(stderr, "CTR: STOP . . .\n"); - */ - this->stop_playing (); - - if (shared->live && videoSocket >= 0) { - Fprintf(stderr, "CTR live video stat: average disp frame rate: %5.2f fps\n", - shared->pictureRate * displayedFrames / shared->nextFrame); - } - unsigned char tmp = CmdDONE; - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) command_handler::Stop :nextFrame=%d\n",shared->nextFrame)); - CmdWrite(&tmp, 1); - - return 0; -} - -int -Command_Handler::stop_playing (void) -{ - unsigned char precmd = shared->cmd; - - TAO_TRY - { - if (precmd == CmdFF || precmd == CmdFB || precmd == CmdPLAY) - { - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - unsigned char tmp = CmdSTOP; - NewCmd(CmdSTOP); - - /* notify AS and/or VS */ - if ((CORBA::is_nil (this->audio_control_) == 0) - && precmd == CmdPLAY - && rtplay) - { - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - // CORBA call - CORBA::Boolean result = - this->audio_control_->stop (shared->cmdsn, - TAO_TRY_ENV); - // cerr << "audio_control_->stop result is " << result << endl; - if (result == (0)) - return -1; - TAO_CHECK_ENV; - } - if (CORBA::is_nil (this->video_control_) == 0) - { - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - // CORBA call - CORBA::Boolean result = - this->video_control_->stop (shared->cmdsn, - TAO_TRY_ENV); - if (result == (0)) - return -1; - TAO_CHECK_ENV; - } - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - - /* stop timer and sleep for a while */ - // cerr << "stopping timer" << endl; - this->client_sig_handler_.stop_timer (); - usleep(100000); - - /* purge VDbuf and audio channel from AS*/ - if (videoSocket >= 0) - { - while (VDpeekMsg() != NULL) - VDreclaimMsg(VDgetMsg()); - /* - Fprintf(stderr, "CTR: VDbuf purged.\n"); - */ - fbstate = 0; - - } - - /* adjust some info */ - if (precmd == CmdPLAY && videoSocket >= 0) - shared->nextFrame = shared->currentFrame+1; - else - shared->nextGroup = shared->currentGroup + 1; - } - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Command_Handler.stop(..)"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -// connects and handshakes with the server -int -Command_Handler::connect_to_video_server (void) -{ - // set the pointers to the correct values - // *max_pkt_size = -INET_SOCKET_BUFFER_SIZE; - // initialize the command handler , ORB - TAO_TRY - { - if (this->resolve_video_reference () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) command_handler: resolve_video_reference returned -1"), - -1); - AVStreams::streamQoS_var the_qos (new AVStreams::streamQoS); - AVStreams::flowSpec_var the_flows (new AVStreams::flowSpec); - // Bind the client and server mmdevices. - - ACE_NEW_RETURN (this->video_reactive_strategy_, - Video_Endpoint_Reactive_Strategy_A (&this->orb_manager_, - this), - -1); - ACE_NEW_RETURN (this->video_client_mmdevice_, - TAO_MMDevice (this->video_reactive_strategy_), - -1); - - this->orb_manager_.activate_under_child_poa ("Video_Client_MMDevice", - this->video_client_mmdevice_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_NEW_RETURN (this->video_streamctrl_, - TAO_StreamCtrl, - -1); - this->video_streamctrl_->bind_devs - (this->video_client_mmdevice_->_this (TAO_TRY_ENV), - this->video_server_mmdevice_.in (), - the_qos.inout (), - the_flows.in (), - TAO_TRY_ENV); - - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("video_streamctrl.bind_devs:"); - return -1; - } - TAO_ENDTRY; - - return 0; - -} - -// connects and handshakes with the server -int -Command_Handler::connect_to_audio_server (void) -{ - - // // set the pointers to the correct values - // *max_pkt_size = -INET_SOCKET_BUFFER_SIZE; - - TAO_TRY - { - - if (this->resolve_audio_reference () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) command_handler: resolve_audio_reference returned -1"), - -1); - AVStreams::streamQoS_var the_qos (new AVStreams::streamQoS); - AVStreams::flowSpec_var the_flows (new AVStreams::flowSpec); - - ACE_NEW_RETURN (this->audio_reactive_strategy_, - Audio_Endpoint_Reactive_Strategy_A (&this->orb_manager_, - this), - -1); - - ACE_NEW_RETURN (this->audio_client_mmdevice_, - TAO_MMDevice (this->audio_reactive_strategy_), - -1); - - // activate the client audio mmdevice under the child poa. - this->orb_manager_.activate_under_child_poa ("Audio_Client_MMDevice", - this->audio_client_mmdevice_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_NEW_RETURN (this->audio_streamctrl_, - TAO_StreamCtrl, - -1); - - // Bind the client and server mmdevices. - this->audio_streamctrl_->bind_devs - (this->audio_client_mmdevice_->_this (TAO_TRY_ENV), - this->audio_server_mmdevice_.in (), - the_qos.inout (), - the_flows.in (), - TAO_TRY_ENV); - - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("audio_streamctrl.bind_devs:"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -// ======================================== -// Decode_Notification_Handler methods. - -Decode_Notification_Handler::Decode_Notification_Handler (Command_Handler *command_handler) - :command_handler_ (command_handler) -{ -} - -ACE_HANDLE -Decode_Notification_Handler::get_handle (void) const -{ - return vdsp[0]; -} - -int -Decode_Notification_Handler::handle_input (ACE_HANDLE fd) -{ - ACE_DEBUG ((LM_DEBUG,"Decode_Notification_Handler::handle_input \n")); - char message[BUFSIZ]; - int result = - ACE_OS::read (fd,&message,BUFSIZ); - if (result == -1) - ACE_ERROR_RETURN ((LM_ERROR,"Decode_Notification_Handler::handle_input read failed\n"),0); - if (result == 0) - ACE_ERROR_RETURN ((LM_ERROR,"Decode_Notification_Handler::handle_input socket closed\n"),0); - - if (message[0] != DECODED) - ACE_ERROR_RETURN ((LM_ERROR,"Decode_Notification_Handler:: Not a decoded message\n"),0); - - // Resume the command handler. - if (this->command_handler_->command_suspended_ != UNSUSPENDED) - { - unsigned char tmp; - switch (this->command_handler_->command_suspended_) - { - case INIT: - tmp = CmdDONE; - CmdWrite(&tmp, 1); - if (videoSocket < 0) - { - tmp = CmdVPclearScreen; - CmdWrite(&tmp, 1); - } - break; - case STEP: - tmp = CmdDONE; - CmdWrite(&tmp, 1); - break; - case POSITION: - if (this->command_handler_->operation_tag_ && audioSocket >= 0) /* needs to adjust audio position */ - { - - shared->nextSample = (int)((double)shared->audioPara.samplesPerSecond * - ((double)shared->nextFrame / shared->pictureRate)); - // ACE_DEBUG ((LM_DEBUG,"shared->nextsample = %d\n",shared->nextSample)); - } - if (audioSocket >= 0) - shared->nextSample = (shared->totalSamples-1) * (this->command_handler_->position_val_) / POSITION_RANGE; - tmp = CmdDONE; - CmdWrite(&tmp, 1); - break; - default: - ACE_DEBUG ((LM_DEBUG,"INVALID STATE for command suspension\n")); - break; - } - TAO_ORB_Core_instance ()->reactor ()->resume_handler (this->command_handler_->get_handle ()); - } - ::usr1_handler (0); - return 0; -} - - -// ---------------------------------------------------------------------- -// Client_Sig_Handler methods - -void -Client_Sig_Handler::PlayAudioOnly(void) -{ - int maxSize; - int size, csize; /* all in samples */ - unsigned int AFtime; - - if (audioFirst) - { - audioFirst = 0; - nextAFtime = GetAudioTime() + audioForward; - } - else - if ((int)(nextAFtime - GetAudioTime()) >= bufferedSamples) - return; - - if (timer_on >4) - { - // ~~we may need to uncomment this ?? - this->stop_timer (); - - // stop both the audio and video servers - this->command_handler_->stop (); - /* tries to rewind and play again */ - if (shared->loopBack) - { - /* - fprintf(stderr, "CTR: trying loopBack().\n"); - */ - loopBack(); - } - - return; - } - if (nextASSample >= shared->totalSamples) - { - timer_on ++; - return; - } - if (shared->samplesPerSecond >= shared->audioPara.samplesPerSecond) - maxSize = (AudioBufSize/shared->audioPara.bytesPerSample); - else - maxSize = ((AudioBufSize/shared->audioPara.bytesPerSample) * - shared->samplesPerSecond) / - shared->audioPara.samplesPerSecond; - for (;;) - { - size = abuffer->ABgetSamples(rawBuf, maxSize); - csize = AudioConvert(size); - AFtime = PlayAudioSamples(nextAFtime, convBuf, csize); - nextASSample += size; - shared->nextSample += size; - nextAFtime += csize; - if ((int)(nextAFtime - AFtime) < 0) - nextAFtime = AFtime; - if (nextASSample >= shared->totalSamples) - { - timer_on ++; - break; - } - /* - Fprintf(stderr, "CTR: nextAFtime:%d, AFtime:%d, bufferedSamples:%d\n", - nextAFtime, AFtime, bufferedSamples); - */ - if ((int)(nextAFtime - AFtime) >= bufferedSamples) - break; - } - { - unsigned char tmp = CmdVPaudioPosition; - CmdWrite(&tmp, 1); - } -} - -// handles the timeout SIGALRM signal -Client_Sig_Handler::Client_Sig_Handler (Command_Handler *command_handler) - : command_handler_ (command_handler) -{ -} - -Client_Sig_Handler::~Client_Sig_Handler (void) -{ - TAO_ORB_Core_instance ()->reactor ()->remove_handler (this, - ACE_Event_Handler::NULL_MASK); - - TAO_ORB_Core_instance ()->reactor ()->remove_handler (this->sig_set); -} - -int -Client_Sig_Handler::register_handler (void) -{ - // Assign the Sig_Handler a dummy I/O descriptor. Note that even - // though we open this file "Write Only" we still need to use the - // ACE_Event_Handler::NULL_MASK when registering this with the - // ACE_Reactor (see below). - this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY); - ACE_ASSERT (this->handle_ != -1); - - // Register signal handler object. Note that NULL_MASK is used to - // keep the ACE_Reactor from calling us back on the "/dev/null" - // descriptor. - if (TAO_ORB_Core_instance ()->reactor ()->register_handler - (this, ACE_Event_Handler::NULL_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - - // Create a sigset_t corresponding to the signals we want to catch. - - this->sig_set.sig_add (SIGINT); - this->sig_set.sig_add (SIGQUIT); - this->sig_set.sig_add (SIGALRM); - this->sig_set.sig_add (SIGUSR2); - this->sig_set.sig_add (SIGSEGV); - - // Register the signal handler object to catch the signals. - if (TAO_ORB_Core_instance ()->reactor ()->register_handler (sig_set, - this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - return 0; -} - -int -Client_Sig_Handler::remove_handler (void) -{ - if (TAO_ORB_Core_instance ()->reactor ()->remove_handler (this, - ACE_Event_Handler::NULL_MASK) == -1) - ACE_DEBUG ((LM_DEBUG,"(%P)remove_handler failed for client_sig handler")); - - if (TAO_ORB_Core_instance ()->reactor ()->remove_handler (sig_set) == -1) - ACE_DEBUG ((LM_DEBUG,"(%P)remove_handler failed for client_sig handler")); - return 0; -} - -// Called by the ACE_Reactor to extract the fd. -ACE_HANDLE -Client_Sig_Handler::get_handle (void) const -{ - return this->handle_; -} - -int -Client_Sig_Handler::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n")); - return 0; -} - -int -Client_Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n")); - return 0; -} - -// This method handles all the signals that are being caught by this -// object. In our simple example, we are simply catching SIGALRM, -// SIGINT, and SIGQUIT. Anything else is logged and ignored. -// -// There are several advantages to using this approach. First, -// the behavior triggered by the signal is handled in the main event -// loop, rather than in the signal handler. Second, the ACE_Reactor's -// signal handling mechanism eliminates the need to use global signal -// handler functions and data. - -int -Client_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) -{ - int status; - pid_t pid; - //ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum)); - - switch (signum) - { - case SIGSEGV: - ::remove_all_semaphores (); - exit (0); - case SIGALRM: - // Handle the timeout - this->TimerHandler (signum); - // %% ??!!! - break; - case SIGCHLD: - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum)); - pid = ACE_OS::wait (&status); - return 0; - case SIGINT: - ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S, removing signal handlers from the reactor\n", signum)); - this->command_handler_->close (); - TAO_ORB_Core_instance ()->reactor ()->remove_handler (this->sig_set); - TAO_ORB_Core_instance ()->orb ()->shutdown (); - return 0; - default: - ACE_DEBUG ((LM_DEBUG, - "(%t) %S: not handled, returning to program\n", - signum)); - return 0; - } - this->TimerProcessing (); - return 0; -} - -void -Client_Sig_Handler::TimerHandler(int sig) -{ - int currentUPF = shared->currentUPF; - /* - Fprintf(stderr, "CTR in TimerHandler.\n"); - */ - if (videoSocket >= 0 && shared->cmd == CmdPLAY && currentUPF != timerUPF) - { - struct itimerval val; - { - val.it_interval.tv_sec = val.it_value.tv_sec = currentUPF / 1000000; - val.it_interval.tv_usec = val.it_value.tv_usec = currentUPF % 1000000; - setitimer(ITIMER_REAL, &val, NULL); - /* - fprintf(stderr, "CTR: timer speed changed to %d upf.\n", shared->currentUPF); - */ - } - timerUPF = currentUPF; -#ifdef STAT - if (shared->collectStat && speedPtr < SPEEDHIST_SIZE) - { - speedHistory[speedPtr].frameId = shared->nextFrame; - speedHistory[speedPtr].usecPerFrame = timerUPF; - speedHistory[speedPtr].frameRateLimit = shared->frameRateLimit; - speedHistory[speedPtr].frames = shared->sendPatternGops * shared->patternSize; - speedHistory[speedPtr].framesDropped = shared->framesDropped; - } - speedPtr ++; -#endif - } - /* - fprintf(stderr, "+\n"); - */ - if (!timerCount) { - int addedVSwat; - if (shared->cmd == CmdPLAY) { - addedVSwat = shared->usecPerFrame * (shared->VBheadFrame - shared->nextFrame); - } - else if (shared->cmd == CmdFF) { - addedVSwat = shared->usecPerFrame * (shared->VBheadFrame - shared->nextGroup); - } - else { /* shared->cmd == CmdFB */ - addedVSwat = shared->usecPerFrame * (shared->nextGroup - shared->VBheadFrame); - } - shared->VStimeAdvance += addedVSwat; - } - timerCount += timer_signals_skip + 1; - timer_signals_skip = 0; - - if (shared->live ) { - if (audioSocket <= 0) { /* video only */ - unsigned t = shared->VBheadFrame - startVSA; - if (timerCount < t) { - /* - Fprintf(stderr, "CTR: (av) timerCount %d, t %d\n", timerCount, t); - */ - timerCount = t; - } - } - } - double frames_per_group = - (double)shared->totalFrames/shared->totalGroups; - long nextframe = shared->nextGroup * frames_per_group; - - if (audioSocket > 0) - { - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Adjusting audio nextsample value\n")); - shared->nextSample = (int)((double)shared->audioPara.samplesPerSecond * - ((double)nextframe / shared->pictureRate)); - - /* audio involved, TimerProcessing() will adjust the rate automatically */ - } - if ((shared->cmd == CmdFF) || (shared->cmd == CmdFB)) - shared->nextFrame = shared->nextGroup * frames_per_group; -} - -void -Client_Sig_Handler::stop_timer(void) -{ - struct itimerval val; - - if (!timer_on) - return; - - timer_on = 0; - - // setsignal(SIGALRM, SIG_IGN); - - val.it_interval.tv_sec = val.it_value.tv_sec = 0; - val.it_interval.tv_usec = val.it_value.tv_usec = 0; - setitimer(ITIMER_REAL, &val, NULL); - - fprintf(stderr, "CTR: timer stopped.\n"); - - // this->command_handler_->stop_timer (); - /* - usleep(200000); - */ -} - -void -Client_Sig_Handler::DisplayPicture(void) -{ - // ACE_DEBUG ((LM_DEBUG,"inside DisplayPicture\n")); - int toDisplay = 1; - int count = timerCount; - - if ((shared->cmd != CmdPLAY && - shared->cmd != CmdFF && - shared->cmd != CmdFB) || - lastCount == count) - ACE_ERROR ((LM_ERROR,"Returning from first if in DisplayPicture\n")); - if (timer_on >4) /* 4 is a magic number */ - { - this->stop_timer(); - - // stop both the audio and video. - this->command_handler_->stop (); - - /* tries to rewind and play again */ - if (shared->cmd == CmdPLAY && shared->loopBack) - loopBack(); - - ACE_ERROR ((LM_ERROR,"Returning because timer_on > 4\n")); - } - /* - Fprintf(stderr, "CTR in diplayPicture().\n"); - */ - { - int i, j; - FrameBlock *buf, *next; -#if 0 - if (shared->cmd == CmdPLAY && rtplay && - (i = shared->nextFrame - shared->firstGopFrames) > 0) { - j = (i / shared->patternSize) % shared->sendPatternGops; - i %= shared->patternSize; - if (shared->pattern[i] != 'B') { - while (i > 0) { - if (shared->pattern[--i] != 'B') break; - } - } - toDisplay = (shared->sendPattern + j * shared->patternSize)[i]; - } - else if (shared->cmd != CmdPLAY) { - if (last_disp_fid != shared->nextGroup) toDisplay = 1; - else toDisplay = 0; - } - if (toDisplay) -#endif - { - if (shared->cmd == CmdPLAY && !rtplay) { /* if play with best effort */ - while (VDcheckMsg() <= 0) /* keep sleeping for 10 millisec until a decoded - frame show up in VD buffer */ - usleep(10000); - } -#ifdef STAT - if (shared->collectStat) - { - shared->stat.VBfillLevel[shared->nextFrame] = - shared->VBheadFrame - shared->nextFrame; - i = VDcheckMsg(); - if (i < 0) i = 0; - else if (i >= MAX_VDQUEUE_SIZE) i = MAX_VDQUEUE_SIZE - 1; - shared->stat.VDqueue[i] ++; - } -#endif - toDisplay = 0; - for (;;) - { - buf = VDpeekMsg(); - - if (buf == NULL) { - // ACE_DEBUG ((LM_DEBUG,"Null buffer ")); - goto loop_end; - } - - switch (shared->cmd) - { - // ACE_DEBUG ((LM_DEBUG,"nextFrame = %d,nextGroup\n",shared->nextFrame,shared->nextGroup)); - int position; - case CmdPLAY: - position = shared->nextFrame; - // ACE_DEBUG ((LM_DEBUG,"nextFrame = %d,nextGroup\n",shared->nextFrame,shared->nextGroup)); - /* - Fprintf(stderr, "CTR PLAY: buf->display %d, position %d\n", - buf->display, position); - */ - if (buf->display == position) - { /* display it */ - buf = VDgetMsg(); - shared->nextGroup = buf->gop + 1; -#ifdef STAT - shared->stat.CTRdispOnTime ++; -#endif - goto display_picture; - } - else if (buf->display > position) - { /* too early, wait for future display */ - goto loop_end; - } - else /* this picture too late */ - { - // this line gets the buffer or dequeues from the shared memory queue - buf = VDgetMsg(); - if (((next = VDpeekMsg()) == NULL || next->display > position) && - buf->display > last_disp_fid) { -#ifdef STAT - shared->stat.CTRdispLate ++; -#endif - /* buf is the last one, or next too to early, display it anyway */ - goto display_picture; - } - else /* next not too early, discard buf */ - { -#ifdef STAT - if (buf->display < last_disp_fid) - shared->stat.CTRdropOutOrder ++; - else - shared->stat.CTRdropLate ++; -#endif - /* - Fprintf(stderr, "CTR drops frame display=%d, shared->nextFrame=%d\n", - buf->display, shared->nextFrame); - */ - VDreclaimMsg(buf); - continue; - } - } - break; - case CmdFF: - position = shared->nextGroup; - if (buf->gop == position) - { /* display it */ - buf = VDgetMsg(); - shared->nextFrame = buf->display; - // ACE_DEBUG ((LM_DEBUG,"nextFrame = %d\n",shared->nextFrame)); - goto display_picture; - } - else if (buf->gop > position) - { /* hold it for future display */ - goto loop_end; - } - else /* discard late picture */ - { - buf = VDgetMsg(); - if ((next = VDpeekMsg()) == NULL || next->gop > position) - /* buf is the last one, or next too to early, display it anyway */ - goto display_picture; - else /* next not too early, discard buf */ - { - VDreclaimMsg(buf); - continue; - } - } - break; - case CmdFB: - position = shared->nextGroup; - if (buf->gop == position) - { /* display it */ - buf = VDgetMsg(); - shared->nextFrame = buf->display; - // ACE_DEBUG ((LM_DEBUG,"nextFrame = %d\n",shared->nextFrame)); - goto display_picture; - } - else if (buf->gop < position) - { /* hold it for future display */ - goto loop_end; - } - else /* discard late picture */ - { - buf = VDgetMsg(); - if ((next = VDpeekMsg()) == NULL || next->gop < position) - /* buf is the last one, or next too to early, display it anyway */ - goto display_picture; - else /* next not too early, discard buf */ - { - VDreclaimMsg(buf); - continue; - } - } - break; - default: - goto loop_end; - } - } - display_picture: - toDisplay = 1; - if (shared->cmd == CmdPLAY) last_disp_fid = buf->display; - else last_disp_fid = buf->gop; -#ifdef STAT - if (shared->live) displayedFrames ++; - if (shared->collectStat) - shared->stat.VPframesDisplayed[buf->display >> 3] |= 1 << (buf->display % 8); -#endif - { - unsigned char tmp = CmdVPdisplayFrame; - CmdWrite(&tmp, 1); - } - CmdWrite((unsigned char *)&buf, sizeof(char *)); - loop_end:; - } - } - - if (shared->cmd == CmdPLAY) - { - shared->nextFrame += rtplay ? count - lastCount : 1; - if (shared->nextFrame >= shared->totalFrames) - { - timer_on ++; - shared->nextFrame = shared->totalFrames; - } - - /* following is frameRate feedback algorithm */ - if (fbstate && toDisplay && rtplay) { - static Filter *fr = NULL; /* frame-rate filter */ - static int start; /* feedback action time, in microseconds */ - static int delay; /* time to delay after each action, and to charge - the filter after action-delay */ - static int pretime; /* time of previous frame, in microseconds */ - static int throw_outlier = 0; - /* tag to throw away outlier. In case there are outliers, this - tag is flipped by the algorithm, so that If there are two - consecutive sample deviating very much from the filtered mean - value, the second is not considered outlier. This may mean - that the frame rate has dropped significantly. */ - static double vr; /* filtered frame-rate value, in microseconds/frame */ - double r, nr; - int t = get_usec(); - - switch (fbstate) { - case 3: /* working, monitoring */ - { - int interval = get_duration(pretime, t); - if (throw_outlier) { - if (interval >> 2 >= vr) { - /* at least four times the filtered mean value to be - considered outlier */ - /* In case an outlier is detected and thrown away, then - the following sample will never be classified as an - outlier, and the current time is recorded */ - throw_outlier = 0; - pretime = t; - Fprintf(stderr, "CTR detected a gap %d (vr = %d) us\n", - interval, (int)vr); - break; - } - } - else { - throw_outlier = 1; - } - vr = DoFilter(fr, (double)interval); - } - pretime = t; - - r = minupf / vr; /* convert the display fps to percentage of maxfr */ - - nr = 0; /* This variable contains the newly computed server frame rate */ - - /* let nr oscillate around 1.5 ~ 2.5 */ - if (min(frate, maxrate) - r >= 3.0 * adjstep) { - /* pipeline is considered overloaded if server fps is more than 3 adjsteps - higher than display fps */ - nr = min(frate, maxrate) - adjstep; /* slow down server frame rate - one step */ - if (fb_startup) { /* startup feedback action: jump set the server fps - to a value close to actually measure display - frame rate */ - fb_startup = 0; - while (nr >= r + 2.5 * adjstep) { - nr -= adjstep; - } - } - } - else if (frate - r <= 0.5 * adjstep && frate < maxrate) { - /* pipeline load is considered too light if the server frame rate - is less than 0.5fps higher than display frame rate, while the server - fps is no maximum yet. The server fps then is stepped up. */ - nr = min(frate + adjstep, maxrate); - } - if (nr > 0) { /* nr = 0 if not feedback action needs to be taken */ - shared->frameRateLimit = maxfr * nr; - compute_sendPattern(); - /* - fprintf(stderr, - "CTR adjust frameRate to %lf, vr=%lf minupf=%d, r=%lf, frate=%lf, nr=%lf\n", - shared->frameRateLimit, vr, minupf, r, frate, nr); - */ - frate = nr; /* remember new server frame rate */ - shared->qosRecomputes ++; - start = t; /* remember the action time */ - /* delay for some time before restarts, to let feedback take effect */ - delay = shared->usecPerFrame * (shared->VBheadFrame - shared->nextFrame) + - shared->playRoundTripDelay; - if (delay < 0) delay = shared->usecPerFrame; - fbstate = 4; - } - break; - case 4: /* delay and reset after action*/ - if (get_duration(start, t) >= delay) { - /* - fprintf(stderr, - "CTR VB from s2 to s3, vr %lf, frate %lf, maxrate %lf, step %lf\n", - vr, frate, maxrate, adjstep); - */ - fr = ResetFilter(fr, shared->config.filterPara >= 1 ? - shared->config.filterPara : 100); - delay = shared->usecPerFrame * - max(shared->sendPatternGops * shared->patternSize, - shared->config.filterPara); - /* charge filter for time */ - start = pretime = t; - throw_outlier = 0; - fbstate = 2; - } - break; - case 2: /* charge the filter */ - { - int interval = get_duration(pretime, t); - if (throw_outlier) { - if (interval >> 2 >= vr) { /* at least four times the previous average */ - throw_outlier = 0; - pretime = t; - Fprintf(stderr, "CTR detected a gap %d (vr = %d) us\n", - interval, (int)vr); - break; - } - } - else { - throw_outlier = 1; - } - vr = DoFilter(fr, (double)interval); - } - pretime = t; - if (get_duration(start, t) >= delay) { - /* - fprintf(stderr, - "CTR VB from s2 to s3, vr %lf, frate %lf, maxrate %lf, step %lf\n", - vr, frate, maxrate, adjstep); - */ - fbstate = 3; - } - break; - case 1: /* start or speed change, wait until speed data consistant */ - if (shared->currentUPF == shared->usecPerFrame) { - if (fr == NULL) { - fr = NewFilter(FILTER_LOWPASS, shared->config.filterPara >= 1 ? - shared->config.filterPara : 100); - } - else { - fr = ResetFilter(fr, shared->config.filterPara >= 1 ? - shared->config.filterPara : 100); - } - if (fr == NULL) { - ACE_OS::perror ("CTR failed to allocate space for fr filter"); - fbstate = 0; - } - vr = DoFilter(fr, (double)shared->usecPerFrame); - delay = shared->usecPerFrame * - shared->sendPatternGops * shared->patternSize; - /* charge filter for some time */ - pretime = start = t; - throw_outlier = 0; - fbstate = 2; - } - break; - default: - fprintf(stderr, "CTR error: unknown feedback state: %d\n", fbstate); - fbstate = 1; - break; - } - } - /* end of frame rate control algorithm */ - - } - else if (shared->cmd == CmdFF) - { - shared->nextGroup += count - lastCount; - if (shared->nextGroup >= shared->totalGroups) - { - timer_on ++; - shared->nextGroup = shared->totalGroups - 1; - } - } - else - { - shared->nextGroup -= count - lastCount; - if (shared->nextGroup < 0) - { - timer_on ++; - shared->nextGroup = 0; - } - } - lastCount = count; -} - -void -Client_Sig_Handler::TimerProcessing (void) -{ - // cerr << "Timerprocessing signal went off\n"; - if (audioSocket >= 0 && shared->cmd == CmdPLAY) - { - if (videoSocket < 0) - this->PlayAudioOnly (); - else if (rtplay) - { - // cerr << "TimerProcessing: calling PlayAudio ()\n"; - int res = PlayAudio(); - /* and also tries to sync audio and video */ - if (res) - { - int jit; - res = forward - audioForward; - jit = (res>0 ? res : -res); - jit = (int)(((double)jit / (double)shared->samplesPerSecond) * 1000000.0); - if (res < -audioForward/2) /* needs to speedup the clock */ - { - struct itimerval val; - getitimer(ITIMER_REAL, &val); - if ((int)val.it_value.tv_usec > jit) - val.it_value.tv_usec -= jit; - else - { - timer_signals_skip ++; - val.it_value.tv_usec = 2; - } - setitimer(ITIMER_REAL, &val, NULL); - } - else if (res > audioForward) /* needs to slow down the clock */ - { - struct itimerval val; - /* - val.it_interval.tv_sec = val.it_value.tv_sec = 0; - val.it_interval.tv_usec = val.it_value.tv_usec = 0; - */ - getitimer(ITIMER_REAL, &val); - val.it_value.tv_usec += (jit % 1000000); - val.it_value.tv_sec += (jit / 1000000); - setitimer(ITIMER_REAL, &val, NULL); - } - /* - if (res < -audioForward || res > audioForward) - */ - if (res < -16000 || res > 16000) - { - Fprintf(stderr, "Audio forward jit %d samples\n", res); - } - } - } - } - if (videoSocket >= 0 && - (shared->cmd == CmdPLAY || shared->cmd == CmdFF || shared->cmd == CmdFB)) { - // cerr << "Timerprocessing signal-handler done\n"; - DisplayPicture(); - } - -} - -// ----------------------------------------------------------- -// Audio_Client_StreamEndPoint methods - -Audio_Client_StreamEndPoint::Audio_Client_StreamEndPoint (Command_Handler *command_handler, - char *host) - :command_handler_ (command_handler), - host_ (host) -{ -} - -int -Audio_Client_StreamEndPoint::handle_open (void) -{ - return -1; -} - -int -Audio_Client_StreamEndPoint::handle_close (void) -{ - return -1; -} - -// called by the framework before calling connect. Here we create our -// flow spec which is nothing but hostname::port_number of the -// datagram. -CORBA::Boolean -Audio_Client_StreamEndPoint::handle_preconnect (AVStreams::flowSpec &the_spec) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) handle_preconnect called\n")); - CORBA::UShort server_port; - ACE_INET_Addr local_addr; - - // Get the local UDP address - if (this->dgram_.open (ACE_Addr::sap_any) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t) datagram open failed %p\n"),0); - - // set the socket buffer sizes to 64k. - int sndbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; - int rcvbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; - - if (this->dgram_.set_option (SOL_SOCKET, - SO_SNDBUF, - (void *) &sndbufsize, - sizeof (sndbufsize)) == -1 - && errno != ENOTSUP) - return 0; - else if (this->dgram_.set_option (SOL_SOCKET, - SO_RCVBUF, - (void *) &rcvbufsize, - sizeof (rcvbufsize)) == -1 - && errno != ENOTSUP) - return 0; - - if (this->dgram_.get_local_addr (local_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t)datagram get local addr failed %p"),-1); - // form a string - char client_address_string [BUFSIZ]; - ::sprintf (client_address_string, - "%s:%d", - this->host_ == 0 ? local_addr.get_host_name ():this->host_, - local_addr.get_port_number ()); - the_spec.length (1); - the_spec [0] = CORBA::string_dup (client_address_string); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) client flow spec is %s\n", - client_address_string)); - return 1; -} - -// called by the A/V framework after calling connect. Passes the -// server streamendpoints' flowspec which we use to connect our -// datagram socket. -CORBA::Boolean -Audio_Client_StreamEndPoint::handle_postconnect (AVStreams::flowSpec& server_spec) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) handle_postconnect called \n")); - - // Take the first string of the sequence . - ACE_INET_Addr server_udp_addr (server_spec [0]); - - server_udp_addr.dump (); - if (ACE_OS::connect (this->dgram_.get_handle (),(sockaddr *) server_udp_addr.get_addr (), - server_udp_addr.get_size ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t) datagram connect failed %p\n"),-1); - // Now set the data handle of the command handler. - - this->command_handler_->set_audio_data_handle (this->dgram_.get_handle ()); - return 0; -} - -int -Audio_Client_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) - -{ - return -1; -} - -int -Audio_Client_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) - -{ - return -1; -} - -int -Audio_Client_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) - -{ - return -1; -} - -ACE_HANDLE -Audio_Client_StreamEndPoint::get_handle (void) -{ - return this->dgram_.get_handle (); -} - -// ----------------------------------------------------------- -// Video_Client_StreamEndPoint methods - -Video_Client_StreamEndPoint::Video_Client_StreamEndPoint (Command_Handler *command_handler, - char *host) - :command_handler_ (command_handler), - host_ (host) -{ -} - -int -Video_Client_StreamEndPoint::handle_open (void) -{ - return -1; -} - -int -Video_Client_StreamEndPoint::handle_close (void) -{ - return -1; -} - -CORBA::Boolean -Video_Client_StreamEndPoint::handle_preconnect (AVStreams::flowSpec &the_spec) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) handle_preconnect called\n")); - CORBA::UShort server_port; - ACE_INET_Addr local_addr; - - // Get the local UDP address - if (this->dgram_.open (ACE_Addr::sap_any) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t) datagram open failed %p\n"),0); - - // set the socket buffer sizes to 64k. - int sndbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; - int rcvbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; - - if (this->dgram_.set_option (SOL_SOCKET, - SO_SNDBUF, - (void *) &sndbufsize, - sizeof (sndbufsize)) == -1 - && errno != ENOTSUP) - return 0; - else if (this->dgram_.set_option (SOL_SOCKET, - SO_RCVBUF, - (void *) &rcvbufsize, - sizeof (rcvbufsize)) == -1 - && errno != ENOTSUP) - return 0; - - if (this->dgram_.get_local_addr (local_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t)datagram get local addr failed %p"),-1); - // form a string - char client_address_string [BUFSIZ]; - ::sprintf (client_address_string, - "%s:%d", - this->host_ == 0 ?local_addr.get_host_name ():this->host_, - local_addr.get_port_number ()); - the_spec.length (1); - the_spec [0] = CORBA::string_dup (client_address_string); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) client flow spec is %s\n", - client_address_string)); - return 1; -} - -CORBA::Boolean -Video_Client_StreamEndPoint::handle_postconnect (AVStreams::flowSpec& server_spec) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) handle_postconnect called \n")); - - // Take the first string of the sequence . - ACE_INET_Addr server_udp_addr (server_spec [0]); - - server_udp_addr.dump (); - if (ACE_OS::connect (this->dgram_.get_handle (),(sockaddr *) server_udp_addr.get_addr (), - server_udp_addr.get_size ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t) datagram connect failed %p\n"),-1); - // Now set the data handle of the command handler. - - this->command_handler_->set_video_data_handle (this->dgram_.get_handle ()); - return 0; -} - -int -Video_Client_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) - -{ - return -1; -} - -int -Video_Client_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) - -{ - return -1; -} - -int -Video_Client_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) - -{ - return -1; -} - -ACE_HANDLE -Video_Client_StreamEndPoint::get_handle (void) -{ - return this->dgram_.get_handle (); -} - -// --------------------------------------------------------- -// Video_Client_VDev methods. - -Video_Client_VDev::Video_Client_VDev (void) - : video_control_ (0), - command_handler_ (0) -{ -} - - -Video_Client_VDev::Video_Client_VDev (Command_Handler *command_handler) - :video_control_ (0), - command_handler_ (command_handler) -{ -} - -CORBA::Boolean -Video_Client_VDev::set_media_ctrl (CORBA::Object_ptr media_ctrl, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Video_Client_VDev::set_media_ctrl ()\n")); - this->video_control_ = Video_Control::_narrow (media_ctrl, - env); - - TAO_CHECK_ENV_RETURN (env,0); - - this->command_handler_->set_video_control (this->video_control_); - - return 1; -} - -// ----------------------------------------------------------- -// Audio_Client_VDev methods. - -Audio_Client_VDev::Audio_Client_VDev (void) - : audio_control_ (0), - command_handler_ (0) -{ -} - - -Audio_Client_VDev::Audio_Client_VDev (Command_Handler *command_handler) - :audio_control_ (0), - command_handler_ (command_handler) -{ -} - -CORBA::Boolean -Audio_Client_VDev::set_media_ctrl (CORBA::Object_ptr media_ctrl, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_Client_VDev::set_media_ctrl ()\n")); - this->audio_control_ = Audio_Control::_narrow (media_ctrl, - env); - - TAO_CHECK_ENV_RETURN (env,0); - - this->command_handler_->set_audio_control (this->audio_control_); - - return 1; -} - -// ----------------------------------------------------------- -// Video_Endpoint_Reactive_Strategy_A methods - -Video_Endpoint_Reactive_Strategy_A::Video_Endpoint_Reactive_Strategy_A (TAO_ORB_Manager *orb_manager, - Command_Handler *command_handler) - : TAO_AV_Endpoint_Reactive_Strategy_A (orb_manager), - command_handler_ (command_handler) -{ -} - -Video_Endpoint_Reactive_Strategy_A::~Video_Endpoint_Reactive_Strategy_A (void) -{ - // delete this->vdev_; - // delete this->endpoint_; -} - -int -Video_Endpoint_Reactive_Strategy_A::make_vdev (Video_Client_VDev *&vdev) -{ - ACE_NEW_RETURN (this->vdev_, - Video_Client_VDev (this->command_handler_), - -1); - vdev = this->vdev_; - return 0; -} - -int -Video_Endpoint_Reactive_Strategy_A::make_stream_endpoint (Video_Client_StreamEndPoint *&endpoint) -{ - ACE_NEW_RETURN (this->endpoint_, - Video_Client_StreamEndPoint (this->command_handler_, - this->command_handler_->get_data_host ()), - -1); - endpoint = this->endpoint_; - return 0; -} - -// ------------------------------------------------------------ -// Audio_Endpoint_Reactive_Strategy_A methods - -Audio_Endpoint_Reactive_Strategy_A::Audio_Endpoint_Reactive_Strategy_A (TAO_ORB_Manager *orb_manager, - Command_Handler *command_handler) - : TAO_AV_Endpoint_Reactive_Strategy_A (orb_manager), - command_handler_ (command_handler) -{ -} - -Audio_Endpoint_Reactive_Strategy_A::~Audio_Endpoint_Reactive_Strategy_A (void) -{ - // delete this->vdev_; - // delete this->endpoint_; -} - -int -Audio_Endpoint_Reactive_Strategy_A::make_vdev (Audio_Client_VDev *&vdev) -{ - ACE_NEW_RETURN (this->vdev_, - Audio_Client_VDev (this->command_handler_), - -1); - vdev = this->vdev_; - return 0; -} - -int -Audio_Endpoint_Reactive_Strategy_A::make_stream_endpoint (Audio_Client_StreamEndPoint *&endpoint) -{ - ACE_NEW_RETURN (this->endpoint_, - Audio_Client_StreamEndPoint (this->command_handler_, - this->command_handler_->get_data_host ()), - -1); - endpoint = this->endpoint_; - return 0; -} - -//-------------------------------------------------------------------------------- - -Receiver_i::Receiver_i (Command_Handler *handler) - :command_handler_ (handler) -{ -} - -void -Receiver_i::push_mmdevice (CORBA::Object_ptr audio_mmdevice, - const char *audio_file, - CORBA::Object_ptr video_mmdevice, - const char *video_file, - CORBA::Environment&) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t)Receiver_i::push_audio_mmdevice")); - this->command_handler_->set_mmdevice (audio_mmdevice,audio_file,video_mmdevice,video_file); -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class TAO_AV_Endpoint_Reactive_Strategy; -template class TAO_AV_Endpoint_Reactive_Strategy_A; -template class TAO_AV_Endpoint_Reactive_Strategy; -template class TAO_AV_Endpoint_Reactive_Strategy_A; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy -#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy_A -#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy -#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy_A -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h deleted file mode 100644 index a6ec7b1d646..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h +++ /dev/null @@ -1,617 +0,0 @@ -// $Id$ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -#include "ace/OS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// ============================================================================ -// -// = LIBRARY -// mpeg_client -// -// = FILENAME -// Command_Handler.h -// -// = DESCRIPTION -// Defines the client side components of the A/V framework like -// video stream endpoints ,video multi media device, video virtual device. -// -// = AUTHORS -// Sumedh Mungee (sumedh@cs.wustl.edu) -// Nagarajan Surendran (naga@cs.wustl.edu) -// -// ============================================================================ - - -#ifndef AV_COMMAND_HANDLER_H -#define AV_COMMAND_HANDLER_H - -#include "ace/Reactor.h" -#include "ace/Event_Handler.h" -#include "ace/ARGV.h" -#include "tao/TAO.h" -#include "mpeg_shared/Video_ControlC.h" -#include "orbsvcs/CosNamingC.h" -#include "ace/SOCK_Dgram.h" -#include "ace/SOCK_Connector.h" -#include "mpeg_shared/Audio_ControlC.h" -#include "orbsvcs/AV/AVStreams_i.h" -#include "ace/High_Res_Timer.h" -#include "ace/Acceptor.h" -#include "orbsvcs/Naming/Naming_Utils.h" -#include "mpeg_shared/ReceiverS.h" -#include "ace/Get_Opt.h" -#include "ab.h" -#include "vb.h" - -class Command_Handler; - - -class Receiver_i - :public POA_Receiver -{ - public: - Receiver_i (Command_Handler *handler); - // constructor. - - void push_mmdevice (CORBA::Object_ptr audio_mmdevice, - const char* audio_file, - CORBA::Object_ptr video_mmdevice, - const char *video_file, - CORBA::Environment&); - - private: - Command_Handler *command_handler_; - // Reference to command handler. -}; - -class Video_Client_StreamEndPoint - :public virtual TAO_Client_StreamEndPoint -{ - // = TITLE - // Defines a video client StreamEndpoint class - // = DESCRIPTION - // Makes use of a connected dgram to receive data from the server - // side stream endpoint. -public: - Video_Client_StreamEndPoint (Command_Handler *command_handler =0, - char *host =0); - // constructor - - virtual int handle_open (void); - // called when streamendpoint is instantiated - - virtual int handle_close (void); - // called when streamendpoint is being destructed - - virtual CORBA::Boolean handle_preconnect (AVStreams::flowSpec &the_spec); - // called before connecting - - virtual CORBA::Boolean handle_postconnect (AVStreams::flowSpec &the_spec); - // called after connecting - - virtual int handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - - virtual int handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - - virtual ACE_HANDLE get_handle (void); - // gets the underlying socket descriptor from the SOCK_Dgram - -private: - ACE_SOCK_Dgram dgram_; - // The datagram used for streaming. - - Command_Handler *command_handler_; - // Reference to the command handler - - char *host_; - // host interface to bind to. -}; - -class Audio_Client_StreamEndPoint - :public virtual TAO_Client_StreamEndPoint -{ - // = TITLE - // Defines a audio client stream endpoint - // = DESCRIPTION - // Uses a connected dgram to receive data from the audio server. -public: - Audio_Client_StreamEndPoint (Command_Handler *command_handler = 0, - char *host = 0); - // constructor - - virtual int handle_open (void); - // called when streamendpoint is instantiated - - virtual int handle_close (void); - // called when streamendpoint is being destructed - - virtual CORBA::Boolean handle_preconnect (AVStreams::flowSpec &the_spec); - // called before connecting - - virtual CORBA::Boolean handle_postconnect (AVStreams::flowSpec &the_spec); - // called after connecting - - virtual int handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - - virtual int handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - - virtual ACE_HANDLE get_handle (void); - // gets the underlying socket descriptor from the SOCK_Dgram - -private: - ACE_SOCK_Dgram dgram_; - // The datagram used for streaming. - - Command_Handler *command_handler_; - // Reference to the command handler. - - char *host_; - // host interface to bind to. -}; - - -class Video_Client_VDev - : public virtual TAO_VDev -{ - // = TITLE - // Defines a class that is a client side Virtual device for video. - // = Description - // Needs a pointer to the command handler object so that it can - // set the video control pointer of the command handler. -public: - Video_Client_VDev (void); - Video_Client_VDev (Command_Handler *command_handler); - -protected: - CORBA::Boolean set_media_ctrl (CORBA::Object_ptr media_ctrl, - CORBA::Environment& env); - -private: - Video_Control_ptr video_control_; - // The video controller - - Command_Handler *command_handler_; - // pointer to the command handler object -}; - - -class Audio_Client_VDev - : public virtual TAO_VDev -{ - // = TITLE - // Defines a client side audio virtual device - // = DESCRIPTION - // Takes a pointer to a command handler object so that it can set - // the audio control object pointer of the command handler. -public: - Audio_Client_VDev (void); - Audio_Client_VDev (Command_Handler *command_handler); - -protected: - CORBA::Boolean set_media_ctrl (CORBA::Object_ptr media_ctrl, - CORBA::Environment& env); - -private: - Audio_Control_ptr audio_control_; - // The Audio controller - - Command_Handler *command_handler_; - // pointer to the command handler object -}; - -class Video_Endpoint_Reactive_Strategy_A - : public TAO_AV_Endpoint_Reactive_Strategy_A -{ - // = TITLE - // Implementation of the Reactive Strategy for the client - // video MMDevice. - // = DESCRIPTION - // Takes a command handler object pointer. It overrides the - // make_vdev and make_stream_endpoint hooks to create the video - // vdev and video streamendpoint with command handler object pointers. -public: - Video_Endpoint_Reactive_Strategy_A (TAO_ORB_Manager *orb_manager, - Command_Handler *command_handler); - // constructor . The orb manager is needed for the TAO_AV_Endpoint_Reactive_Strategy_A. - - virtual ~Video_Endpoint_Reactive_Strategy_A (void); - // destructor. - - virtual int make_vdev (Video_Client_VDev *&vdev); - // hook to make our Vdev with the pointer to command handler. - virtual int make_stream_endpoint (Video_Client_StreamEndPoint *& endpoint); - // hook to make our streamendpoint taking a command handler pointer -private: - Command_Handler *command_handler_; - // pointer to command handler object - - Video_Client_VDev *vdev_; - // reference to the created vdev . - - Video_Client_StreamEndPoint *endpoint_; - // reference to the created streamendpoint. -}; - -class Audio_Endpoint_Reactive_Strategy_A - : public TAO_AV_Endpoint_Reactive_Strategy_A -{ - // = TITLE - // Implementation of the Reactive Strategy for the client audio - // MMDevice - // = DESCRIPTION - // Takes a command handler object pointer. It overrides the - // make_vdev and make_stream_endpoint hooks to create the audio - // vdev and audio streamendpoint with command handler object pointers. -public: - Audio_Endpoint_Reactive_Strategy_A (TAO_ORB_Manager *orb_manager, - Command_Handler *command_handler); - // constructor . The orb manager is needed for the TAO_AV_Endpoint_Reactive_Strategy_A. - - ~Audio_Endpoint_Reactive_Strategy_A (void); - // Destructor. - - virtual int make_vdev (Audio_Client_VDev *&vdev); - // hook to make our Vdev with the pointer to command handler. - - virtual int make_stream_endpoint (Audio_Client_StreamEndPoint *& endpoint); - // hook to make our streamendpoint taking a command handler pointer - -private: - Command_Handler *command_handler_; - // pointer to command handler object - - Audio_Client_VDev *vdev_; - // reference to the vdev that was created. - - Audio_Client_StreamEndPoint *endpoint_; - //reference to the created streamendpoint. - -}; - -class Client_Sig_Handler - : public virtual ACE_Event_Handler - // = TITLE - // Defines the signal handler class for the client timer processing - // - // = DESCRIPTION - // Checks if the video is ready and refreshes the display and - // also plays the audio packets in the timer processing. -{ -public: - Client_Sig_Handler (Command_Handler *command_handler); - // We need the command handler to call close () - - ~Client_Sig_Handler (void); - // Destructor - - virtual ACE_HANDLE get_handle (void) const; - - int register_handler (void); - // this will register this sig_handler - // with the reactor for SIGCHLD,SIGTERM,SIGINT - - int remove_handler (void); - // removes the handlers. - - virtual int shutdown (ACE_HANDLE, - ACE_Reactor_Mask); - // handles the reactor shutdown - - virtual int handle_input (ACE_HANDLE); - // handle input on the dummy handle. - - virtual int handle_signal (ACE_HANDLE signum, - siginfo_t * = 0, - ucontext_t* = 0); - // handles SIGALRM - - void TimerHandler (int signum); - - void stop_timer (void); - - void DisplayPicture (void); - // display the picture. - - void TimerProcessing (void); - - void PlayAudioOnly (void); - -private: - ACE_HANDLE handle_; - // dummy handle for the sig handler. - - ACE_Sig_Set sig_set; - // the signal set - - Command_Handler *command_handler_; - // We need the command handler to call close () - -}; - -class Decode_Notification_Handler :public ACE_Event_Handler -{ -public: - Decode_Notification_Handler (Command_Handler *command_handler); - // constructor. - - virtual ACE_HANDLE get_handle (void) const; - // Get the Notification handle. - - virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); - // called when input events occur. -private: - Command_Handler *command_handler_; -}; - -enum Suspended -{ - UNSUSPENDED = 0,INIT=1,STEP=2,POSITION=3 -}; - -class Command_Handler - : public virtual ACE_Event_Handler - // public virtual ACE_Svc_Handler -{ - // = TITLE - // Defines the event handler class for the client commands - // - // = DESCRIPTION - // This class makes use of a UNIX socket, over which - // it will receive commands from the GUI - -public: - - int command_suspended_; - // flag to indicate whether the GUI handler has been suspended. - - int operation_tag_; - // operation tag for release/press for position. - - int position_val_; - // value of the position button. - - Command_Handler (ACE_HANDLE command_handle = ACE_INVALID_HANDLE); - // Construct this handler with a control (UNIX) handle - - ~Command_Handler (void); - // Destructor - - int init (int argc,char **argv); - // initialize the ORB and NamingService - - int run (void); - // Run the ORB event loop - - int handle_timeout (const ACE_Time_Value &, - const void *arg); - // handle the timeout - - // void stop_timer (void); - // stop the internal timer - - void wait_for_display (Suspended reason); - // suspends the gui socket handler in the reactor. - - TAO_ORB_Manager *orb_manager (void); - // returns the orbmanager reference - - void set_mmdevice (CORBA::Object_ptr audio_mmdevice, - const char *audio_file, - CORBA::Object_ptr video_mmdevice, - const char *video_file); - // sets the audio mmdevice object ptr. - - void set_video_data_handle (ACE_HANDLE data_fd); - // sets the data handle (UDP) of the command handler - - void set_video_control (Video_Control_ptr video_control); - // called to set the video control object pointer of the comand handler. - - void set_audio_data_handle (ACE_HANDLE data_fd); - // sets the data handle (UDP) of the command handler - - void set_audio_control (Audio_Control_ptr video_control); - // called to set the video control object pointer of the comand handler. - - int get_video_control (void); - // Gets the video control reference thru the property service from - // the video server virtual device - - char *get_data_host (void); - // gets the data interface to be used. - - int resolve_video_reference (void); - // Resolve the video control reference. - - int resolve_audio_reference (void); - // Resolve the audio control reference. - - virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); - // Called when input events occur (e.g., connection or data). - - virtual ACE_HANDLE get_handle (void) const; - // Returns the handle used by the event_handler. - - int init_av (void); - // Initialize both the audio and video - - int init_java_av (char *audio_ior, - char *video_ior, - char *audio_file, - char *video_file); - // initialize both the audio and video reading the iors from java GUI thru a socket. - - int init_video_channel (char *videofile); - // Initializes the video channel by bind the client and server video - // mmdevices together and gets the video control object. - - int init_audio_channel (char *videofile); - // Initializes the audio channel by bind the client and server audio - // mmdevices together and gets the video control object. - - int stat_stream (CORBA::Char_out ch,CORBA::Long_out size) ; - // statistics of this stream. - - int close (void) ; - // close the audio and video connections - - int stat_sent (void) ; - - int fast_forward (void); - - int fast_backward (void); - - int step (void); - - int play (int flag, - CORBA::Environment& env); - - int position_action (int operation_tag); - - int position (void); - - int position_release (void); - - int volume (void); - - int balance (void); - - int speed (void); - - int stop (void); - - int stop_playing (void); - - int connect_to_video_server (void); - // resolves the server video mmdevice and binds the local and server - // mmdevices together. - - int connect_to_audio_server (void); - // resolves the server video mmdevice and binds the local and server - // mmdevices together. - -private: - - int parse_args (int argc,char **argv); - // parses the arguments. - - int remove_handlers (void); - // removes all the handlers. - - int busy_; - // flag to indicate the state of the command handler - - CORBA::String_var audio_mmdevice_ior_; - CORBA::String_var video_mmdevice_ior_; - - ACE_SOCK_Dgram video_dgram_; - // UDP socket on which to send/recv data - - ACE_SOCK_Dgram audio_dgram_; - // Audio UDP socket - - ACE_HANDLE video_data_handle_; - // UDP socket for video - - ACE_HANDLE audio_data_handle_; - // UDP socket for audio - - ACE_HANDLE command_handle_; - // The fd for the UNIX command socket - - TAO_ORB_Manager orb_manager_; - // the ORB manager - - TAO_Naming_Client my_name_client_; - // A Name_Client used to resolve the video_server_mmdevice - - Video_Control_ptr video_control_; - // Video Control CORBA object - - AVStreams::MMDevice_var video_server_mmdevice_; - // The video server multimedia device - - Video_Endpoint_Reactive_Strategy_A *video_reactive_strategy_; - // Strategy for creating stream endpoints - - TAO_MMDevice *video_client_mmdevice_; - // The video client multimedia device - - TAO_StreamCtrl *video_streamctrl_; - // Video stream controller - - Audio_Control_ptr audio_control_; - // Audio Control CORBA object - - AVStreams::MMDevice_var audio_server_mmdevice_; - // The audio server multimedia device - - Audio_Endpoint_Reactive_Strategy_A *audio_reactive_strategy_; - // Strategy for creating stream endpoints - - TAO_MMDevice *audio_client_mmdevice_; - // The audio client multimedia device - - TAO_StreamCtrl *audio_streamctrl_; - // audio stream controller - - // ACE_High_Res_Timer timer_; - // timer to record the time taken for the play sequence. - - Receiver_i receiver_; - // Receive object,called by the agent to give the mmdevice object - // reference. - - char *data_host_; - // interface name to bind to for data transfer. - - Client_Sig_Handler client_sig_handler_; - // Handler for the signals. - - Decode_Notification_Handler notification_handler_; - // handler for the decode signals from VD process. - - int argc_; - char **argv_; -}; - - - -#endif /* AV_COMMAND_HANDLER_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Makefile deleted file mode 100644 index 0d1f562cf3a..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Makefile +++ /dev/null @@ -1,1017 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -MAKEFILE = Makefile -LIBNAME = libmpeg_client -LIB = $(LIBNAME).a -SHLIB = $(LIBNAME).$(SOEXT) - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -# On non-Windows environment, we should at least define -# the export_include IDL flag. -FILES= 24bit \ - 2x2 \ - ab \ - audio \ - decoders \ - file \ - fs2 \ - fs2fast \ - fs4 \ - global \ - gray \ - hybrid \ - hybriderr \ - info \ - jrevdct \ - mb_ordered \ - mono \ - motionvector \ - ordered \ - ordered2 \ - para \ - parseblock \ - prog \ - ui \ - util \ - util32 \ - vb \ - vd \ - video \ - vp \ - Command_Handler - -MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source -CPPFLAGS += -I$(MPEG_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs - -DEFS = $(addsuffix .h,$(FILES)) -LSRC = $(addsuffix .cpp,$(FILES)) - -##LIBS += -lTAO -lACE - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets (and local hacks) -#---------------------------------------------------------------------------- - -LDFLAGS += -L/project/doc/pkg/X11/lib/ -lXm -lXt -lXext -lSM -lICE -lX11 -L/project/doc/pkg/X11/lib -lsocket -lnsl -ldl -CPPFLAGS += -i -DSH_MEM -DNDEBUG -I/project/doc/pkg/X11/include -L/project/doc/pkg/X11/lib - -clean: - -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state - -realclean: clean - -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES)) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/24bit.o .obj/24bit.so .shobj/24bit.o .shobj/24bit.so: 24bit.cpp video.h dither.h proto.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/2x2.o .obj/2x2.so .shobj/2x2.o .shobj/2x2.so: 2x2.cpp video.h dither.h proto.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/ab.o .obj/ab.so .shobj/ab.o .shobj/ab.so: ab.cpp ab.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - global.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h vb.h -.obj/audio.o .obj/audio.so .shobj/audio.o .shobj/audio.so: audio.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - global.h -.obj/decoders.o .obj/decoders.so .shobj/decoders.o .shobj/decoders.so: decoders.cpp decoders.h util.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i video.h \ - proto.h -.obj/file.o .obj/file.so .shobj/file.o .shobj/file.so: file.cpp video.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - global.h -.obj/fs2.o .obj/fs2.so .shobj/fs2.o .shobj/fs2.so: fs2.cpp video.h dither.h fs2.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i proto.h -.obj/fs2fast.o .obj/fs2fast.so .shobj/fs2fast.o .shobj/fs2fast.so: fs2fast.cpp video.h proto.h dither.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/fs4.o .obj/fs4.so .shobj/fs4.o .shobj/fs4.so: fs4.cpp fs4.h $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i video.h \ - proto.h dither.h -.obj/global.o .obj/global.so .shobj/global.o .shobj/global.so: global.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/gray.o .obj/gray.so .shobj/gray.o .shobj/gray.so: gray.cpp video.h proto.h dither.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/hybrid.o .obj/hybrid.so .shobj/hybrid.o .shobj/hybrid.so: hybrid.cpp video.h proto.h dither.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/hybriderr.o .obj/hybriderr.so .shobj/hybriderr.o .shobj/hybriderr.so: hybriderr.cpp video.h proto.h dither.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/info.o .obj/info.so .shobj/info.o .shobj/info.so: info.cpp $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/jrevdct.o .obj/jrevdct.so .shobj/jrevdct.o .shobj/jrevdct.so: jrevdct.cpp video.h proto.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/mb_ordered.o .obj/mb_ordered.so .shobj/mb_ordered.o .shobj/mb_ordered.so: mb_ordered.cpp video.h proto.h dither.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/mono.o .obj/mono.so .shobj/mono.o .shobj/mono.so: mono.cpp video.h proto.h dither.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/motionvector.o .obj/motionvector.so .shobj/motionvector.o .shobj/motionvector.so: motionvector.cpp video.h proto.h util.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/ordered.o .obj/ordered.so .shobj/ordered.o .shobj/ordered.so: ordered.cpp video.h proto.h dither.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/ordered2.o .obj/ordered2.so .shobj/ordered2.o .shobj/ordered2.so: ordered2.cpp video.h proto.h dither.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/para.o .obj/para.so .shobj/para.o .shobj/para.so: para.cpp video.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - global.h -.obj/parseblock.o .obj/parseblock.so .shobj/parseblock.o .shobj/parseblock.so: parseblock.cpp video.h proto.h decoders.h util.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/prog.o .obj/prog.so .shobj/prog.o .shobj/prog.so: prog.cpp video.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - global.h -.obj/ui.o .obj/ui.so .shobj/ui.o .shobj/ui.so: ui.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - interface/fb.xbm interface/play.xbm interface/step.xbm \ - interface/stop.xbm interface/loop.xbm interface/ff.xbm \ - interface/MainWindow.mib interface/Info.mib video.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - global.h -.obj/util.o .obj/util.so .shobj/util.o .shobj/util.so: util.cpp video.h proto.h util.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/util32.o .obj/util32.so .shobj/util32.o .shobj/util32.so: util32.cpp video.h proto.h ui.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/vb.o .obj/vb.so .shobj/vb.o .shobj/vb.so: vb.cpp vb.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - global.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h -.obj/vd.o .obj/vd.so .shobj/vd.o .shobj/vd.so: vd.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - global.h dither.h video.h proto.h vb.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h -.obj/video.o .obj/video.so .shobj/video.o .shobj/video.so: video.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i decoders.h \ - util.h video.h proto.h global.h ui.h -.obj/vp.o .obj/vp.so .shobj/vp.o .shobj/vp.so: vp.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - global.h dither.h video.h proto.h ui.h -.obj/Command_Handler.o .obj/Command_Handler.so .shobj/Command_Handler.o .shobj/Command_Handler.so: Command_Handler.cpp Command_Handler.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/ARGV.h \ - $(ACE_ROOT)/ace/ARGV.i \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverS.i \ - ab.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - newproto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - global.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - vb.h ctr.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.cpp deleted file mode 100644 index 2887981ee52..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.cpp +++ /dev/null @@ -1,575 +0,0 @@ - -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -extern int asp[2]; -extern void set_exit_routine_tag(int tag); - -#include "ab.h" - -ACE_RCSID(mpeg_client, ab, "$Id$") - -AudioBuffer::AudioBuffer (void) - :temp (0), - bytes (-1), - abuf (0), - sid (-1), - exit_tag (0), - savedSocket (-1), - packet (0), - pkt_data (0), - conn_tag (-1), - fbstate (0), - waketime (0), - pcmdsn (-1), - mode_ (INVALID) -{ -} - -//destructor. -AudioBuffer::~AudioBuffer (void) -{ - if (ACE_Reactor::instance ()->remove_handler (this->handler_,ACE_Event_Handler::READ_MASK) == -1) - ACE_DEBUG ((LM_ERROR,"(%P)remove handler failed for Video_Notification_Handler\n")); - - delete this->handler_; - if (ACE_Reactor::instance ()->remove_handler (this,ACE_Event_Handler::READ_MASK) == -1) - ACE_DEBUG ((LM_ERROR,"(%P)remove handler failed for VideoBuffer\n")); - -} - -void -AudioBuffer::set_silence (char *buf, int samples) -{ - memset(buf, 0xff, samples * shared->audioPara.bytesPerSample); -} - -void -AudioBuffer::ABinitBuf (int size) /* size in bytes */ -{ - abuf = (ABBuffer *)creat_shared_mem(size); - abuf->bufsize = size - sizeof(*abuf); - abuf->buf = (char *)abuf + sizeof(*abuf); - sid = creat_semaphore(); -} - -void -AudioBuffer::ABflushBuf (int nextSample) /* flush the whole buffer */ -{ - enter_cs(sid); - abuf->bps = shared->audioPara.bytesPerSample; - abuf->size = abuf->bufsize / abuf->bps; - abuf->samples = 0; - abuf->stuff = 0; - abuf->ts = abuf->hs = nextSample; - abuf->tind = 0; - set_silence(abuf->buf, abuf->size); - leave_cs(sid); -} - -int -AudioBuffer::ABcheckSamples (void) /* returns # of samples in ABbuf */ -{ - return abuf->samples; -} - -int -AudioBuffer::ABgetSamples (char * buf, int samples) - /* read at most given number of samples from AB to buf, returns - number of sample actually read */ -{ - int as; - int tsamples = samples; - enter_cs(sid); - if (abuf->stuff > 0) { - as = min(abuf->stuff, samples); - set_silence(buf, as); - abuf->stuff -= as; - samples -= as; - buf += as * abuf->bps; - } - if (samples > 0) { - as = min(samples, max(0, abuf->samples)); - /* there may be fewer samples in abuf */ - if (as > 0) { - int part1 = min(as, abuf->size - abuf->tind); - ACE_OS::memcpy (buf, abuf->buf + (abuf->bps * abuf->tind), part1 * abuf->bps); - set_silence(abuf->buf + (abuf->bps * abuf->tind), part1); - if (part1 < as) { /* This read cross the boundary of abuf */ - ACE_OS::memcpy (buf + (part1 * abuf->bps), - abuf->buf, - (as - part1) * abuf->bps); - set_silence(abuf->buf, as - part1); - } - } - abuf->samples -= samples; - abuf->ts += samples; - abuf->tind = (abuf->tind + samples) % abuf->size; - if (as < samples) set_silence(buf + (as * abuf->bps), samples - as); - } - leave_cs(sid); - return tsamples; -} - -/* if samples < 0; then stuff |samples| silient samples to ABgetSamples(), - otherwise wipe out this number of samples from AB */ -int -AudioBuffer::ABskipSamples (int samples) -{ - enter_cs(sid); - if (samples <= 0) { - abuf->stuff += (- samples); - } - else { - abuf->samples -= samples; - abuf->ts += samples; - abuf->tind = (abuf->tind + samples) % abuf->size; - } - leave_cs(sid); - return samples; -} - -void -AudioBuffer::ABdeleteBuf (void) -{ - remove_shared_mem((char *)abuf); -} - -void -AudioBuffer::ABdeleteSem (void) -{ - remove_semaphore(sid); -} - -/* SIGUSR1 from CTR is for killing this process, without affecting any other ones. */ - -void -AudioBuffer::exit_on_kill (void) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) ABprocess killed \n")); - extern void set_exit_routine_tag(int tag); - set_exit_routine_tag(0); - // ComCloseConn(savedSocket); - vbuffer->VBdeleteBuf(); - ACE_OS::exit (0); -} - -ACE_HANDLE -AudioBuffer::get_handle (void) const -{ - return this->dataSocket; -} - -int -AudioBuffer::handle_input (ACE_HANDLE fd) -{ - // ACE_DEBUG ((LM_DEBUG,"handle_input:mode = %d\n",this->mode_)); - int len; - switch (this->mode_) - { - case READ_HEADER: - { - int len; - if (conn_tag >= 0) - { - // ACE_DEBUG ((LM_DEBUG,"non discard mode: ")); - if (bytes < 0) - bytes = sizeof(*packet); - len = ACE_OS::read (dataSocket, (char *)temp, bytes); - } - else - { /* discard mode packet stream, read all bytes */ - // ACE_DEBUG ((LM_DEBUG,"discard mode: ")); - if (bytes < 0) - bytes = PACKET_SIZE; - len = ACE_OS::read (dataSocket, (char *)packet, bytes); - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) ABprocess: got a %d sized packet\n",len)); - } - if (len == -1) - { - if (errno == EINTR || errno == EWOULDBLOCK || errno == EAGAIN) - { - return 0; - } - perror("AB ACE_OS::read () audio packet from discard-mode packet stream"); - ACE_Reactor::instance ()->end_event_loop (); - return -1; - } - - if (len == 0) - { - fprintf(stderr, "Error: AB found dataSocket broken\n"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - // ACE_DEBUG ((LM_DEBUG,"packet: bytes = %d,len = %d\n",bytes,len)); - if (conn_tag >= 0) - { - temp += len; - bytes -= len; - if (bytes == 0) - { - // header reading is done. - this->mode_ = READ_DATA; - bytes = -1; - len = sizeof (*packet); - } - else - return 0; - } - if (len < sizeof (*packet)) - { - fprintf(stderr, "Warn: AB discard len = %d bytes of supposed header.\n", len); - return 0; - } - // process the header. -#ifdef NeedByteOrderConversion - packet->dataBytes = ntohl(packet->dataBytes); -#endif - - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) ABprocess: Received %d sized packet\n",len)); - if (packet->dataBytes <= 0) - { - fprintf(stderr, "AB Error: pkt->dataBytes %d, len %d\n", - packet->dataBytes, - len); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - bytes = packet->dataBytes + sizeof(*packet); - - if (bytes > PACKET_SIZE) - { - Fprintf(stderr, "Fatal error: AB packet buf (%dB) too small (%d)\n", - PACKET_SIZE, bytes); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - if (conn_tag > 0) - { - temp = (char *)packet + sizeof(*packet); - bytes = bytes - sizeof(*packet); - ACE_DEBUG ((LM_DEBUG,"(%P) Ready to read the data part of the packet\n")); - break; - } - } - // fall through and process the header. - case READ_DATA: - { - // code to read the audio packet and buffer it. - if (conn_tag >= 0) - { - len = ACE_OS::read (dataSocket,temp,bytes); - - if (len <= 0) - { - if (len == -1)ACE_OS::perror ("AB encounter error on wait_read_bytes()"); - else fprintf(stderr, "AB encounter EOF on wait_read_bytes()\n"); - } - temp +=len; - bytes -= len; - if (bytes != 0) - return 0; - } - // set the parameters for the header reading. - this->mode_ = READ_HEADER; - bytes = -1; - temp = (char *)packet; -#ifdef NeedByteOrderConversion - packet->cmdsn = ntohl(packet->cmdsn); - packet->samplesPerSecond = ntohl(packet->samplesPerSecond); - packet->resend = ntohl(packet->resend); - packet->firstSample = ntohl(packet->firstSample); - packet->samples = ntohl(packet->samples); - packet->actualSamples = ntohl(packet->actualSamples); - /* dataBytes already byte-reordered */ -#endif - /* - Fprintf(stderr, "AB got a packet: %d(%d)\n", - packet->firstSample, packet->samples); - */ - /* - if (packet->firstSample % 10240 && !packet->resend) continue; - */ - if (packet->samples * abuf->bps > PACKET_SIZE - sizeof(*packet)) { - fprintf(stderr, "Fatal error: AB has too small packet buffer, %d out of %d\n", - PACKET_SIZE, packet->samples * abuf->bps + sizeof(*packet)); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - - if (packet->cmdsn != shared->cmdsn) { /* outdated packet */ - /* - Fprintf(stderr, "AB discarded an outdated packet\n"); - */ - return 0; - } - enter_cs(sid); - if (packet->firstSample + packet->samples <= abuf->ts) - { - /* all samples too late, discard it */ - abuf->hs = max(abuf->hs, packet->firstSample + packet->samples); - abuf->samples = abuf->hs - abuf->ts; - leave_cs(sid); - /* - Fprintf(stderr, "AB all sample in packet %d(%d) too late\n", - packet->firstSample, packet->samples); - */ - feedback (); - } - else if (packet->firstSample >= abuf->ts + abuf->size) { - /* all samples too early, discard the packet */ - abuf->hs = max(abuf->hs, packet->firstSample + packet->samples); - abuf->samples = abuf->hs - abuf->ts; - leave_cs(sid); - /* - Fprintf(stderr, "AB all sample in packet %d(%d) too early\n", - packet->firstSample, packet->samples); - */ - feedback (); - } - else if (packet->samples > packet->actualSamples) { - leave_cs(sid); - fprintf(stderr, "Error: AB interpolation not available yet.\n"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - else - { - int oldhs = abuf->hs; - int firstSample = max(packet->firstSample, abuf->ts); - int samples = min(packet->samples - - (firstSample - packet->firstSample), - (abuf->ts + abuf->size) - packet->firstSample); - char * data = pkt_data + - (firstSample - packet->firstSample) * abuf->bps; - int dstart = (abuf->tind + (firstSample - abuf->ts)) % abuf->size; - int part1 = min(samples, abuf->size - dstart); - ACE_OS::memcpy (abuf->buf + (dstart * abuf->bps), data, part1 * abuf->bps); - if (part1 < samples) { - memcpy(abuf->buf, data + part1 * abuf->bps, - (samples - part1) * abuf->bps); - } - abuf->hs = max(abuf->hs, packet->firstSample + packet->samples); - abuf->samples = abuf->hs - abuf->ts; - dstart =max(oldhs, abuf->ts); - - leave_cs(sid); - - part1 = firstSample - dstart; - if (packet->resend) { - Fprintf(stderr, "AB got resent %d(%d)\n", - packet->firstSample, packet->samples); - } - else if (part1 > 0) { - int res; - AudioFeedBackPara para; - Fprintf(stderr, "AB found gap %d(%d)\n", dstart, part1); - para.cmdsn = htonl(shared->cmdsn); - para.type = htonl(1); - para.data.ap.firstSample = htonl(dstart); - para.data.ap.samples = htonl(part1); - // register ourself for the write handler. - int result; - result = ACE_Reactor::instance ()->register_handler (this,ACE_Event_Handler::WRITE_MASK); - if (result != 0) - return result; - this->mode_ = WRITE_FEEDBACK2; - temp = (char *)¶ - bytes = sizeof (para); - } - } - } - break; - default: - break; - } - return 0; -} - -int -AudioBuffer::handle_output (ACE_HANDLE fd) -{ - ACE_DEBUG ((LM_DEBUG,"handle_output:mode = %d\n",this->mode_)); - int res; - if ((this->mode_ == WRITE_FEEDBACK1) || (this->mode_ == WRITE_FEEDBACK2)) - { - // send feedback. - - if (conn_tag != 0) - { /* packet stream */ - res = ACE_OS::write (dataSocket, temp, bytes); - if (res == -1) - { - if (errno == ENOBUFS) { - ACE_OS::perror ("AB Warning, resend-req packet discarded for"); - return 0; - } - ACE_OS::perror ("AB error, resend-req packet sending failed"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - } - else - { - res = ACE_OS::write (dataSocket, temp, bytes); - if (res == -1) { - ACE_OS::perror ("AB error, resend-req packet sending failed"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - } - if (res == 0) - { - ACE_DEBUG ((LM_DEBUG,"(%P|%t)AudioBuffer::handle_output:write failed\n")); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - temp += res; - bytes -= res; - if (bytes != 0) - return 0; - else - { - // remove the write handler. - int result; - result = ACE_Reactor::instance ()->remove_handler (this, - ACE_Event_Handler::WRITE_MASK); - if (result != 0) - return result; - - this->mode_ = READ_HEADER; - temp = (char *)packet; - bytes == -1; - } - } - if (this->mode_ == WRITE_FEEDBACK1) - { - // adjust the wakeup time and feedback state. - waketime = get_usec() + STARTUP_WAIT; - fbstate = 1; - } - return 0; -} - -int -AudioBuffer::ABprocess (int socket) -{ - int result; - ACE_DEBUG ((LM_DEBUG,"(%P|%t)AudioBuffer::ABprocess ()\n")); - packet = (AudioPacket *)ACE_OS::malloc(PACKET_SIZE); - if (packet == NULL) { - ACE_OS::perror ("AB failed to allocate mem for packet buffer"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - - this->dataSocket = socket; - ACE_NEW_RETURN (this->handler_, - Audio_Notification_Handler, - -1); - // Register the notification handler with the reactor. - result = ACE_Reactor::instance ()->register_handler (this->handler_, - ACE_Event_Handler::READ_MASK); - if (result != 0) - return result; - - result = ACE_Reactor::instance ()->register_handler (this, - ACE_Event_Handler::READ_MASK); - - if (result != 0) - return result; - - conn_tag = shared->audioMaxPktSize; - exit_tag = 0; - - this->mode_ = READ_HEADER; - pkt_data = (char *)packet + sizeof(*packet); - temp = (char *)packet; - bytes = -1; - return 0; -} - -// following is feedback algorithm. -void -AudioBuffer::feedback (void) -{ - if (shared->live || (!shared->config.syncEffective)) return; - /* - fprintf(stderr, "AB fbstate = %d\n", fbstate); - */ - switch (fbstate) { - case 0: /* startup init */ - if (pcmdsn != packet->cmdsn) { - fbstate = 0; - pcmdsn = packet->cmdsn; - } - else { - fbstate = 1; - waketime = get_usec() + STARTUP_WAIT; - } - break; - case 1: /* startup wait */ - if (pcmdsn != packet->cmdsn) { - fbstate = 0; - break; - } - if (get_usec() >= waketime) { - fbstate = 2; - } - break; - case 2: /* monitoring */ - if (pcmdsn != packet->cmdsn) { - fbstate = 0; - break; - } - if (abuf->samples < abuf->size >>2 || - abuf->samples > (abuf->size * 3) >> 2) - { - /* feedback action needed */ - AudioFeedBackPara para; - int res; - para.data.fb.addsps = 0; - para.data.fb.addSamples = (abuf->size >> 2) - abuf->samples; - - Fprintf(stderr, "AB sends fb: %dsps, %dsamples\n", - para.data.fb.addsps, - para.data.fb.addSamples); - para.cmdsn = htonl(shared->cmdsn); - para.type = htonl(0); - para.data.fb.addsps = htonl(para.data.fb.addsps); - para.data.fb.addSamples = htonl(para.data.fb.addSamples); - int result = ACE_Reactor::instance ()->register_handler (this,ACE_Event_Handler::WRITE_MASK); - if (result != 0) - ACE_DEBUG ((LM_DEBUG,"register_hanlder for write failed\n")); - this->mode_ = WRITE_FEEDBACK1; - temp = (char *)¶ - bytes = sizeof (para); - return; - } - break; - default: - break; - } -} - -ACE_HANDLE -Audio_Notification_Handler::get_handle (void) const -{ - return asp[1]; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.h deleted file mode 100644 index e1397665998..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ab.h +++ /dev/null @@ -1,161 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// mpeg_client -// -// = FILENAME -// ab.h -// -// = DESCRIPTION -// Defines the audio packet buffering process. -// -// = AUTHORS -// Nagarajan Surendran (naga@cs.wustl.edu) -// -// ============================================================================ - -#if !defined (AV_AB_H) -#define AV_AB_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef __svr4__ -#include -#include -#endif - -#include "include/common.h" -#include "newproto.h" -#include "global.h" -#include "mpeg_shared/filters.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/com.h" -#include "ace/OS.h" -#include "ace/Event_Handler.h" -#include "ace/Reactor.h" -#include "vb.h" - -extern VideoBuffer *vbuffer; - -/* magic number -- deviation is considered - caused by clock drift only if rate <= 1/MAX_CLOCK_DRIFT. - */ -#define MAX_CLOCK_DRIFT 50 - -#define max(a,b) ((a)>(b) ? (a) : (b)) -#define min(a,b) ((a)<(b) ? (a) : (b)) -#define PACKET_SIZE 8192 -#define STARTUP_WAIT 10000000 -#define ACTION_WAIT 5000000 - -typedef struct { - int bufsize; /* number of bytes for the buffer pointed by 'buf' */ - char * buf; /* pointer to the data buffer area */ - int bps; /* current byte-per-sample */ - int size; /* number of samples the buffer can hold */ - int samples; /* number of samples in the buffer; */ - int stuff; /* number of stuff samples to be read by ABgetSamples() */ - int ts; /* tail-sample: the next sample to be comsumed by CTR */ - int hs; /* head-sample: the next sample to be expected from the network */ - int tind; /* index of the ts-sample in the buf */ -} ABBuffer; - - -class Notification_Handler; - -class AudioBuffer :public ACE_Event_Handler -{ -public: - AudioBuffer (void); - // constructor. - - int ABprocess (int dataSocket); - // start the buffering process. - - ~AudioBuffer (void); - // destructor. - - virtual ACE_HANDLE get_handle (void) const; - // get the underlying I/O handle. - - virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); - // called when input arrives on the datasocket. - - virtual int handle_output (ACE_HANDLE fd = ACE_INVALID_HANDLE); - // Called to send feedback. - - void set_silence(char *buf, int samples); - - void ABinitBuf(int size); - - void ABflushBuf(int nextSample); - // flush the whole buffer - - int ABcheckSamples(void); - // returns # of samples in ABbuf - - int ABgetSamples(char * buf, int samples); - // read at most given number of samples from AB to buf, returns - // number of sample actually read - - int ABskipSamples(int samples); - // if samples < 0; then stuff |samples| silient samples to ABgetSamples(), - // otherwise wipe out this number of samples from AB. - - void ABdeleteBuf(void); - - void ABdeleteSem(void); - - static void exit_on_kill(void); - - static void usr1_handler(int sig); - - static void usr2_handler(int sig); - - void feedback (void); - -private: - char *temp; - // temporary pointer. - int bytes; - // temporary placeholder for no.of bytes to be read. - ABBuffer *abuf; - int sid; - int exit_tag; - int savedSocket; - AudioPacket *packet; - char *pkt_data; - int conn_tag; - /* following are for feedback */ - int fbstate; - unsigned waketime; - int pcmdsn; - - int dataSocket; - // data socket handle. - - Notification_Handler *handler_; - - enum MODE {INVALID = -1,READ_HEADER,READ_DATA,WRITE_FEEDBACK1,WRITE_FEEDBACK2}; - int mode_; -}; - -class Audio_Notification_Handler :public Notification_Handler -{ -public: - virtual ACE_HANDLE get_handle (void) const; - // Returns the audio notification handle. -}; - -#endif /* AV_AB_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/audio.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/audio.cpp deleted file mode 100644 index b99c7d35cba..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/audio.cpp +++ /dev/null @@ -1,494 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -/* ################################################################## - - When you port to a new architecture, you much add native audio - device support in this file by adding stuff to all relevant - functions, otherwise, it is disabled by default. - - ################################################################# */ - -#include -#include -#include -#include -#include -#include -#include -#ifdef __svr4__ -#include -#elif defined(FreeBSD) -#include -#elif defined(sun) -#include -#elif defined(_HPUX_SOURCE) -#include -#elif defined(IRIX) -#include -#endif - -#ifdef FreeBSD -#define AUDIO_DEVICE "/dev/pcaudio" -#define AUDIO_CONTROL "/dev/pcaudioctl" -#elif defined(__svr4__) || defined(sun) -#define AUDIO_DEVICE "/dev/audio" -#define AUDIO_CONTROL "/dev/audioctl" -#elif defined(_HPUX_SOURCE) -#define AUDIO_DEVICE "/dev/audio" -#define AUDIO_CONTROL "/dev/audioCtl" -#elif defined(IRIX) -#define AUDIO_DEVICE "proprietary device" -#define AUDIO_CONTROL "proprietary device" -#elif defined(LINUX) -#define AUDIO_DEVICE "/dev/audio" -#define AUDIO_CONTROL "NO CONTROL DEV" -#endif - -#include -#include -#include -#include -#include -#include - -#include "include/common.h" -#include "newproto.h" -#include "global.h" - -ACE_RCSID(mpeg_client, audio, "$Id$") - -static int cfd = -1, afd = -1; /* afd == -1 mean no native device available */ -static long start_time; -static long current_time; - -#ifdef IRIX -#define audioDevice AL_DEFAULT_DEVICE -static ALport playPort = NULL; -#endif - -#ifdef AUDIOFILE - -#include -#include - -static int useAF = 0; - -static AFAudioConn *aud; -static AC ac; -static AFSetACAttributes attributes; - -/* - * Find a suitable default device - * Returns -1 if no suitable device can be found. - */ -static int FindDefaultDevice(AFAudioConn *aud) -{ - AFDeviceDescriptor *audioDevice; - int i; - for(i=0; iinputsFromPhone == 0 && audioDevice->outputsToPhone == 0) - return i; - } - return -1; -} -#endif - -/* - returns: 0 - succ - -1 - failed -*/ -int InitAudioDevice(void) -{ -#ifdef AUDIOFILE - int device; - int gain; - unsigned int channels; - int endianflag = 0; -#endif - -#ifdef AUDIOFILE - device = -1; - attributes.preempt = Mix; - attributes.start_timeout = 0; - attributes.end_silence = 0; - attributes.play_gain = 0; - attributes.rec_gain = 0; - attributes.type = UNKNOWN_ENCODETYPE; - - if ( (aud = AFOpenAudioConn(NULL)) == NULL) - { - fprintf(stderr, "Failed locating default AudioFile.\n"); - goto native_audio; - } - - /* set up audio context, find sample size and sample rate - At this time, we only support default setings */ - device = FindDefaultDevice(aud); - attributes.type = aud->devices[device].playBufType; - ac = AFCreateAC(aud, device, (ACPlayGain | ACEncodingType | endianflag), - &attributes); - if (ac == NULL) - { - fprintf(stderr, "Failed Initializing default AudioFile.\n"); - AFCloseAudioConn(aud); - goto native_audio; - } - AFSync(aud, 0); /* Make sure we confirm encoding type support. */ - shared->AFPara.encodeType = attributes.type; - shared->AFPara.channels = ac->device->playNchannels; - shared->AFPara.bytesPerSample = - BytesPerUnit(attributes.type) / SampsPerUnit(attributes.type); - shared->AFPara.samplesPerSecond = ac->device->playSampleFreq; - /* - ACE_OS::memcpy (&(shared->AFPara), &(shared->config.audioPara), sizeof(AudioParameter)); - */ - useAF = 1; - fprintf(stderr, "Using default AudioFile.\n"); - return 0; -#elif defined(__svr4__) || defined(sun) || defined(FreeBSD) \ - || defined(_HPUX_SOURCE) || defined(IRIX) || defined(LINUX) - fprintf(stderr, "This vcr compiled without AudioFile, try native audio.\n"); -#else - fprintf(stderr, "This vcr compiled without AudioFile, audio to be ignored\n"); - afd = -1; - return -1; -#endif - - native_audio: - -#if defined(__svr4__) || defined(sun) || defined(FreeBSD) || defined(_HPUX_SOURCE) - - afd = open(AUDIO_DEVICE, O_WRONLY | O_NDELAY); - if (afd == -1) { - fprintf(stderr, "%s", AUDIO_DEVICE); - ACE_OS::perror (" can't be opened for write"); - return -1; - } - cfd = open(AUDIO_CONTROL, O_WRONLY | O_NDELAY); - if (cfd == -1) { - fprintf(stderr, "%s", AUDIO_DEVICE); - ACE_OS::perror (" can't be opened for write"); - ACE_OS::close (afd); - afd = -1; - return -1; - } -#if defined(_HPUX_SOURCE) - - if (ioctl(cfd, AUDIO_SET_DATA_FORMAT, AUDIO_FORMAT_ULAW) < 0) { - fprintf(stderr, "%s" AUDIO_DEVICE); - ACE_OS::perror ("can't be set to u-law"); - ACE_OS::close (afd); - ACE_OS::close (cfd); - afd = -1; - return -1; - } - if (ioctl(cfd, AUDIO_SET_CHANNELS, 1) < 0) { - fprintf(stderr, "%s" AUDIO_DEVICE); - ACE_OS::perror ("can't be set to have single channel"); - ACE_OS::close (afd); - ACE_OS::close (cfd); - afd = -1; - return -1; - } - if (ioctl(cfd, AUDIO_SET_SAMPLE_RATE, 8000) < 0) { - fprintf(stderr, "%s" AUDIO_DEVICE); - ACE_OS::perror ("can't be set to 8000sps"); - ACE_OS::close (afd); - ACE_OS::close (cfd); - afd = -1; - return -1; - } - if (ioctl(cfd, AUDIO_SET_OUTPUT, AUDIO_OUT_SPEAKER | AUDIO_OUT_HEADPHONE)) - { - fprintf(stderr, "%s" AUDIO_DEVICE); - ACE_OS::perror ("can't be set output to both internal speaker and headphone"); - ACE_OS::close (afd); - ACE_OS::close (cfd); - afd = -1; - return -1; - } - if(ioctl(cfd, AUDIO_SET_TXBUFSIZE, 1024*64) < 0) - { - fprintf(stderr, "%s" AUDIO_DEVICE); - ACE_OS::perror ("can't be set output buffer size to 64K"); - ACE_OS::close (afd); - ACE_OS::close (cfd); - afd = -1; - return -1; - } -#endif /* _HPUX_SOURCE */ - -#elif defined(IRIX) - { -#define NCH 1 -#define MSQUEUE 100 - ALconfig c; - long params[2]; - - params[0] = AL_OUTPUT_RATE; - params[1] = 8000; - ALsetparams(audioDevice, params, 2); - - if ((c = ALnewconfig()) == NULL) { - afd = -1; - return -1; - } - ALsetwidth(c, AL_SAMPLE_16); - ALsetchannels(c, AL_MONO); - ALsetqueuesize(c, 10240); /* Minimal queue size */ - playPort = ALopenport(AUDIO_DEVICE, "w", c); - ALfreeconfig(c); - if (playPort == NULL) { - afd = -1; - return -1; - } - afd = 0; - } -#elif defined(LINUX) - - afd = open(AUDIO_DEVICE, O_WRONLY); - if (afd == -1) { - fprintf(stderr, "%s", AUDIO_DEVICE); - ACE_OS::perror (" can't be opened for write"); - return -1; - } - -#else /* no audio device supported on other platforms */ - - fprintf(stderr, "Audio device access not supported, audio to be ignored\n"); - afd = -1; - return -1; - -#endif /* sun, FreeBSD, _HPUX_SOURCE, ... */ - shared->AFPara.encodeType = AudioTypeMuLaw; - shared->AFPara.channels = 1; - shared->AFPara.bytesPerSample = 1; - shared->AFPara.samplesPerSecond = 8000; - start_time = get_msec(); - current_time = 0; - fprintf(stderr, "Using native %s\n", AUDIO_DEVICE); - return 0; -} - -void SetAudioParameter(AudioParameter * para) -{ -} - -unsigned int GetAudioTime(void) -{ -#ifdef AUDIOFILE - if (useAF) return AFGetTime(ac); -#endif -#if defined(__svr4__) || defined(sun) || defined(FreeBSD) \ - || defined(_HPUX_SOURCE) || defined(IRIX) || defined(LINUX) - if (afd == -1) return 0; - return get_duration(start_time, get_msec()) * 8; /* 8K sampling speed */ -#else - return 0; -#endif -} - -/* Play size number of samples to AF */ -unsigned int PlayAudioSamples(unsigned int time, char * buf, int size) -{ -#ifdef AUDIOFILE - if (useAF) return AFPlaySamples(ac, time, size * shared->audioPara.bytesPerSample, - (unsigned char *)buf); -#endif - -#if defined(__svr4__) || defined(sun) || defined(FreeBSD) \ - || defined(_HPUX_SOURCE) || defined(IRIX) || defined(LINUX) - if (afd == -1) return 0; - -#ifdef IRIX - { -#define BUFSIZE 1024 - static short AF_cvt_u2s[]={ - -32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956, - -23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764, - -15996,-15484,-14972,-14460,-13948,-13436,-12924,-12412, - -11900,-11388,-10876,-10364, -9852, -9340, -8828, -8316, - -7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140, - -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092, - -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004, - -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980, - -1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436, - -1372, -1308, -1244, -1180, -1116, -1052, -988, -924, - -876, -844, -812, -780, -748, -716, -684, -652, - -620, -588, -556, -524, -492, -460, -428, -396, - -372, -356, -340, -324, -308, -292, -276, -260, - -244, -228, -212, -196, -180, -164, -148, -132, - -120, -112, -104, -96, -88, -80, -72, -64, - -56, -48, -40, -32, -24, -16, -8, 0, - 32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956, - 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764, - 15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412, - 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316, - 7932, 7676, 7420, 7164, 6908, 6652, 6396, 6140, - 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092, - 3900, 3772, 3644, 3516, 3388, 3260, 3132, 3004, - 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980, - 1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436, - 1372, 1308, 1244, 1180, 1116, 1052, 988, 924, - 876, 844, 812, 780, 748, 716, 684, 652, - 620, 588, 556, 524, 492, 460, 428, 396, - 372, 356, 340, 324, 308, 292, 276, 260, - 244, 228, 212, 196, 180, 164, 148, 132, - 120, 112, 104, 96, 88, 80, 72, 64, - 56, 48, 40, 32, 24, 16, 8, 0 - }; - int left = size; - unsigned char * src = buf; - int i; - while (left > 0) { - short buffer[BUFSIZE]; - short * dst = buffer; - int len = left; - if (len > BUFSIZE) len = BUFSIZE; - left -= len; - for (i = 0; i < len; i ++) { - *(dst ++) = AF_cvt_u2s[*(src ++)]; - } - ALwritesamps(playPort, buffer, len); - } - } -#else - ACE_OS::write (afd, buf, size); -#endif - - current_time += size; - return get_duration(start_time, get_msec()) * 8; /* 8K sampling speed */ -#else - return 0; -#endif -} - -void StartAudioPlaySession(void) -{ - SetAudioGain(); -#ifdef AUDIOFILE - if (useAF) return; -#endif -#if defined(__svr4__) || defined(sun) || defined(FreeBSD) \ - || defined(_HPUX_SOURCE) || defined(IRIX) - if (afd == -1) return; -#else - return; -#endif -} -void SetAudioGain(void) -{ -#if defined(__svr4__) || defined(sun) || defined(FreeBSD) - audio_info_t sun_gapo; -#elif defined(_HPUX_SOURCE) - struct audio_gain ag; -#elif defined(IRIX) - long params[4]; -#endif - int volume = shared->volumePosition; - -#ifdef AUDIOFILE - if (useAF) { - AFSetOutputGain(ac, volume * 2); - /* - AFSetOutputGain(ac, (volume - 10)/3); - fprintf(stderr, "CTR audio.c: volume changed to %d.\n", volume); - */ - return; - } -#endif -#if defined(__svr4__) || defined(sun) || defined(FreeBSD) - if (afd == -1) return; - ioctl(cfd, AUDIO_GETINFO, &sun_gapo); - sun_gapo.play.gain = volume * 2; - ioctl(cfd, AUDIO_SETINFO, &sun_gapo); - return; -#elif defined(_HPUX_SOURCE) - ioctl(cfd, AUDIO_GET_GAINS, &ag); - ag.cgain[0].transmit_gain = AUDIO_OFF_GAIN+(AUDIO_MAX_GAIN-AUDIO_OFF_GAIN)*volume/100; - ag.cgain[1].transmit_gain = ag.cgain[0].transmit_gain; - ioctl(cfd, AUDIO_SET_GAINS, &ag); - return; -#elif defined(IRIX) - params[0] = AL_LEFT_SPEAKER_GAIN; - params[1] = volume; - params[2] = AL_RIGHT_SPEAKER_GAIN; - params[3] = volume; - ALsetparams(audioDevice, params, 4); - return; -#else - return; -#endif -} - -void AudioInterpolate(char *rBuf, int len, char * cBuf, int convLen) -{ - unsigned char *rawBuf = (unsigned char *)rBuf; - unsigned char *convBuf = (unsigned char *)cBuf; - int i; - float factor = (float)len / (float)convLen; - -#ifdef AUDIOFILE - if ((!useAF) && afd == -1) return; -#else - if (afd == -1) return; -#endif - - /* - Fprintf(stderr, "factor %5.2lf, len %d, convLen %d\n", factor, len, convLen); - */ - if (shared->audioPara.bytesPerSample == 1) - { - for (i=0; i -#include -#include -#include -#include -#include -#ifdef ULTRIX -#include -#else -#include -#endif -#include -#include -#include -#include -#include -#include -#include - -#include "include/common.h" -#include "newproto.h" -#include "global.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/sendpt.h" -#include "mpeg_shared/filters.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/com.h" -#include "Command_Handler.h" - -ACE_RCSID(mpeg_client, ctr, "$Id$") - -#define SPEEDHIST_SIZE 20 - -#if defined max -#undef max -#endif -#define max(a,b) (a>b ? a : b) - -#if defined min -#undef min -#endif -#define min(a,b) (a maxfr, - then this value would be 1.0. Otherwise it would be - playspeed/maxfr */ -static double frate = 0; /* current server frame rate, in percentage of maxrate */ -static double adjstep = 0; /* step of frame-rate adjustment. In percentage value. - This is basically - maxrate/#frames-in-feedback-frame-sequence */ -static int fb_startup = 0; /* Indicate the first feedback action. The first feedback - action is to set the server fps directly according to - actully measured display frame-rate. All following - feedback action would then adjust server fps linearly - adjstep each time */ - -AudioBuffer *abuffer; -VideoBuffer *vbuffer; -int asp[2]; -int vsp[2]; -int vdsp[2]; - -#define max(a,b) (a>b ? a : b) -#define min(a,b) (acmd = val; shared->cmdsn ++; } - -static void compute_sendPattern(void); - -int -OurCmdRead(char *buf, int size) -{ - int val; - if (size == 0) return 0; - if (cmdBytes > 0) - { - ACE_OS::memcpy (buf, cmdBuffer, size); - cmdBytes -= size; - cmdBuffer += size; - return 0; - } - while ((val = ACE_OS::read (cmdSocket, (buf), (size))) <= 0) - { - if (val == -1 && errno == EINTR) return 1; - if (!val) { - ACE_OS::perror ("CTR error, EOF reached unexpected within CmdRead()"); - } - else { - ACE_OS::perror ("CTR CmdRead() from UI through CmdSocket"); - } - ACE_OS::exit (1); - } - return 0; -} - -static void CmdWrite(unsigned char * buf, int size) -{ - if (cmdAcks > 0 && size == 1 && *buf == CmdDONE) - { - cmdAcks --; - return; - } - - while (ACE_OS::write(cmdSocket, buf, size) == -1) - { - if (errno == EINTR) - continue; - ACE_OS::perror ("CTR writes to UI through cmdSocket"); - ACE_OS::exit (1); - } -} - -/* following function can be replaced by ../shared/fileio.c:read_bytes() - but SocketRead provides more error info */ - -static void SocketRead(int s, char *buf, int size) -{ int val, remain = size; - char * ptr = buf; - // fprintf (stderr, "SocketRead: videoSocket = %d\n",videoSocket); - for (;;) - { - val = ACE_OS::read (s, ptr, remain); - - // fprintf(stderr, "CTR got from %sSocket %d of %d.\n",s == videoSocket ? "video" : "audio", val, remain); - - if (val == -1 && errno == EINTR) - { - errno = 0; - continue; - } - if (val == -1) - { - fprintf(stderr, "CTR error read %sSocket, ret=%d(size=%d)", - s == videoSocket ? "video" : "audio", size-remain, size); - ACE_OS::perror (""); - ACE_OS::exit (1); - } - if (val == 0) - { - fprintf(stderr, "CTR error read %sSocket, EOF met, ret=%d(size=%d).\n", - s == videoSocket ? "video" : "audio", size-remain, size); - ACE_OS::exit (1); - } - ptr += val; - remain -= val; - if (remain < 0) - { - fprintf(stderr, "CTR error read %sSocket, read too much, ret=%d(size=%d).\n", - s == videoSocket ? "video" : "audio", size-remain, size); - ACE_OS::exit (1); - } - if (remain == 0) - break; - } -} - -#define VideoRead(buf, size) SocketRead(videoSocket, buf, size) - -#define VideoWrite(buf, psize) \ - { int val; while ((val = ACE_OS::write (videoSocket, (buf), (psize))) == -1) \ - { if (errno == EINTR) continue; \ - ACE_OS::perror ("CTR writes to VS through videoSocket");\ - ACE_OS::exit (1); \ - } \ - if (val < (int)(psize)) { \ - fprintf(stderr, "CTR bad VideoWrite, size %d, val %d", psize, val);ACE_OS::perror (""); }\ - } - -#define AudioRead(buf, size) SocketRead(audioSocket, buf, size) - -#define AudioWrite(buf, size) \ - { while (write(audioSocket, (buf), (size)) == -1) \ - { if (errno == EINTR) continue; \ - ACE_OS::perror ("CTR writes to AS through audioSocket"); \ - ACE_OS::exit (1); \ - } \ - } - -static void start_timer(void); -static void stop_timer(void); -static void timer_speed(void); -static void wait_display(void); -static void stop_playing(); - -static void set_speed(void) -{ - int val; - if (shared->live) { - shared->speedPosition = 50; - } - val = shared->speedPosition; - if (val == 0) - val = 1; - if (shared->cmd == CmdPLAY && audioSocket >= 0 && videoSocket >= 0 && rtplay) { - /* limit audio signal period to no more than 1.0 seconds, because AudioFile - will block if one send more than 4 seconds of sample ahead of current - time. and our timing control is not precise. - */ - double s = ((1.0 / shared->pictureRate) * 50.0) * - (double)max(shared->config.framesPerAudioPlay, 1) / 1.0; - if (s > 50.0) { - fprintf(stderr, "CTR warning: lower value of parameter framesPerAudioPlay,\n"); - fprintf(stderr, " otherwise the Player may not work properly.\n"); - } - if (val < s) { - if (shared->config.verbose) { - if (val < s * 1.0 / 2.0) { - val = (int)s; - fprintf(stderr, "CTR warning: speed too low, set to %d scale val.\n", val); - } - else { - fprintf(stderr, "CTR warning: audio signal period %3.2f > 1 sec.\n", - 1.0 * (float)s / (float) val); - fprintf(stderr, " lower framesPerAudioPlay or increase speed.\n"); - } - } - else { - val = (int)s; - } - } - } - if (videoSocket >= 0) - { - float fps; - if (val <= 50) - fps = shared->pictureRate * (float)val / 50.0; - else - { - float rate = shared->config.maxFPS - shared->pictureRate; - fps = shared->pictureRate + (float)rate * (float)(val - 50) / 50.0; - /* only B frames are to be dropped */ - } - Fprintf(stderr, "Play speed video %5.1ffps\n", fps); - shared->framesPerSecond = (int)fps; - shared->usecPerFrame = (int) (1000000.0/fps); - if (audioSocket >= 0) - { - float sps = shared->audioPara.samplesPerSecond * fps / shared->pictureRate; - shared->samplesPerSecond = (int)sps; - shared->usecPerSample = (int)(1000000.0/sps); - } - } - else if (audioSocket >= 0) - { - float sps; - if (val <= 50) - sps = (float)shared->audioPara.samplesPerSecond * (float)val / 50.0; - else - { - int rate = shared->config.maxSPS - shared->audioPara.samplesPerSecond; - sps = shared->audioPara.samplesPerSecond + (float)rate * (float)(val - 50) / 50.0; - } - Fprintf(stderr, "Play speed audio %5.1fsps\n", sps); - shared->samplesPerSecond = (int)sps; - shared->usecPerSample = (int)(1000000.0/sps); - } -} - -static int timer_on = 0; -static int timer_signals_skip = 0; -static int timerCount = 0; -static int lastCount = 0; -static int timerUPF; -static int wait_usr2 = 0; -static int last_disp_fid = 0; - -static void loopBack(void) -{ - static char loopBackCmd[7] = {CmdSTOP, CmdPOSITIONrelease, - 0, 0, 0, 0, CmdPLAY}; - cmdBuffer = loopBackCmd; - cmdBytes = 7; - cmdAcks = 3; -} - -#define AUDIO_BUFSIZE 2048 - -static int audioCount = 0; -static int audioFirst = 0; -static int needAudioSkip = 0; -static int bufferedSamples; -static int nextASSample, startSample; -static unsigned int nextAFtime; -static int forward, forwardDelta; -static int audioForward, framesPerAudioPlay; -static int AudioBufSize; -static char * rawBuf = NULL, * workBuf = NULL, * convBuf = NULL; - -static void PlayAudioInit(void) -{ - audioCount = -1; - audioFirst = 1; - needAudioSkip = 0; - startSample = nextASSample = shared->nextSample; - audioForward = shared->config.audioForward; - framesPerAudioPlay = max(shared->config.framesPerAudioPlay, 1); - if (audioForward <= 0) - audioForward = DEFAULT_audioForward; - fprintf(stderr, "CTR audioForward: %d samples.\n", audioForward); - bufferedSamples = (int)(((double) - (shared->config.audioTimerDuration * - shared->config.audioBufferedIntervals)) - * (double)shared->audioPara.samplesPerSecond / 1000.0); - if (rawBuf == NULL) - { - if ((rawBuf = (char *)ACE_OS::malloc(AUDIO_BUFSIZE)) == NULL) - { - ACE_OS::perror ("CTR fails to allocate rawBuf for audio channel"); - ACE_OS::exit (1); - } - if ((workBuf = (char *)ACE_OS::malloc(AUDIO_BUFSIZE)) == NULL) - { - ACE_OS::perror ("CTR fails to allocate workBuf for audio channel"); - ACE_OS::exit (1); - } - } - AudioBufSize = (AUDIO_BUFSIZE / shared->audioPara.bytesPerSample) * - shared->audioPara.bytesPerSample; - - StartAudioPlaySession(); -} - -/* input the number of samples in the raw buffer, - returns the numberof samples in theconverted buffer */ -static int AudioConvert(int len) -{ - int convLen; - - if (shared->samplesPerSecond == shared->audioPara.samplesPerSecond) - { - convBuf = rawBuf; - return len; - } - - convBuf = workBuf; - convLen = len * shared->audioPara.samplesPerSecond / shared->samplesPerSecond; - AudioInterpolate(rawBuf, len, convBuf, convLen); - return convLen; -} - -/* returns: 0 - no forward calculated , 1 - forward calculated */ -static int PlayAudio(void) -{ - int timer_count = timerCount; - int i = timer_count / framesPerAudioPlay; - if (audioFirst) - { - audioFirst = 0; - nextAFtime = GetAudioTime() + audioForward;; - audioCount = -1; /* guarantee that PlayAudio do the first step */ - } - if (audioCount == i) /* current audio timer signal already processed */ - return 0; - if (audioCount < i - 1) /* some audio timer signal missing */ - { - needAudioSkip = 1; - /* - Fprintf(stderr, "CTR: some audio timer signal missed.\n"); - */ - } - if (nextASSample >= shared->totalSamples) - { - /* - timer_on ++; - */ - return 0; - } - - audioCount = i; - - if (needAudioSkip) - { - /* return if not enough skip can be done */ - int next_sample = (int)(startSample + - ((double)timer_count / shared->pictureRate) * - shared->audioPara.samplesPerSecond); - int skip_samples = next_sample - nextASSample; - abuffer->ABskipSamples(skip_samples); - nextAFtime += (unsigned int)(((double)skip_samples * - (double)shared->audioPara.samplesPerSecond) / - (double)shared->samplesPerSecond); - nextASSample += skip_samples; - needAudioSkip = 0; - } - - /* read current block, convert, put to AF, and update nextAFtime */ - { - int frame_samples = (int)(startSample + - ((double)(timer_count + framesPerAudioPlay) / shared->pictureRate) * - (double)shared->audioPara.samplesPerSecond - - nextASSample); - int fsize = frame_samples * shared->audioPara.bytesPerSample; - int read_samples; - unsigned int curAFtime; - unsigned int oldAFtime = nextAFtime; - char * ptr = rawBuf; - if (fsize > AudioBufSize) - { /* make sure the rawBuf is big enough */ - Fprintf(stderr, "CTR PlayAudio error: BytesPerFrame=%d > AudioBufSize=%d.\n", - fsize, AudioBufSize); - Fprintf(stderr, - "CTR PlayAudio: startSample=%d, timer_count=%d, nextASSmple=%d.\n", - startSample, timer_count, nextASSample); - fprintf(stderr, "Internal error: audio resampling buffer not big enough,\n\ - please reduce value of parameter 'Audio timer interval',\n\ - or 'Audio buffered intervals' or Frames per audio play',\n\ - and try again.\n"); - ACE_OS::exit (1); - } - - read_samples = abuffer->ABgetSamples(ptr, frame_samples); - - /* convert and play to AF */ - { - int maxSamples; - int left_samples = read_samples; - if (shared->samplesPerSecond >= shared->audioPara.samplesPerSecond) - maxSamples = (AudioBufSize/shared->audioPara.bytesPerSample); - else - maxSamples = ((AudioBufSize/shared->audioPara.bytesPerSample) * - shared->samplesPerSecond) / - shared->audioPara.samplesPerSecond; - for (;;) - { - int samples = (left_samples > maxSamples) ? maxSamples : left_samples; - int convSamples = AudioConvert(samples); - curAFtime = PlayAudioSamples(nextAFtime, convBuf, convSamples); - nextAFtime += convSamples; - left_samples -= samples; - if (left_samples == 0) - break; - else - { - ACE_OS::memcpy (rawBuf, rawBuf + samples * shared->audioPara.bytesPerSample, - left_samples * shared->audioPara.bytesPerSample); - } - } - } - - /* possible bugs in AF some times cause PlayAudioSample() to return 0 */ - forward = curAFtime ? (oldAFtime - curAFtime) : audioForward; - /* - if ((oldAFtime - curAFtime) > (audioForward << 6)) { - fprintf(stderr, "forward %d, oldAFtime %d, curAFtime %d\n", - oldAFtime - curAFtime, oldAFtime, curAFtime); - } - */ - /* check condition */ - if (read_samples == frame_samples) { /* all bytes for current frame already read */ - nextASSample += frame_samples; - } - else { /* read to the end of audio file */ - /* - timer_on ++; - */ - nextASSample += read_samples; - } - shared->nextSample = nextASSample; - } - return 1; -} - - - -#define MAX_WAIT_USEC 10000000 - -static void start_timer (void) -{ - struct itimerval val; - - if (audioSocket >= 0 && shared->cmd == CmdPLAY && rtplay) - { - // ACE_DEBUG ((LM_DEBUG,"calling playaudioinit ()\n")); - PlayAudioInit(); - } - - /* sleep for a while to wait for decoding the first picture - and/or audio stream ready */ - { - unsigned val1 = startTime; - if (audioSocket >= 0 && shared->cmd == CmdPLAY && rtplay) - { - if (shared->nextSample < shared->totalSamples) - { - int samples = videoSocket >= 0 ? 1200 : 1200; - while (abuffer->ABcheckSamples() <= samples) - { - if (get_duration(val1, get_usec()) >= MAX_WAIT_USEC) - { - fprintf(stderr, "CTR warning: audio is not ready yet.\n"); - break; - } - else - { - usleep(10000); - continue; - } - } - } - } - - if (videoSocket >= 0) - { - while (VDcheckMsg() <= 0) { /* keep sleeping for 1 millisec until a decoded - frame show up in VD buffer */ - if (get_duration(val1, get_usec()) >= MAX_WAIT_USEC) { - fprintf(stderr, "CTR warning: video is not ready yet.\n"); - break; - } - usleep(10000); - } - } - val1 = get_duration(val1, get_usec()) / 1000; - shared->playRoundTripDelay = val1; - - Fprintf(stderr, "CTR: estimated play round trip delay: %d millisec.\n", val1); - - /* - if (shared->collectStat) - { - fprintf(stderr, "CTR: estimated play round trip delay: %d millisec.\n", val1); - } - */ - } - timer_on = 1; - timer_signals_skip = 0; - timerCount = 0; - lastCount = 0; - - if (shared->live) { - - /* delay for shared->config.VStimeAdvance milliseconds, adjustable delay */ - if (shared->config.VStimeAdvance > 0) { - Fprintf(stderr, "CTR adds %d millisec of latency\n", - shared->config.VStimeAdvance); - usleep(shared->config.VStimeAdvance * 1000); - } - displayedFrames = 0; - startTime = get_usec(); - startVSA = shared->nextFrame - shared->VBheadFrame; - if (startVSA < 5) startVSA = 5; - /* - Fprintf(stderr, "CTR: startVSA %d\n", startVSA); - */ - } - - if (shared->cmd == CmdPLAY && rtplay) { - wait_usr2 = 0; - } - else { - wait_usr2 = 1; - } - last_disp_fid = -1; - /* - fprintf(stderr, "CTR start_timer() - %s for usr2\n", - wait_usr2 ? "wait" : "NOwait"); - */ - if (shared->cmd == CmdPLAY && audioSocket >= 0 && videoSocket < 0) - timerUPF = shared->config.audioTimerDuration * 1000; - else { - timerUPF = shared->usecPerFrame; - } -#ifdef STAT - speedPtr = 1; - speedHistory[0].frameId = shared->nextFrame; - speedHistory[0].usecPerFrame = timerUPF; - speedHistory[0].frameRateLimit = shared->frameRateLimit; - speedHistory[0].frames = shared->sendPatternGops * shared->patternSize; - speedHistory[0].framesDropped = shared->framesDropped; -#endif - /* - fprintf(stderr, "CTR: timer started at %d upf.\n", timerUPF); - */ - val.it_interval.tv_sec = val.it_value.tv_sec = timerUPF / 1000000; - val.it_interval.tv_usec = val.it_value.tv_usec = timerUPF % 1000000; - // setsignal(SIGALRM, TimerHandler); - setitimer(ITIMER_REAL, &val, NULL); -} - - -static void wait_display(void) -{ - if (!usr1_flag) { - if (shared->cmd == CmdINIT) sleep(10);// XXX hack to make the client wait until the server gets a chance. - else usleep(800000); - } - if (!usr1_flag) - { - if (shared->cmd == CmdSTEP) /* to skip undecodable pictures */ - shared->nextFrame ++; - else if (shared->cmd == CmdINIT) { - fprintf(stderr, "Warning: initialilzation failed. Please reinitialize the program.\n"); - } - return; - } - usr1_flag = 0; -} - -static void usr1_handler(int sig) -{ - FrameBlock *buf; - unsigned char tmp; - /* - Fprintf(stderr, "CTR got USR1 for displaying single frame.\n"); - */ - usr1_flag = 1; - - if (shared->cmd == CmdINIT) { /* Initialize display window */ - tmp = CmdVPinitScreen; - CmdWrite(&tmp, 1); - } - /* - fprintf(stderr, "CTR: %d frames in VDbuf.\n", VDcheckMsg()); - */ - while (VDcheckMsg() > 1) - { - /* - Fprintf(stderr, "CTR: VDcheckMsg() = %d, to discard a picture.\n", VDcheckMsg()); - */ - if ((buf = VDgetMsg()) != NULL) - VDreclaimMsg(buf); - else - fprintf(stderr, "CTR error: VDgetMsg is NULL, unexpected.\n"); - } - if (VDcheckMsg() >0 ) { - /* - Fprintf(stderr, "CTR to display a frame in user1_handler()\n"); - */ - buf = VDgetMsg(); - } - else { - /* - Fprintf(stderr, "CTR no frame to display in user_handler()\n"); - */ - buf = NULL; - } - - if (buf != NULL) { - if (shared->cmd == CmdSTEP) - { - shared->nextFrame ++; - shared->nextGroup = buf->gop + 1; - } - else - { - shared->nextFrame = buf->display; - shared->nextGroup = buf->gop; - } - tmp = CmdVPdisplayFrame; - CmdWrite(&tmp, 1); - CmdWrite((unsigned char *)&buf, sizeof(char *)); - } - else if (shared->cmd == CmdSTEP) { - shared->nextFrame ++; - } -} - -static void compute_sendPattern(void) -{ - char buf[PATTERN_SIZE]; - float limit = shared->frameRateLimit; - char * pat = shared->pattern; - int len = shared->patternSize * shared->sendPatternGops; - int f; - - if (limit <= 0) - limit = 1.0; - if (rtplay) { - f = (int)((double)len * - ((double)limit / (1000000.0 / (double)shared->usecPerFrame)) + 0.5); - /* rounded to integer, instead of truncated */ - } - else { - f = len; - } - if (f >= len) - f = len; - else if (f <= 1) - f = 1; - - ComputeSendPattern(pat, buf, len, f); - shared->qosRecomputes ++; - - ACE_OS::memcpy (shared->sendPattern, buf, PATTERN_SIZE); - - f = len - f; - if (shared->config.verbose) { - fprintf(stderr, "speed %dupf, %d frames dropped, frames %d:\nsend pattern:", - shared->usecPerFrame, f, len); - shared->framesDropped = f; - { - int i; - for (i = 0; i < len; i ++) - fputc(buf[i] ? pat[i] : '-', stderr); - } - fputc('\n', stderr); - } -} - - -static void on_exit_routine(void) -{ - // ACE_DEBUG ((LM_DEBUG, - // "(%P|%t) %s:%d\n", - // __FILE__, - // __LINE__)); - unsigned char tmp = CmdCLOSE; - - if (getpid() != CTRpid) return; - - if (audioSocket >= 0) - { - char message[BUFSIZ]; - message [0] = EXIT; - ACE_OS::write (asp[0],&message,BUFSIZ); - // ACE_OS::write (audioSocket, &tmp, 1); - // ComCloseConn(audioSocket); - audioSocket = -1; - } - - if (videoSocket >= 0) - { - // ACE_OS::write (videoSocket, &tmp, 1); - // ComCloseConn(videoSocket); - videoSocket = -1; - if (VBpid > 0) { - char message[BUFSIZ]; - message [0] = EXIT; - ACE_OS::write (vsp[0],&message,BUFSIZ); - // ACE_OS::kill (VBpid, SIGUSR1); - VBpid = -1; - } - } - ComCloseClient(); -} - -int CTRmain(int argc, - char **argv) -{ - int sv[2]; - extern void set_exit_routine_tag(int tag); - - FILE * fp = NULL; /* file pointer for experiment plan */ - - set_exit_routine_tag(0); - - /* allocate shared data structure and initialize it */ - shared = (SharedData *) creat_shared_mem(sizeof(*shared)); - shared->cmd = 0; - shared->cmdsn = 0; - shared->cmdBusy = 0; - shared->loopBack = 0; - shared->volumePosition = 0; - shared->balancePosition = 50; - shared->locationPosition = 0; - shared->speedPosition = 0; - shared->qosRecomputes = 0; - - shared->pixelValid = 0; - - shared->config.rt = 1; - shared->config.maxFPS = DEFAULT_maxFPS; - shared->config.maxSPS = DEFAULT_maxSPS; - shared->config.ffFPS = DEFAULT_ffFPS; - shared->config.fbFPS = DEFAULT_fbFPS; - shared->config.feedBackDelay = DEFAULT_feedBackDelay; - shared->config.audioMask = DEFAULT_audioMask; - shared->config.audioPara.encodeType = DEFAULT_encodeType; - shared->config.audioPara.channels = DEFAULT_channels; - shared->config.audioPara.samplesPerSecond = DEFAULT_samplesPerSecond; - shared->config.audioPara.bytesPerSample = DEFAULT_bytesPerSample; - shared->config.audioTimerDuration = DEFAULT_audioTimerDuration; - shared->config.audioBufferedIntervals = DEFAULT_audioBufferedIntervals; - shared->config.framesPerAudioPlay = DEFAULT_framesPerAudioPlay; - shared->config.audioForward = DEFAULT_audioForward; - shared->config.VStimeAdvance = DEFAULT_VStimeAdvance; - shared->config.frameRateLimit = DEFAULT_maxFPS; - shared->config.collectStat = 0; - shared->config.collectFrameInfo = 0; - shared->config.syncEffective = 1; - shared->config.qosEffective = 1; - shared->config.audioOffset = 0; - shared->config.filterPara = DEFAULT_filterPara; - shared->config.maxSPframes = DEFAULT_maxSPframes; - shared->config.audioConn = 0; - shared->config.videoConn = 0; - shared->config.verbose = (!getuid()) || ACE_OS::getuid () == DEVELOPER_UID; - - ACE_NEW_RETURN (vbuffer, - VideoBuffer (), - -1); - - ACE_NEW_RETURN (abuffer, - AudioBuffer (), - -1); - - /* create all shared buffers: AB-CTR, VB-VD, VD-VP */ - abuffer->ABinitBuf(AB_BUF_SIZE); - vbuffer->VBinitBuf(VB_BUF_SIZE); - VDinitBuf(VD_BUF_SIZE); - - CTRpid =ACE_OS::getpid (); - set_exit_routine_tag(1); - - - // create the notification socket pair. - if (ACE_OS::socketpair (AF_UNIX,SOCK_STREAM,0,asp) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"Error in opening notification socket:%p", - "notification socket"),-1); - - // create the notification socket pair. - if (ACE_OS::socketpair (AF_UNIX,SOCK_STREAM,0,vsp) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"Error in opening notification socket:%p", - "notification socket"),-1); - - if (ACE_OS::socketpair (AF_UNIX,SOCK_STREAM,0,vdsp) == -1) - ACE_ERROR_RETURN ((LM_ERROR,"Error in opening notification socket:%p", - "notification socket"),-1); - - /* create command socket pair */ - if (ACE_OS::socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == -1) - { - ACE_OS::perror ("CTR error on open cmd socketpair"); - ACE_OS::exit (1); - } - cmdSocket = sv[0]; - /* fork processes: VD, GUI */ - - if ((VDpid = ACE_OS::fork ()) == -1) - { - ACE_OS::perror ("CTR error on fork VD"); - ACE_OS::exit (1); - } else if (VDpid == 0) - { - abuffer->ABdeleteBuf(); - ACE_OS::close (sv[0]); - ACE_OS::close (sv[1]); - if (realTimeFlag >= 3) { - if (SetRTpriority("VD", 0)) realTimeFlag = 0; - } - VDprocess(CTRpid); - } - - if ((UIpid = ACE_OS::fork ()) == -1) - { - ACE_OS::perror ("CTR error on fork UI"); - ACE_OS::exit (1); - } else if (UIpid == 0) - { - vbuffer->VBdeleteBuf(); - abuffer->ABdeleteBuf(); - ACE_OS::close (sv[0]); - if (realTimeFlag >= 2) { -#ifdef __svr4__ - if (SetRTpriority("VB", 0)) realTimeFlag = 0; -#elif defined(_HPUX_SOURCE) - if (SetRTpriority("VB", 2)) realTimeFlag = 0; -#endif - } - UIprocess(sv[1]); - } - ACE_OS::close (sv[1]); - - /* initialize Audio device */ - if (InitAudioDevice() == 0) - hasAudioDevice = 1; - else - hasAudioDevice = 0; - - // ComInitClient(VCR_TCP_PORT, VCR_UNIX_PORT, VCR_ATM_PORT); - - if ((vh = (char *)ACE_OS::malloc(PATH_SIZE)) == NULL) - { - ACE_OS::perror ("CTR failed to allocate space for vh"); - ACE_OS::exit (1); - } - if ((vf = (char *)ACE_OS::malloc(PATH_SIZE)) == NULL) - { - ACE_OS::perror ("CTR failed to allocate space for vf"); - ACE_OS::exit (1); - } - if ((ah = (char *)ACE_OS::malloc(PATH_SIZE)) == NULL) - { - ACE_OS::perror ("CTR failed to allocate space for ah"); - ACE_OS::exit (1); - } - if ((af = (char *)ACE_OS::malloc(PATH_SIZE)) == NULL) - { - ACE_OS::perror ("CTR failed to allocate space for af"); - ACE_OS::exit (1); - } - if (realTimeFlag) { - if (SetRTpriority("CTR", 4)) realTimeFlag = 0; - } - - // instantiate our command handler - Command_Handler command_handler (cmdSocket); - if (command_handler.init (argc,argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) command_handler: init returned -1"), - -1); - - // .. and register it with the reactor. - if (TAO_ORB_Core_instance ()->reactor ()->register_handler (&command_handler, - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) register_handler for command_handler failed\n"), - -1); - - int result = command_handler.run (); - if (ABpid == 0) - { - ACE_DEBUG ((LM_DEBUG,"(%d) Restarting the ACE_Reactor::instance ()",ACE_OS::getpid ())); - ACE_Reactor::instance ()->run_event_loop (); - } - - if (VBpid == 0) - { - ACE_DEBUG ((LM_DEBUG,"(%d) Restarting the ACE_Reactor::instance ()",ACE_OS::getpid ())); - ACE_Reactor::instance ()->run_event_loop (); - } - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Exited the client command handler event loop\n" - "%p\n", - "run_event_loop")); - - return 0; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.cpp deleted file mode 100644 index 43e4373934f..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.cpp +++ /dev/null @@ -1,937 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -/* - * decoders.c - * - * This file contains all the routines for Huffman decoding required in - * MPEG - * - */ - -#include -#include -#include "decoders.h" -#include "util.h" -#include "video.h" -#include "proto.h" - -ACE_RCSID(mpeg_client, decoders, "$Id$") - -/* Decoding table for macroblock_address_increment */ -mb_addr_inc_entry mb_addr_inc[2048]; - -/* Decoding table for macroblock_type in predictive-coded pictures */ -mb_type_entry mb_type_P[64]; - -/* Decoding table for macroblock_type in bidirectionally-coded pictures */ -mb_type_entry mb_type_B[64]; - -/* Decoding table for motion vectors */ -motion_vectors_entry motion_vectors[2048]; - -/* Decoding table for coded_block_pattern */ - -coded_block_pattern_entry coded_block_pattern[512] = -{ {(unsigned int)ERROR, 0}, {(unsigned int)ERROR, 0}, {39, 9}, {27, 9}, {59, 9}, {55, 9}, {47, 9}, {31, 9}, - {58, 8}, {58, 8}, {54, 8}, {54, 8}, {46, 8}, {46, 8}, {30, 8}, {30, 8}, - {57, 8}, {57, 8}, {53, 8}, {53, 8}, {45, 8}, {45, 8}, {29, 8}, {29, 8}, - {38, 8}, {38, 8}, {26, 8}, {26, 8}, {37, 8}, {37, 8}, {25, 8}, {25, 8}, - {43, 8}, {43, 8}, {23, 8}, {23, 8}, {51, 8}, {51, 8}, {15, 8}, {15, 8}, - {42, 8}, {42, 8}, {22, 8}, {22, 8}, {50, 8}, {50, 8}, {14, 8}, {14, 8}, - {41, 8}, {41, 8}, {21, 8}, {21, 8}, {49, 8}, {49, 8}, {13, 8}, {13, 8}, - {35, 8}, {35, 8}, {19, 8}, {19, 8}, {11, 8}, {11, 8}, {7, 8}, {7, 8}, - {34, 7}, {34, 7}, {34, 7}, {34, 7}, {18, 7}, {18, 7}, {18, 7}, {18, 7}, - {10, 7}, {10, 7}, {10, 7}, {10, 7}, {6, 7}, {6, 7}, {6, 7}, {6, 7}, - {33, 7}, {33, 7}, {33, 7}, {33, 7}, {17, 7}, {17, 7}, {17, 7}, {17, 7}, - {9, 7}, {9, 7}, {9, 7}, {9, 7}, {5, 7}, {5, 7}, {5, 7}, {5, 7}, - {63, 6}, {63, 6}, {63, 6}, {63, 6}, {63, 6}, {63, 6}, {63, 6}, {63, 6}, - {3, 6}, {3, 6}, {3, 6}, {3, 6}, {3, 6}, {3, 6}, {3, 6}, {3, 6}, - {36, 6}, {36, 6}, {36, 6}, {36, 6}, {36, 6}, {36, 6}, {36, 6}, {36, 6}, - {24, 6}, {24, 6}, {24, 6}, {24, 6}, {24, 6}, {24, 6}, {24, 6}, {24, 6}, - {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, - {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, {62, 5}, - {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, - {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, {2, 5}, - {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, - {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, {61, 5}, - {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, - {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, {1, 5}, - {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, - {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, {56, 5}, - {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, - {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, {52, 5}, - {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, - {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, {44, 5}, - {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, - {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, {28, 5}, - {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, - {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, {40, 5}, - {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, - {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, {20, 5}, - {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, - {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, {48, 5}, - {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, - {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, {12, 5}, - {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, - {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, - {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, - {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, {32, 4}, - {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, - {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, - {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, - {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, {16, 4}, - {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, - {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, - {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, - {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, {8, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, - {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, - {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, - {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, - {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, - {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, - {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, - {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3}, {60, 3} -}; - -/* Decoding table for dct_dc_size_luminance */ -dct_dc_size_entry dct_dc_size_luminance[128] = -{ {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, - {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, {0, 3}, - {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, - {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, - {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, - {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, {4, 3}, - {5, 4}, {5, 4}, {5, 4}, {5, 4}, {5, 4}, {5, 4}, {5, 4}, {5, 4}, - {6, 5}, {6, 5}, {6, 5}, {6, 5}, {7, 6}, {7, 6}, {8, 7}, {(unsigned int)ERROR, 0} -}; - -/* Decoding table for dct_dc_size_chrominance */ -dct_dc_size_entry dct_dc_size_chrominance[256] = -{ {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, - {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, - {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, - {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, - {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, - {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, - {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, - {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, - {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, - {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, - {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {5, 5}, {5, 5}, {5, 5}, {5, 5}, {5, 5}, {5, 5}, {5, 5}, {5, 5}, - {6, 6}, {6, 6}, {6, 6}, {6, 6}, {7, 7}, {7, 7}, {8, 8}, {(unsigned int)ERROR, 0} -}; - -/* DCT coeff tables. */ - -unsigned short int dct_coeff_tbl_0[256] = -{ -0xffff, 0xffff, 0xffff, 0xffff, -0xffff, 0xffff, 0xffff, 0xffff, -0xffff, 0xffff, 0xffff, 0xffff, -0xffff, 0xffff, 0xffff, 0xffff, -0x052f, 0x051f, 0x050f, 0x04ff, -0x183f, 0x402f, 0x3c2f, 0x382f, -0x342f, 0x302f, 0x2c2f, 0x7c1f, -0x781f, 0x741f, 0x701f, 0x6c1f, -0x028e, 0x028e, 0x027e, 0x027e, -0x026e, 0x026e, 0x025e, 0x025e, -0x024e, 0x024e, 0x023e, 0x023e, -0x022e, 0x022e, 0x021e, 0x021e, -0x020e, 0x020e, 0x04ee, 0x04ee, -0x04de, 0x04de, 0x04ce, 0x04ce, -0x04be, 0x04be, 0x04ae, 0x04ae, -0x049e, 0x049e, 0x048e, 0x048e, -0x01fd, 0x01fd, 0x01fd, 0x01fd, -0x01ed, 0x01ed, 0x01ed, 0x01ed, -0x01dd, 0x01dd, 0x01dd, 0x01dd, -0x01cd, 0x01cd, 0x01cd, 0x01cd, -0x01bd, 0x01bd, 0x01bd, 0x01bd, -0x01ad, 0x01ad, 0x01ad, 0x01ad, -0x019d, 0x019d, 0x019d, 0x019d, -0x018d, 0x018d, 0x018d, 0x018d, -0x017d, 0x017d, 0x017d, 0x017d, -0x016d, 0x016d, 0x016d, 0x016d, -0x015d, 0x015d, 0x015d, 0x015d, -0x014d, 0x014d, 0x014d, 0x014d, -0x013d, 0x013d, 0x013d, 0x013d, -0x012d, 0x012d, 0x012d, 0x012d, -0x011d, 0x011d, 0x011d, 0x011d, -0x010d, 0x010d, 0x010d, 0x010d, -0x282c, 0x282c, 0x282c, 0x282c, -0x282c, 0x282c, 0x282c, 0x282c, -0x242c, 0x242c, 0x242c, 0x242c, -0x242c, 0x242c, 0x242c, 0x242c, -0x143c, 0x143c, 0x143c, 0x143c, -0x143c, 0x143c, 0x143c, 0x143c, -0x0c4c, 0x0c4c, 0x0c4c, 0x0c4c, -0x0c4c, 0x0c4c, 0x0c4c, 0x0c4c, -0x085c, 0x085c, 0x085c, 0x085c, -0x085c, 0x085c, 0x085c, 0x085c, -0x047c, 0x047c, 0x047c, 0x047c, -0x047c, 0x047c, 0x047c, 0x047c, -0x046c, 0x046c, 0x046c, 0x046c, -0x046c, 0x046c, 0x046c, 0x046c, -0x00fc, 0x00fc, 0x00fc, 0x00fc, -0x00fc, 0x00fc, 0x00fc, 0x00fc, -0x00ec, 0x00ec, 0x00ec, 0x00ec, -0x00ec, 0x00ec, 0x00ec, 0x00ec, -0x00dc, 0x00dc, 0x00dc, 0x00dc, -0x00dc, 0x00dc, 0x00dc, 0x00dc, -0x00cc, 0x00cc, 0x00cc, 0x00cc, -0x00cc, 0x00cc, 0x00cc, 0x00cc, -0x681c, 0x681c, 0x681c, 0x681c, -0x681c, 0x681c, 0x681c, 0x681c, -0x641c, 0x641c, 0x641c, 0x641c, -0x641c, 0x641c, 0x641c, 0x641c, -0x601c, 0x601c, 0x601c, 0x601c, -0x601c, 0x601c, 0x601c, 0x601c, -0x5c1c, 0x5c1c, 0x5c1c, 0x5c1c, -0x5c1c, 0x5c1c, 0x5c1c, 0x5c1c, -0x581c, 0x581c, 0x581c, 0x581c, -0x581c, 0x581c, 0x581c, 0x581c, -}; - -unsigned short int dct_coeff_tbl_1[16] = -{ -0x00bb, 0x202b, 0x103b, 0x00ab, -0x084b, 0x1c2b, 0x541b, 0x501b, -0x009b, 0x4c1b, 0x481b, 0x045b, -0x0c3b, 0x008b, 0x182b, 0x441b, -}; - -unsigned short int dct_coeff_tbl_2[4] = -{ -0x4019, 0x1429, 0x0079, 0x0839, -}; - -unsigned short int dct_coeff_tbl_3[4] = -{ -0x0449, 0x3c19, 0x3819, 0x1029, -}; - -unsigned short int dct_coeff_next[256] = -{ -0xffff, 0xffff, 0xffff, 0xffff, -0xf7d5, 0xf7d5, 0xf7d5, 0xf7d5, -0x0826, 0x0826, 0x2416, 0x2416, -0x0046, 0x0046, 0x2016, 0x2016, -0x1c15, 0x1c15, 0x1c15, 0x1c15, -0x1815, 0x1815, 0x1815, 0x1815, -0x0425, 0x0425, 0x0425, 0x0425, -0x1415, 0x1415, 0x1415, 0x1415, -0x3417, 0x0067, 0x3017, 0x2c17, -0x0c27, 0x0437, 0x0057, 0x2817, -0x0034, 0x0034, 0x0034, 0x0034, -0x0034, 0x0034, 0x0034, 0x0034, -0x1014, 0x1014, 0x1014, 0x1014, -0x1014, 0x1014, 0x1014, 0x1014, -0x0c14, 0x0c14, 0x0c14, 0x0c14, -0x0c14, 0x0c14, 0x0c14, 0x0c14, -0x0023, 0x0023, 0x0023, 0x0023, -0x0023, 0x0023, 0x0023, 0x0023, -0x0023, 0x0023, 0x0023, 0x0023, -0x0023, 0x0023, 0x0023, 0x0023, -0x0813, 0x0813, 0x0813, 0x0813, -0x0813, 0x0813, 0x0813, 0x0813, -0x0813, 0x0813, 0x0813, 0x0813, -0x0813, 0x0813, 0x0813, 0x0813, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0xfbe1, 0xfbe1, 0xfbe1, 0xfbe1, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -0x0011, 0x0011, 0x0011, 0x0011, -}; - -unsigned short int dct_coeff_first[256] = -{ -0xffff, 0xffff, 0xffff, 0xffff, -0xf7d5, 0xf7d5, 0xf7d5, 0xf7d5, -0x0826, 0x0826, 0x2416, 0x2416, -0x0046, 0x0046, 0x2016, 0x2016, -0x1c15, 0x1c15, 0x1c15, 0x1c15, -0x1815, 0x1815, 0x1815, 0x1815, -0x0425, 0x0425, 0x0425, 0x0425, -0x1415, 0x1415, 0x1415, 0x1415, -0x3417, 0x0067, 0x3017, 0x2c17, -0x0c27, 0x0437, 0x0057, 0x2817, -0x0034, 0x0034, 0x0034, 0x0034, -0x0034, 0x0034, 0x0034, 0x0034, -0x1014, 0x1014, 0x1014, 0x1014, -0x1014, 0x1014, 0x1014, 0x1014, -0x0c14, 0x0c14, 0x0c14, 0x0c14, -0x0c14, 0x0c14, 0x0c14, 0x0c14, -0x0023, 0x0023, 0x0023, 0x0023, -0x0023, 0x0023, 0x0023, 0x0023, -0x0023, 0x0023, 0x0023, 0x0023, -0x0023, 0x0023, 0x0023, 0x0023, -0x0813, 0x0813, 0x0813, 0x0813, -0x0813, 0x0813, 0x0813, 0x0813, -0x0813, 0x0813, 0x0813, 0x0813, -0x0813, 0x0813, 0x0813, 0x0813, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0412, 0x0412, 0x0412, 0x0412, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -0x0010, 0x0010, 0x0010, 0x0010, -}; - -/* Macro for filling up the decoding table for mb_addr_inc */ -#define ASSIGN1(start, end, step, val, num) \ - for (i = start; i < end; i+= step) { \ - for (j = 0; j < step; j++) { \ - mb_addr_inc[i+j].value = val; \ - mb_addr_inc[i+j].num_bits = num; \ - } \ - val--; \ - } - - - -/* - *-------------------------------------------------------------- - * - * init_mb_addr_inc -- - * - * Initialize the VLC decoding table for macro_block_address_increment - * - * Results: - * The decoding table for macro_block_address_increment will - * be filled; illegal values will be filled as ERROR. - * - * Side effects: - * The global array mb_addr_inc will be filled. - * - *-------------------------------------------------------------- - */ -static void -init_mb_addr_inc() -{ - int i, j, val; - - for (i = 0; i < 8; i++) { - mb_addr_inc[i].value = (unsigned int)ERROR; - mb_addr_inc[i].num_bits = 0; - } - - mb_addr_inc[8].value = MACRO_BLOCK_ESCAPE; - mb_addr_inc[8].num_bits = 11; - - for (i = 9; i < 15; i++) { - mb_addr_inc[i].value = (unsigned int)ERROR; - mb_addr_inc[i].num_bits = 0; - } - - mb_addr_inc[15].value = MACRO_BLOCK_STUFFING; - mb_addr_inc[15].num_bits = 11; - - for (i = 16; i < 24; i++) { - mb_addr_inc[i].value = (unsigned int)ERROR; - mb_addr_inc[i].num_bits = 0; - } - - val = 33; - - ASSIGN1(24, 36, 1, val, 11); - ASSIGN1(36, 48, 2, val, 10); - ASSIGN1(48, 96, 8, val, 8); - ASSIGN1(96, 128, 16, val, 7); - ASSIGN1(128, 256, 64, val, 5); - ASSIGN1(256, 512, 128, val, 4); - ASSIGN1(512, 1024, 256, val, 3); - ASSIGN1(1024, 2048, 1024, val, 1); -} - - -/* Macro for filling up the decoding table for mb_type */ -#define ASSIGN2(start, end, quant, motion_forward, motion_backward, pattern, intra, num, mb_type) \ - for (i = start; i < end; i ++) { \ - mb_type[i].mb_quant = quant; \ - mb_type[i].mb_motion_forward = motion_forward; \ - mb_type[i].mb_motion_backward = motion_backward; \ - mb_type[i].mb_pattern = pattern; \ - mb_type[i].mb_intra = intra; \ - mb_type[i].num_bits = num; \ - } - - - -/* - *-------------------------------------------------------------- - * - * init_mb_type_P -- - * - * Initialize the VLC decoding table for macro_block_type in - * predictive-coded pictures. - * - * Results: - * The decoding table for macro_block_type in predictive-coded - * pictures will be filled; illegal values will be filled as ERROR. - * - * Side effects: - * The global array mb_type_P will be filled. - * - *-------------------------------------------------------------- - */ -static void -init_mb_type_P() -{ - int i; - - mb_type_P[0].mb_quant = mb_type_P[0].mb_motion_forward - = mb_type_P[0].mb_motion_backward = mb_type_P[0].mb_pattern - = mb_type_P[0].mb_intra = (unsigned int)ERROR; - mb_type_P[0].num_bits = 0; - - ASSIGN2(1, 2, 1, 0, 0, 0, 1, 6, mb_type_P) - ASSIGN2(2, 4, 1, 0, 0, 1, 0, 5, mb_type_P) - ASSIGN2(4, 6, 1, 1, 0, 1, 0, 5, mb_type_P); - ASSIGN2(6, 8, 0, 0, 0, 0, 1, 5, mb_type_P); - ASSIGN2(8, 16, 0, 1, 0, 0, 0, 3, mb_type_P); - ASSIGN2(16, 32, 0, 0, 0, 1, 0, 2, mb_type_P); - ASSIGN2(32, 64, 0, 1, 0, 1, 0, 1, mb_type_P); -} - - - - -/* - *-------------------------------------------------------------- - * - * init_mb_type_B -- - * - * Initialize the VLC decoding table for macro_block_type in - * bidirectionally-coded pictures. - * - * Results: - * The decoding table for macro_block_type in bidirectionally-coded - * pictures will be filled; illegal values will be filled as ERROR. - * - * Side effects: - * The global array mb_type_B will be filled. - * - *-------------------------------------------------------------- - */ -static void -init_mb_type_B() -{ - int i; - - mb_type_B[0].mb_quant = mb_type_B[0].mb_motion_forward - = mb_type_B[0].mb_motion_backward = mb_type_B[0].mb_pattern - = mb_type_B[0].mb_intra = (unsigned int)ERROR; - mb_type_B[0].num_bits = 0; - - ASSIGN2(1, 2, 1, 0, 0, 0, 1, 6, mb_type_B); - ASSIGN2(2, 3, 1, 0, 1, 1, 0, 6, mb_type_B); - ASSIGN2(3, 4, 1, 1, 0, 1, 0, 6, mb_type_B); - ASSIGN2(4, 6, 1, 1, 1, 1, 0, 5, mb_type_B); - ASSIGN2(6, 8, 0, 0, 0, 0, 1, 5, mb_type_B); - ASSIGN2(8, 12, 0, 1, 0, 0, 0, 4, mb_type_B); - ASSIGN2(12, 16, 0, 1, 0, 1, 0, 4, mb_type_B); - ASSIGN2(16, 24, 0, 0, 1, 0, 0, 3, mb_type_B); - ASSIGN2(24, 32, 0, 0, 1, 1, 0, 3, mb_type_B); - ASSIGN2(32, 48, 0, 1, 1, 0, 0, 2, mb_type_B); - ASSIGN2(48, 64, 0, 1, 1, 1, 0, 2, mb_type_B); -} - - -/* Macro for filling up the decoding tables for motion_vectors */ -#define ASSIGN3(start, end, step, val, num) \ - for (i = start; i < end; i+= step) { \ - for (j = 0; j < step / 2; j++) { \ - motion_vectors[i+j].code = val; \ - motion_vectors[i+j].num_bits = num; \ - } \ - for (j = step / 2; j < step; j++) { \ - motion_vectors[i+j].code = -val; \ - motion_vectors[i+j].num_bits = num; \ - } \ - val--; \ - } - - - -/* - *-------------------------------------------------------------- - * - * init_motion_vectors -- - * - * Initialize the VLC decoding table for the various motion - * vectors, including motion_horizontal_forward_code, - * motion_vertical_forward_code, motion_horizontal_backward_code, - * and motion_vertical_backward_code. - * - * Results: - * The decoding table for the motion vectors will be filled; - * illegal values will be filled as ERROR. - * - * Side effects: - * The global array motion_vector will be filled. - * - *-------------------------------------------------------------- - */ -static void -init_motion_vectors() -{ - int i, j, val = 16; - - for (i = 0; i < 24; i++) { - motion_vectors[i].code = (unsigned int)ERROR; - motion_vectors[i].num_bits = 0; - } - - ASSIGN3(24, 36, 2, val, 11); - ASSIGN3(36, 48, 4, val, 10); - ASSIGN3(48, 96, 16, val, 8); - ASSIGN3(96, 128, 32, val, 7); - ASSIGN3(128, 256, 128, val, 5); - ASSIGN3(256, 512, 256, val, 4); - ASSIGN3(512, 1024, 512, val, 3); - ASSIGN3(1024, 2048, 1024, val, 1); -} - - - - -/* - *-------------------------------------------------------------- - * - * init_tables -- - * - * Initialize all the tables for VLC decoding; this must be - * called when the system is set up before any decoding can - * take place. - * - * Results: - * All the decoding tables will be filled accordingly. - * - * Side effects: - * The corresponding global array for each decoding table - * will be filled. - * - *-------------------------------------------------------------- - */ -void -init_tables() -{ - extern void init_pre_idct(); - - init_mb_addr_inc(); - init_mb_type_P(); - init_mb_type_B(); - init_motion_vectors(); - init_pre_idct(); - -#ifdef ANALYSIS - { - init_stats(); - } -#endif -} - -/* - *-------------------------------------------------------------- - * - * DecodeDCTDCSizeLum -- - * - * Huffman Decoder for dct_dc_size_luminance; location where - * the result of decoding will be placed is passed as argument. - * The decoded values are obtained by doing a table lookup on - * dct_dc_size_luminance. - * - * Results: - * The decoded value for dct_dc_size_luminance or ERROR for - * unbound values will be placed in the location specified. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -void -decodeDCTDCSizeLum(unsigned int *value) -{ - unsigned int index; - - show_bits7(index); - - *value = dct_dc_size_luminance[index].value; - - flush_bits(dct_dc_size_luminance[index].num_bits); -} - - - - -/* - *-------------------------------------------------------------- - * - * DecodeDCTDCSizeChrom -- - * - * Huffman Decoder for dct_dc_size_chrominance; location where - * the result of decoding will be placed is passed as argument. - * The decoded values are obtained by doing a table lookup on - * dct_dc_size_chrominance. - * - * Results: - * The decoded value for dct_dc_size_chrominance or ERROR for - * unbound values will be placed in the location specified. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -void -decodeDCTDCSizeChrom(unsigned int *value) -{ - unsigned int index; - - show_bits8(index); - - *value = dct_dc_size_chrominance[index].value; - - flush_bits(dct_dc_size_chrominance[index].num_bits); -} - - - -/* - *-------------------------------------------------------------- - * - * decodeDCTCoeff -- - * - * Huffman Decoder for dct_coeff_first and dct_coeff_next; - * locations where the results of decoding: run and level, are to - * be placed and also the type of DCT coefficients, either - * dct_coeff_first or dct_coeff_next, are being passed as argument. - * - * The decoder first examines the next 8 bits in the input stream, - * and perform according to the following cases: - * - * '0000 0000' - examine 8 more bits (i.e. 16 bits total) and - * perform a table lookup on dct_coeff_tbl_0. - * One more bit is then examined to determine the sign - * of level. - * - * '0000 0001' - examine 4 more bits (i.e. 12 bits total) and - * perform a table lookup on dct_coeff_tbl_1. - * One more bit is then examined to determine the sign - * of level. - * - * '0000 0010' - examine 2 more bits (i.e. 10 bits total) and - * perform a table lookup on dct_coeff_tbl_2. - * One more bit is then examined to determine the sign - * of level. - * - * '0000 0011' - examine 2 more bits (i.e. 10 bits total) and - * perform a table lookup on dct_coeff_tbl_3. - * One more bit is then examined to determine the sign - * of level. - * - * otherwise - perform a table lookup on dct_coeff_tbl. If the - * value of run is not ESCAPE, extract one more bit - * to determine the sign of level; otherwise 6 more - * bits will be extracted to obtain the actual value - * of run , and then 8 or 16 bits to get the value of level. - * - * - * - * Results: - * The decoded values of run and level or ERROR for unbound values - * are placed in the locations specified. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -static void -decodeDCTCoeff(unsigned short int *dct_coeff_tbl, unsigned int *run, int *level) -{ - unsigned int temp, index, num_bits; - unsigned int value, next32bits, flushed; - - /* - * Grab the next 32 bits and use it to improve performance of - * getting the bits to parse. Thus, calls are translated as: - * - * show_bitsX <--> next32bits >> (32-X) - * get_bitsX <--> val = next32bits >> (32-flushed-X); - * flushed += X; - * next32bits &= bitMask[flushed]; - * flush_bitsX <--> flushed += X; - * next32bits &= bitMask[flushed]; - * - */ - show_bits32(next32bits); - flushed = 0; - - /* show_bits8(index); */ - index = next32bits >> 24; - - if (index > 3) { - value = dct_coeff_tbl[index]; - *run = (value & RUN_MASK) >> RUN_SHIFT; - if (*run == END_OF_BLOCK) { - *level = END_OF_BLOCK; - } - else { - /* num_bits = (value & NUM_MASK) + 1; */ - /* flush_bits(num_bits); */ - flushed = (value & NUM_MASK) + 1; - next32bits &= bitMask[flushed]; - if (*run != ESCAPE) { - *level = (value & LEVEL_MASK) >> LEVEL_SHIFT; - /* get_bits1(value); */ - /* if (value) *level = -*level; */ - if (next32bits >> (31-flushed)) *level = -*level; - flushed++; - /* next32bits &= bitMask[flushed]; last op before update */ - } - else { /* *run == ESCAPE */ - /* get_bits14(temp); */ - temp = next32bits >> (18-flushed); - flushed += 14; - next32bits &= bitMask[flushed]; - *run = temp >> 8; - temp &= 0xff; - if (temp == 0) { - /* get_bits8(*level); */ - *level = next32bits >> (24-flushed); - flushed += 8; - /* next32bits &= bitMask[flushed]; last op before update */ - assert(*level >= 128); - } else if (temp != 128) { - /* Grab sign bit */ - *level = ((int) (temp << 24)) >> 24; - } else { - /* get_bits8(*level); */ - *level = next32bits >> (24-flushed); - flushed += 8; - /* next32bits &= bitMask[flushed]; last op before update */ - *level = *level - 256; - assert(*level <= -128 && *level >= -255); - } - } - /* Update bitstream... */ - flush_bits(flushed); - } - } - else { - if (index == 2) { - /* show_bits10(index); */ - index = next32bits >> 22; - value = dct_coeff_tbl_2[index & 3]; - } - else if (index == 3) { - /* show_bits10(index); */ - index = next32bits >> 22; - value = dct_coeff_tbl_3[index & 3]; - } - else if (index) { /* index == 1 */ - /* show_bits12(index); */ - index = next32bits >> 20; - value = dct_coeff_tbl_1[index & 15]; - } - else { /* index == 0 */ - /* show_bits16(index); */ - index = next32bits >> 16; - value = dct_coeff_tbl_0[index & 255]; - } - *run = (value & RUN_MASK) >> RUN_SHIFT; - *level = (value & LEVEL_MASK) >> LEVEL_SHIFT; - - /* - * Fold these operations together to make it fast... - */ - /* num_bits = (value & NUM_MASK) + 1; */ - /* flush_bits(num_bits); */ - /* get_bits1(value); */ - /* if (value) *level = -*level; */ - - flushed = (value & NUM_MASK) + 2; - if ((next32bits >> (32-flushed)) & 0x1) *level = -*level; - - /* Update bitstream ... */ - flush_bits(flushed); - } -} - - -/* - *-------------------------------------------------------------- - * - * decodeDCTCoeffFirst -- - * - * Huffman Decoder for dct_coeff_first. Locations for the - * decoded results: run and level, are being passed as - * arguments. Actual work is being done by calling DecodeDCTCoeff, - * with the table dct_coeff_first. - * - * Results: - * The decoded values of run and level for dct_coeff_first or - * ERROR for unbound values are placed in the locations given. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -void -decodeDCTCoeffFirst(unsigned int *run, int *level) -{ - decodeDCTCoeff(dct_coeff_first, run, level); -} - - - - -/* - *-------------------------------------------------------------- - * - * decodeDCTCoeffNext -- - * - * Huffman Decoder for dct_coeff_first. Locations for the - * decoded results: run and level, are being passed as - * arguments. Actual work is being done by calling DecodeDCTCoeff, - * with the table dct_coeff_next. - * - * Results: - * The decoded values of run and level for dct_coeff_next or - * ERROR for unbound values are placed in the locations given. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -void -decodeDCTCoeffNext(unsigned int *run, int *level) -{ - decodeDCTCoeff(dct_coeff_next, run, level); -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h deleted file mode 100644 index da6f73bca54..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h +++ /dev/null @@ -1,480 +0,0 @@ -/* $Id$ */ -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ -/* - * decoders.h - * - * This file contains the declarations of structures required for Huffman - * decoding - * - */ - -/* Include util.h for bit i/o parsing macros. */ - -#include "util.h" -#include "ace/OS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/* Code for unbound values in decoding tables */ -#define ERROR -1 -#define DCT_ERROR 63 - -#define MACRO_BLOCK_STUFFING 34 -#define MACRO_BLOCK_ESCAPE 35 - -/* Two types of DCT Coefficients */ -#define DCT_COEFF_FIRST 0 -#define DCT_COEFF_NEXT 1 - -/* Special values for DCT Coefficients */ -#define END_OF_BLOCK 62 -#define ESCAPE 61 - -/* Structure for an entry in the decoding table of - * macroblock_address_increment */ -typedef struct { - unsigned int value; /* value for macroblock_address_increment */ - int num_bits; /* length of the Huffman code */ -} mb_addr_inc_entry; - -/* Decoding table for macroblock_address_increment */ -extern mb_addr_inc_entry mb_addr_inc[2048]; - - -/* Structure for an entry in the decoding table of macroblock_type */ -typedef struct { - unsigned int mb_quant; /* macroblock_quant */ - unsigned int mb_motion_forward; /* macroblock_motion_forward */ - unsigned int mb_motion_backward; /* macroblock_motion_backward */ - unsigned int mb_pattern; /* macroblock_pattern */ - unsigned int mb_intra; /* macroblock_intra */ - int num_bits; /* length of the Huffman code */ -} mb_type_entry; - -/* Decoding table for macroblock_type in predictive-coded pictures */ -extern mb_type_entry mb_type_P[64]; - -/* Decoding table for macroblock_type in bidirectionally-coded pictures */ -extern mb_type_entry mb_type_B[64]; - - -/* Structures for an entry in the decoding table of coded_block_pattern */ -typedef struct { - unsigned int cbp; /* coded_block_pattern */ - int num_bits; /* length of the Huffman code */ -} coded_block_pattern_entry; - -/* External declaration of coded block pattern table. */ - -extern coded_block_pattern_entry coded_block_pattern[512]; - - - -/* Structure for an entry in the decoding table of motion vectors */ -typedef struct { - int code; /* value for motion_horizontal_forward_code, - * motion_vertical_forward_code, - * motion_horizontal_backward_code, or - * motion_vertical_backward_code. - */ - int num_bits; /* length of the Huffman code */ -} motion_vectors_entry; - - -/* Decoding table for motion vectors */ -extern motion_vectors_entry motion_vectors[2048]; - - -/* Structure for an entry in the decoding table of dct_dc_size */ -typedef struct { - unsigned int value; /* value of dct_dc_size (luminance or chrominance) */ - int num_bits; /* length of the Huffman code */ -} dct_dc_size_entry; - -/* External declaration of dct dc size lumiance table. */ - -extern dct_dc_size_entry dct_dc_size_luminance[128]; - -/* External declaration of dct dc size chrom table. */ - -extern dct_dc_size_entry dct_dc_size_chrominance[256]; - - -/* DCT coeff tables. */ - -#define RUN_MASK 0xfc00 -#define LEVEL_MASK 0x03f0 -#define NUM_MASK 0x000f -#define RUN_SHIFT 10 -#define LEVEL_SHIFT 4 - -/* External declaration of dct coeff tables. */ - -extern unsigned short int dct_coeff_tbl_0[256]; -extern unsigned short int dct_coeff_tbl_1[16]; -extern unsigned short int dct_coeff_tbl_2[4]; -extern unsigned short int dct_coeff_tbl_3[4]; -extern unsigned short int dct_coeff_next[256]; -extern unsigned short int dct_coeff_first[256]; - -#define DecodeDCTDCSizeLum(macro_val) \ -{ \ - unsigned int index; \ - \ - show_bits7(index); \ - \ - macro_val = dct_dc_size_luminance[index].value; \ - \ - flush_bits(dct_dc_size_luminance[index].num_bits); \ -} - -#define DecodeDCTDCSizeChrom(macro_val) \ -{ \ - unsigned int index; \ - \ - show_bits8(index); \ - \ - macro_val = dct_dc_size_chrominance[index].value; \ - \ - flush_bits(dct_dc_size_chrominance[index].num_bits); \ -} - -#define DecodeDCTCoeff(dct_coeff_tbl, run, level) \ -{ \ - unsigned int temp, index; \ - unsigned int value, next32bits, flushed; \ - \ - /* \ - * Grab the next 32 bits and use it to improve performance of \ - * getting the bits to parse. Thus, calls are translated as: \ - * \ - * show_bitsX <--> next32bits >> (32-X) \ - * get_bitsX <--> val = next32bits >> (32-flushed-X); \ - * flushed += X; \ - * next32bits &= bitMask[flushed]; \ - * flush_bitsX <--> flushed += X; \ - * next32bits &= bitMask[flushed]; \ - * \ - * I've streamlined the code a lot, so that we don't have to mask \ - * out the low order bits and a few of the extra adds are removed. \ - */ \ - show_bits32(next32bits); \ - \ - /* show_bits8(index); */ \ - index = next32bits >> 24; \ - \ - if (index > 3) { \ - value = dct_coeff_tbl[index]; \ - run = value >> RUN_SHIFT; \ - if (run != END_OF_BLOCK) { \ - /* num_bits = (value & NUM_MASK) + 1; */ \ - /* flush_bits(num_bits); */ \ - if (run != ESCAPE) { \ - /* get_bits1(value); */ \ - /* if (value) level = -level; */ \ - flushed = (value & NUM_MASK) + 2; \ - level = (value & LEVEL_MASK) >> LEVEL_SHIFT; \ - value = next32bits >> (32-flushed); \ - value &= 0x1; \ - if (value) level = -level; \ - /* next32bits &= ((~0) >> flushed); last op before update */ \ - } \ - else { /* run == ESCAPE */ \ - /* Get the next six into run, and next 8 into temp */ \ - /* get_bits14(temp); */ \ - flushed = (value & NUM_MASK) + 1; \ - temp = next32bits >> (18-flushed); \ - /* Normally, we'd ad 14 to flushed, but I've saved a few \ - * instr by moving the add below */ \ - temp &= 0x3fff; \ - run = temp >> 8; \ - temp &= 0xff; \ - if (temp == 0) { \ - /* get_bits8(level); */ \ - level = next32bits >> (10-flushed); \ - level &= 0xff; \ - flushed += 22; \ - assert(level >= 128); \ - } else if (temp != 128) { \ - /* Grab sign bit */ \ - flushed += 14; \ - level = ((int) (temp << 24)) >> 24; \ - } else { \ - /* get_bits8(level); */ \ - level = next32bits >> (10-flushed); \ - level &= 0xff; \ - flushed += 22; \ - level = level - 256; \ - assert(level <= -128 && level >= -255); \ - } \ - } \ - /* Update bitstream... */ \ - flush_bits(flushed); \ - assert (flushed <= 32); \ - } \ - } \ - else { \ - if (index == 2) { \ - /* show_bits10(index); */ \ - index = next32bits >> 22; \ - value = dct_coeff_tbl_2[index & 3]; \ - } \ - else if (index == 3) { \ - /* show_bits10(index); */ \ - index = next32bits >> 22; \ - value = dct_coeff_tbl_3[index & 3]; \ - } \ - else if (index) { /* index == 1 */ \ - /* show_bits12(index); */ \ - index = next32bits >> 20; \ - value = dct_coeff_tbl_1[index & 15]; \ - } \ - else { /* index == 0 */ \ - /* show_bits16(index); */ \ - index = next32bits >> 16; \ - value = dct_coeff_tbl_0[index & 255]; \ - } \ - run = value >> RUN_SHIFT; \ - level = (value & LEVEL_MASK) >> LEVEL_SHIFT; \ - \ - /* \ - * Fold these operations together to make it fast... \ - */ \ - /* num_bits = (value & NUM_MASK) + 1; */ \ - /* flush_bits(num_bits); */ \ - /* get_bits1(value); */ \ - /* if (value) level = -level; */ \ - \ - flushed = (value & NUM_MASK) + 2; \ - value = next32bits >> (32-flushed); \ - value &= 0x1; \ - if (value) level = -level; \ - \ - /* Update bitstream ... */ \ - flush_bits(flushed); \ - assert (flushed <= 32); \ - } \ -} - -#define DecodeDCTCoeffFirst(runval, levelval) \ -{ \ - DecodeDCTCoeff(dct_coeff_first, runval, levelval); \ -} - -#define DecodeDCTCoeffNext(runval, levelval) \ -{ \ - DecodeDCTCoeff(dct_coeff_next, runval, levelval); \ -} - -/* - *-------------------------------------------------------------- - * - * DecodeMBAddrInc -- - * - * Huffman Decoder for macro_block_address_increment; the location - * in which the result will be placed is being passed as argument. - * The decoded value is obtained by doing a table lookup on - * mb_addr_inc. - * - * Results: - * The decoded value for macro_block_address_increment or ERROR - * for unbound values will be placed in the location specified. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -#define DecodeMBAddrInc(val) \ -{ \ - unsigned int index; \ - show_bits11(index); \ - val = mb_addr_inc[index].value; \ - flush_bits(mb_addr_inc[index].num_bits); \ -} - -/* - *-------------------------------------------------------------- - * - * DecodeMotionVectors -- - * - * Huffman Decoder for the various motion vectors, including - * motion_horizontal_forward_code, motion_vertical_forward_code, - * motion_horizontal_backward_code, motion_vertical_backward_code. - * Location where the decoded result will be placed is being passed - * as argument. The decoded values are obtained by doing a table - * lookup on motion_vectors. - * - * Results: - * The decoded value for the motion vector or ERROR for unbound - * values will be placed in the location specified. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ - -#define DecodeMotionVectors(value) \ -{ \ - unsigned int index; \ - show_bits11(index); \ - value = motion_vectors[index].code; \ - flush_bits(motion_vectors[index].num_bits); \ -} -/* - *-------------------------------------------------------------- - * - * DecodeMBTypeB -- - * - * Huffman Decoder for macro_block_type in bidirectionally-coded - * pictures;locations in which the decoded results: macroblock_quant, - * macroblock_motion_forward, macro_block_motion_backward, - * macroblock_pattern, macro_block_intra, will be placed are - * being passed as argument. The decoded values are obtained by - * doing a table lookup on mb_type_B. - * - * Results: - * The various decoded values for macro_block_type in - * bidirectionally-coded pictures or ERROR for unbound values will - * be placed in the locations specified. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -#define DecodeMBTypeB(quant, motion_fwd, motion_bwd, pat, intra) \ -{ \ - unsigned int index; \ - \ - show_bits6(index); \ - \ - quant = mb_type_B[index].mb_quant; \ - motion_fwd = mb_type_B[index].mb_motion_forward; \ - motion_bwd = mb_type_B[index].mb_motion_backward; \ - pat = mb_type_B[index].mb_pattern; \ - intra = mb_type_B[index].mb_intra; \ - flush_bits(mb_type_B[index].num_bits); \ -} -/* - *-------------------------------------------------------------- - * - * DecodeMBTypeI -- - * - * Huffman Decoder for macro_block_type in intra-coded pictures; - * locations in which the decoded results: macroblock_quant, - * macroblock_motion_forward, macro_block_motion_backward, - * macroblock_pattern, macro_block_intra, will be placed are - * being passed as argument. - * - * Results: - * The various decoded values for macro_block_type in intra-coded - * pictures or ERROR for unbound values will be placed in the - * locations specified. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -#define DecodeMBTypeI(quant, motion_fwd, motion_bwd, pat, intra) \ -{ \ - unsigned int index; \ - static int quantTbl[4] = {ERROR, 1, 0, 0}; \ - \ - show_bits2(index); \ - \ - motion_fwd = 0; \ - motion_bwd = 0; \ - pat = 0; \ - intra = 1; \ - quant = quantTbl[index]; \ - if (index) { \ - flush_bits (1 + quant); \ - } \ -} -/* - *-------------------------------------------------------------- - * - * DecodeMBTypeP -- - * - * Huffman Decoder for macro_block_type in predictive-coded pictures; - * locations in which the decoded results: macroblock_quant, - * macroblock_motion_forward, macro_block_motion_backward, - * macroblock_pattern, macro_block_intra, will be placed are - * being passed as argument. The decoded values are obtained by - * doing a table lookup on mb_type_P. - * - * Results: - * The various decoded values for macro_block_type in - * predictive-coded pictures or ERROR for unbound values will be - * placed in the locations specified. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -#define DecodeMBTypeP(quant, motion_fwd, motion_bwd, pat, intra) \ -{ \ - unsigned int index; \ - \ - show_bits6(index); \ - \ - quant = mb_type_P[index].mb_quant; \ - motion_fwd = mb_type_P[index].mb_motion_forward; \ - motion_bwd = mb_type_P[index].mb_motion_backward; \ - pat = mb_type_P[index].mb_pattern; \ - intra = mb_type_P[index].mb_intra; \ - \ - flush_bits(mb_type_P[index].num_bits); \ -} -/* - *-------------------------------------------------------------- - * - * DecodeCBP -- - * - * Huffman Decoder for coded_block_pattern; location in which the - * decoded result will be placed is being passed as argument. The - * decoded values are obtained by doing a table lookup on - * coded_block_pattern. - * - * Results: - * The decoded value for coded_block_pattern or ERROR for unbound - * values will be placed in the location specified. - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -#define DecodeCBP(coded_bp) \ -{ \ - unsigned int index; \ - \ - show_bits9(index); \ - coded_bp = coded_block_pattern[index].cbp; \ - flush_bits(coded_block_pattern[index].num_bits); \ -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h deleted file mode 100644 index 51320095ed5..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h +++ /dev/null @@ -1,36 +0,0 @@ -/* $Id$ */ -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -extern int LUM_RANGE; -extern int CR_RANGE; -extern int CB_RANGE; - - -#define CB_BASE 1 -#define CR_BASE (CB_BASE*CB_RANGE) -#define LUM_BASE (CR_BASE*CR_RANGE) - -extern unsigned char pixel[256]; -extern int *lum_values; -extern int *cr_values; -extern int *cb_values; - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/file.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/file.cpp deleted file mode 100644 index 7caa4bb8621..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/file.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#include -#include -#include -#include -#include "video.h" -#include -#include -#include -#include -#include -#if defined(sun) || defined(FreeBSD) -#include -#endif -#include "include/common.h" -#include "newproto.h" -#include "global.h" - -ACE_RCSID(mpeg_client, file, "$Id$") - -#ifdef XmFONTLIST_DEFAULT_TAG -#define XmStringTag XmFONTLIST_DEFAULT_TAG -#else -#define XmStringTag XmSTRING_DEFAULT_CHARSET -#endif -#define BUFSIZE 256 - -static Widget fileshell; - -void StartLocalServer(void) -{ - int res; - - static int startLocalServer = 1; - - if (startLocalServer) { - startLocalServer = 0; - if (access(VCR_UNIX_PORT, 0) == -1) { /* going to start a server */ - fprintf(stderr, "Trying to fork a server on local host...\n"); - res = system("vcrs -rt 2> /dev/null& exit"); - if (shared->config.verbose && res == -1) { - perror("Error on fork server on local host"); - } - usleep(1000000); - } - } -} - -/* hostname == "" defaults to local host */ -static void StartFile(char *hostname, char *filename) -{ - char *title = (char *)ACE_OS::malloc(strlen(hostname) +ACE_OS::strlen (filename) + 10); - char buf[BUFSIZE]; - int len; - - if (*hostname == 0) StartLocalServer(); - - if (*hostname == 0) { - get_full_path(filename, buf, BUFSIZE); - } - else { - strncpy(buf, filename, BUFSIZE); - buf[BUFSIZE-1] = 0; - } - len =ACE_OS::strlen (buf); - - if (title == NULL) title = filename; - else sprintf(title, "%s:%s", hostname, filename); - - if (!strcasecmp(".mpg", buf+len-4) || !strcasecmp(".mpeg", buf+len-5)) - StartProgram(title, hostname, buf, "", ""); - else if (!strcasecmp(".au", buf+len-3)) - StartProgram(title, "", "", hostname, buf); - else - fprintf(stderr, "Error: type of file %s not known (know only .mpeg .mpg, .au).\n", - filename); - if (title != filename) ACE_OS::free (title); -} - -static void dismissCB(Widget W, XtPointer closure, XtPointer call_data) -{ - - XtUnmanageChild (fileshell); -} - -static void playCB(Widget w, XtPointer closure, XtPointer call_data) -{ - char *filename = NULL; /* String containing file name */ - XmStringCharSet charset = (XmStringCharSet) XmSTRING_DEFAULT_CHARSET; - XmFileSelectionBoxCallbackStruct *fcb = - (XmFileSelectionBoxCallbackStruct *) call_data; - - XmStringGetLtoR(fcb->value, charset, &filename); - - if (filename == NULL) - { - fprintf(stderr, "Error: failed to get file name to play.\n"); - return; - } - StartFile("", filename); - XmStringFree((XmString)filename); -} - -Widget CreateFileWindow(Widget parent, int cmdSock, int * playflag, Widget frametext) -{ - Arg args[10]; /* arg list */ - register int n; /* arg count */ - XmString okString, cancelString; - -/* Create the file selection box */ - okString = (XmString)XmStringCreateLtoR("Select", XmStringTag); - cancelString = (XmString)XmStringCreateLtoR("Dismiss", XmStringTag); - n = 0; - XtSetArg(args[n], XmNtitle, "Virtual VCR File Selection"); n++; - XtSetArg(args[n], XmNokLabelString, okString); n++; - XtSetArg(args[n], XmNcancelLabelString, cancelString); n++; - fileshell = XmCreateFileSelectionDialog(parent, "filebox", args, n); - XmStringFree(okString); - XmStringFree(cancelString); - XtAddCallback (fileshell, XmNokCallback, (XtCallbackProc)playCB, NULL); - XtAddCallback (fileshell, XmNcancelCallback, (XtCallbackProc)dismissCB, NULL); - - return fileshell; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.cpp deleted file mode 100644 index b5d07070aa1..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.cpp +++ /dev/null @@ -1,398 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -#include -#include -#include "video.h" -#include "dither.h" -#include "fs2.h" -#include "proto.h" - -ACE_RCSID(mpeg_client, fs2, "$Id$") - -/* Structures for precomputed error propogation values. */ - -static FS2DithVal lum_index[256]; -static FS2DithVal cr_index[256]; -static FS2DithVal cb_index[256]; - - - -/* - *-------------------------------------------------------------- - * - * InitFS2Dither -- - * - * Initializes structures for precomputed 2 error f-s dithering. - * The value field of the structure contains the pixel component - * of the particular channel in question. Thus the addition of - * the value field of a structure in the luminance index, a - * structure in the Cr index, and a structure in the Cb index will - * yeild a color number. This color number can then be transformed - * into a pixel value to be displayed. Each channel can then be - * processed (i.e. dithered) separately, with the results being - * added up and remapped to yield a final pixel value. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void InitFS2Dither() -{ - int i; - - /* For each possible pixel value, precompute propogated error and - store in array. - */ - - for (i=0; i<256; i++) { - lum_index[i].value = (i * LUM_RANGE) / 256; - - lum_index[i].e1 = (i-lum_values[lum_index[i].value]) / 2; - lum_index[i].e3 = (i - lum_values[lum_index[i].value]) - lum_index[i].e1; - - lum_index[i].value *= LUM_BASE; - - cr_index[i].value = (i * CR_RANGE) / 256; - - cr_index[i].e1 = (i - cr_values[cr_index[i].value]) / 2; - cr_index[i].e3 = (i - cr_values[cr_index[i].value]) - cr_index[i].e1 ; - - cr_index[i].value *= CR_BASE; - - cb_index[i].value = (i * CB_RANGE) / 256; - - cb_index[i].e1 = (i - cb_values[cb_index[i].value]) / 2; - cb_index[i].e3 = (i - cb_values[cb_index[i].value]) - cb_index[i].e1; - - cb_index[i].value *= CB_BASE; - - } - -} - - -/* - *-------------------------------------------------------------- - * - * DitherImage -- - * - * Converts lum, cr, cb image planes into fixed colormap - * space. - * - * Results: - * the display plane is replaced by 8-bit colormap space - * image. - * - * Side effects: - * Hopefully, none. - * - *-------------------------------------------------------------- - */ - -void FS2DitherImage(unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *disp, - int rows, int cols) -{ - static char *cur_row_error, *next_row_error; - static int first = 1; - char *cur_row_err_mark, *next_row_err_mark; - char *temp; - int i, j, pixsum, c_cols; - unsigned char *cur_row, *channel, *dest_row; - FS2DithVal *chan_index; - - /* Allocate error arrays. */ - - if (first) { - cur_row_error = (char *) ACE_OS::malloc(cols+2); - next_row_error = (char *) ACE_OS::malloc(cols+2); - first = 0; - } - - /* Initialize error arrays. */ - - memset(cur_row_error, 0, cols+2); - memset(next_row_error, 0, cols+2); - - /* Use luminance values first. */ - - /* For each two rows, do... */ - - for(i=0; i 255) pixsum = 255; - - /* Establish dest value, propogate errors. */ - - *dest_row = lum_index[pixsum].value; - *(cur_row_err_mark+1) += lum_index[pixsum].e1; - *next_row_err_mark += lum_index[pixsum].e3; - - /* Advance pointers. */ - - cur_row++; - dest_row++; - cur_row_err_mark++; - next_row_err_mark++; - } - - /* Switch error arrays, so next row errors are now current row errors, and - vice versa. - */ - - temp = cur_row_error; - cur_row_error = next_row_error; - next_row_error = temp; - - /* Reset next row errors. */ - - memset(next_row_error, 0, cols+2); - - /* Establish pointers for second row. This one will be processed right to - left to establish serpantine motion. - */ - - cur_row += cols-1; - dest_row += cols-1; - cur_row_err_mark = cur_row_error + cols; - next_row_err_mark = next_row_error + cols; - - /* Process each column... */ - - for (j=0; j 255) pixsum = 255; - - *dest_row = lum_index[pixsum].value; - *(cur_row_err_mark-1) += lum_index[pixsum].e1; - *next_row_err_mark += lum_index[pixsum].e3; - - cur_row--; - dest_row--; - cur_row_err_mark--; - next_row_err_mark--; - } - - /* Switch error arrays. */ - - temp = cur_row_error; - cur_row_error = next_row_error; - next_row_error = temp; - - /* Reset next row errors. */ - - memset(next_row_error, 0, cols+2); - } - - /* Reset error arrays. */ - - memset(cur_row_error, 0, cols+2); - - /* Establish column length divided by two. */ - - c_cols = cols >> 1; - - /* Set channel to Cr. Use Cr index. */ - - channel = cr; - chan_index = cr_index; - - repeat: - - /* Process each row of chrominance data... */ - - for (i=0; i < rows; i+=2) { - - /* Establish pointers. */ - - cur_row = channel + ((i>>1)*c_cols); - dest_row = disp + (i*cols); - - cur_row_err_mark = cur_row_error+1; - next_row_err_mark = next_row_error+1; - - /* For each column in row... */ - - for (j=0; j 255) pixsum = 255; - - /* Increment dest value. */ - - *dest_row += chan_index[pixsum].value; - - /* Propogate error values. */ - - *(cur_row_err_mark+1) += chan_index[pixsum].e1; - *next_row_err_mark += chan_index[pixsum].e3; - - - /* If count is odd, advance source pointer (Cr and Cb channels are 2:1 - subsampled. - */ - - if (j&1) cur_row++; - - /* Advance destination and error pointers. */ - - dest_row++; - cur_row_err_mark++; - next_row_err_mark++; - } - - /* Switch error arrays. */ - - temp = cur_row_error; - cur_row_error = next_row_error; - next_row_error = temp; - - /* Reset next row errors. */ - - memset(next_row_error, 0, cols+2); - - /* Re-establish pointers. */ - - cur_row += c_cols-1; - dest_row += cols-1; - cur_row_err_mark = cur_row_error+cols; - next_row_err_mark = next_row_error+cols; - - /* Process second row right to left. */ - - for (j=0; j 255) pixsum = 255; - - /* Increment dest value. */ - - *dest_row += chan_index[pixsum].value; - - /* Propogate errors. */ - - *(cur_row_err_mark-1) += chan_index[pixsum].e1; - *next_row_err_mark += chan_index[pixsum].e3; - - /* If column counters is odd, decrement source pointer. */ - - if (j&1) cur_row--; - - /* Decrement dest and error pointers. */ - - dest_row--; - cur_row_err_mark--; - next_row_err_mark--; - } - - /* Switch error arrays. */ - - temp = cur_row_error; - cur_row_error = next_row_error; - next_row_error = temp; - - /* Reinitialize next row errors. */ - - memset(next_row_error, 0, cols+2); - } - - /* If Cr channel completed, set channel to Cb and Cb index and repeat. */ - - if (channel == cr) { - channel = cb; - chan_index = cb_index; - memset(cur_row_error, 0, cols+2); - - goto repeat; - } - - /* Establish pointer to start of display frame. */ - - dest_row = disp; - - /* Transform all display values to pixel values. */ - - for (i=0; i -#include -#include "video.h" -#include "proto.h" -#include "dither.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, fs2fast, "$Id$") - -/* Arrays containing error values for floyd-steinberg dithering. */ - -static int deltay[256]; -static int deltau[256]; -static int deltav[256]; -static int deltay2[256]; -static int deltau2[256]; -static int deltav2[256]; - -/* Definitions governing number of bits used for luminance, cr, and cb. */ - -#define L_BITS 3 -#define CR_BITS 2 -#define CB_BITS 2 - -/* Masks for proper quantization of lum, cr, and cb values. */ - -#define L_MASK 0xe0 -#define CR_MASK 0xc0 -#define CB_MASK 0xc0 - - - -/* - *-------------------------------------------------------------- - * - * InitFS2FastDither -- - * - * Initializes structures and arrays neeeded for fast implementation - * of two error F-S dithering. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void InitFS2FastDither() -{ - int i; - int lum_num, cr_num, cb_num; - - for (i=0; i<256; i++) { - lum_num = (i >> (8-L_BITS)); - cr_num = (i >> (8-CR_BITS)); - cb_num = (i >> (8-CB_BITS)); - - /* These arrays contain the error values propogated for each pixel value - for each channel. - */ - - deltay[i] = (i - ((int) lum_values[lum_num])) / 2; - deltau[i] = (i-((int) cr_values[cr_num])) / 2; - deltav[i] = (i-((int) cb_values[cb_num])) / 2; - deltay2[i] = (i - ((int) lum_values[lum_num])) - deltay[i]; - deltau2[i] = (i - ((int) cr_values[cr_num])) - deltau[i]; - deltav2[i] = (i - ((int) cb_values[cb_num])) - deltav[i]; - - } - -} - -/* - *-------------------------------------------------------------- - * - * DitherImage -- - * - * Dithers an image using floyd-steinberg. - * Assumptions made: - * 1) The color space is allocated y:cr:cb = 8:4:4 - * 2) The spatial resolution of y:cr:cb is 4:1:1 - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ -void -FS2FastDitherImage ( - unsigned char *lum, - unsigned char *cr, - unsigned char *cb, - unsigned char *out, - int w, int h) -{ - int i, j, idx, idx2; - int y, u, v; - int dy, du, dv; - int code; - static int *yerr1; - static int *yerr2; - static int *uerr1; - static int *uerr2; - static int *verr1; - static int *verr2; - int *ye1, *ue1, *ve1; - int *ye2, *ue2, *ve2; - unsigned char *o, *l, *r, *b; - static int first = 1; - - /* If first time called, allocate error arrays. */ - - if (first) { - first = 0; - yerr1 = (int *) ACE_OS::malloc((w+5)*sizeof(int)); - yerr2 = (int *) ACE_OS::malloc((w+5)*sizeof(int)); - uerr1 = (int *) ACE_OS::malloc((w+5)*sizeof(int)); - uerr2 = (int *) ACE_OS::malloc((w+5)*sizeof(int)); - verr1 = (int *) ACE_OS::malloc((w+5)*sizeof(int)); - verr2 = (int *) ACE_OS::malloc((w+5)*sizeof(int)); - } - - /* - * Init error arrays and variables. - */ - memset ((char *)yerr1, 0, (w+5)*sizeof(int)); - memset ((char *)yerr2, 0, (w+5)*sizeof(int)); - memset ((char *)uerr1, 0, (w+5)*sizeof(int)); - memset ((char *)uerr2, 0, (w+5)*sizeof(int)); - memset ((char *)verr1, 0, (w+5)*sizeof(int)); - memset ((char *)verr2, 0, (w+5)*sizeof(int)); - du = dv = dy = 0; - - for (j=0; j 255) y = 255; - if (u < 0) u = 0; - else if (u > 255) u = 255; - if (v < 0) v = 0; - else if (v > 255) v = 255; - - /* - * Construct a code using: - * high order 3 bits of y, - * high order 2 bits of u, - * high order 2 bits of v - */ - code = (((y & L_MASK) | ((u & CR_MASK) >> L_BITS) | (v >> (L_BITS+CR_BITS))) - >> (8-(L_BITS+CR_BITS+CB_BITS))); - *o++ = pixel[code]; - *ye2++ = deltay[y]; - *ue2++ = deltau[u]; - *ve2++ = deltav[v]; - dy = deltay2[y]; - du = deltau2[u]; - dv = deltav2[v]; - - /* Do right side of this pair... */ - y = *l++ + dy + *ye1++; - u = *r++ + du + *ue1++; - v = *b++ + dv + *ve1++; - - if (y < 0) y = 0; - else if (y > 255) y = 255; - if (u < 0) u = 0; - else if (u > 255) u = 255; - if (v < 0) v = 0; - else if (v > 255) v = 255; - - code = (((y & L_MASK) | ((u & CR_MASK) >> L_BITS) | (v >> (L_BITS+CR_BITS))) - >> (8-(L_BITS+CR_BITS+CB_BITS))); - *o++ = pixel[code]; - *ye2++ = deltay[y]; - *ue2++ = deltau[u]; - *ve2++ = deltav[v]; - dy = deltay2[y]; - du = deltau2[u]; - dv = deltav2[v]; - - } - - ye1 = yerr1+w-1; - ue1 = uerr1+w-1; - ve1 = verr1+w-1; - ye2 = yerr2+w-1; - ue2 = uerr2+w-1; - ve2 = verr2+w-1; - l += w-1; - o += w-1; - r--; - b--; - dy = du = dv = 0; - - /* Do bottom part of row, in right to left order. */ - for (i=w-1; i>0; i-=2) { - /* Do right side of this pair... */ - y = *l-- + dy + *ye2--; - u = *r + du + *ue2--; - v = *b + dv + *ve2--; - - if (y < 0) y = 0; - else if (y > 255) y = 255; - if (u < 0) u = 0; - else if (u > 255) u = 255; - if (v < 0) v = 0; - else if (v > 255) v = 255; - - /* - * Construct a code using: - * high order 3 bits of y, - * high order 2 bits of u, - * high order 2 bits of v - */ - code = (((y & L_MASK) | ((u & CR_MASK) >> L_BITS) | (v >> (L_BITS+CR_BITS))) - >> (8-(L_BITS+CR_BITS+CB_BITS))); - *o-- = pixel[code]; - *ye1-- = deltay[y]; - *ue1-- = deltau[u]; - *ve1-- = deltav[v]; - dy = deltay2[y]; - du = deltau2[u]; - dv = deltav2[v]; - - /* Do left side of this pair... */ - y = *l-- + dy + *ye2--; - u = *r-- + du + *ue2--; - v = *b-- + dv + *ve2--; - - if (y < 0) y = 0; - else if (y > 255) y = 255; - if (u < 0) u = 0; - else if (u > 255) u = 255; - if (v < 0) v = 0; - else if (v > 255) v = 255; - - code = (((y & L_MASK) | ((u & CR_MASK) >> L_BITS) | (v >> (L_BITS+CR_BITS))) - >> (8-(L_BITS+CR_BITS+CB_BITS))); - *o-- = pixel[code]; - *ye1-- = deltay[y]; - *ue1-- = deltau[u]; - *ve1-- = deltav[v]; - dy = deltay2[y]; - du = deltau2[u]; - dv = deltav2[v]; - - } - } -} - - - - - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.cpp deleted file mode 100644 index 79174685246..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.cpp +++ /dev/null @@ -1,312 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -/* This file contains C code to do YCrCb -> colormap space. */ - -#include -#include -#include "fs4.h" -#include "video.h" -#include "proto.h" -#include "dither.h" - -ACE_RCSID(mpeg_client, fs4, "$Id$") - -/* Structures containing precomputed error terms. */ - -static FS4Dither lum_index[256]; -static FS4Dither cr_index[256]; -static FS4Dither cb_index[256]; - - -/* - *-------------------------------------------------------------- - * - * InitFS4Dither -- - * - * Initializes structures used for f-s dithering. Precomputes - * error terms. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -InitFS4Dither() -{ - int i; - - for (i=0; i<256; i++) { - lum_index[i].value = (i * LUM_RANGE) / 256; - - lum_index[i].e1 = (7 * (i-lum_values[lum_index[i].value])) / 16; - lum_index[i].e2 = (i-lum_values[lum_index[i].value])/16; - lum_index[i].e3 = (5 * (i - lum_values[lum_index[i].value])) / 16; - lum_index[i].e4 = (i-lum_values[lum_index[i].value]) - lum_index[i].e1 - - lum_index[i].e2 - lum_index[i].e3; - - lum_index[i].value *= LUM_BASE; - - cr_index[i].value = (i * CR_RANGE) / 256; - - cr_index[i].e1 = (7 * (i-cr_values[cr_index[i].value])) / 16; - cr_index[i].e2 = (i-cr_values[cr_index[i].value])/16; - cr_index[i].e3 = (5 * (i - cr_values[cr_index[i].value])) / 16; - cr_index[i].e4 = (i-cr_values[cr_index[i].value]) - cr_index[i].e1 - - cr_index[i].e2 - cr_index[i].e3; - cr_index[i].value *= CR_BASE; - - cb_index[i].value = (i * CB_RANGE) / 256; - - cb_index[i].e1 = (7 * (i-cb_values[cb_index[i].value])) / 16; - cb_index[i].e2 = (i-cb_values[cb_index[i].value])/16; - cb_index[i].e3 = (5 * (i - cb_values[cb_index[i].value])) / 16; - cb_index[i].e4 = (i-cb_values[cb_index[i].value]) - cb_index[i].e1 - - cb_index[i].e2 - cb_index[i].e3; - cb_index[i].value *= CB_BASE; - - } - -} - - -/* - *-------------------------------------------------------------- - * - * DitherImage -- - * - * Converts lum, cr, cb image planes into fixed colormap - * space. Uses Floyd-Steinberg dithering in serpentine - * pattern with standard 4 errors propogated. - * - * Results: - * The display plane is replaced by 8-bit colormap space - * image. - * - * Side effects: - * Hopefully, none. - * - *-------------------------------------------------------------- - */ - -void -FS4DitherImage(unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *disp, - int rows, int cols) -{ - static char *cur_row_error, *next_row_error; - static int first = 1; - char *cur_row_err_mark, *next_row_err_mark; - char *temp; - int i, j, pixsum, c_cols; - unsigned char *cur_row, *channel, *dest_row; - FS4Dither *chan_index; - - if (first) { - cur_row_error = (char *) ACE_OS::malloc(cols+2); - next_row_error = (char *) ACE_OS::malloc(cols+2); - first = 0; - } - - memset(cur_row_error, 0, cols+2); - memset(next_row_error, 0, cols+2); - - for(i=0; i 255) pixsum = 255; - - *dest_row = lum_index[pixsum].value; - *(cur_row_err_mark+1) += lum_index[pixsum].e1; - *(next_row_err_mark+1) += lum_index[pixsum].e2; - *next_row_err_mark += lum_index[pixsum].e3; - *(next_row_err_mark-1) += lum_index[pixsum].e4; - - cur_row++; - dest_row++; - cur_row_err_mark++; - next_row_err_mark++; - } - - temp = cur_row_error; - cur_row_error = next_row_error; - next_row_error = temp; - - memset(next_row_error, 0, cols+2); - - cur_row += cols-1; - dest_row += cols-1; - cur_row_err_mark = cur_row_error + cols; - next_row_err_mark = next_row_error + cols; - - for (j=0; j 255) pixsum = 255; - - *dest_row = lum_index[pixsum].value; - *(cur_row_err_mark-1) += lum_index[pixsum].e1; - *(next_row_err_mark-1) += lum_index[pixsum].e2; - *next_row_err_mark += lum_index[pixsum].e3; - *(next_row_err_mark+1) += lum_index[pixsum].e4; - - cur_row--; - dest_row--; - cur_row_err_mark--; - next_row_err_mark--; - } - - temp = cur_row_error; - cur_row_error = next_row_error; - next_row_error = temp; - - memset(next_row_error, 0, cols+2); - } - - memset(cur_row_error, 0, cols+2); - - c_cols = cols >> 1; - - channel = cr; - chan_index = cr_index; - - repeat: - - for (i=0; i < rows; i+=2) { - cur_row = channel + ((i>>1)*c_cols); - dest_row = disp + (i*cols); - - cur_row_err_mark = cur_row_error+1; - next_row_err_mark = next_row_error+1; - - for (j=0; j 255) pixsum = 255; - - *dest_row += chan_index[pixsum].value; - - *(cur_row_err_mark+1) += chan_index[pixsum].e1; - *(next_row_err_mark+1) += chan_index[pixsum].e2; - *next_row_err_mark += chan_index[pixsum].e3; - *(next_row_err_mark-1) += chan_index[pixsum].e4; - - - if (j&1) cur_row++; - dest_row++; - cur_row_err_mark++; - next_row_err_mark++; - } - - temp = cur_row_error; - cur_row_error = next_row_error; - next_row_error = temp; - - memset(next_row_error, 0, cols+2); - - cur_row += c_cols-1; - dest_row += cols-1; - cur_row_err_mark = cur_row_error+cols; - next_row_err_mark = next_row_error+cols; - - for (j=0; j 255) pixsum = 255; - - *dest_row += chan_index[pixsum].value; - - *(cur_row_err_mark-1) += chan_index[pixsum].e1; - *(next_row_err_mark-1) += chan_index[pixsum].e2; - *next_row_err_mark += chan_index[pixsum].e3; - *(next_row_err_mark+1) += chan_index[pixsum].e4; - - if (j&1) cur_row--; - dest_row--; - cur_row_err_mark--; - next_row_err_mark--; - } - - temp = cur_row_error; - cur_row_error = next_row_error; - next_row_error = temp; - - memset(next_row_error, 0, cols+2); - } - - if (channel == cr) { - channel = cb; - chan_index = cb_index; - memset(cur_row_error, 0, cols+2); - - goto repeat; - } - - dest_row = disp; - - - for (i=0; i -#include -#include -#include -#include - -#include "include/common.h" - -ACE_RCSID(mpeg_client, global, "$Id$") - -/* Declaration of global variable to hold dither info. */ - -int ditherType; - -/* Global file pointer to incoming data. */ -FILE *input; - -/* End of File flag. */ -int EOF_flag = 0; - -/* Loop flag. */ -int loopFlag = 0; - -/* Shared memory flag. */ -int shmemFlag = 0; - -/* Quiet flag. */ -int quietFlag = 0; - -/* Display image on screen? */ -int noDisplayFlag = 0; - -/* real time flag */ -int realTimeFlag = 0; - -/* shared version of command line argument */ -int argc_share; -char **argv_share; - -/* for command line display name */ -char displayName[64]; - -/* command line program list name */ -char proglistName[PATH_SIZE] = ""; - -/* shared data structure */ -SharedData * shared = NULL; - -/* Range values for lum, cr, cb. */ -int LUM_RANGE; -int CR_RANGE; -int CB_RANGE; - -/* Array that remaps color numbers to actual pixel values used by X server. */ - -unsigned char pixel[256]; - -/* Arrays holding quantized value ranged for lum, cr, and cb. */ - -int *lum_values = NULL; -int *cr_values = NULL; -int *cb_values = NULL; - -/* Structures used by the X server. */ - -Display *display; -Colormap cmap; - - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h deleted file mode 100644 index 40bb64b0985..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h +++ /dev/null @@ -1,67 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -/* Declaration of global variable to hold dither info. */ - -extern int ditherType; - -/* Global file pointer to incoming data. */ -extern FILE *input; - -/* End of File flag. */ -extern int EOF_flag; - -/* Loop flag. */ -extern int loopFlag; - -/* Shared memory flag. */ -extern int shmemFlag; - -/* Quiet flag. */ -extern int quietFlag; - -/* Display image on screen? */ -extern int noDisplayFlag; - -/* real time flag */ -extern int realTimeFlag; - -/* shared version of command line argument */ -extern int argc_share; -extern char **argv_share; - -/* for command line display name */ -extern char displayName[]; - -/* command line program list name */ -extern char proglistName[PATH_SIZE]; - -/* shared data structure */ -extern SharedData * shared; - -/* Structures used by the X server. */ - -extern Display *display; -extern Colormap cmap; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/gray.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/gray.cpp deleted file mode 100644 index 71aa8d295d5..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/gray.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -#include -#include -#include "video.h" -#include "proto.h" -#include "dither.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, gray, "$Id$") - - -/* - *-------------------------------------------------------------- - * - * GrayDitherImage -- - * - * Dithers image into 128 gray scales. Simply maps luminance - * value into 1 of 128 gray scale colors (divide by two, essentially). - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -GrayDitherImage(unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int h, int w) -{ - - int i, max = w*h/16; - - for (i=0; i -#include -#include "video.h" -#include "proto.h" -#include "dither.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, hybrid, "$Id$") - -#define DITH_SIZE 16 - - -/* Structures used to implement hybrid ordered dither/floyd-steinberg - dither algorithm. -*/ - -static unsigned char *l_darrays[DITH_SIZE]; -static unsigned char cr_fsarray[256][4]; -static unsigned char cb_fsarray[256][4]; - - -/* - *-------------------------------------------------------------- - * - * InitHybridDither-- - * - * Structures intialized for hybrid dithering. Ordered dither - * patterns set for luminance channel, f-s errors precomputed - * for chrominance channels. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -InitHybridDither() -{ - int i, j, k, err_range, threshval; - unsigned char *lmark; - - for (i=0; i threshval) *lmark++ = ((j+1) * (CR_RANGE * CB_RANGE)); - else *lmark++ = (j * (CR_RANGE * CB_RANGE)); - } - } - - for (j=lum_values[LUM_RANGE-1]; j<256; j++) { - *lmark++ = (LUM_RANGE-1)*(CR_RANGE * CB_RANGE); - } - - } - { - int cr1, cr2, cr3, cr4, err1, err2; - int cb1, cb2, cb3, cb4, val, nval; - - for (i=0; i<256; i++) { - - val = i; - - cr1 = (val * CR_RANGE) / 256; - err1 = (val - cr_values[cr1])/2; - err2 = (val - cr_values[cr1]) - err1; - - nval = val+err1; - if (nval > 255) nval = 255; - else if (nval < 0) nval = 0; - cr2 = (nval * CR_RANGE) / 256; - err1 = (nval - cr_values[cr2])/2; - - nval = val+err2; - if (nval > 255) nval = 255; - else if (nval < 0) nval = 0; - cr3 = (nval * CR_RANGE) / 256; - err2 = (nval - cr_values[cr3])/2; - - nval = val+err1+err2; - if (nval > 255) nval = 255; - else if (nval < 0) nval = 0; - cr4 = (nval * CR_RANGE) / 256; - - cr_fsarray[i][0] = cr1*CB_RANGE; - cr_fsarray[i][1] = cr2*CB_RANGE; - cr_fsarray[i][2] = cr3*CB_RANGE; - cr_fsarray[i][3] = cr4*CB_RANGE; - } - - for (i=0; i<256; i++) { - - val = i; - - cb1 = (val * CB_RANGE) / 256; - err1 = (val - cb_values[cb1])/2; - err2 = (val - cb_values[cb1]) - err1; - - nval = val+err1; - if (nval > 255) nval = 255; - else if (nval < 0) nval = 0; - cb2 = (nval * CB_RANGE) / 256; - err1 = (nval - cb_values[cb2])/2; - - nval = val+err2; - if (nval > 255) nval = 255; - else if (nval < 0) nval = 0; - cb3 = (nval * CB_RANGE) / 256; - err2 = (nval - cb_values[cb3])/2; - - nval = val+err1+err2; - if (nval > 255) nval = 255; - else if (nval < 0) nval = 0; - cb4 = (nval * CB_RANGE) / 256; - - cb_fsarray[i][0] = cb1; - cb_fsarray[i][1] = cb2; - cb_fsarray[i][2] = cb3; - cb_fsarray[i][3] = cb4; - } - } -} - -/* - *-------------------------------------------------------------- - * - * HybridDitherImage -- - * - * Dithers an image using an ordered dither. - * Assumptions made: - * 1) The color space is allocated y:cr:cb = 8:4:4 - * 2) The spatial resolution of y:cr:cb is 4:1:1 - * The luminance channel is dithered based on the standard - * ordered dither pattern for a 4x4 area. The Chrominance - * channels are dithered based on precomputed f-s errors. - * Two errors are propogated per pixel. Errors are NOT propogated - * beyond a 2x2 pixel area. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ -void -HybridDitherImage (unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int w, int h) -{ - unsigned char *l, *r, *b, *o1, *o2; - unsigned char *l2; - int i, j; - - l = lum; - l2 = lum+w; - r = cr; - b = cb; - o1 = out; - o2 = out+w; - - for (i=0; i -#include -#include "video.h" -#include "proto.h" -#include "dither.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, hybriderr, "$Id$") - -#define DITH_SIZE 16 - -/* Structures used for hybrid dither with errors propogated. */ - -static unsigned char *l_darrays[DITH_SIZE]; -static unsigned char *l_darrays0, *l_darrays1, *l_darrays2, *l_darrays3; -static unsigned char *l_darrays4, *l_darrays5, *l_darrays6, *l_darrays7; -static unsigned char *l_darrays8, *l_darrays9, *l_darrays10, *l_darrays11; -static unsigned char *l_darrays12, *l_darrays13, *l_darrays14, *l_darrays15; -static unsigned char cr_fsarray[256*256][4]; -static unsigned char cb_fsarray[256*256][4]; -static unsigned short c_fserr[256*256][2]; - - -/* - *-------------------------------------------------------------- - * - * InitHybridErrorDither-- - * - * Initializes structures used for hybrid dither algorithm - * with errors propogated on Cr and Cb. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -InitHybridErrorDither() -{ - int i, j, k, err_range, threshval; - unsigned char *lmark; - - - for (i=0; i threshval) *lmark++ = ((j+1) * (CR_RANGE * CB_RANGE)); - else *lmark++ = (j * (CR_RANGE * CB_RANGE)); - } - } - - for (j=lum_values[LUM_RANGE-1]; j <256; j++) { - *lmark++ = (LUM_RANGE-1)*(CR_RANGE * CB_RANGE); - } - } - l_darrays0 = l_darrays[0]; l_darrays8 = l_darrays[8]; - l_darrays1 = l_darrays[1]; l_darrays9 = l_darrays[9]; - l_darrays2 = l_darrays[2]; l_darrays10 = l_darrays[10]; - l_darrays3 = l_darrays[3]; l_darrays11 = l_darrays[11]; - l_darrays4 = l_darrays[4]; l_darrays12 = l_darrays[12]; - l_darrays5 = l_darrays[5]; l_darrays13 = l_darrays[13]; - l_darrays6 = l_darrays[6]; l_darrays14 = l_darrays[14]; - l_darrays7 = l_darrays[7]; l_darrays15 = l_darrays[15]; - { - int cr1, cr2, cr3, cr4, err1, err2; - int cb1, cb2, cb3, cb4, val, nval; - int outerr1, outerr2, outerr3, outerr4; - int inerr1, inerr2, inerr3, inerr4; - unsigned short oe1, oe2, oe3, oe4; - - for (j=0; j<65536; j+= 256) { - - inerr1 = (((j & 0xc000) >> 14)*8) - 12; - inerr2 = (((j & 0x3000) >> 12)*8) - 12; - inerr3 = (((j & 0x0c00) >> 10)*8) - 12; - inerr4 = (((j & 0x0300) >> 8) *8) - 12; - - for (i=0; i<256; i++) { - val = i; - - nval = val+inerr1+inerr3; - if (nval < 0) nval = 0; else if (nval > 255) nval = 255; - cr1 = ((nval) * CR_RANGE) / 256; - err1 = ((nval) - cr_values[cr1])/2; - err2 = ((nval) - cr_values[cr1]) - err1; - - nval = val+err1+inerr2; - if (nval < 0) nval = 0; else if (nval > 255) nval = 255; - cr2 = ((nval) * CR_RANGE) / 256; - err1 = ((nval) - cr_values[cr2])/2; - outerr3 = ((nval) - cr_values[cr2])-err1; - - nval = val+err2+inerr4; - if (nval < 0) nval = 0; else if (nval > 255) nval = 255; - cr3 = ((nval) * CR_RANGE) / 256; - err2 = ((nval) - cr_values[cr3])/2; - outerr1 = ((nval) - cr_values[cr3]) - err2; - - nval = val+err1+err2; - if (nval < 0) nval = 0; else if (nval > 255) nval = 255; - cr4 = ((nval) * CR_RANGE) / 256; - outerr2 = ((nval) - cr_values[cr4])/2; - outerr4 = ((nval) - cr_values[cr4])-outerr2; - - cr_fsarray[i+j][0] = cr1*CB_RANGE; - cr_fsarray[i+j][1] = cr2*CB_RANGE; - cr_fsarray[i+j][2] = cr3*CB_RANGE; - cr_fsarray[i+j][3] = cr4*CB_RANGE; - - if (outerr1 < -16) outerr1++; - else if (outerr1 > 15) outerr1--; - if (outerr2 < -16) outerr2++; - else if (outerr2 > 15) outerr2--; - if (outerr3 < -16) outerr3++; - else if (outerr3 > 15) outerr3--; - if (outerr4 < -16) outerr4++; - else if (outerr4 > 15) outerr4--; - - oe1 = (outerr1 + 16) / 8; - oe2 = (outerr2 + 16) / 8; - oe3 = (outerr3 + 16) / 8; - oe4 = (outerr4 + 16) / 8; - -/* This is a debugging check and should be removed if not needed. */ - if ((oe1 > 3) || (oe2 > 3) || (oe3 > 3) || (oe4 > 3)) - fprintf(stderr, "OE error!!!!\n"); - - - c_fserr[i+j][0] = ((oe1 << 14) | (oe2 << 12)); - - c_fserr[i+j][1] = ((oe3 << 10) | (oe4 << 8)); - } - - for (i=0; i<256; i++) { - val = i; - nval = val+inerr1+inerr3; - if (nval < 0) nval = 0; else if (nval > 255) nval = 255; - cb1 = ((nval) * CB_RANGE) / 256; - err1 = ((nval) - cb_values[cb1])/2; - err2 = ((nval) - cb_values[cb1]) - err1; - - nval = val+err1+inerr2; - if (nval < 0) nval = 0; else if (nval > 255) nval = 255; - cb2 = ((nval) * CB_RANGE) / 256; - err1 = ((nval) - cb_values[cb2])/2; - - nval = val+err2+inerr4; - if (nval < 0) nval = 0; else if (nval > 255) nval = 255; - cb3 = ((nval) * CB_RANGE) / 256; - err2 = ((nval) - cb_values[cb3])/2; - - nval = val+err1+err2; - if (nval < 0) nval = 0; else if (nval > 255) nval = 255; - cb4 = ((nval) * CB_RANGE) / 256; - - cb_fsarray[i+j][0] = cb1; - cb_fsarray[i+j][1] = cb2; - cb_fsarray[i+j][2] = cb3; - cb_fsarray[i+j][3] = cb4; - } - } - } -} - -/* - *-------------------------------------------------------------- - * - * HybridErrorDitherImage -- - * - * Dithers an image using a hybrid ordered/floyd-steinberg dither. - * Assumptions made: - * 1) The color space is allocated y:cr:cb = 8:4:4 - * 2) The spatial resolution of y:cr:cb is 4:1:1 - * This dither is almost exactly like the dither implemented in the - * file odith.c (i.e. hybrid dithering) except a quantized amount of - * error is propogated between 2x2 pixel areas in Cr and Cb. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ -void -HybridErrorDitherImage (unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int w, int h) -{ - unsigned char *l, *r, *b, *o1, *o2; - unsigned char *l2; - static int *cr_row_errs; - static int *cb_row_errs; - int *cr_r_err; - int *cb_r_err; - int cr_c_err; - int cb_c_err; - unsigned char *cr_fsptr; - unsigned char *cb_fsptr; - static int first = 1; - int cr_code, cb_code; - - int i, j; - int row_advance, row_advance2; - int half_row_advance, half_row_advance2; - - /* If first time called, allocate error arrays. */ - - if (first) { - cr_row_errs = (int *) ACE_OS::malloc((w+5)*sizeof(int)); - cb_row_errs = (int *) ACE_OS::malloc((w+5)*sizeof(int)); - first = 0; - } - - row_advance = (w << 1) - 1; - row_advance2 = row_advance+2; - half_row_advance = (w>>1)-1; - half_row_advance2 = half_row_advance+2; - - l = lum; - l2 = lum+w; - r = cr; - b = cb; - o1 = out; - o2 = out+w; - - memset( (char *) cr_row_errs, 0, (w+5)*sizeof(int)); - cr_r_err = cr_row_errs; - cr_c_err = 0; - memset( (char *) cb_row_errs, 0, (w+5)*sizeof(int)); - cb_r_err = cb_row_errs; - cb_c_err = 0; - - for (i=0; i0; j-=4) { - - cr_code = (*cr_r_err | cr_c_err | *r++); - cb_code = (*cb_r_err | cb_c_err | *b++); - - cr_fsptr = cr_fsarray[cr_code]; - cb_fsptr = cb_fsarray[cb_code]; - - *o1++ = pixel[(l_darrays0[*l++] | *cr_fsptr++ | *cb_fsptr++)]; - *o1++ = pixel[(l_darrays8[*l++] | *cr_fsptr++ | *cb_fsptr++)]; - *o2++ = pixel[(l_darrays12[*l2++] | *cr_fsptr++ | *cb_fsptr++)]; - *o2++ = pixel[(l_darrays4[*l2++] | *cr_fsptr++ | *cb_fsptr++)]; - - cr_c_err = c_fserr[cr_code][1]; - cb_c_err = c_fserr[cb_code][1]; - *cr_r_err++ = c_fserr[cr_code][0]; - *cb_r_err++ = c_fserr[cb_code][0]; - cr_code = (*cr_r_err | cr_c_err | *r++); - cb_code = (*cb_r_err | cb_c_err | *b++); - - cr_fsptr = cr_fsarray[cr_code]; - cb_fsptr = cb_fsarray[cb_code]; - - *o1++ = pixel[(l_darrays2[*l++] | *cr_fsptr++ | *cb_fsptr++)]; - *o1++ = pixel[(l_darrays10[*l++] | *cr_fsptr++ | *cb_fsptr++)]; - *o2++ = pixel[(l_darrays14[*l2++] | *cr_fsptr++ | *cb_fsptr++)]; - *o2++ = pixel[(l_darrays6[*l2++] | *cr_fsptr++ | *cb_fsptr++)]; - - cr_c_err = c_fserr[cr_code][1]; - cb_c_err = c_fserr[cb_code][1]; - *cr_r_err++ = c_fserr[cr_code][0]; - *cb_r_err++ = c_fserr[cb_code][0]; - } - - l += row_advance; l2 += row_advance; - o1 += row_advance; o2 += row_advance; - cr_c_err = 0; - cb_c_err = 0; - cr_r_err--; cb_r_err--; - r += half_row_advance; b += half_row_advance; - - for (j=w; j>0; j-=4) { - - cr_code = (*cr_r_err | cr_c_err | *r--); - cb_code = (*cb_r_err | cb_c_err | *b--); - cr_fsptr = cr_fsarray[cr_code]; - cb_fsptr = cb_fsarray[cb_code]; - - *o1-- = pixel[(l_darrays9[*l--] | *cr_fsptr++ | *cb_fsptr++)]; - *o1-- = pixel[(l_darrays1[*l--] | *cr_fsptr++ | *cb_fsptr++)]; - *o2-- = pixel[(l_darrays5[*l2--] | *cr_fsptr++ | *cb_fsptr++)]; - *o2-- = pixel[(l_darrays13[*l2--] | *cr_fsptr++ | *cb_fsptr++)]; - - cr_c_err = c_fserr[cr_code][1]; - cb_c_err = c_fserr[cb_code][1]; - *cr_r_err-- = c_fserr[cr_code][0]; - *cb_r_err-- = c_fserr[cb_code][0]; - cr_code = (*cr_r_err | cr_c_err | *r--); - cb_code = (*cb_r_err | cb_c_err | *b--); - cr_fsptr = cr_fsarray[cr_code]; - cb_fsptr = cb_fsarray[cb_code]; - - *o1-- = pixel[(l_darrays11[*l--] | *cr_fsptr++ | *cb_fsptr++)]; - *o1-- = pixel[(l_darrays3[*l--] | *cr_fsptr++ | *cb_fsptr++)]; - *o2-- = pixel[(l_darrays7[*l2--] | *cr_fsptr++ | *cb_fsptr++)]; - *o2-- = pixel[(l_darrays15[*l2--] | *cr_fsptr++ | *cb_fsptr++)]; - - cr_c_err = c_fserr[cr_code][1]; - cb_c_err = c_fserr[cb_code][1]; - *cr_r_err-- = c_fserr[cr_code][0]; - *cb_r_err-- = c_fserr[cb_code][0]; - - } - - l += row_advance2; l2 += row_advance2; - o1 += row_advance2; o2 += row_advance2; - cr_c_err = 0; cb_c_err = 0; - cr_r_err++; cb_r_err++; - r += half_row_advance2; b += half_row_advance2; - } -} - - - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/info.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/info.cpp deleted file mode 100644 index 6400a72bd42..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/info.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#include "ace/ACE.h" - -ACE_RCSID(mpeg_client, info, "$Id$") - -char infomessage[] = "\ -\n\ -\n\ -\n\ -TAO Audio/Video Streaming service\n\ ----------------------------------\n\ -\n\ -This is a distributed audio/video streaming application that uses\n\ -interfaces and interactions defined in the OMG \"Control and Management\n\ -of A/V streams\" spec. An implementation of the spec can be found in\n\ -the following directory.\n\ -\n\ -TAO/orbsvcs/orbsvcs/AV/\n\ -\n\ -The TAO application is a modified version of a streaming application\n\ -developed at the Oregon Graduate Institute.\n\ -\n\ -\n\ -\n\ -The player features common VCR functionalities like synchronized\n\ -video(MPEG) and audio(.au) play back, play speed set on the fly,\n\ -fast-forward, rewind, step forward, random Positioning, and more.\n\ -\n\ -The player is of server/client architecture. The server manages program\n\ -retrieval and distribution. The client decodes video frames, plays video\n\ -and audio streams, and provides a Motif style user interface.\n\ -\n\ -\n\ -The basic client/server used by the application originated from:\n\ - Distributed Systems Research Group\n\ - Department of Computer Science and Engineering\n\ - Oregon Graduate Institute of Science and Technology\n\ - October, 1995\n\ -The MPEG decoder used by the client is originated from U.C.Berkeley\n\ -MPEG decoder 2.0, by Lawrence A. Rowe, Ketan Patel, and Brian Smith,\n\ -of Computer Science Division-EECS, Univ. of Calif. at Berkeley.\n\ -\n\ -The Motif user interface is based on an implementation by Daeron Meyer\n\ -of The Geometry Center, University of Minnesota.\n\ -\n\ -This software is covered by copyrights. It contains code contributed\n\ -by the authors and several other parties. Please see the beginning of\n\ -source files and copyright file(s) in the root directory of the source\n\ -kit.\n\ -\n\ -Sumedh Mungee \n\ -Nagarajan Surendran \n\ -Seth Widoff \n\ -Alexander Arulanthu \n\ -Distributed Object Computing Group\n\ -Washington University\n\ -\n\ -\n\ -"; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/Info.mib b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/Info.mib deleted file mode 100644 index e42c3b7ec75..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/Info.mib +++ /dev/null @@ -1,78 +0,0 @@ -static char InfoMib[] = "\ -TotalWidgets: 4\n\ -Ref: 1\n\ -Widget: \"RootForm\"\n\ -Children: 2 3 4\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Root\"\n\ -Xmwidth: 562\n\ -Xmheight: 307\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 0\n\ -XmbottomOffset: 0\n\ -XmleftOffset: 0\n\ -XmrightOffset: 0\n\ -Private-\n\ -EndWidget.\n\ -Ref: 2\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Dismiss\"\n\ -Xmwidth: 62\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 270\n\ -XmbottomOffset: 9\n\ -XmleftOffset: 506\n\ -XmrightOffset: 9\n\ -Private-\n\ -label: \"Dismiss\"\n\ -EndWidget.\n\ -Ref: 3\n\ -Widget: \"TextBig\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"TextBig\"\n\ -Xmwidth: 546\n\ -Xmheight: 256\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 8\n\ -XmbottomOffset: 43\n\ -XmleftOffset: 8\n\ -XmrightOffset: 8\n\ -Private-\n\ -EndWidget.\n\ -Ref: 4\n\ -Widget: \"Frame\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"OutFrame\"\n\ -Xmwidth: 561\n\ -Xmheight: 306\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 0\n\ -XmbottomOffset: 1\n\ -XmleftOffset: 1\n\ -XmrightOffset: 0\n\ -Private-\n\ -shadowtype: 1\n\ -EndWidget.\n\ -END.\n\ -"; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MW.mib b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MW.mib deleted file mode 100644 index d1f432214bb..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MW.mib +++ /dev/null @@ -1,229 +0,0 @@ -static char MainMib[] = "\ -TotalWidgets: 12\n\ -Ref: 1\n\ -Widget: \"RootForm\"\n\ -Children: 2 3 4 5 6 7 8 9 10 11 12\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Root\"\n\ -Xmwidth: 364\n\ -Xmheight: 216\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 0\n\ -XmbottomOffset: 0\n\ -XmleftOffset: 0\n\ -XmrightOffset: 0\n\ -Private-\n\ -EndWidget.\n\ -Ref: 2\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Info\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 9\n\ -XmleftOffset: 200\n\ -XmrightOffset: 123\n\ -Private-\n\ -label: \"Info\"\n\ -EndWidget.\n\ -Ref: 3\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Loop\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 9\n\ -XmleftOffset: 140\n\ -XmrightOffset: 196\n\ -Private-\n\ -label: \"Loop\"\n\ -EndWidget.\n\ -Ref: 4\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Step\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 9\n\ -XmleftOffset: 74\n\ -XmrightOffset: 262\n\ -Private-\n\ -label: \"Step\"\n\ -EndWidget.\n\ -Ref: 5\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Exit\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 9\n\ -XmleftOffset: 314\n\ -XmrightOffset: 9\n\ -Private-\n\ -label: \"Exit\"\n\ -EndWidget.\n\ -Ref: 6\n\ -Widget: \"TextBox\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"FrameText\"\n\ -Xmwidth: 65\n\ -Xmheight: 29\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 8\n\ -XmleftOffset: 245\n\ -XmrightOffset: 54\n\ -Private-\n\ -EndWidget.\n\ -Ref: 7\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Rewind\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 9\n\ -XmleftOffset: 8\n\ -XmrightOffset: 328\n\ -Private-\n\ -label: \"Rew\"\n\ -EndWidget.\n\ -Ref: 8\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Play\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 9\n\ -XmleftOffset: 107\n\ -XmrightOffset: 229\n\ -Private-\n\ -label: \"Play\"\n\ -EndWidget.\n\ -Ref: 9\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Stop\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 9\n\ -XmleftOffset: 41\n\ -XmrightOffset: 295\n\ -Private-\n\ -label: \"Stop\"\n\ -EndWidget.\n\ -Ref: 10\n\ -Widget: \"DrawingArea\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Monitor\"\n\ -Xmwidth: 336\n\ -Xmheight: 157\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 13\n\ -XmbottomOffset: 46\n\ -XmleftOffset: 13\n\ -XmrightOffset: 15\n\ -Private-\n\ -EndWidget.\n\ -Ref: 11\n\ -Widget: \"Frame\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"InFrame\"\n\ -Xmwidth: 347\n\ -Xmheight: 167\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 8\n\ -XmbottomOffset: 41\n\ -XmleftOffset: 8\n\ -XmrightOffset: 9\n\ -Private-\n\ -shadowtype: 0\n\ -EndWidget.\n\ -Ref: 12\n\ -Widget: \"Frame\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"OutFrame\"\n\ -Xmwidth: 362\n\ -Xmheight: 215\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 0\n\ -XmbottomOffset: 1\n\ -XmleftOffset: 1\n\ -XmrightOffset: 1\n\ -Private-\n\ -shadowtype: 1\n\ -EndWidget.\n\ -END.\n\ -"; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MainWindow.mib b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MainWindow.mib deleted file mode 100644 index 1005fba75e8..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/MainWindow.mib +++ /dev/null @@ -1,324 +0,0 @@ -static char MainMib[] = "\ -TotalWidgets: 17\n\ -Ref: 1\n\ -Widget: \"RootForm\"\n\ -Children: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Root\"\n\ -Xmwidth: 364\n\ -Xmheight: 306\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 0\n\ -XmbottomOffset: 0\n\ -XmleftOffset: 0\n\ -XmrightOffset: 0\n\ -Private-\n\ -EndWidget.\n\ -Ref: 2\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Exit\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 8\n\ -XmrightOffset: 10\n\ -Private-\n\ -label: \"Exit\"\n\ -EndWidget.\n\ -Ref: 3\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Info\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 53\n\ -XmrightOffset: 10\n\ -Private-\n\ -label: \"Info\"\n\ -EndWidget.\n\ -Ref: 4\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Para\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 98\n\ -XmrightOffset: 10\n\ -Private-\n\ -label: \"Para\"\n\ -EndWidget.\n\ -Ref: 5\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Prog\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 143\n\ -XmrightOffset: 10\n\ -Private-\n\ -label: \"Prog\"\n\ -EndWidget.\n\ -Ref: 6\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"File\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 188\n\ -XmrightOffset: 10\n\ -Private-\n\ -label: \"File\"\n\ -EndWidget.\n\ -Ref: 7\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Step\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 9\n\ -Private-\n\ -label: \"Step\"\n\ -EndWidget.\n\ -Ref: 8\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Play\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 42\n\ -Private-\n\ -label: \"Play\"\n\ -EndWidget.\n\ -Ref: 9\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"FF\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 75\n\ -Private-\n\ -label: \"FF\"\n\ -EndWidget.\n\ -Ref: 10\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Stop\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 108\n\ -Private-\n\ -label: \"Stop\"\n\ -EndWidget.\n\ -Ref: 11\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Rewind\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 141\n\ -Private-\n\ -label: \"Rewind\"\n\ -EndWidget.\n\ -Ref: 12\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Normal\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 174\n\ -Private-\n\ -label: \"Norm\"\n\ -EndWidget.\n\ -Ref: 13\n\ -Widget: \"Toggle\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Loop\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 219\n\ -Private-\n\ -label: \"Loop\"\n\ -EndWidget.\n\ -Ref: 14\n\ -Widget: \"DrawingArea\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Monitor\"\n\ -Xmwidth: 336\n\ -Xmheight: 157\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 43\n\ -XmbottomOffset: 106\n\ -XmleftOffset: 13\n\ -XmrightOffset: 15\n\ -Private-\n\ -EndWidget.\n\ -Ref: 15\n\ -Widget: \"TextBox\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"TitleText\"\n\ -Xmwidth: 336\n\ -Xmheight: 29\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 0\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 8\n\ -XmbottomOffset: 106\n\ -XmleftOffset: 8\n\ -XmrightOffset: 9\n\ -Private-\n\ -EndWidget.\n\ -Ref: 16\n\ -Widget: \"Frame\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"InFrame\"\n\ -Xmwidth: 347\n\ -Xmheight: 197\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 38\n\ -XmbottomOffset: 101\n\ -XmleftOffset: 8\n\ -XmrightOffset: 9\n\ -Private-\n\ -shadowtype: 0\n\ -EndWidget.\n\ -Ref: 17\n\ -Widget: \"Frame\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"OutFrame\"\n\ -Xmwidth: 362\n\ -Xmheight: 275\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 0\n\ -XmbottomOffset: 1\n\ -XmleftOffset: 1\n\ -XmrightOffset: 1\n\ -Private-\n\ -shadowtype: 1\n\ -EndWidget.\n\ -END.\n\ -"; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/fb.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/fb.xbm deleted file mode 100644 index e20c1d81d6c..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/fb.xbm +++ /dev/null @@ -1,9 +0,0 @@ -#define fb_width 20 -#define fb_height 20 -static unsigned char fb_bits[] = { -0x00, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x8a, 0x02, 0x00, -0x4d, 0x03, 0x80, 0xaa, 0x02, 0x40, 0x5d, 0x03, 0xa0, 0x28, -0x02, 0x50, 0x1c, 0x03, 0x28, 0x00, 0x02, 0x1c, 0x00, 0x03, -0x38, 0x00, 0x02, 0x70, 0x1c, 0x03, 0xe0, 0x38, 0x02, 0xc0, -0x7d, 0x03, 0x80, 0xeb, 0x02, 0x00, 0xcf, 0x03, 0x00, 0x8e, -0x03, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/ff.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/ff.xbm deleted file mode 100644 index 82b4c250417..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/ff.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define ff_width 20 -#define ff_height 20 -static unsigned char ff_bits[] = { - 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x14, 0x05, 0x00, 0x2c, 0x0b, 0x00, - 0x54, 0x15, 0x00, 0xac, 0x2b, 0x00, 0x44, 0x51, 0x00, 0x8c, 0xa3, 0x00, - 0x04, 0x40, 0x01, 0x0c, 0x80, 0x03, 0x04, 0xc0, 0x01, 0x8c, 0xe3, 0x00, - 0xc4, 0x71, 0x00, 0xec, 0x3b, 0x00, 0x74, 0x1d, 0x00, 0x3c, 0x0f, 0x00, - 0x1c, 0x07, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/loop.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/loop.xbm deleted file mode 100644 index 9847623ba6a..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/loop.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define loop_width 20 -#define loop_height 20 -static unsigned char loop_bits[] = { - 0x00, 0x10, 0x00, 0x00, 0xf0, 0x00, 0xa0, 0xa0, 0x03, 0x50, 0x51, 0x05, - 0xe8, 0xa0, 0x06, 0x74, 0x50, 0x03, 0x38, 0xe0, 0x02, 0x34, 0x70, 0x05, - 0x1a, 0x80, 0x06, 0x14, 0x00, 0x05, 0x1a, 0x80, 0x06, 0x14, 0x00, 0x05, - 0x2a, 0x80, 0x06, 0x54, 0x40, 0x03, 0xa8, 0xaa, 0x02, 0x50, 0x55, 0x01, - 0xb0, 0xea, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/old.MainWindow.mib b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/old.MainWindow.mib deleted file mode 100644 index b3cc211d9ad..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/old.MainWindow.mib +++ /dev/null @@ -1,305 +0,0 @@ -static char MainMib[] = "\ -TotalWidgets: 16\n\ -Ref: 1\n\ -Widget: \"RootForm\"\n\ -Children: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Root\"\n\ -Xmwidth: 364\n\ -Xmheight: 306\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 0\n\ -XmbottomOffset: 0\n\ -XmleftOffset: 0\n\ -XmrightOffset: 0\n\ -Private-\n\ -EndWidget.\n\ -Ref: 2\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Exit\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 8\n\ -XmrightOffset: 10\n\ -Private-\n\ -label: \"Exit\"\n\ -EndWidget.\n\ -Ref: 3\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Info\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 53\n\ -XmrightOffset: 10\n\ -Private-\n\ -label: \"Info\"\n\ -EndWidget.\n\ -Ref: 4\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Para\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 98\n\ -XmrightOffset: 10\n\ -Private-\n\ -label: \"Para\"\n\ -EndWidget.\n\ -Ref: 5\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Prog\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 0\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 143\n\ -XmrightOffset: 10\n\ -Private-\n\ -label: \"Prog\"\n\ -EndWidget.\n\ -Ref: 6\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Step\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 9\n\ -Private-\n\ -label: \"Step\"\n\ -EndWidget.\n\ -Ref: 7\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Play\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 42\n\ -Private-\n\ -label: \"Play\"\n\ -EndWidget.\n\ -Ref: 8\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"FF\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 75\n\ -Private-\n\ -label: \"FF\"\n\ -EndWidget.\n\ -Ref: 9\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Stop\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 108\n\ -Private-\n\ -label: \"Stop\"\n\ -EndWidget.\n\ -Ref: 10\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Rewind\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 141\n\ -Private-\n\ -label: \"Rewind\"\n\ -EndWidget.\n\ -Ref: 11\n\ -Widget: \"Button\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Normal\"\n\ -Xmwidth: 41\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 174\n\ -Private-\n\ -label: \"Norm\"\n\ -EndWidget.\n\ -Ref: 12\n\ -Widget: \"Toggle\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Loop\"\n\ -Xmwidth: 28\n\ -Xmheight: 28\n\ -XmtopAttachment: 0\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 0\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 179\n\ -XmbottomOffset: 69\n\ -XmleftOffset: 100\n\ -XmrightOffset: 219\n\ -Private-\n\ -label: \"Loop\"\n\ -EndWidget.\n\ -Ref: 13\n\ -Widget: \"DrawingArea\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"Monitor\"\n\ -Xmwidth: 336\n\ -Xmheight: 157\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 43\n\ -XmbottomOffset: 106\n\ -XmleftOffset: 13\n\ -XmrightOffset: 15\n\ -Private-\n\ -EndWidget.\n\ -Ref: 14\n\ -Widget: \"TextBox\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"TitleText\"\n\ -Xmwidth: 336\n\ -Xmheight: 29\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 0\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 8\n\ -XmbottomOffset: 106\n\ -XmleftOffset: 8\n\ -XmrightOffset: 9\n\ -Private-\n\ -EndWidget.\n\ -Ref: 15\n\ -Widget: \"Frame\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"InFrame\"\n\ -Xmwidth: 347\n\ -Xmheight: 197\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 38\n\ -XmbottomOffset: 101\n\ -XmleftOffset: 8\n\ -XmrightOffset: 9\n\ -Private-\n\ -shadowtype: 0\n\ -EndWidget.\n\ -Ref: 16\n\ -Widget: \"Frame\"\n\ -Children: X\n\ -Parent: 1\n\ -Public-\n\ -Name: \"OutFrame\"\n\ -Xmwidth: 362\n\ -Xmheight: 275\n\ -XmtopAttachment: 1\n\ -XmbottomAttachment: 1\n\ -XmleftAttachment: 1\n\ -XmrightAttachment: 1\n\ -XmtopOffset: 0\n\ -XmbottomOffset: 1\n\ -XmleftOffset: 1\n\ -XmrightOffset: 1\n\ -Private-\n\ -shadowtype: 1\n\ -EndWidget.\n\ -END.\n\ -"; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/play.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/play.xbm deleted file mode 100644 index 91955e5117c..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/play.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define play_width 20 -#define play_height 20 -static unsigned char play_bits[] = { - 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x01, 0x00, 0xc0, 0x02, 0x00, - 0x40, 0x05, 0x00, 0xc0, 0x0a, 0x00, 0x40, 0x14, 0x00, 0xc0, 0x28, 0x00, - 0x40, 0x50, 0x00, 0xc0, 0xe0, 0x00, 0x40, 0x70, 0x00, 0xc0, 0x38, 0x00, - 0x40, 0x1c, 0x00, 0xc0, 0x0e, 0x00, 0x40, 0x07, 0x00, 0xc0, 0x03, 0x00, - 0xc0, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/rewind.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/rewind.xbm deleted file mode 100644 index 402643dcd25..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/rewind.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define rewind_width 20 -#define rewind_height 20 -static unsigned char rewind_bits[] = { - 0x00, 0x00, 0x00, 0x30, 0x80, 0x01, 0x28, 0x40, 0x01, 0x30, 0xa0, 0x01, - 0x28, 0x50, 0x01, 0x30, 0xa8, 0x01, 0x28, 0x14, 0x01, 0x30, 0x8a, 0x01, - 0x28, 0x05, 0x01, 0xb0, 0x83, 0x01, 0x28, 0x03, 0x01, 0x30, 0x8e, 0x01, - 0x28, 0x1c, 0x01, 0x30, 0xb8, 0x01, 0x28, 0x70, 0x01, 0x30, 0xe0, 0x01, - 0x28, 0xc0, 0x01, 0x38, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/step.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/step.xbm deleted file mode 100644 index 3ac996cbdb7..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/step.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define step_width 20 -#define step_height 20 -static unsigned char step_bits[] = { - 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x14, 0x05, 0x00, 0x18, 0x0b, 0x00, - 0x14, 0x15, 0x00, 0x18, 0x2b, 0x00, 0x14, 0x51, 0x00, 0x18, 0xa3, 0x00, - 0x14, 0x41, 0x01, 0x18, 0x83, 0x03, 0x14, 0xc1, 0x01, 0x18, 0xe3, 0x00, - 0x14, 0x71, 0x00, 0x18, 0x3b, 0x00, 0x14, 0x1d, 0x00, 0x18, 0x0f, 0x00, - 0x14, 0x07, 0x00, 0x1c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/stop.xbm b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/stop.xbm deleted file mode 100644 index 490ee392761..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/interface/stop.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define stop_width 20 -#define stop_height 20 -static unsigned char stop_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x03, 0x54, 0x55, 0x01, - 0xac, 0xaa, 0x02, 0x14, 0x80, 0x01, 0x0c, 0x80, 0x02, 0x14, 0x80, 0x01, - 0x0c, 0x80, 0x02, 0x14, 0x80, 0x01, 0x0c, 0x80, 0x02, 0x14, 0x80, 0x01, - 0x0c, 0x80, 0x02, 0x14, 0x80, 0x01, 0x0c, 0x80, 0x02, 0xf4, 0xff, 0x01, - 0xac, 0xaa, 0x02, 0x54, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/jrevdct.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/jrevdct.cpp deleted file mode 100644 index 6114517c580..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/jrevdct.cpp +++ /dev/null @@ -1,1461 +0,0 @@ -/* $Id$ */ - -/* - * jrevdct.c - * - * Copyright (C) 1991, 1992, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the basic inverse-DCT transformation subroutine. - * - * This implementation is based on an algorithm described in - * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT - * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, - * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. - * The primary algorithm described there uses 11 multiplies and 29 adds. - * We use their alternate method with 12 multiplies and 32 adds. - * The advantage of this method is that no data path contains more than one - * multiplication; this allows a very simple and accurate implementation in - * scaled fixed-point arithmetic, with a minimal number of shifts. - * - * I've made lots of modifications to attempt to take advantage of the - * sparse nature of the DCT matrices we're getting. Although the logic - * is cumbersome, it's straightforward and the resulting code is much - * faster. - * - * A better way to do this would be to pass in the DCT block as a sparse - * matrix, perhaps with the difference cases encoded. - */ - -#include -#include "video.h" -#include "proto.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, jrevdct, "$Id$") - -#define GLOBAL /* a function referenced thru EXTERNs */ - -/* We assume that right shift corresponds to signed division by 2 with - * rounding towards minus infinity. This is correct for typical "arithmetic - * shift" instructions that shift in copies of the sign bit. But some - * C compilers implement >> with an unsigned shift. For these machines you - * must define RIGHT_SHIFT_IS_UNSIGNED. - * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. - * It is only applied with constant shift counts. SHIFT_TEMPS must be - * included in the variables of any routine using RIGHT_SHIFT. - */ - -#ifdef RIGHT_SHIFT_IS_UNSIGNED -#define SHIFT_TEMPS INT32 shift_temp; -#define RIGHT_SHIFT(x,shft) \ - ((shift_temp = (x)) < 0 ? \ - (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ - (shift_temp >> (shft))) -#else -#define SHIFT_TEMPS -#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) -#endif - -/* - * This routine is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ -#endif - - -/* - * A 2-D IDCT can be done by 1-D IDCT on each row followed by 1-D IDCT - * on each column. Direct algorithms are also available, but they are - * much more complex and seem not to be any faster when reduced to code. - * - * The poop on this scaling stuff is as follows: - * - * Each 1-D IDCT step produces outputs which are a factor of sqrt(N) - * larger than the true IDCT outputs. The final outputs are therefore - * a factor of N larger than desired; since N=8 this can be cured by - * a simple right shift at the end of the algorithm. The advantage of - * this arrangement is that we save two multiplications per 1-D IDCT, - * because the y0 and y4 inputs need not be divided by sqrt(N). - * - * We have to do addition and subtraction of the integer inputs, which - * is no problem, and multiplication by fractional constants, which is - * a problem to do in integer arithmetic. We multiply all the constants - * by CONST_SCALE and convert them to integer constants (thus retaining - * CONST_BITS bits of precision in the constants). After doing a - * multiplication we have to divide the product by CONST_SCALE, with proper - * rounding, to produce the correct output. This division can be done - * cheaply as a right shift of CONST_BITS bits. We postpone shifting - * as long as possible so that partial sums can be added together with - * full fractional precision. - * - * The outputs of the first pass are scaled up by PASS1_BITS bits so that - * they are represented to better-than-integral precision. These outputs - * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word - * with the recommended scaling. (To scale up 12-bit sample data further, an - * intermediate INT32 array would be needed.) - * - * To avoid overflow of the 32-bit intermediate results in pass 2, we must - * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis - * shows that the values given below are the most effective. - */ - -#ifdef EIGHT_BIT_SAMPLES -#define PASS1_BITS 2 -#else -#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ -#endif - -#define ONE ((INT32) 1) - -#define CONST_SCALE (ONE << CONST_BITS) - -/* Convert a positive real constant to an integer scaled by CONST_SCALE. - * IMPORTANT: if your compiler doesn't do this arithmetic at compile time, - * you will pay a significant penalty in run time. In that case, figure - * the correct integer constant values and insert them by hand. - */ - -#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) - -/* Descale and correctly round an INT32 value that's scaled by N bits. - * We assume RIGHT_SHIFT rounds towards minus infinity, so adding - * the fudge factor is correct for either sign of X. - */ - -#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) - -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. - * For 8-bit samples with the recommended scaling, all the variable - * and constant values involved are no more than 16 bits wide, so a - * 16x16->32 bit multiply can be used instead of a full 32x32 multiply; - * this provides a useful speedup on many machines. - * There is no way to specify a 16x16->32 multiply in portable C, but - * some C compilers will do the right thing if you provide the correct - * combination of casts. - * NB: for 12-bit samples, a full 32-bit multiplication will be needed. - */ - -#ifdef EIGHT_BIT_SAMPLES -#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ -#define MULTIPLY(var,const) (((INT16) (var)) * ((INT16) (const))) -#endif -#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ -#define MULTIPLY(var,const) (((INT16) (var)) * ((INT32) (const))) -#endif -#endif - -#ifndef MULTIPLY /* default definition */ -#define MULTIPLY(var,const) ((var) * (const)) -#endif - -/* Precomputed idct value arrays. */ - -static DCTELEM PreIDCT[64][64]; - -void j_rev_dct (DCTBLOCK data); - -/* Pre compute singleton coefficient IDCT values. */ -void -init_pre_idct() { - int i; - - for (i=0; i<64; i++) { - memset((char *) PreIDCT[i], 0, 64*sizeof(DCTELEM)); - PreIDCT[i][i] = 2048; - j_rev_dct(PreIDCT[i]); - } -} - -#ifndef ORIG_DCT - - -/* - * Perform the inverse DCT on one block of coefficients. - */ - -void -j_rev_dct_sparse (DCTBLOCK data, int pos) -{ - register DCTELEM *dataptr; - short int val; - DCTELEM *ndataptr; - int scale, coeff, rr; - register int *dp; - register int v; - - /* If DC Coefficient. */ - - if (pos == 0) { - dp = (int *)data; - v = *data; - /* Compute 32 bit value to assign. This speeds things up a bit */ - if (v < 0) val = (v-3)>>3; - else val = (v+4)>>3; - v = val | (val << 16); - dp[0] = v; dp[1] = v; dp[2] = v; dp[3] = v; - dp[4] = v; dp[5] = v; dp[6] = v; dp[7] = v; - dp[8] = v; dp[9] = v; dp[10] = v; dp[11] = v; - dp[12] = v; dp[13] = v; dp[14] = v; dp[15] = v; - dp[16] = v; dp[17] = v; dp[18] = v; dp[19] = v; - dp[20] = v; dp[21] = v; dp[22] = v; dp[23] = v; - dp[24] = v; dp[25] = v; dp[26] = v; dp[27] = v; - dp[28] = v; dp[29] = v; dp[30] = v; dp[31] = v; - return; - } - - /* Some other coefficient. */ - dataptr = (DCTELEM *)data; - coeff = dataptr[pos]; - ndataptr = PreIDCT[pos]; - - for (rr=0; rr<4; rr++) { - dataptr[0] = (ndataptr[0] * coeff) >> (CONST_BITS-2); - dataptr[1] = (ndataptr[1] * coeff) >> (CONST_BITS-2); - dataptr[2] = (ndataptr[2] * coeff) >> (CONST_BITS-2); - dataptr[3] = (ndataptr[3] * coeff) >> (CONST_BITS-2); - dataptr[4] = (ndataptr[4] * coeff) >> (CONST_BITS-2); - dataptr[5] = (ndataptr[5] * coeff) >> (CONST_BITS-2); - dataptr[6] = (ndataptr[6] * coeff) >> (CONST_BITS-2); - dataptr[7] = (ndataptr[7] * coeff) >> (CONST_BITS-2); - dataptr[8] = (ndataptr[8] * coeff) >> (CONST_BITS-2); - dataptr[9] = (ndataptr[9] * coeff) >> (CONST_BITS-2); - dataptr[10] = (ndataptr[10] * coeff) >> (CONST_BITS-2); - dataptr[11] = (ndataptr[11] * coeff) >> (CONST_BITS-2); - dataptr[12] = (ndataptr[12] * coeff) >> (CONST_BITS-2); - dataptr[13] = (ndataptr[13] * coeff) >> (CONST_BITS-2); - dataptr[14] = (ndataptr[14] * coeff) >> (CONST_BITS-2); - dataptr[15] = (ndataptr[15] * coeff) >> (CONST_BITS-2); - dataptr += 16; - ndataptr += 16; - } - return; -} - - -void -j_rev_dct (DCTBLOCK data) -{ - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3, z4, z5; - INT32 d0, d1, d2, d3, d4, d5, d6, d7; - register DCTELEM *dataptr; - int rowctr; - SHIFT_TEMPS - - /* Pass 1: process rows. */ - /* Note results are scaled up by sqrt(8) compared to a true IDCT; */ - /* furthermore, we scale the results by 2**PASS1_BITS. */ - - dataptr = data; - - for (rowctr = DCTSIZE-1; rowctr >= 0; rowctr--) { - /* Due to quantization, we will usually find that many of the input - * coefficients are zero, especially the AC terms. We can exploit this - * by short-circuiting the IDCT calculation for any row in which all - * the AC terms are zero. In that case each output is equal to the - * DC coefficient (with scale factor as needed). - * With typical images and quantization tables, half or more of the - * row DCT calculations can be simplified this way. - */ - - register int *idataptr = (int*)dataptr; - d0 = dataptr[0]; - d1 = dataptr[1]; - if ((d1 == 0) && (idataptr[1] | idataptr[2] | idataptr[3]) == 0) { - /* AC terms all zero */ - if (d0) { - /* Compute a 32 bit value to assign. */ - DCTELEM dcval = (DCTELEM) (d0 << PASS1_BITS); - register int v = (dcval & 0xffff) | ((dcval << 16) & 0xffff0000); - - idataptr[0] = v; - idataptr[1] = v; - idataptr[2] = v; - idataptr[3] = v; - } - - dataptr += DCTSIZE; /* advance pointer to next row */ - continue; - } - d2 = dataptr[2]; - d3 = dataptr[3]; - d4 = dataptr[4]; - d5 = dataptr[5]; - d6 = dataptr[6]; - d7 = dataptr[7]; - - /* Even part: reverse the even part of the forward DCT. */ - /* The rotator is sqrt(2)*c(-6). */ - if (d6) { - if (d4) { - if (d2) { - if (d0) { - /* d0 != 0, d2 != 0, d4 != 0, d6 != 0 */ - z1 = MULTIPLY(d2 + d6, FIX(0.541196100)); - tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065)); - tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865)); - - tmp0 = (d0 + d4) << CONST_BITS; - tmp1 = (d0 - d4) << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - } else { - /* d0 == 0, d2 != 0, d4 != 0, d6 != 0 */ - z1 = MULTIPLY(d2 + d6, FIX(0.541196100)); - tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065)); - tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865)); - - tmp0 = d4 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp2 - tmp0; - tmp12 = -(tmp0 + tmp2); - } - } else { - if (d0) { - /* d0 != 0, d2 == 0, d4 != 0, d6 != 0 */ - tmp2 = MULTIPLY(d6, - FIX(1.306562965)); - tmp3 = MULTIPLY(d6, FIX(0.541196100)); - - tmp0 = (d0 + d4) << CONST_BITS; - tmp1 = (d0 - d4) << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - } else { - /* d0 == 0, d2 == 0, d4 != 0, d6 != 0 */ - tmp2 = MULTIPLY(d6, -FIX(1.306562965)); - tmp3 = MULTIPLY(d6, FIX(0.541196100)); - - tmp0 = d4 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp2 - tmp0; - tmp12 = -(tmp0 + tmp2); - } - } - } else { - if (d2) { - if (d0) { - /* d0 != 0, d2 != 0, d4 == 0, d6 != 0 */ - z1 = MULTIPLY(d2 + d6, FIX(0.541196100)); - tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065)); - tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865)); - - tmp0 = d0 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - } else { - /* d0 == 0, d2 != 0, d4 == 0, d6 != 0 */ - z1 = MULTIPLY(d2 + d6, FIX(0.541196100)); - tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065)); - tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865)); - - tmp10 = tmp3; - tmp13 = -tmp3; - tmp11 = tmp2; - tmp12 = -tmp2; - } - } else { - if (d0) { - /* d0 != 0, d2 == 0, d4 == 0, d6 != 0 */ - tmp2 = MULTIPLY(d6, - FIX(1.306562965)); - tmp3 = MULTIPLY(d6, FIX(0.541196100)); - - tmp0 = d0 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - } else { - /* d0 == 0, d2 == 0, d4 == 0, d6 != 0 */ - tmp2 = MULTIPLY(d6, - FIX(1.306562965)); - tmp3 = MULTIPLY(d6, FIX(0.541196100)); - - tmp10 = tmp3; - tmp13 = -tmp3; - tmp11 = tmp2; - tmp12 = -tmp2; - } - } - } - } else { - if (d4) { - if (d2) { - if (d0) { - /* d0 != 0, d2 != 0, d4 != 0, d6 == 0 */ - tmp2 = MULTIPLY(d2, FIX(0.541196100)); - tmp3 = MULTIPLY(d2, FIX(1.306562965)); - - tmp0 = (d0 + d4) << CONST_BITS; - tmp1 = (d0 - d4) << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - } else { - /* d0 == 0, d2 != 0, d4 != 0, d6 == 0 */ - tmp2 = MULTIPLY(d2, FIX(0.541196100)); - tmp3 = MULTIPLY(d2, FIX(1.306562965)); - - tmp0 = d4 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp2 - tmp0; - tmp12 = -(tmp0 + tmp2); - } - } else { - if (d0) { - /* d0 != 0, d2 == 0, d4 != 0, d6 == 0 */ - tmp10 = tmp13 = (d0 + d4) << CONST_BITS; - tmp11 = tmp12 = (d0 - d4) << CONST_BITS; - } else { - /* d0 == 0, d2 == 0, d4 != 0, d6 == 0 */ - tmp10 = tmp13 = d4 << CONST_BITS; - tmp11 = tmp12 = -tmp10; - } - } - } else { - if (d2) { - if (d0) { - /* d0 != 0, d2 != 0, d4 == 0, d6 == 0 */ - tmp2 = MULTIPLY(d2, FIX(0.541196100)); - tmp3 = MULTIPLY(d2, FIX(1.306562965)); - - tmp0 = d0 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - } else { - /* d0 == 0, d2 != 0, d4 == 0, d6 == 0 */ - tmp2 = MULTIPLY(d2, FIX(0.541196100)); - tmp3 = MULTIPLY(d2, FIX(1.306562965)); - - tmp10 = tmp3; - tmp13 = -tmp3; - tmp11 = tmp2; - tmp12 = -tmp2; - } - } else { - if (d0) { - /* d0 != 0, d2 == 0, d4 == 0, d6 == 0 */ - tmp10 = tmp13 = tmp11 = tmp12 = d0 << CONST_BITS; - } else { - /* d0 == 0, d2 == 0, d4 == 0, d6 == 0 */ - tmp10 = tmp13 = tmp11 = tmp12 = 0; - } - } - } - } - - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - if (d7) { - if (d5) { - if (d3) { - if (d1) { - /* d1 != 0, d3 != 0, d5 != 0, d7 != 0 */ - z1 = d7 + d1; - z2 = d5 + d3; - z3 = d7 + d3; - z4 = d5 + d1; - z5 = MULTIPLY(z3 + z4, FIX(1.175875602)); - - tmp0 = MULTIPLY(d7, FIX(0.298631336)); - tmp1 = MULTIPLY(d5, FIX(2.053119869)); - tmp2 = MULTIPLY(d3, FIX(3.072711026)); - tmp3 = MULTIPLY(d1, FIX(1.501321110)); - z1 = MULTIPLY(z1, - FIX(0.899976223)); - z2 = MULTIPLY(z2, - FIX(2.562915447)); - z3 = MULTIPLY(z3, - FIX(1.961570560)); - z4 = MULTIPLY(z4, - FIX(0.390180644)); - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 += z2 + z4; - tmp2 += z2 + z3; - tmp3 += z1 + z4; - } else { - /* d1 == 0, d3 != 0, d5 != 0, d7 != 0 */ - z1 = d7; - z2 = d5 + d3; - z3 = d7 + d3; - z5 = MULTIPLY(z3 + d5, FIX(1.175875602)); - - tmp0 = MULTIPLY(d7, FIX(0.298631336)); - tmp1 = MULTIPLY(d5, FIX(2.053119869)); - tmp2 = MULTIPLY(d3, FIX(3.072711026)); - z1 = MULTIPLY(d7, - FIX(0.899976223)); - z2 = MULTIPLY(z2, - FIX(2.562915447)); - z3 = MULTIPLY(z3, - FIX(1.961570560)); - z4 = MULTIPLY(d5, - FIX(0.390180644)); - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 += z2 + z4; - tmp2 += z2 + z3; - tmp3 = z1 + z4; - } - } else { - if (d1) { - /* d1 != 0, d3 == 0, d5 != 0, d7 != 0 */ - z1 = d7 + d1; - z2 = d5; - z3 = d7; - z4 = d5 + d1; - z5 = MULTIPLY(z3 + z4, FIX(1.175875602)); - - tmp0 = MULTIPLY(d7, FIX(0.298631336)); - tmp1 = MULTIPLY(d5, FIX(2.053119869)); - tmp3 = MULTIPLY(d1, FIX(1.501321110)); - z1 = MULTIPLY(z1, - FIX(0.899976223)); - z2 = MULTIPLY(d5, - FIX(2.562915447)); - z3 = MULTIPLY(d7, - FIX(1.961570560)); - z4 = MULTIPLY(z4, - FIX(0.390180644)); - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 += z2 + z4; - tmp2 = z2 + z3; - tmp3 += z1 + z4; - } else { - /* d1 == 0, d3 == 0, d5 != 0, d7 != 0 */ - tmp0 = MULTIPLY(d7, - FIX(0.601344887)); - z1 = MULTIPLY(d7, - FIX(0.899976223)); - z3 = MULTIPLY(d7, - FIX(1.961570560)); - tmp1 = MULTIPLY(d5, - FIX(0.509795578)); - z2 = MULTIPLY(d5, - FIX(2.562915447)); - z4 = MULTIPLY(d5, - FIX(0.390180644)); - z5 = MULTIPLY(d5 + d7, FIX(1.175875602)); - - z3 += z5; - z4 += z5; - - tmp0 += z3; - tmp1 += z4; - tmp2 = z2 + z3; - tmp3 = z1 + z4; - } - } - } else { - if (d3) { - if (d1) { - /* d1 != 0, d3 != 0, d5 == 0, d7 != 0 */ - z1 = d7 + d1; - z3 = d7 + d3; - z5 = MULTIPLY(z3 + d1, FIX(1.175875602)); - - tmp0 = MULTIPLY(d7, FIX(0.298631336)); - tmp2 = MULTIPLY(d3, FIX(3.072711026)); - tmp3 = MULTIPLY(d1, FIX(1.501321110)); - z1 = MULTIPLY(z1, - FIX(0.899976223)); - z2 = MULTIPLY(d3, - FIX(2.562915447)); - z3 = MULTIPLY(z3, - FIX(1.961570560)); - z4 = MULTIPLY(d1, - FIX(0.390180644)); - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 = z2 + z4; - tmp2 += z2 + z3; - tmp3 += z1 + z4; - } else { - /* d1 == 0, d3 != 0, d5 == 0, d7 != 0 */ - z3 = d7 + d3; - - tmp0 = MULTIPLY(d7, - FIX(0.601344887)); - z1 = MULTIPLY(d7, - FIX(0.899976223)); - tmp2 = MULTIPLY(d3, FIX(0.509795579)); - z2 = MULTIPLY(d3, - FIX(2.562915447)); - z5 = MULTIPLY(z3, FIX(1.175875602)); - z3 = MULTIPLY(z3, - FIX(0.785694958)); - - tmp0 += z3; - tmp1 = z2 + z5; - tmp2 += z3; - tmp3 = z1 + z5; - } - } else { - if (d1) { - /* d1 != 0, d3 == 0, d5 == 0, d7 != 0 */ - z1 = d7 + d1; - z5 = MULTIPLY(z1, FIX(1.175875602)); - - z1 = MULTIPLY(z1, FIX(0.275899379)); - z3 = MULTIPLY(d7, - FIX(1.961570560)); - tmp0 = MULTIPLY(d7, - FIX(1.662939224)); - z4 = MULTIPLY(d1, - FIX(0.390180644)); - tmp3 = MULTIPLY(d1, FIX(1.111140466)); - - tmp0 += z1; - tmp1 = z4 + z5; - tmp2 = z3 + z5; - tmp3 += z1; - } else { - /* d1 == 0, d3 == 0, d5 == 0, d7 != 0 */ - tmp0 = MULTIPLY(d7, - FIX(1.387039845)); - tmp1 = MULTIPLY(d7, FIX(1.175875602)); - tmp2 = MULTIPLY(d7, - FIX(0.785694958)); - tmp3 = MULTIPLY(d7, FIX(0.275899379)); - } - } - } - } else { - if (d5) { - if (d3) { - if (d1) { - /* d1 != 0, d3 != 0, d5 != 0, d7 == 0 */ - z2 = d5 + d3; - z4 = d5 + d1; - z5 = MULTIPLY(d3 + z4, FIX(1.175875602)); - - tmp1 = MULTIPLY(d5, FIX(2.053119869)); - tmp2 = MULTIPLY(d3, FIX(3.072711026)); - tmp3 = MULTIPLY(d1, FIX(1.501321110)); - z1 = MULTIPLY(d1, - FIX(0.899976223)); - z2 = MULTIPLY(z2, - FIX(2.562915447)); - z3 = MULTIPLY(d3, - FIX(1.961570560)); - z4 = MULTIPLY(z4, - FIX(0.390180644)); - - z3 += z5; - z4 += z5; - - tmp0 = z1 + z3; - tmp1 += z2 + z4; - tmp2 += z2 + z3; - tmp3 += z1 + z4; - } else { - /* d1 == 0, d3 != 0, d5 != 0, d7 == 0 */ - z2 = d5 + d3; - - z5 = MULTIPLY(z2, FIX(1.175875602)); - tmp1 = MULTIPLY(d5, FIX(1.662939225)); - z4 = MULTIPLY(d5, - FIX(0.390180644)); - z2 = MULTIPLY(z2, - FIX(1.387039845)); - tmp2 = MULTIPLY(d3, FIX(1.111140466)); - z3 = MULTIPLY(d3, - FIX(1.961570560)); - - tmp0 = z3 + z5; - tmp1 += z2; - tmp2 += z2; - tmp3 = z4 + z5; - } - } else { - if (d1) { - /* d1 != 0, d3 == 0, d5 != 0, d7 == 0 */ - z4 = d5 + d1; - - z5 = MULTIPLY(z4, FIX(1.175875602)); - z1 = MULTIPLY(d1, - FIX(0.899976223)); - tmp3 = MULTIPLY(d1, FIX(0.601344887)); - tmp1 = MULTIPLY(d5, - FIX(0.509795578)); - z2 = MULTIPLY(d5, - FIX(2.562915447)); - z4 = MULTIPLY(z4, FIX(0.785694958)); - - tmp0 = z1 + z5; - tmp1 += z4; - tmp2 = z2 + z5; - tmp3 += z4; - } else { - /* d1 == 0, d3 == 0, d5 != 0, d7 == 0 */ - tmp0 = MULTIPLY(d5, FIX(1.175875602)); - tmp1 = MULTIPLY(d5, FIX(0.275899380)); - tmp2 = MULTIPLY(d5, - FIX(1.387039845)); - tmp3 = MULTIPLY(d5, FIX(0.785694958)); - } - } - } else { - if (d3) { - if (d1) { - /* d1 != 0, d3 != 0, d5 == 0, d7 == 0 */ - z5 = d1 + d3; - tmp3 = MULTIPLY(d1, FIX(0.211164243)); - tmp2 = MULTIPLY(d3, - FIX(1.451774981)); - z1 = MULTIPLY(d1, FIX(1.061594337)); - z2 = MULTIPLY(d3, - FIX(2.172734803)); - z4 = MULTIPLY(z5, FIX(0.785694958)); - z5 = MULTIPLY(z5, FIX(1.175875602)); - - tmp0 = z1 - z4; - tmp1 = z2 + z4; - tmp2 += z5; - tmp3 += z5; - } else { - /* d1 == 0, d3 != 0, d5 == 0, d7 == 0 */ - tmp0 = MULTIPLY(d3, - FIX(0.785694958)); - tmp1 = MULTIPLY(d3, - FIX(1.387039845)); - tmp2 = MULTIPLY(d3, - FIX(0.275899379)); - tmp3 = MULTIPLY(d3, FIX(1.175875602)); - } - } else { - if (d1) { - /* d1 != 0, d3 == 0, d5 == 0, d7 == 0 */ - tmp0 = MULTIPLY(d1, FIX(0.275899379)); - tmp1 = MULTIPLY(d1, FIX(0.785694958)); - tmp2 = MULTIPLY(d1, FIX(1.175875602)); - tmp3 = MULTIPLY(d1, FIX(1.387039845)); - } else { - /* d1 == 0, d3 == 0, d5 == 0, d7 == 0 */ - tmp0 = tmp1 = tmp2 = tmp3 = 0; - } - } - } - } - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - dataptr[0] = (DCTELEM) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS); - dataptr[7] = (DCTELEM) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS); - dataptr[1] = (DCTELEM) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS); - dataptr[2] = (DCTELEM) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS); - dataptr[4] = (DCTELEM) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. */ - /* Note that we must descale the results by a factor of 8 == 2**3, */ - /* and also undo the PASS1_BITS scaling. */ - - dataptr = data; - for (rowctr = DCTSIZE-1; rowctr >= 0; rowctr--) { - /* Columns of zeroes can be exploited in the same way as we did with rows. - * However, the row calculation has created many nonzero AC terms, so the - * simplification applies less often (typically 5% to 10% of the time). - * On machines with very fast multiplication, it's possible that the - * test takes more time than it's worth. In that case this section - * may be commented out. - */ - - d0 = dataptr[DCTSIZE*0]; - d1 = dataptr[DCTSIZE*1]; - d2 = dataptr[DCTSIZE*2]; - d3 = dataptr[DCTSIZE*3]; - d4 = dataptr[DCTSIZE*4]; - d5 = dataptr[DCTSIZE*5]; - d6 = dataptr[DCTSIZE*6]; - d7 = dataptr[DCTSIZE*7]; - - /* Even part: reverse the even part of the forward DCT. */ - /* The rotator is sqrt(2)*c(-6). */ - if (d6) { - if (d4) { - if (d2) { - if (d0) { - /* d0 != 0, d2 != 0, d4 != 0, d6 != 0 */ - z1 = MULTIPLY(d2 + d6, FIX(0.541196100)); - tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065)); - tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865)); - - tmp0 = (d0 + d4) << CONST_BITS; - tmp1 = (d0 - d4) << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - } else { - /* d0 == 0, d2 != 0, d4 != 0, d6 != 0 */ - z1 = MULTIPLY(d2 + d6, FIX(0.541196100)); - tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065)); - tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865)); - - tmp0 = d4 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp2 - tmp0; - tmp12 = -(tmp0 + tmp2); - } - } else { - if (d0) { - /* d0 != 0, d2 == 0, d4 != 0, d6 != 0 */ - tmp2 = MULTIPLY(d6, - FIX(1.306562965)); - tmp3 = MULTIPLY(d6, FIX(0.541196100)); - - tmp0 = (d0 + d4) << CONST_BITS; - tmp1 = (d0 - d4) << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - } else { - /* d0 == 0, d2 == 0, d4 != 0, d6 != 0 */ - tmp2 = MULTIPLY(d6, -FIX(1.306562965)); - tmp3 = MULTIPLY(d6, FIX(0.541196100)); - - tmp0 = d4 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp2 - tmp0; - tmp12 = -(tmp0 + tmp2); - } - } - } else { - if (d2) { - if (d0) { - /* d0 != 0, d2 != 0, d4 == 0, d6 != 0 */ - z1 = MULTIPLY(d2 + d6, FIX(0.541196100)); - tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065)); - tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865)); - - tmp0 = d0 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - } else { - /* d0 == 0, d2 != 0, d4 == 0, d6 != 0 */ - z1 = MULTIPLY(d2 + d6, FIX(0.541196100)); - tmp2 = z1 + MULTIPLY(d6, - FIX(1.847759065)); - tmp3 = z1 + MULTIPLY(d2, FIX(0.765366865)); - - tmp10 = tmp3; - tmp13 = -tmp3; - tmp11 = tmp2; - tmp12 = -tmp2; - } - } else { - if (d0) { - /* d0 != 0, d2 == 0, d4 == 0, d6 != 0 */ - tmp2 = MULTIPLY(d6, - FIX(1.306562965)); - tmp3 = MULTIPLY(d6, FIX(0.541196100)); - - tmp0 = d0 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - } else { - /* d0 == 0, d2 == 0, d4 == 0, d6 != 0 */ - tmp2 = MULTIPLY(d6, - FIX(1.306562965)); - tmp3 = MULTIPLY(d6, FIX(0.541196100)); - - tmp10 = tmp3; - tmp13 = -tmp3; - tmp11 = tmp2; - tmp12 = -tmp2; - } - } - } - } else { - if (d4) { - if (d2) { - if (d0) { - /* d0 != 0, d2 != 0, d4 != 0, d6 == 0 */ - tmp2 = MULTIPLY(d2, FIX(0.541196100)); - tmp3 = MULTIPLY(d2, FIX(1.306562965)); - - tmp0 = (d0 + d4) << CONST_BITS; - tmp1 = (d0 - d4) << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - } else { - /* d0 == 0, d2 != 0, d4 != 0, d6 == 0 */ - tmp2 = MULTIPLY(d2, FIX(0.541196100)); - tmp3 = MULTIPLY(d2, FIX(1.306562965)); - - tmp0 = d4 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp2 - tmp0; - tmp12 = -(tmp0 + tmp2); - } - } else { - if (d0) { - /* d0 != 0, d2 == 0, d4 != 0, d6 == 0 */ - tmp10 = tmp13 = (d0 + d4) << CONST_BITS; - tmp11 = tmp12 = (d0 - d4) << CONST_BITS; - } else { - /* d0 == 0, d2 == 0, d4 != 0, d6 == 0 */ - tmp10 = tmp13 = d4 << CONST_BITS; - tmp11 = tmp12 = -tmp10; - } - } - } else { - if (d2) { - if (d0) { - /* d0 != 0, d2 != 0, d4 == 0, d6 == 0 */ - tmp2 = MULTIPLY(d2, FIX(0.541196100)); - tmp3 = MULTIPLY(d2, FIX(1.306562965)); - - tmp0 = d0 << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - } else { - /* d0 == 0, d2 != 0, d4 == 0, d6 == 0 */ - tmp2 = MULTIPLY(d2, FIX(0.541196100)); - tmp3 = MULTIPLY(d2, FIX(1.306562965)); - - tmp10 = tmp3; - tmp13 = -tmp3; - tmp11 = tmp2; - tmp12 = -tmp2; - } - } else { - if (d0) { - /* d0 != 0, d2 == 0, d4 == 0, d6 == 0 */ - tmp10 = tmp13 = tmp11 = tmp12 = d0 << CONST_BITS; - } else { - /* d0 == 0, d2 == 0, d4 == 0, d6 == 0 */ - tmp10 = tmp13 = tmp11 = tmp12 = 0; - } - } - } - } - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - if (d7) { - if (d5) { - if (d3) { - if (d1) { - /* d1 != 0, d3 != 0, d5 != 0, d7 != 0 */ - z1 = d7 + d1; - z2 = d5 + d3; - z3 = d7 + d3; - z4 = d5 + d1; - z5 = MULTIPLY(z3 + z4, FIX(1.175875602)); - - tmp0 = MULTIPLY(d7, FIX(0.298631336)); - tmp1 = MULTIPLY(d5, FIX(2.053119869)); - tmp2 = MULTIPLY(d3, FIX(3.072711026)); - tmp3 = MULTIPLY(d1, FIX(1.501321110)); - z1 = MULTIPLY(z1, - FIX(0.899976223)); - z2 = MULTIPLY(z2, - FIX(2.562915447)); - z3 = MULTIPLY(z3, - FIX(1.961570560)); - z4 = MULTIPLY(z4, - FIX(0.390180644)); - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 += z2 + z4; - tmp2 += z2 + z3; - tmp3 += z1 + z4; - } else { - /* d1 == 0, d3 != 0, d5 != 0, d7 != 0 */ - z1 = d7; - z2 = d5 + d3; - z3 = d7 + d3; - z5 = MULTIPLY(z3 + d5, FIX(1.175875602)); - - tmp0 = MULTIPLY(d7, FIX(0.298631336)); - tmp1 = MULTIPLY(d5, FIX(2.053119869)); - tmp2 = MULTIPLY(d3, FIX(3.072711026)); - z1 = MULTIPLY(d7, - FIX(0.899976223)); - z2 = MULTIPLY(z2, - FIX(2.562915447)); - z3 = MULTIPLY(z3, - FIX(1.961570560)); - z4 = MULTIPLY(d5, - FIX(0.390180644)); - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 += z2 + z4; - tmp2 += z2 + z3; - tmp3 = z1 + z4; - } - } else { - if (d1) { - /* d1 != 0, d3 == 0, d5 != 0, d7 != 0 */ - z1 = d7 + d1; - z2 = d5; - z3 = d7; - z4 = d5 + d1; - z5 = MULTIPLY(z3 + z4, FIX(1.175875602)); - - tmp0 = MULTIPLY(d7, FIX(0.298631336)); - tmp1 = MULTIPLY(d5, FIX(2.053119869)); - tmp3 = MULTIPLY(d1, FIX(1.501321110)); - z1 = MULTIPLY(z1, - FIX(0.899976223)); - z2 = MULTIPLY(d5, - FIX(2.562915447)); - z3 = MULTIPLY(d7, - FIX(1.961570560)); - z4 = MULTIPLY(z4, - FIX(0.390180644)); - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 += z2 + z4; - tmp2 = z2 + z3; - tmp3 += z1 + z4; - } else { - /* d1 == 0, d3 == 0, d5 != 0, d7 != 0 */ - tmp0 = MULTIPLY(d7, - FIX(0.601344887)); - z1 = MULTIPLY(d7, - FIX(0.899976223)); - z3 = MULTIPLY(d7, - FIX(1.961570560)); - tmp1 = MULTIPLY(d5, - FIX(0.509795578)); - z2 = MULTIPLY(d5, - FIX(2.562915447)); - z4 = MULTIPLY(d5, - FIX(0.390180644)); - z5 = MULTIPLY(d5 + d7, FIX(1.175875602)); - - z3 += z5; - z4 += z5; - - tmp0 += z3; - tmp1 += z4; - tmp2 = z2 + z3; - tmp3 = z1 + z4; - } - } - } else { - if (d3) { - if (d1) { - /* d1 != 0, d3 != 0, d5 == 0, d7 != 0 */ - z1 = d7 + d1; - z3 = d7 + d3; - z5 = MULTIPLY(z3 + d1, FIX(1.175875602)); - - tmp0 = MULTIPLY(d7, FIX(0.298631336)); - tmp2 = MULTIPLY(d3, FIX(3.072711026)); - tmp3 = MULTIPLY(d1, FIX(1.501321110)); - z1 = MULTIPLY(z1, - FIX(0.899976223)); - z2 = MULTIPLY(d3, - FIX(2.562915447)); - z3 = MULTIPLY(z3, - FIX(1.961570560)); - z4 = MULTIPLY(d1, - FIX(0.390180644)); - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 = z2 + z4; - tmp2 += z2 + z3; - tmp3 += z1 + z4; - } else { - /* d1 == 0, d3 != 0, d5 == 0, d7 != 0 */ - z3 = d7 + d3; - - tmp0 = MULTIPLY(d7, - FIX(0.601344887)); - z1 = MULTIPLY(d7, - FIX(0.899976223)); - tmp2 = MULTIPLY(d3, FIX(0.509795579)); - z2 = MULTIPLY(d3, - FIX(2.562915447)); - z5 = MULTIPLY(z3, FIX(1.175875602)); - z3 = MULTIPLY(z3, - FIX(0.785694958)); - - tmp0 += z3; - tmp1 = z2 + z5; - tmp2 += z3; - tmp3 = z1 + z5; - } - } else { - if (d1) { - /* d1 != 0, d3 == 0, d5 == 0, d7 != 0 */ - z1 = d7 + d1; - z5 = MULTIPLY(z1, FIX(1.175875602)); - - z1 = MULTIPLY(z1, FIX(0.275899379)); - z3 = MULTIPLY(d7, - FIX(1.961570560)); - tmp0 = MULTIPLY(d7, - FIX(1.662939224)); - z4 = MULTIPLY(d1, - FIX(0.390180644)); - tmp3 = MULTIPLY(d1, FIX(1.111140466)); - - tmp0 += z1; - tmp1 = z4 + z5; - tmp2 = z3 + z5; - tmp3 += z1; - } else { - /* d1 == 0, d3 == 0, d5 == 0, d7 != 0 */ - tmp0 = MULTIPLY(d7, - FIX(1.387039845)); - tmp1 = MULTIPLY(d7, FIX(1.175875602)); - tmp2 = MULTIPLY(d7, - FIX(0.785694958)); - tmp3 = MULTIPLY(d7, FIX(0.275899379)); - } - } - } - } else { - if (d5) { - if (d3) { - if (d1) { - /* d1 != 0, d3 != 0, d5 != 0, d7 == 0 */ - z2 = d5 + d3; - z4 = d5 + d1; - z5 = MULTIPLY(d3 + z4, FIX(1.175875602)); - - tmp1 = MULTIPLY(d5, FIX(2.053119869)); - tmp2 = MULTIPLY(d3, FIX(3.072711026)); - tmp3 = MULTIPLY(d1, FIX(1.501321110)); - z1 = MULTIPLY(d1, - FIX(0.899976223)); - z2 = MULTIPLY(z2, - FIX(2.562915447)); - z3 = MULTIPLY(d3, - FIX(1.961570560)); - z4 = MULTIPLY(z4, - FIX(0.390180644)); - - z3 += z5; - z4 += z5; - - tmp0 = z1 + z3; - tmp1 += z2 + z4; - tmp2 += z2 + z3; - tmp3 += z1 + z4; - } else { - /* d1 == 0, d3 != 0, d5 != 0, d7 == 0 */ - z2 = d5 + d3; - - z5 = MULTIPLY(z2, FIX(1.175875602)); - tmp1 = MULTIPLY(d5, FIX(1.662939225)); - z4 = MULTIPLY(d5, - FIX(0.390180644)); - z2 = MULTIPLY(z2, - FIX(1.387039845)); - tmp2 = MULTIPLY(d3, FIX(1.111140466)); - z3 = MULTIPLY(d3, - FIX(1.961570560)); - - tmp0 = z3 + z5; - tmp1 += z2; - tmp2 += z2; - tmp3 = z4 + z5; - } - } else { - if (d1) { - /* d1 != 0, d3 == 0, d5 != 0, d7 == 0 */ - z4 = d5 + d1; - - z5 = MULTIPLY(z4, FIX(1.175875602)); - z1 = MULTIPLY(d1, - FIX(0.899976223)); - tmp3 = MULTIPLY(d1, FIX(0.601344887)); - tmp1 = MULTIPLY(d5, - FIX(0.509795578)); - z2 = MULTIPLY(d5, - FIX(2.562915447)); - z4 = MULTIPLY(z4, FIX(0.785694958)); - - tmp0 = z1 + z5; - tmp1 += z4; - tmp2 = z2 + z5; - tmp3 += z4; - } else { - /* d1 == 0, d3 == 0, d5 != 0, d7 == 0 */ - tmp0 = MULTIPLY(d5, FIX(1.175875602)); - tmp1 = MULTIPLY(d5, FIX(0.275899380)); - tmp2 = MULTIPLY(d5, - FIX(1.387039845)); - tmp3 = MULTIPLY(d5, FIX(0.785694958)); - } - } - } else { - if (d3) { - if (d1) { - /* d1 != 0, d3 != 0, d5 == 0, d7 == 0 */ - z5 = d1 + d3; - tmp3 = MULTIPLY(d1, FIX(0.211164243)); - tmp2 = MULTIPLY(d3, - FIX(1.451774981)); - z1 = MULTIPLY(d1, FIX(1.061594337)); - z2 = MULTIPLY(d3, - FIX(2.172734803)); - z4 = MULTIPLY(z5, FIX(0.785694958)); - z5 = MULTIPLY(z5, FIX(1.175875602)); - - tmp0 = z1 - z4; - tmp1 = z2 + z4; - tmp2 += z5; - tmp3 += z5; - } else { - /* d1 == 0, d3 != 0, d5 == 0, d7 == 0 */ - tmp0 = MULTIPLY(d3, - FIX(0.785694958)); - tmp1 = MULTIPLY(d3, - FIX(1.387039845)); - tmp2 = MULTIPLY(d3, - FIX(0.275899379)); - tmp3 = MULTIPLY(d3, FIX(1.175875602)); - } - } else { - if (d1) { - /* d1 != 0, d3 == 0, d5 == 0, d7 == 0 */ - tmp0 = MULTIPLY(d1, FIX(0.275899379)); - tmp1 = MULTIPLY(d1, FIX(0.785694958)); - tmp2 = MULTIPLY(d1, FIX(1.175875602)); - tmp3 = MULTIPLY(d1, FIX(1.387039845)); - } else { - /* d1 == 0, d3 == 0, d5 == 0, d7 == 0 */ - tmp0 = tmp1 = tmp2 = tmp3 = 0; - } - } - } - } - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp3, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp10 - tmp3, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp11 + tmp2, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(tmp11 - tmp2, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(tmp12 + tmp1, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12 - tmp1, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp13 + tmp0, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp13 - tmp0, - CONST_BITS+PASS1_BITS+3); - - dataptr++; /* advance pointer to next column */ - } -} - -#else - - -void -j_rev_dct_sparse (DCTBLOCK data, int pos) -{ - j_rev_dct(data); -} - -void -j_rev_dct (DCTBLOCK data) -{ - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3, z4, z5; - register DCTELEM *dataptr; - int rowctr; - SHIFT_TEMPS - - /* Pass 1: process rows. */ - /* Note results are scaled up by sqrt(8) compared to a true IDCT; */ - /* furthermore, we scale the results by 2**PASS1_BITS. */ - - dataptr = data; - for (rowctr = DCTSIZE-1; rowctr >= 0; rowctr--) { - /* Due to quantization, we will usually find that many of the input - * coefficients are zero, especially the AC terms. We can exploit this - * by short-circuiting the IDCT calculation for any row in which all - * the AC terms are zero. In that case each output is equal to the - * DC coefficient (with scale factor as needed). - * With typical images and quantization tables, half or more of the - * row DCT calculations can be simplified this way. - */ - - if ((dataptr[1] | dataptr[2] | dataptr[3] | dataptr[4] | - dataptr[5] | dataptr[6] | dataptr[7]) == 0) { - /* AC terms all zero */ - DCTELEM dcval = (DCTELEM) (dataptr[0] << PASS1_BITS); - - dataptr[0] = dcval; - dataptr[1] = dcval; - dataptr[2] = dcval; - dataptr[3] = dcval; - dataptr[4] = dcval; - dataptr[5] = dcval; - dataptr[6] = dcval; - dataptr[7] = dcval; - - dataptr += DCTSIZE; /* advance pointer to next row */ - continue; - } - - /* Even part: reverse the even part of the forward DCT. */ - /* The rotator is sqrt(2)*c(-6). */ - - z2 = (INT32) dataptr[2]; - z3 = (INT32) dataptr[6]; - - z1 = MULTIPLY(z2 + z3, FIX(0.541196100)); - tmp2 = z1 + MULTIPLY(z3, - FIX(1.847759065)); - tmp3 = z1 + MULTIPLY(z2, FIX(0.765366865)); - - tmp0 = ((INT32) dataptr[0] + (INT32) dataptr[4]) << CONST_BITS; - tmp1 = ((INT32) dataptr[0] - (INT32) dataptr[4]) << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - tmp0 = (INT32) dataptr[7]; - tmp1 = (INT32) dataptr[5]; - tmp2 = (INT32) dataptr[3]; - tmp3 = (INT32) dataptr[1]; - - z1 = tmp0 + tmp3; - z2 = tmp1 + tmp2; - z3 = tmp0 + tmp2; - z4 = tmp1 + tmp3; - z5 = MULTIPLY(z3 + z4, FIX(1.175875602)); /* sqrt(2) * c3 */ - - tmp0 = MULTIPLY(tmp0, FIX(0.298631336)); /* sqrt(2) * (-c1+c3+c5-c7) */ - tmp1 = MULTIPLY(tmp1, FIX(2.053119869)); /* sqrt(2) * ( c1+c3-c5+c7) */ - tmp2 = MULTIPLY(tmp2, FIX(3.072711026)); /* sqrt(2) * ( c1+c3+c5-c7) */ - tmp3 = MULTIPLY(tmp3, FIX(1.501321110)); /* sqrt(2) * ( c1+c3-c5-c7) */ - z1 = MULTIPLY(z1, - FIX(0.899976223)); /* sqrt(2) * (c7-c3) */ - z2 = MULTIPLY(z2, - FIX(2.562915447)); /* sqrt(2) * (-c1-c3) */ - z3 = MULTIPLY(z3, - FIX(1.961570560)); /* sqrt(2) * (-c3-c5) */ - z4 = MULTIPLY(z4, - FIX(0.390180644)); /* sqrt(2) * (c5-c3) */ - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 += z2 + z4; - tmp2 += z2 + z3; - tmp3 += z1 + z4; - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - dataptr[0] = (DCTELEM) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS); - dataptr[7] = (DCTELEM) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS); - dataptr[1] = (DCTELEM) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS); - dataptr[2] = (DCTELEM) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS); - dataptr[4] = (DCTELEM) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. */ - /* Note that we must descale the results by a factor of 8 == 2**3, */ - /* and also undo the PASS1_BITS scaling. */ - - dataptr = data; - for (rowctr = DCTSIZE-1; rowctr >= 0; rowctr--) { - /* Columns of zeroes can be exploited in the same way as we did with rows. - * However, the row calculation has created many nonzero AC terms, so the - * simplification applies less often (typically 5% to 10% of the time). - * On machines with very fast multiplication, it's possible that the - * test takes more time than it's worth. In that case this section - * may be commented out. - */ - -#ifndef NO_ZERO_COLUMN_TEST - if ((dataptr[DCTSIZE*1] | dataptr[DCTSIZE*2] | dataptr[DCTSIZE*3] | - dataptr[DCTSIZE*4] | dataptr[DCTSIZE*5] | dataptr[DCTSIZE*6] | - dataptr[DCTSIZE*7]) == 0) { - /* AC terms all zero */ - DCTELEM dcval = (DCTELEM) DESCALE((INT32) dataptr[0], PASS1_BITS+3); - - dataptr[DCTSIZE*0] = dcval; - dataptr[DCTSIZE*1] = dcval; - dataptr[DCTSIZE*2] = dcval; - dataptr[DCTSIZE*3] = dcval; - dataptr[DCTSIZE*4] = dcval; - dataptr[DCTSIZE*5] = dcval; - dataptr[DCTSIZE*6] = dcval; - dataptr[DCTSIZE*7] = dcval; - - dataptr++; /* advance pointer to next column */ - continue; - } -#endif - - /* Even part: reverse the even part of the forward DCT. */ - /* The rotator is sqrt(2)*c(-6). */ - - z2 = (INT32) dataptr[DCTSIZE*2]; - z3 = (INT32) dataptr[DCTSIZE*6]; - - z1 = MULTIPLY(z2 + z3, FIX(0.541196100)); - tmp2 = z1 + MULTIPLY(z3, - FIX(1.847759065)); - tmp3 = z1 + MULTIPLY(z2, FIX(0.765366865)); - - tmp0 = ((INT32) dataptr[DCTSIZE*0] + (INT32) dataptr[DCTSIZE*4]) << CONST_BITS; - tmp1 = ((INT32) dataptr[DCTSIZE*0] - (INT32) dataptr[DCTSIZE*4]) << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - tmp0 = (INT32) dataptr[DCTSIZE*7]; - tmp1 = (INT32) dataptr[DCTSIZE*5]; - tmp2 = (INT32) dataptr[DCTSIZE*3]; - tmp3 = (INT32) dataptr[DCTSIZE*1]; - - z1 = tmp0 + tmp3; - z2 = tmp1 + tmp2; - z3 = tmp0 + tmp2; - z4 = tmp1 + tmp3; - z5 = MULTIPLY(z3 + z4, FIX(1.175875602)); /* sqrt(2) * c3 */ - - tmp0 = MULTIPLY(tmp0, FIX(0.298631336)); /* sqrt(2) * (-c1+c3+c5-c7) */ - tmp1 = MULTIPLY(tmp1, FIX(2.053119869)); /* sqrt(2) * ( c1+c3-c5+c7) */ - tmp2 = MULTIPLY(tmp2, FIX(3.072711026)); /* sqrt(2) * ( c1+c3+c5-c7) */ - tmp3 = MULTIPLY(tmp3, FIX(1.501321110)); /* sqrt(2) * ( c1+c3-c5-c7) */ - z1 = MULTIPLY(z1, - FIX(0.899976223)); /* sqrt(2) * (c7-c3) */ - z2 = MULTIPLY(z2, - FIX(2.562915447)); /* sqrt(2) * (-c1-c3) */ - z3 = MULTIPLY(z3, - FIX(1.961570560)); /* sqrt(2) * (-c3-c5) */ - z4 = MULTIPLY(z4, - FIX(0.390180644)); /* sqrt(2) * (c5-c3) */ - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 += z2 + z4; - tmp2 += z2 + z3; - tmp3 += z1 + z4; - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp3, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp10 - tmp3, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp11 + tmp2, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(tmp11 - tmp2, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(tmp12 + tmp1, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12 - tmp1, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp13 + tmp0, - CONST_BITS+PASS1_BITS+3); - dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp13 - tmp0, - CONST_BITS+PASS1_BITS+3); - - dataptr++; /* advance pointer to next column */ - } -} - - -#endif diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mb_ordered.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mb_ordered.cpp deleted file mode 100644 index 716648959b6..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mb_ordered.cpp +++ /dev/null @@ -1,517 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -/* This file contains C code to implement an ordered dither. */ - -#include -#include "video.h" -#include "proto.h" -#include "dither.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, mb_ordered, "$Id$") - -#define DITH_SIZE 16 - - -/* Structures used to implement macroblock ordered - dither algorithm. -*/ - -static unsigned char ***ditherPtr[DITH_SIZE]; - - -/* - *-------------------------------------------------------------- - * - * InitMBOrderedDither-- - * - * Structures intialized for ordered dithering. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -InitMBOrderedDither() -{ - unsigned char ****pos_2_cb; - unsigned char ***cb_2_cr; - unsigned char **cr_2_l; - int cb_val, cb_rval, cr_val, cr_rval, l_val, l_rval; - int i, j, pos; - int err_range, threshval; - - pos_2_cb = (unsigned char ****) ACE_OS::malloc (DITH_SIZE*sizeof(unsigned char ***)); - cb_2_cr = (unsigned char ***) ACE_OS::malloc(CB_RANGE*sizeof(unsigned char **)); - cr_2_l = (unsigned char **) ACE_OS::malloc(CR_RANGE*sizeof(unsigned char *)); - - for (pos=0; posthreshval) (pos_2_cb[pos])[cb_val] = cb_2_cr[cb_rval+1]; - else (pos_2_cb[pos])[cb_val] = cb_2_cr[cb_rval]; - } - } - - for (cb_val=cb_values[CB_RANGE-1]; cb_val<256; cb_val++) { - (pos_2_cb[pos])[cb_val] = cb_2_cr[CB_RANGE-1]; - } - - for (cb_rval=0; cb_rvalthreshval) (cb_2_cr[cb_rval])[cr_val] = cr_2_l[cr_rval+1]; - else (cb_2_cr[cb_rval])[cr_val] = cr_2_l[cr_rval]; - } - } - - for (cr_val=cr_values[CR_RANGE-1]; cr_val<256; cr_val++) { - (cb_2_cr[cb_rval])[cr_val] = cr_2_l[CR_RANGE-1]; - } - - for (cr_rval=0; cr_rvalthreshval) (cr_2_l[cr_rval])[l_val] = - pixel[cb_rval+(cr_rval*CB_RANGE)+((l_rval+1)*CR_RANGE*CB_RANGE)]; - else (cr_2_l[cr_rval])[l_val] = - pixel[cb_rval+(cr_rval*CB_RANGE)+(l_rval*CR_RANGE*CB_RANGE)]; - } - } - - for (l_val = lum_values[LUM_RANGE-1]; l_val < 256; l_val++) { - (cr_2_l[cr_rval])[l_val] = - pixel[cb_rval+(cr_rval*CB_RANGE)+((LUM_RANGE-1)*CR_RANGE*CB_RANGE)]; - } - } - } - } - - for (i=0; imb_width) << 4; - col = (mb_addr % vid_stream->mb_width) << 4; - row_size = vid_stream->mb_width << 4; -/* - dest = vid_stream->current->display + (row * row_size) + col; -*/ - if (motion_forw) { - right_forw = r_right_forw >> 1; - down_forw = r_down_forw >> 1; - src1 = past + ((row + down_forw) * row_size) + (col + right_forw); - } - - if (motion_back) { - right_back = r_right_back >> 1; - down_back = r_down_back >> 1; - src2 = future + ((row + down_back) * row_size) + (col + right_back); - } - - if (motion_forw) { - if (motion_back) { - for (rr = 0; rr<16; rr++) { - dest[0] = src1[0]; dest[1] = src2[1]; - dest[2] = src1[2]; dest[3] = src2[3]; - dest[4] = src1[4]; dest[5] = src2[5]; - dest[6] = src1[6]; dest[7] = src2[7]; - dest[8] = src1[8]; dest[9] = src2[9]; - dest[10] = src1[10]; dest[11] = src2[11]; - dest[12] = src1[12]; dest[13] = src2[13]; - dest[14] = src1[14]; dest[15] = src2[15]; - - dest += row_size; - src1 += row_size; - src2 += row_size; - } - } - else { - mc = col & 0x3; - mr = right_forw & 0x3; - if (!mc && !mr) { - /* Use 32 bit copy */ - int *d, *s; - - d = (int *) dest; - s = (int *) src1; - row_size /= 4; - - for (rr = 0; rr < 16; rr++) { - d[0] = s[0]; - d[1] = s[1]; - d[2] = s[2]; - d[3] = s[3]; - d += row_size; - s += row_size; - } - } else if ((!mc || (mc == 2)) && - (!mr || (mr == 2))) { - /* Use 16 bit copy */ - short int *d, * s; - - d = (short int *) dest; - s = (short int *) src1; - row_size /= 2; - - for (rr = 0; rr < 16; rr++) { - d[0] = s[0]; - d[1] = s[1]; - d[2] = s[2]; - d[3] = s[3]; - d[4] = s[4]; - d[5] = s[5]; - d[6] = s[6]; - d[7] = s[7]; - d += row_size; - s += row_size; - } - } - else { - for (rr = 0; rr < 16; rr++) { - dest[0] = src1[0]; - dest[1] = src1[1]; - dest[2] = src1[2]; - dest[3] = src1[3]; - dest[4] = src1[4]; - dest[5] = src1[5]; - dest[6] = src1[6]; - dest[7] = src1[7]; - dest[8] = src1[8]; - dest[9] = src1[9]; - dest[10] = src1[10]; - dest[11] = src1[11]; - dest[12] = src1[12]; - dest[13] = src1[13]; - dest[14] = src1[14]; - dest[15] = src1[15]; - - dest += row_size; - src1 += row_size; - } - } - } - } - else if (motion_back) { - mc = col & 0x3; - mr = right_back & 0x3; - if (!mc && !mr) { - /* Use 32 bit copy */ - int *d, *s; - - d = (int *) dest; - s = (int *) src2; - row_size /= 4; - - for (rr = 0; rr < 16; rr++) { - d[0] = s[0]; - d[1] = s[1]; - d[2] = s[2]; - d[3] = s[3]; - d += row_size; - s += row_size; - } - } - else if ((!mc || mc == 2) && - (!mr || mr == 2)) { - /* Use 8 bit copy */ - short int *d, *s; - - d = (short int *) dest; - s = (short int *) src2; - row_size /= 2; - - for (rr = 0; rr < 16; rr++) { - d[0] = s[0]; - d[1] = s[1]; - d[2] = s[2]; - d[3] = s[3]; - d[4] = s[4]; - d[5] = s[5]; - d[6] = s[6]; - d[7] = s[7]; - d += row_size; - s += row_size; - } - } - else { - for (rr = 0; rr < 16; rr++) { - /* Use 8 bit copy */ - dest[0] = src2[0]; - dest[1] = src2[1]; - dest[2] = src2[2]; - dest[3] = src2[3]; - dest[4] = src2[4]; - dest[5] = src2[5]; - dest[6] = src2[6]; - dest[7] = src2[7]; - dest[8] = src2[8]; - dest[9] = src2[9]; - dest[10] = src2[10]; - dest[11] = src2[11]; - dest[12] = src2[12]; - dest[13] = src2[13]; - dest[14] = src2[14]; - dest[15] = src2[15]; - - dest += row_size; - src2 += row_size; - } - } - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h deleted file mode 100644 index 085d1802ce0..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h +++ /dev/null @@ -1,155 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with this file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/* Structure of mib_Widget */ -/*****************************************************************************/ - -typedef struct _mib_Widget { - char *mib_class; /* name of mib class (Button, TextBox, etc..)*/ - int mib_class_num; /* class number for ez reference :) */ - int mib_mynum; /* numbering for storage format */ - Widget me; /* Xt widget */ - int mib_selected; /* is selected */ - int mib_resizing; /* is resizing 1, or being moved 0 */ - int mib_resizetype;/* 1 = upper left, 2 = upper, 3 = ... */ - int mib_allowresize; /* can this widget be resized ? */ - - int clkx, clky; /* where user clicked */ - - void *myres; /* my resources (different for each widget) */ - - char *name; /* reference name of this widget */ - int width, height; /* width and height */ - - int topAttachment, bottomAttachment, leftAttachment, rightAttachment; - /* attachments 1=attached 0=not-attached */ - - int topOffset, bottomOffset, leftOffset, rightOffset; - /* offsets if attached */ - - struct _mib_Widget *parent; /* pointer to parent */ - struct _mib_Widget *sibling; /* remaining linked list of sibling widgets */ - struct _mib_Widget *prev; /* previous sibling or parent */ - struct _mib_Widget *child; /* linked list of children widgets */ -} mib_Widget; - -/* mib_Buffer structure */ -/*****************************************************************************/ - -typedef struct _mib_Buffer { - void *buffer; /* pointer to either a file or a char string */ - int buf_type; /* type of buffer (defined above) */ - int point; /* pointer for string */ - int buflen; /* length of string buffer */ -} mib_Buffer; - -/* mib_Widget functions */ -/*****************************************************************************/ - -void mib_add_mib_Widget(mib_Widget *, mib_Widget *); -void mib_add_backward_Widget(mib_Widget *, mib_Widget *); -void mib_remove_mib_Widget(mib_Widget *); -void mib_clear_myres(mib_Widget *); -mib_Widget *mib_new_mib_Widget(); -mib_Widget *mib_find_name(mib_Widget *, char *); -mib_Widget *mib_load_interface(Widget, char *, int); -int mib_count_all(mib_Widget *, int); -int mib_load_Root(Widget, mib_Widget **, mib_Buffer *); -mib_Widget *mib_load_public(mib_Widget *, mib_Widget *, mib_Buffer *); -int mib_load_mib_class(mib_Widget **, mib_Widget *, char *, char *, - mib_Buffer *); -int mib_load_private(mib_Widget *, mib_Buffer *); -void mib_reset_size(mib_Widget *); -int mib_read_line(mib_Buffer *, char *, char *); -void mib_set_eventhandlers(void *, void *, void *); -void mib_apply_eventhandlers(Widget, mib_Widget *); - -/* supporting functions and structures */ -/*****************************************************************************/ - -typedef struct _menu_item { - char *label; - WidgetClass *class; - char mnemonic; - char *accelerator; - char *accel_text; - void (*callback)(); - XtPointer callback_data; - struct _menu_item *subitems; -} MenuItem; - -Widget BuildMenu(Widget, int, char *, char, MenuItem *); - -/* mib class numbers */ - -#define MIB_NULL 0 -#define MIB_TEXTBOX 1 -#define MIB_BUTTON 2 -#define MIB_TOGGLE 3 -#define MIB_RADIOBOX 4 -#define MIB_DRAWINGAREA 5 -#define MIB_LABEL 6 -#define MIB_FRAME 7 -#define MIB_SCROLLBAR 8 -#define MIB_TEXTBIG 9 -#define MIB_LIST 10 -#define MIB_SCALE 11 -#define MIB_MENU 12 - -/* number of classes */ -#define MI_NUMCLASSES 12 - -/* for specifying creation of a widget with - default private values, no values at all (empty), - or no values and editable */ - -#define WDEFAULT 1 -#define WEMPTY 2 -#define WEDIT 3 - -/* for specifing whether we are loading an - interface from a file or from a string and whether it - is editable :) */ - -#define MI_FROMFILE 1 -#define MI_EDITFROMFILE 2 -#define MI_FROMSTRING 3 -#define MI_EDITFROMSTRING 4 - -#define MI_MAXSTRLEN 200 /* maximum string length */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mono.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mono.cpp deleted file mode 100644 index 879de356059..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mono.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/* $Id$ */ - -/* - * Author: Yoichiro Ueno (ueno@cs.titech.ac.jp) - * - * Copyright (C) 1991, 1992, Yoichiro Ueno. - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose is hereby granted by the Author without - * fee, provided that the above copyright notice appear in all copies and - * that both the copyright notice and this permission notice appear in - * supporting documentation, and that the name of the Author not be used - * in advertising or publicity pertaining to distribution of the software - * without specific, written prior permission. The Author makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - -#include -#include -#include "video.h" -#include "proto.h" -#include "dither.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, mono, "$Id$") - -/* - *-------------------------------------------------------------- - * - * MonoDitherImage -- - * - * Dithers image into monochrome. - * Dither algorithm is based on dither.c in xli.1.11. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ -#define MaxGrey 65280 -#define Threshold (MaxGrey/2) -#define MinGrey 0 - -#if ultrix && mips -# define SEED_BIT 0x01 -# define OPP_SEED_BIT 0x80 -# define SHIFT_SEED_BIT(b) (b <<= 1) -# define OPP_SHIFT_SEED_BIT(b) (b >>= 1) -#else -# define SEED_BIT 0x80 -# define OPP_SEED_BIT 0x01 -# define SHIFT_SEED_BIT(b) (b >>= 1) -# define OPP_SHIFT_SEED_BIT(b) (b <<= 1) -#endif - -static int *curr = NULL; -static int *next = NULL; - -#if 0 -void -MonoDitherImage(register unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int h, int w) -{ - int bit_r2l; - register unsigned int bit; - register unsigned int data; - int i; - register int j; - int *swap; - register int out_err; - register int next1; - register int next2; - - if(curr == NULL) { - curr = (int *)ACE_OS::malloc(sizeof(int) * (w + 2)); - curr += 1; - } - if(next == NULL) { - next = (int *)ACE_OS::malloc(sizeof(int) * (w + 2)); - next += 1; - } - - bzero ((char *)curr, w * sizeof(*curr)); - - bit_r2l = SEED_BIT << (w - 1 & 7); - for(i = 0; i < h; i ++) { - if(i & 0x01) { /* Right to Left */ - bit = bit_r2l; - data = 0; - out_err = curr[w-1]; - next1 = 0; - next2 = 0; - for (j=(w-1); j>=0; j--) - { - out_err = (out_err >> 4) + (lum[j] << 8); - if(out_err > Threshold) { - data |= bit; - out_err -= MaxGrey; - } - else - out_err -= MinGrey; - - next[j+1] = next1 + (out_err * 3); - next1 = next2 + (out_err * 5); - next2 = (out_err * 1); - out_err = curr[j-1] + (out_err * 7); - - OPP_SHIFT_SEED_BIT(bit); -#if ultrix && mips - if(bit == 0) -#else - if(bit > 0x80) -#endif - { - out[j >> 3] = data; - bit = OPP_SEED_BIT; - data = 0; - } - } - next[0] = next1; - } - else { /* Left to Right */ - bit = SEED_BIT; - data = 0; - out_err = curr[0]; - next1 = 0; - next2 = 0; - for (j=0; j> 4) + (lum[j] << 8); - if(out_err > Threshold) { - data |= bit; - out_err = out_err - MaxGrey; - } - else - out_err = out_err - MinGrey; - - next[j-1] = next1 + (out_err * 3); - next1 = next2 + (out_err * 5); - next2 = (out_err * 1); - out_err = curr[j+1] + (out_err * 7); - - SHIFT_SEED_BIT(bit); -#if ultrix && mips - if(bit > 0x80) -#else - if(bit == 0) -#endif - { - out[j >> 3] = data; - bit = SEED_BIT; - data = 0; - } - } - next[w-1] = next1; - } - - lum += w; - out += w >> 3; - swap = curr; - curr = next; - next = swap; - } -} -#endif - -void -MonoDitherImage(register unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int h, int w) -{ - register unsigned int bit; - register unsigned int data; - register int j; - int i; - static unsigned char d[4][4] = {{0, 8, 2, 10}, - {12, 4, 14, 6}, - {3, 11, 1, 9}, - {15, 7, 13, 5}}; - - for(i = 0; i < h; i ++) { - bit = SEED_BIT; - data = 0; - for (j=0; j> 4) > d[i % 4][j % 4]) { - data |= bit; - } - SHIFT_SEED_BIT(bit); -#if ultrix && mips - if(bit > 0x80) -#else - if(bit == 0) -#endif - { - out[j >> 3] = data; - bit = SEED_BIT; - data = 0; - } - } - lum += w; - out += (w + 7) >> 3; - } -} - - -/* - *-------------------------------------------------------------- - * - * MonoThresholdImage -- - * - * convert image into monochrome with threshold. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ -void -MonoThresholdImage(unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int h, int w) -{ - unsigned char bit; - unsigned char data; - - bit = SEED_BIT; - data = 0; - for (w*=h; w>0; w--) { - if(*lum++>128) - data |= bit; - - SHIFT_SEED_BIT(bit); - if(bit == 0) { - *out ++ = data; - bit = SEED_BIT; - data = 0; - } - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/motionvector.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/motionvector.cpp deleted file mode 100644 index e7a2407cd68..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/motionvector.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -#include "video.h" -#include "proto.h" -#include "util.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, motionvector, "$Id$") - - -/* - *-------------------------------------------------------------- - * - * ComputeVector -- - * - * Computes motion vector given parameters previously parsed - * and reconstructed. - * - * Results: - * Reconstructed motion vector info is put into recon_* parameters - * passed to this function. Also updated previous motion vector - * information. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -#define ComputeVector(recon_right_ptr, recon_down_ptr, recon_right_prev, recon_down_prev, f, full_pel_vector, motion_h_code, motion_v_code, motion_h_r, motion_v_r) \ - \ -{ \ - int comp_h_r, comp_v_r; \ - int right_little, right_big, down_little, down_big; \ - int max, min, new_vector; \ - \ - /* The following procedure for the reconstruction of motion vectors \ - is a direct and simple implementation of the instructions given \ - in the mpeg December 1991 standard draft. \ - */ \ - \ - if (f == 1 || motion_h_code == 0) \ - comp_h_r = 0; \ - else \ - comp_h_r = f - 1 - motion_h_r; \ - \ - if (f == 1 || motion_v_code == 0) \ - comp_v_r = 0; \ - else \ - comp_v_r = f - 1 - motion_v_r; \ - \ - right_little = motion_h_code * f; \ - if (right_little == 0) \ - right_big = 0; \ - else { \ - if (right_little > 0) { \ - right_little = right_little - comp_h_r; \ - right_big = right_little - 32 * f; \ - } \ - else { \ - right_little = right_little + comp_h_r; \ - right_big = right_little + 32 * f; \ - } \ - } \ - \ - down_little = motion_v_code * f; \ - if (down_little == 0) \ - down_big = 0; \ - else { \ - if (down_little > 0) { \ - down_little = down_little - comp_v_r; \ - down_big = down_little - 32 * f; \ - } \ - else { \ - down_little = down_little + comp_v_r; \ - down_big = down_little + 32 * f; \ - } \ - } \ - \ - max = 16 * f - 1; \ - min = -16 * f; \ - \ - new_vector = recon_right_prev + right_little; \ - \ - if (new_vector <= max && new_vector >= min) \ - *recon_right_ptr = recon_right_prev + right_little; \ - /* just new_vector */ \ - else \ - *recon_right_ptr = recon_right_prev + right_big; \ - recon_right_prev = *recon_right_ptr; \ - if (full_pel_vector) \ - *recon_right_ptr = *recon_right_ptr << 1; \ - \ - new_vector = recon_down_prev + down_little; \ - if (new_vector <= max && new_vector >= min) \ - *recon_down_ptr = recon_down_prev + down_little; \ - /* just new_vector */ \ - else \ - *recon_down_ptr = recon_down_prev + down_big; \ - recon_down_prev = *recon_down_ptr; \ - if (full_pel_vector) \ - *recon_down_ptr = *recon_down_ptr << 1; \ -} - -/* - *-------------------------------------------------------------- - * - * ComputeForwVector -- - * - * Computes forward motion vector by calling ComputeVector - * with appropriate parameters. - * - * Results: - * Reconstructed motion vector placed in recon_right_for_ptr and - * recon_down_for_ptr. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -ComputeForwVector(int *recon_right_for_ptr, int *recon_down_for_ptr) -{ - - Pict *picture; - Macroblock *mblock; - - picture = &(curVidStream->picture); - mblock = &(curVidStream->mblock); - - ComputeVector(recon_right_for_ptr, recon_down_for_ptr, - mblock->recon_right_for_prev, - mblock->recon_down_for_prev, - picture->forw_f, picture->full_pel_forw_vector, - mblock->motion_h_forw_code, mblock->motion_v_forw_code, - mblock->motion_h_forw_r, mblock->motion_v_forw_r); -} - - -/* - *-------------------------------------------------------------- - * - * ComputeBackVector -- - * - * Computes backward motion vector by calling ComputeVector - * with appropriate parameters. - * - * Results: - * Reconstructed motion vector placed in recon_right_back_ptr and - * recon_down_back_ptr. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -ComputeBackVector(int *recon_right_back_ptr, int *recon_down_back_ptr) -{ - Pict *picture; - Macroblock *mblock; - - picture = &(curVidStream->picture); - mblock = &(curVidStream->mblock); - - ComputeVector(recon_right_back_ptr, recon_down_back_ptr, - mblock->recon_right_back_prev, - mblock->recon_down_back_prev, - picture->back_f, picture->full_pel_back_vector, - mblock->motion_h_back_code, mblock->motion_v_back_code, - mblock->motion_h_back_r, mblock->motion_v_back_r); - -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h deleted file mode 100644 index 9df0e313bbb..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h +++ /dev/null @@ -1,110 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -/* ui.c */ -void UIprocess(int cmdSocket); - -#include "mpeg_shared/routine.h" - -/* ctr.c */ -int CTRmain(int argc,char **argv); - -/* ab.c */ -void ABinitBuf(int size); -void ABflushBuf(int nextSample); -int ABcheckSamples(void); /* returns # of samples in ABbuf */ -int ABgetSamples(char * buf, int samples); - /* read at most given number of samples from AB to buf, returns - number of sample actually read */ -int ABskipSamples(int samples); -/* if samples < 0; then stuff |samples| silient samples to ABgetSamples(), - otherwise wipe out this number of samples from AB */ -void ABdeleteBuf(void); -void ABdeleteSem(void); - -void ABprocess(int dataSocket); - -/* vb.c */ -void VBinitBuf(int size); -char * VBgetBuf(int size); /* block version */ -int VBcheckBuf(int size); /* non-block check, return True/False*/ -void VBputMsg(char * msgPtr); -char * VBgetMsg(); /* block version */ -int VBcheckMsg(); /* non-block check, return Number of Msgs in buffer */ -int VBbufEmpty(void); -void VBreclaimMsg(char * msgPtr); -void VBdeleteBuf(void); -void VBdeleteSem(void); - -void VBprocess(int initSocket, int dataSocket); - -/* vd.c */ -void VDprocess(int CTRpid); -void VDinitBuf(int size); -void VDresizeBuf(int height, int width); -FrameBlock * VDgetBuf(void); /* block version, return with interrupt */ -int VDcheckBuf(void); /* non-block check, return True/False */ -void VDputMsg(FrameBlock * msgPtr); -FrameBlock * VDgetMsg(void); /* block version, return with interrupt */ -FrameBlock * VDpeekMsg(void); /* returns a msg for checking only, no modification allowed */ -int VDcheckMsg(void); /* non-block check, return Number of Msg in buffer */ -int VDbufEmpty(void); -void VDreferMsg(FrameBlock * msgPtr); -void VDreclaimMsg(FrameBlock * msgPtr); -void VDdeleteBuf(void); -void VDdeleteSem(void); - -/* vp.c */ - -void VPinitWindow(Widget shell, Window monitorWindow, int cmdSocket); -void VPresizeWindow(int height, int width); - -/* -- in gdith.c -- */ -void VPcommand(int cmd, char * position); -void VPexpose(void); - -/* audio.c */ -int InitAudioDevice(void); -void SetAudioParameter(AudioParameter * para); -unsigned int GetAudioTime(void); -unsigned int PlayAudioSamples(unsigned int time, char * buf, int size); -void StartAudioPlaySession(void); -void SetAudioGain(void); -void AudioInterpolate(char *rawBuf, int len, char * convBuf, int convLen); - -/* prog.c */ - -void StartProgram(char * title, char * vh, char * vf, char * ah, char * af); -Widget CreateProgramWindow(Widget parent, int cmdSoket, int * playflag, Widget frametext); - -/* file.c */ - -void StartLocalServer(void); -Widget CreateFileWindow(Widget parent, int cmdSoket, int * playflag, Widget frametext); - - -/* para.c */ - -Widget CreateParameterWindow(Widget parent); diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered.cpp deleted file mode 100644 index e62806771b2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ordered.cpp +++ /dev/null @@ -1,290 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -/* This file contains C code to implement an ordered dither. */ - -#include -#include "video.h" -#include "proto.h" -#include "dither.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, ordered, "$Id$") - -#define DITH_SIZE 16 - - -/* Structures used to implement hybrid ordered dither/floyd-steinberg - dither algorithm. -*/ - -static unsigned char *l_darrays[DITH_SIZE]; -static unsigned char *cr_darrays[DITH_SIZE]; -static unsigned char *cb_darrays[DITH_SIZE]; - -/* - *-------------------------------------------------------------- - * - * InitOrderedDither-- - * - * Structures intialized for ordered dithering. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -InitOrderedDither() -{ - int i, j, k, err_range, threshval; - unsigned char *lmark, *cmark; - - for (i=0; i threshval) *lmark++ = ((j+1) * (CR_RANGE * CB_RANGE)); - else *lmark++ = (j * (CR_RANGE * CB_RANGE)); - } - } - - for (j=lum_values[LUM_RANGE-1]; j<256; j++) { - *lmark++ = (LUM_RANGE-1)*(CR_RANGE * CB_RANGE); - } - } - - for (i=0; i threshval) *cmark++ = ((j+1) * CB_RANGE); - else *cmark++ = (j * CB_RANGE); - } - } - - for (j=cr_values[CR_RANGE-1]; j<256; j++) { - *cmark++ = (CR_RANGE-1)*(CB_RANGE); - } - } - - for (i=0; i threshval) *cmark++ = j+1; - else *cmark++ = j; - } - } - - for (j=cb_values[CB_RANGE-1]; j<256; j++) { - *cmark++ = CB_RANGE-1; - } - } -} - -/* - *-------------------------------------------------------------- - * - * OrderedDitherImage -- - * - * Dithers an image using an ordered dither. - * Assumptions made: - * 1) The color space is allocated y:cr:cb = 8:4:4 - * 2) The spatial resolution of y:cr:cb is 4:1:1 - * The channels are dithered based on the standard - * ordered dither pattern for a 4x4 area. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ -void -OrderedDitherImage (unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int h, int w) -{ - unsigned char *l, *r, *b, *o1, *o2; - unsigned char *l2; - unsigned char L, R, B; - int i, j; - - l = lum; - l2 = lum+w; - r = cr; - b = cb; - o1 = out; - o2 = out+w; - - for (i=0; i -#include "video.h" -#include "proto.h" -#include "dither.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, ordered2, "$Id$") - -#define DITH_SIZE 16 - - -/* Structures used to implement hybrid ordered dither/floyd-steinberg - dither algorithm. -*/ - -static unsigned char ***ditherPtr[DITH_SIZE]; - - -/* - *-------------------------------------------------------------- - * - * InitOrderedDither-- - * - * Structures intialized for ordered dithering. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -InitOrdered2Dither() -{ - unsigned char ****pos_2_cb; - unsigned char ***cb_2_cr; - unsigned char **cr_2_l; - int cb_val, cb_rval, cr_val, cr_rval, l_val, l_rval; - int i, j, pos; - int err_range, threshval; - - pos_2_cb = (unsigned char ****) ACE_OS::malloc (DITH_SIZE*sizeof(unsigned char ***)); - cb_2_cr = (unsigned char ***) ACE_OS::malloc(CB_RANGE*sizeof(unsigned char **)); - cr_2_l = (unsigned char **) ACE_OS::malloc(CR_RANGE*sizeof(unsigned char *)); - - for (pos=0; posthreshval) (pos_2_cb[pos])[cb_val] = cb_2_cr[cb_rval+1]; - else (pos_2_cb[pos])[cb_val] = cb_2_cr[cb_rval]; - } - } - - for (cb_val=cb_values[CB_RANGE-1]; cb_val<256; cb_val++) { - (pos_2_cb[pos])[cb_val] = cb_2_cr[CB_RANGE-1]; - } - - for (cb_rval=0; cb_rvalthreshval) (cb_2_cr[cb_rval])[cr_val] = cr_2_l[cr_rval+1]; - else (cb_2_cr[cb_rval])[cr_val] = cr_2_l[cr_rval]; - } - } - - for (cr_val=cr_values[CR_RANGE-1]; cr_val<256; cr_val++) { - (cb_2_cr[cb_rval])[cr_val] = cr_2_l[CR_RANGE-1]; - } - - for (cr_rval=0; cr_rvalthreshval) (cr_2_l[cr_rval])[l_val] = - pixel[cb_rval+(cr_rval*CB_RANGE)+((l_rval+1)*CR_RANGE*CB_RANGE)]; - else (cr_2_l[cr_rval])[l_val] = - pixel[cb_rval+(cr_rval*CB_RANGE)+(l_rval*CR_RANGE*CB_RANGE)]; - } - } - - for (l_val = lum_values[LUM_RANGE-1]; l_val < 256; l_val++) { - (cr_2_l[cr_rval])[l_val] = - pixel[cb_rval+(cr_rval*CB_RANGE)+((LUM_RANGE-1)*CR_RANGE*CB_RANGE)]; - } - } - } - } - - for (i=0; i -#include -#include -#include "video.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "include/common.h" -#include "newproto.h" -#include "global.h" - -ACE_RCSID(mpeg_client, para, "$Id$") - -#define NUM_LIST_ITEMS 25 -#define PARAMETER_FILE "~/.vcr/vcrParameters" -#define BANNER "Virtual VCR Parameter File, version 2.0 ** Do not Edit **" -#ifdef XmFONTLIST_DEFAULT_TAG -#define XmStringTag XmFONTLIST_DEFAULT_TAG -#else -#define XmStringTag XmSTRING_DEFAULT_CHARSET -#endif -#define STRING_SIZE 64 -#define ITEMS sizeof(shared->config)/4 - -static Widget parashell, wparalist, wparafield; - -static int * config; -static float *fconfig; - -static struct -{ - char * title; - int float_tag; /* 0 - integer, 1 - floating point */ -} -para[] = -{ - {"Real time (audio on)(tag)", 0}, - {"Video max frames-per-second", 0}, - {"Audio max sampels-per-second", 0}, - {"FF frames-per-second", 0}, - {"Rewind frames-per-second", 0}, - {"Feedback delay (msec)", 0}, - {"Audio output mask", 0}, - {"Audio_para.encodeType", 0}, - {"Audio_para.channels", 0}, - {"Audio_para.samplesPerSecond", 0}, - {"Audio_para.bytesPerSamples", 0}, - {"Audio timer interval (millisec)", 0}, - {"Audio buffered intervals", 0}, - {"Frames per audio play", 0}, - {"Audio forward (samples)", 0}, - {"VS work-ahead (milliseconds)", 0}, - {"frame rate limit (fps, float)", 1}, - {"collect statistics(tag)", 0}, - {"collect video structure info(tag)", 0}, - {"Sync effective(tag)", 0}, - {"QoS effective(tag)", 0}, - {"Audio offset(samples)", 0}, - {"Filter parameter(1/R or nsamples)", 0}, - {"Max send pattern frames", 0}, - {"Reliable byte-stream audio (tag)", 0}, - {"Reliable byte-stream video (tag)", 0}, - {"Verbose message(tag)", 0}, - {"", 0} /* this empty string is needed for testing the size of para */ -}; - -#define Fgets(s) {if (feof(fp) || fgets(s, STRING_SIZE, fp) == NULL) break; s[strlen(s)-1] = 0; } - -#define Fputs(s) {fputs(s, fp); fputc('\n', fp);} - -static void InitBuf(void) -{ - FILE * fp; - char buf[256]; - int i; - - config = (int *)&(shared->config); - fconfig = (float *)&(shared->config); - - get_full_path(PARAMETER_FILE, buf, 256); - fp = fopen(buf, "r"); - if (fp == NULL) - { - fprintf(stderr, "Warning: %s not found, use default parameter value\n", - PARAMETER_FILE); - InitBuf_exit1: - return; - } - if (fgets(buf, 100, fp) == NULL) - { - fclose(fp); - goto InitBuf_exit1; - } - buf[strlen(buf)-1] = 0; - if (ACE_OS::strcmp (buf, BANNER)) - { - fprintf(stderr, "BANNER in %s not expected, use default parameter value\n", - PARAMETER_FILE); - fclose(fp); - goto InitBuf_exit1; - } - for(i = 0; i < ITEMS; i++) - { - Fgets(buf); - if (para[i].float_tag) - sscanf(buf, "%f", &fconfig[i]); - else - sscanf(buf, "%d", &config[i]); - } - fclose(fp); -} - -static void SaveBuf(void) -{ - int i; - FILE * fp; - char buf[256]; - get_full_path(PARAMETER_FILE, buf, 256); - fp = fopen(buf, "w"); - if (fp == NULL) - { - fprintf(stderr, "Fail to open %s for saving para", buf); - ACE_OS::perror (""); - return; - } - Fputs(BANNER); - for (i = 0; i < ITEMS; i++) - if (para[i].float_tag) - fprintf(fp, "%f\n", fconfig[i]); - else - fprintf(fp, "%d\n", config[i]); - fclose(fp); -} - - -static int curListPos(void) -{ - int * poses, count; - - if (XmListGetSelectedPos(wparalist, &poses, &count)) - { - count = poses[0]; - XtFree((char*)poses); - /* - fprintf(stderr, "curListPos: current pos = %d\n", count); - */ - return count - 1; - } - return -1; -} - -static void modifyCB(Widget w, XtPointer closure, XtPointer call_data) -{ - int i, value; - XmString item; - char buf[100], * valptr; - i = curListPos(); - if (i == -1) { beep(); return;} - valptr = XmTextGetString(wparafield); - if (para[i].float_tag) - sscanf(valptr, "%f", &fconfig[i]); - else - sscanf(valptr, "%d", &config[i]); - XtFree(valptr); - if (para[i].float_tag) - sprintf(buf, "%s: %f", para[i].title, fconfig[i]); - else - sprintf(buf, "%s: %d", para[i].title, config[i]); - item = (XmString)XmStringCreateLtoR(buf, XmStringTag); - XmListReplaceItemsPos(wparalist, &item, 1, i+1); - XmListSelectPos(wparalist, i+1, 0); - XmStringFree(item); - SaveBuf(); - /* - XtManageChild(parashell); - */ - return; -} - -static void dismissCB(Widget W, XtPointer closure, XtPointer call_data) -{ - - XtUnrealizeWidget(parashell); - /* - XtUnmanageChild(parashell); - */ -} - -Widget CreateParameterWindow(Widget parent) -{ - Arg args[20]; - int n; - Widget wform, frame1, frame2, wlabel, - wmodify, wdismiss; - XmFontList fontlist; - XFontStruct * font; - XmStringCharSet cset = XmSTRING_DEFAULT_CHARSET; - - InitBuf(); - - n = 0; - XtSetArg(args[n], XmNtitle, "Virtual VCR Parameter List"); n++; - XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING);n++; - XtSetArg(args[n], XmNkeyboardFocusPolicy, XmPOINTER); n++; - XtSetArg(args[n], XmNwidth, 350); n++; - XtSetArg(args[n], XmNheight, 400); n++; - XtSetArg(args[n], XmNminWidth, 250); n++; - XtSetArg(args[n], XmNminHeight, 150); n++; - - parashell = XtAppCreateShell("Parameter List", "virtual_vcr", - topLevelShellWidgetClass, display, args, n); - /* - parashell = XmCreateDialogShell(parent, "virtual_vcr", args, n); - */ - - font = XLoadQueryFont (XtDisplay (parashell), "courB14"); - fontlist = XmStringCreateFontList (font, cset); - - n = 0; - XtSetArg(args[n], XmNtitle, "Virtual Parameter List"); n++; - wform = XmCreateForm(parashell, "Parameters", args, n); - XtManageChild(wform); - /* - parashell = wform = XmCreateForm(parashell, "Parameters", args, n); - */ - - n = 0; - wmodify = XmCreatePushButton (wform, "Update", args, n); - XtManageChild(wmodify); - XtAddCallback (wmodify, XmNactivateCallback, (XtCallbackProc)modifyCB, NULL); - wdismiss = XmCreatePushButton (wform, "Dismiss", args, n); - XtManageChild(wdismiss); - XtAddCallback (wdismiss, XmNactivateCallback, (XtCallbackProc)dismissCB, NULL); - - n=0; - XtSetArg (args[n], XmNwidth, 60); n++; - XtSetArg (args[n], XmNheight, 28); n++; - XtSetArg (args[n], XmNleftOffset, 20); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetValues (wmodify, args, n); - - n = 0; - XtSetArg(args[n], XmNcolumns, 10); n++; - XtSetArg (args[n], XmNleftOffset, 90); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - wparafield = XmCreateTextField(wform, "updata_text", args, n); - XtManageChild(wparafield); - - n=0; - XtSetArg (args[n], XmNwidth, 60); n++; - XtSetArg (args[n], XmNheight, 28); n++; - XtSetArg (args[n], XmNrightOffset, 20); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetValues (wdismiss, args, n); - - n = 0; - XtSetArg (args[n], XmNtopOffset, 5); n++; - XtSetArg (args[n], XmNleftOffset, 5); n++; - XtSetArg (args[n], XmNbottomOffset, 45); n++; - XtSetArg (args[n], XmNrightOffset, 5); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - XtSetArg(args[n], XmNfontList, fontlist); n++; - XtSetArg(args[n], XmNvisibleItemCount, NUM_LIST_ITEMS); n++; - - { - int items; - XmString * item; - int i; - /* - fprintf(stderr, "Total parameter items: %d\n", items); - */ - for (items = 0; para[items].title[0] != 0; items ++); - if (items > ITEMS) - items = ITEMS; - else if (items < ITEMS) - { - fprintf(stderr, "Error in para.c: fewer titles than parameters, %d out of %d.\n", - items, ITEMS); - ACE_OS::exit (1); - } - item = (XmString *)ACE_OS::malloc(sizeof(*item) * items); - if (item == NULL) - { - ACE_OS::perror ("UI allocate parameter list item(XmString)"); - ACE_OS::exit (1); - } - for (i = 0; i < items; i ++) - { - char buf[100]; - if (para[i].float_tag) - sprintf(buf, "%s: %f", para[i].title, fconfig[i]); - else - sprintf(buf, "%s: %d", para[i].title, config[i]); - item[i] = (XmString)XmStringCreateLtoR(buf, XmStringTag); - } - XtSetArg(args[n], XmNitems, item); n++; - XtSetArg(args[n], XmNitemCount, items); n++; - XtSetArg(args[n], XmNselectedItems, item); n++; - XtSetArg(args[n], XmNselectedItemCount, 1); n++; - wparalist = XmCreateScrolledList(wform, "ParameterList", args, n); - XtManageChild(wparalist); - for (i = 0; i < items; i++) - XmStringFree(item[i]); - ACE_OS::free (item); - } - XmFontListFree(fontlist); - - n=0; - XtSetArg (args[n], XmNtopOffset, 5); n++; - XtSetArg (args[n], XmNleftOffset, 5); n++; - XtSetArg (args[n], XmNbottomOffset, 45); n++; - XtSetArg (args[n], XmNrightOffset, 5); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - frame2 = XmCreateFrame (wform, "frame", args, n); - XtManageChild(frame2); - - n=0; - XtSetArg (args[n], XmNtopOffset, 0); n++; - XtSetArg (args[n], XmNleftOffset, 0); n++; - XtSetArg (args[n], XmNbottomOffset, 0); n++; - XtSetArg (args[n], XmNrightOffset, 0); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - frame1 = XmCreateFrame (wform, "frame", args, n); - XtManageChild(frame1); - - return parashell; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/parseblock.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/parseblock.cpp deleted file mode 100644 index 7c22415443c..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/parseblock.cpp +++ /dev/null @@ -1,461 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -#define NO_SANITY_CHECKS - -#include -#include "video.h" -#include "proto.h" -#include "decoders.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, parseblock, "$Id$") - -/* External declarations. */ - -extern int zigzag_direct[]; - -/* Macro for returning 1 if num is positive, -1 if negative, 0 if 0. */ - -#define Sign(num) ((num > 0) ? 1 : ((num == 0) ? 0 : -1)) - - -/* - *-------------------------------------------------------------- - * - * ParseReconBlock -- - * - * Parse values for block structure from bitstream. - * n is an indication of the position of the block within - * the macroblock (i.e. 0-5) and indicates the type of - * block (i.e. luminance or chrominance). Reconstructs - * coefficients from values parsed and puts in - * block.dct_recon array in vid stream structure. - * sparseFlag is set when the block contains only one - * coeffictient and is used by the IDCT. - * - * Results: - * - * - * Side effects: - * Bit stream irreversibly parsed. - * - *-------------------------------------------------------------- - */ - -#define DCT_recon blockPtr->dct_recon -#define DCT_dc_y_past blockPtr->dct_dc_y_past -#define DCT_dc_cr_past blockPtr->dct_dc_cr_past -#define DCT_dc_cb_past blockPtr->dct_dc_cb_past - -#define DECODE_DCT_COEFF_FIRST DecodeDCTCoeffFirst -#define DECODE_DCT_COEFF_NEXT DecodeDCTCoeffNext - -void -ParseReconBlock(int n) -{ -#ifdef RISC - unsigned int temp_curBits; - int temp_bitOffset; - int temp_bufLength; - unsigned int *temp_bitBuffer; -#endif - - Block *blockPtr = &curVidStream->block; - int coeffCount; - - if (bufLength < 2) - correct_underflow(); - -#ifdef RISC - temp_curBits = curBits; - temp_bitOffset = bitOffset; - temp_bufLength = bufLength; - temp_bitBuffer = bitBuffer; -#endif - - { - /* - * Copy the globals curBits, bitOffset, bufLength, and bitBuffer - * into local variables with the same names, so the macros use the - * local variables instead. This allows register allocation and - * can provide 1-2 fps speedup. On machines with not so many registers, - * don't do this. - */ -#ifdef RISC - register unsigned int curBits = temp_curBits; - register int bitOffset = temp_bitOffset; - register int bufLength = temp_bufLength; - register unsigned int *bitBuffer = temp_bitBuffer; -#endif - - int diff; - int size, level, i, run, pos, coeff; - short int *reconptr; - unsigned char *iqmatrixptr, *niqmatrixptr; - int qscale; - - reconptr = DCT_recon[0]; - - /* - * Hand coded version of memset that's a little faster... - * Old call: - * memset((char *) DCT_recon, 0, 64*sizeof(short int)); - */ - { - INT32 *p; - p = (INT32 *) reconptr; - - p[0] = p[1] = p[2] = p[3] = p[4] = p[5] = p[6] = p[7] = p[8] = p[9] = - p[10] = p[11] = p[12] = p[13] = p[14] = p[15] = p[16] = p[17] = p[18] = - p[19] = p[20] = p[21] = p[22] = p[23] = p[24] = p[25] = p[26] = p[27] = - p[28] = p[29] = p[30] = p[31] = 0; - - } - - if (curVidStream->mblock.mb_intra) { - - if (n < 4) { - - /* - * Get the luminance bits. This code has been hand optimized to - * get by the normal bit parsing routines. We get some speedup - * by grabbing the next 16 bits and parsing things locally. - * Thus, calls are translated as: - * - * show_bitsX <--> next16bits >> (16-X) - * get_bitsX <--> val = next16bits >> (16-flushed-X); - * flushed += X; - * next16bits &= bitMask[flushed]; - * flush_bitsX <--> flushed += X; - * next16bits &= bitMask[flushed]; - * - * I've streamlined the code a lot, so that we don't have to mask - * out the low order bits and a few of the extra adds are removed. - * bsmith - */ - unsigned int next16bits, index, flushed; - - show_bits16(next16bits); - index = next16bits >> (16-7); - size = dct_dc_size_luminance[index].value; - flushed = dct_dc_size_luminance[index].num_bits; - next16bits &= bitMask[16+flushed]; - - if (size != 0) { - flushed += size; - diff = next16bits >> (16-flushed); - if (!(diff & bitTest[32-size])) { - diff = rBitMask[size] | (diff + 1); - } - } else { - diff = 0; - } - flush_bits(flushed); - - if (n == 0) { - coeff = diff << 3; - if (curVidStream->mblock.mb_address - - curVidStream->mblock.past_intra_addr > 1) - coeff += 1024; - else coeff += DCT_dc_y_past; - DCT_dc_y_past = coeff; - } else { - coeff = DCT_dc_y_past + (diff << 3); - DCT_dc_y_past = coeff; - } - } else { - - /* - * Get the chrominance bits. This code has been hand optimized to - * as described above - */ - unsigned int next16bits, index, flushed; - - show_bits16(next16bits); - index = next16bits >> (16-8); - size = dct_dc_size_chrominance[index].value; - flushed = dct_dc_size_chrominance[index].num_bits; - next16bits &= bitMask[16+flushed]; - - if (size != 0) { - flushed += size; - diff = next16bits >> (16-flushed); - if (!(diff & bitTest[32-size])) { - diff = rBitMask[size] | (diff + 1); - } - } else { - diff = 0; - } - flush_bits(flushed); - - if (n == 4) { - coeff = diff << 3; - if (curVidStream->mblock.mb_address - - curVidStream->mblock.past_intra_addr > 1) - coeff += 1024; - else coeff += DCT_dc_cr_past; - DCT_dc_cr_past = coeff; - - } else { - coeff = diff << 3; - if (curVidStream->mblock.mb_address - - curVidStream->mblock.past_intra_addr > 1) - coeff += 1024; - else coeff += DCT_dc_cb_past; - DCT_dc_cb_past = coeff; - } - } - - *reconptr = coeff; - i = 0; pos = 0; - coeffCount = (coeff != 0); - - if (curVidStream->picture.code_type != 4) { - - qscale = curVidStream->slice.quant_scale; - iqmatrixptr = curVidStream->intra_quant_matrix[0]; - - while(1) { - - DECODE_DCT_COEFF_NEXT(run, level); - - if (run == END_OF_BLOCK) break; - if (i >= 64) - { - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) subscript out of range \n")); - break; - } - i = i + run + 1; - pos = zigzag_direct[i]; - coeff = (level * qscale * ((int) iqmatrixptr[pos])) >> 3; - if (level < 0) { - coeff += (coeff & 1); - } else { - coeff -= (coeff & 1); - } - - reconptr[pos] = coeff; - if (coeff) { - coeffCount++; - } - - } - -#ifdef ANALYSIS - - { - extern unsigned int *mbCoeffPtr; - mbCoeffPtr[pos]++; - } -#endif - - flush_bits(2); - - goto end; - } - } - - else { - - niqmatrixptr = curVidStream->non_intra_quant_matrix[0]; - qscale = curVidStream->slice.quant_scale; - - DECODE_DCT_COEFF_FIRST(run, level); - i = run; - - pos = zigzag_direct[i]; - if (level < 0) { - coeff = (((level<<1) - 1) * qscale * - ((int) (niqmatrixptr[pos]))) >> 4; - coeff += (coeff & 1); - } else { - coeff = (((level<<1) + 1) * qscale * - ((int) (*(niqmatrixptr+pos)))) >> 4; - coeff -= (coeff & 1); - } - reconptr[pos] = coeff; - if (coeff) { - coeffCount = 1; - } - - if (curVidStream->picture.code_type != 4) { - - while(1) { - - DECODE_DCT_COEFF_NEXT(run, level); - - if (run == END_OF_BLOCK) break; - - i = i+run+1; - if (i >= 64) - { - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) subscript out of range \n")); - break; - } - pos = zigzag_direct[i]; - if (level < 0) { - coeff = (((level<<1) - 1) * qscale * - ((int) (niqmatrixptr[pos]))) >> 4; - coeff += (coeff & 1); - } else { - coeff = (((level<<1) + 1) * qscale * - ((int) (*(niqmatrixptr+pos)))) >> 4; - coeff -= (coeff & 1); - } - reconptr[pos] = coeff; - if (coeff) { - coeffCount++; - } - } - -#ifdef ANALYSIS - { - extern unsigned int *mbCoeffPtr; - mbCoeffPtr[pos]++; - } -#endif - - flush_bits(2); - - goto end; - } - } - - end: - - if (coeffCount == 1) j_rev_dct_sparse (reconptr, pos); - else j_rev_dct(reconptr); - -#ifdef RISC - temp_curBits = curBits; - temp_bitOffset = bitOffset; - temp_bufLength = bufLength; - temp_bitBuffer = bitBuffer; -#endif - - } - -#ifdef RISC - curBits = temp_curBits; - bitOffset = temp_bitOffset; - bufLength = temp_bufLength; - bitBuffer = temp_bitBuffer; -#endif -} - -#undef DCT_recon -#undef DCT_dc_y_past -#undef DCT_dc_cr_past -#undef DCT_dc_cb_past - - -/* - *-------------------------------------------------------------- - * - * ParseAwayBlock -- - * - * Parses off block values, throwing them away. - * Used with grayscale dithering. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -ParseAwayBlock(int n) -{ - unsigned int diff; - unsigned int size, run; - int level; - - if (bufLength < 2) - correct_underflow(); - - if (curVidStream->mblock.mb_intra) { - - /* If the block is a luminance block... */ - - if (n < 4) { - - /* Parse and decode size of first coefficient. */ - - DecodeDCTDCSizeLum(size); - - /* Parse first coefficient. */ - - if (size != 0) { - get_bitsn(size, diff); - } - } - - /* Otherwise, block is chrominance block... */ - - else { - - /* Parse and decode size of first coefficient. */ - - DecodeDCTDCSizeChrom(size); - - /* Parse first coefficient. */ - - if (size != 0) { - get_bitsn(size, diff); - } - } - } - - /* Otherwise, block is not intracoded... */ - - else { - - /* Decode and set first coefficient. */ - - DECODE_DCT_COEFF_FIRST(run, level); - } - - /* If picture is not D type (i.e. I, P, or B)... */ - - if (curVidStream->picture.code_type != 4) { - - /* While end of macroblock has not been reached... */ - - while (1) { - - /* Get the dct_coeff_next */ - - DECODE_DCT_COEFF_NEXT(run, level); - - if (run == END_OF_BLOCK) break; - } - - /* End_of_block */ - - flush_bits(2); - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/prog.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/prog.cpp deleted file mode 100644 index 1469e13ac6f..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/prog.cpp +++ /dev/null @@ -1,933 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#include -#include -#include -#include -#include -#include -#include "video.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "include/common.h" -#include "newproto.h" -#include "global.h" - -ACE_RCSID(mpeg_client, prog, "$Id$") - -#define NUM_LIST_ITEMS 20 -#define STRING_SIZE 100 -#define ITEMS 100 -#define PROGRAM_FILE "~/.vcr/vcrPrograms" -#define BANNER "Virtual VCR Program DataBase. version 2.0 **DO NOT edit**" -#ifdef XmFONTLIST_DEFAULT_TAG -#define XmStringTag XmFONTLIST_DEFAULT_TAG -#else -#define XmStringTag XmSTRING_DEFAULT_CHARSET -#endif - -static int cmdSocket; -static int *playtag; -static Widget titlewidget, progshell, progmodifyshell; -static Widget wproglist, wprogmodify; - -static int items = 0; -static XmString * item; -static struct ProgramList -{ - char title[STRING_SIZE]; - char vh[STRING_SIZE]; - char vf[STRING_SIZE]; - char ah[STRING_SIZE]; - char af[STRING_SIZE]; -} * prog; - -static int progcmd, progid; /* progcmd == 0 - insert, 1 - modify*/ -static struct ProgramList deletedprog; - -#define LINE1 " Program Title: " -#define LINE2 "Video file host: " -#define LINE3 "Video file path: " -#define LINE4 "Audio file host: " -#define LINE5 "Audio file path: " -#define MarginHeight 10 -#define MarginWidth 10 -static int charHeight, charWidth; -static int titleSize; - -#define Fgets(s) {if (feof(fp) || fgets(s, STRING_SIZE, fp) == NULL) break; s[strlen(s)-1] = 0; } - -#define Fputs(s) {fputs(s, fp); fputc('\n', fp);} - -static void SaveBuf(void); - -static void InitBuf(void) -{ - FILE * fp; - char *fname; - char buf[256]; - int copyTag = 0; - - deletedprog.title[0] = 0; - - item = (XmString *)ACE_OS::malloc(sizeof(*item) * ITEMS); - if (item == NULL) - { - ACE_OS::perror ("UI allocate proglist item(XmString)"); - ACE_OS::exit (1); - } - prog = (struct ProgramList *) ACE_OS::malloc(sizeof(*prog) * ITEMS); - if (prog == NULL) - { - ACE_OS::perror ("UI allocate prog"); - ACE_OS::exit (1); - } - fp = NULL; - if (proglistName[0] != 0) { /* file name given in command line */ - get_full_path(proglistName, buf, 256); - fname = proglistName; - fp = fopen(buf, "r"); - if (fp == NULL) { - fprintf(stderr,"PROG.C error opening %s:", proglistName); - ACE_OS::perror (""); - } - } - if (fp == NULL) { - get_full_path(PROGRAM_FILE, buf, 256); - fname = PROGRAM_FILE; - fp = fopen(buf, "r"); - } - if (fp == NULL) { - { - - InitBuf_exit1: - - get_full_path(PROGRAM_FILE, buf, 256); - if (access(buf, 0) != 0) { /* PROGRAM_FILE does not exist, create it */ - if (strchr(fname, '/') != NULL) { /* create the default directory */ - char *ptr = strrchr(buf, '/'); - *ptr = 0; - mkdir(buf, 0755); - *ptr = '/'; - } - fname = PROGRAM_FILE; - fp = fopen(buf, "w+"); - } - else { /* Exist, create a temp file in /tmp */ - char *ptr = tempnam("/tmp/", "vcr"); - fname = tmpnam(NULL); - if (ptr != NULL) { - strncpy(fname, ptr, L_tmpnam); - ACE_OS::free (ptr); - } - strcpy(buf, fname); - fp = tmpfile(); - } - if (fp != NULL) { - if (strncmp(fname, "/tmp/", 5) != 0) { - fprintf(stderr, - "Warning: created file %s with default movie list.\n", - fname); - } - else fprintf(stderr, "Warning: using default movie list.\n"); - fprintf(fp, "%s\n", BANNER); - fprintf(fp, "\ -lemond: (va) Blazers Game 1 (128)\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/c1.0.300.128.mpg\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/c1.0.300.au\n\ -lemond: (va) Blazers Game 1 (256)\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/c1.0.300.256.mpg\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/c1.0.300.au\n\ -lemond: (va) Blazers Game 1 (320)\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/c1.0.300.320.mpg\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/c1.0.300.au\n\ -lemond: (va) Blazers Game 2 (128)\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/h1.0.300.128.mpg\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/h1.0.300.au\n\ -lemond: (va) Blazers Game 2 (256)\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/h1.0.300.256.mpg\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/h1.0.300.au\n\ -lemond: (va) Blazers Game 2 (320)\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/h1.0.300.320.mpg\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/h1.0.300.au\n\ -lemond: (va) Blazers Game 3 (128)\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/s1.0.300.128.mpg\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/s1.0.300.au\n\ -lemond: (va) Blazers Game 3 (256)\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/s1.0.300.256.mpg\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/s1.0.300.au\n\ -lemond: (vo) Skiing on Mt. Rainer\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/skiRainer.mpeg\n\ -\n\ -\n\ -lemond: (ao) Following the sense (Chinese song)\n\ -\n\ -\n\ -lemond.cse.ogi.edu\n\ -/projects/dsrg/L/multimedia3/sense.au\n\ -"); - fseek(fp, (long)0, 0); - fgets(buf, 100, fp); - goto InitBuf_continue; - /* - fclose(fp); - fp = fopen(buf, "r"); - if (fp != NULL) { - fgets(buf, 100, fp); - goto InitBuf_continue; - } - else { - fprintf(stderr, "Warning: failed to read newly created %s:", buf); - ACE_OS::perror (""); - } - */ - } - else { - fprintf(stderr, "Warning: failed to create %s:", buf); - perror(""); - } - items = 0; - return; - } - } - if (fgets(buf, 100, fp) == NULL) - { - fclose(fp); - goto InitBuf_exit1; - } - buf[strlen(buf)-1] = 0; - if (strncmp(buf, BANNER,ACE_OS::strlen (BANNER))) - { - fprintf(stderr, "BANNER in %s not expected\n", fname); - fprintf(stderr, " Expected: %s\n", BANNER); - fprintf(stderr, " Actual : %s\n", buf); - fclose(fp); - goto InitBuf_exit1; - } - - InitBuf_continue: - - items = 0; - for(;;) - { - /* - fprintf(stderr, "Reading next program.\n"); - */ - Fgets(prog[items].title); - // Fgets(prog[items].vh); - Fgets(prog[items].vf); - // Fgets(prog[items].ah); - Fgets(prog[items].af); - item[items] = (XmString)XmStringCreateLtoR(prog[items].title, XmStringTag); - if ((++items) >= ITEMS) break; - } - /* - fprintf(stderr, "Total programs %d\n", items); - */ - fclose(fp); - if (copyTag) { - SaveBuf(); - } -} - -static void SaveBuf(void) -{ - int i; - FILE * fp; - char buf[256]; - get_full_path(PROGRAM_FILE, buf, 256); - fp = fopen(buf, "w"); - if (fp == NULL) - { - fprintf(stderr, "Fail to open %s for saving programs", buf); - ACE_OS::perror (""); - return; - } - Fputs(BANNER); - for (i = 0; i < items; i++) - { - Fputs(prog[i].title); - // Fputs(prog[i].vh); - Fputs(prog[i].vf); - // Fputs(prog[i].ah); - Fputs(prog[i].af); - } - fclose(fp); -} - -static void CmdWrite(char * buf, int size) -{ - if (size == 0) return; - while (write(cmdSocket, (buf), (size)) == -1) - { - if (errno == EINTR) continue; - ACE_OS::perror ("UI write to cmdSocket"); - ACE_OS::exit (1); - } -} - -void StartProgram(char * title, char * vh, char * vf, char * ah, char * af) -{ - extern int cmdBusy; - char tmp = CmdINIT; - int len; - if (!cmdBusy) { - char *str = title; - len =ACE_OS::strlen (str); -// if (len > 0 && str[len-1] == 0x0d) str[len - 1] = 0; -// str = vh; - // len =ACE_OS::strlen (str); - if (len > 0 && str[len-1] == 0x0d) str[len - 1] = 0; - str = vf; - // len =ACE_OS::strlen (str); - // if (len > 0 && str[len-1] == 0x0d) str[len - 1] = 0; - // str = ah; - len =ACE_OS::strlen (str); - if (len > 0 && str[len-1] == 0x0d) str[len - 1] = 0; - str = af; - len =ACE_OS::strlen (str); - if (len > 0 && str[len-1] == 0x0d) str[len - 1] = 0; - XmTextFieldSetString(titlewidget, title); - cmdBusy = 1; - CmdWrite(&tmp, 1); -// len =ACE_OS::strlen (vh); -// CmdWrite((char *)&len, 4); -// cerr << "StartProgram: len =" << len; -// CmdWrite(vh, len); -// cerr << " StartProgram: vh =" << vh << endl; - len =ACE_OS::strlen (vf); - CmdWrite((char *)&len, 4); - cerr << "StartProgram: len =" << len; - CmdWrite(vf, len); - cerr << " StartProgram: vf =" << vf << endl; -// len =ACE_OS::strlen (ah); -// CmdWrite((char *)&len, 4); -// cerr << "StartProgram: len =" << len; -// CmdWrite(ah, len); -// cerr << " StartProgram: ah =" << ah << endl; - len =ACE_OS::strlen (af); - CmdWrite((char *)&len, 4); - cerr << "StartProgram: len =" << len; - CmdWrite(af, len); - cerr << " StartProgram: af =" << af << endl; - } - else { - beep(); - } - cerr << "StartProgram done\n"; -} - -static int curListPos(void) -{ - int * poses, count; - - if (XmListGetSelectedPos(wproglist, &poses, &count)) - { - count = poses[0]; - XtFree((char*)poses); - /* - fprintf(stderr, "curListPos: current pos = %d\n", count); - */ - return count - 1; - } - return -1; -} - - -static void modifyprog(struct ProgramList *p) -{ - XmString item; - - if (items <0 || progid >= items || progid < 0) - { beep(); return; } - item = (XmString)XmStringCreateLtoR(p->title, XmStringTag); - XmListReplaceItemsPos(wproglist, &item, 1, progid+1); - XmListSelectPos(wproglist, progid+1, 0); - XmStringFree(item); - ACE_OS::memcpy (&(prog[progid]), p, sizeof(*p)); - SaveBuf(); -} - -static void insertprog(struct ProgramList *p) -{ - XmString item; - - if (items <= 0 || items >= ITEMS) return; - ACE_OS::memcpy ((char*)&(prog[items]), (char *)p, sizeof(*p)); - item = (XmString)XmStringCreateLtoR(p->title, XmStringTag); - XmListAddItemUnselected(wproglist, item, items+1); - XmStringFree(item); - if (items == 0) - XmListSelectPos(wproglist, 0, False); - items ++; - SaveBuf(); -} - -static void verifyCB(Widget w, XtPointer closure, XmTextVerifyCallbackStruct * cd); - -static void deleteCB(Widget w, XtPointer closure, XtPointer call_data) -{ - int i, j; - - // return; - - - if (items <= 0) { beep(); return; } - j = curListPos(); - if (j == -1) return; - ACE_OS::memcpy (&deletedprog, &prog[j], sizeof(deletedprog)); - for (i = j+1; i < items; i++) - ACE_OS::memcpy (&prog[i-1], &prog[i], sizeof(*prog)); - XmListDeletePos(wproglist, j+1); - items --; - SaveBuf(); - return; -} - -static void undoCB(Widget w, XtPointer closure, XtPointer call_data) -{ - // return; - - if (deletedprog.title[0] != 0) - { - insertprog(&deletedprog); - deletedprog.title[0] = 0; - } - else - beep(); - -} - -static void setposition(Widget w, int x, int y); - -static void insertCB (Widget w, XtPointer closure, XtPointer call_data) -{ - char buf[1000]; - - // return; - - //#if 0 - if (items >= ITEMS -1) - { - beep(); - return; - } - XtRemoveAllCallbacks(wprogmodify, XmNmodifyVerifyCallback); - XtRemoveAllCallbacks(wprogmodify, XmNmotionVerifyCallback); - progcmd = 0; - sprintf(buf, " *** append a program ***\n"); - strcat(buf, LINE1); - strcat(buf, "\n"); - strcat(buf, LINE2); - strcat(buf, "\n"); - strcat(buf, LINE3); - strcat(buf, "\n"); - strcat(buf, LINE4); - strcat(buf, "\n"); - strcat(buf, LINE5); - strcat(buf, "\n\n"); - XmTextSetString(wprogmodify, buf); - - setposition(wprogmodify, titleSize, 1); - XtAddCallback (wprogmodify, XmNmodifyVerifyCallback, (XtCallbackProc)verifyCB, NULL); - XtAddCallback (wprogmodify, XmNmotionVerifyCallback, (XtCallbackProc)verifyCB, NULL); - - // uncommented - //XtManageChild(progmodifyshell); - - XtRealizeWidget(progmodifyshell); - //#endif -} - -static void modifyCB(Widget w, XtPointer closure, XtPointer call_data) -{ - int i; - char buf[1000]; - if (items == 0) - { - beep(); - return; - } - XtRemoveAllCallbacks(wprogmodify, XmNmodifyVerifyCallback); - XtRemoveAllCallbacks(wprogmodify, XmNmotionVerifyCallback); - progid = i = curListPos(); - progcmd = 1; - sprintf(buf, " *** modify program: %s ***\n", prog[i].title); - strcat(buf, LINE1); - strcat(buf, prog[i].title); - strcat(buf, "\n"); - // strcat(buf, LINE2); - // strcat(buf, prog[i].vh); - // strcat(buf, "\n"); - strcat(buf, LINE3); - strcat(buf, prog[i].vf); - strcat(buf, "\n"); - // strcat(buf, LINE4); - // strcat(buf, prog[i].ah); - // strcat(buf, "\n"); - strcat(buf, LINE5); - strcat(buf, prog[i].af); - strcat(buf, "\n\n"); - XmTextSetString(wprogmodify, buf); - - setposition(wprogmodify, titleSize, 1); - XtAddCallback (wprogmodify, XmNmodifyVerifyCallback, (XtCallbackProc)verifyCB, NULL); - XtAddCallback (wprogmodify, XmNmotionVerifyCallback, (XtCallbackProc)verifyCB, NULL); - /* - XtManageChild(progmodifyshell); - */ - XtRealizeWidget(progmodifyshell); -} - -static void playCB(Widget w, XtPointer closure, XtPointer call_data) -{ - /* - fprintf(stderr, "play"); - */ - if (items > 0) - { - int i = curListPos(); - if (i >= items || i < 0) - return; - cerr << "PlayCB\n"; - cerr << prog[i].title << " " << " " <newInsert, &x1, &y1)) - return 0; - *x = (x1-(MarginWidth+4))/charWidth; - *y = (y1-(charHeight+MarginHeight+1))/charHeight; - if ((*x)*charWidth != x1-(MarginWidth+4) || (*y)*charHeight != y1-(charHeight+MarginHeight+1)) - { - /* - fprintf(stderr, "error: TextCursorConversion failed. \007\n"); - fprintf(stderr, "x-%d, x1-%d, y-%d, y1-%d\n", *x, (int)x1, *y, (int)y1); - */ - return 1; - } - return 1; - -} - -static void modifydismissCB(Widget w, XtPointer closure, XtPointer call_data) -{ - - XtUnrealizeWidget(progmodifyshell); - /* - XtUnmanageChild(progmodifyshell); - */ -} - -static void modifysaveCB(Widget w, XtPointer closure, XtPointer call_data) -{ - return; - - //#if 0 - if (progcmd == 1 && items <= progid) - { - beep(); - } - else if (progcmd == 1 || progcmd == 0) - { - char * buf, * ptr, *ptr1; - struct ProgramList p; - buf = XmTextGetString(wprogmodify); - ptr = buf; - fprintf(stderr, "Buf: %s\n", buf); - while (*ptr != '\n') ptr ++; - ptr ++; - - ptr1 = ptr + titleSize; - while (*ptr != '\n') ptr ++; - (*ptr) = 0; ptr ++; - strncpy(p.title, ptr1, STRING_SIZE); - p.title[STRING_SIZE-1] = 0; - - ptr1 = ptr + titleSize; - while (*ptr != '\n') ptr ++; - (*ptr) = 0; ptr ++; - strncpy(p.vh, ptr1, STRING_SIZE); - p.vh[STRING_SIZE-1] = 0; - - ptr1 = ptr + titleSize; - while (*ptr != '\n') ptr ++; - (*ptr) = 0; ptr ++; - strncpy(p.vf, ptr1, STRING_SIZE); - p.vf[STRING_SIZE-1] = 0; - - ptr1 = ptr + titleSize; - while (*ptr != '\n') ptr ++; - (*ptr) = 0; ptr ++; - strncpy(p.ah, ptr1, STRING_SIZE); - p.ah[STRING_SIZE-1] = 0; - - ptr1 = ptr + titleSize; - while (*ptr != '\n') ptr ++; - (*ptr) = 0; - strncpy(p.af, ptr1, STRING_SIZE); - p.af[STRING_SIZE-1] = 0; - /* - fprintf(stderr, "*|%s||%s||%s||%s||%s||*\n", p.title, p.vh, p.vf, p.ah, p.af); - */ - XtFree((char *)buf); - if (progcmd == 1) - modifyprog(&p); - else - insertprog(&p); - } - //#endif -} - -static void verifyCB(Widget w, XtPointer closure, XmTextVerifyCallbackStruct * cd) -{ - int x = 0, y = 0; - - if (!getposition(w, cd, &x, &y)) - { - fprintf(stderr, "error on conversion to x/y\n"); - return; - } -/* - fprintf(stderr, "verifyCB: %d (x-%d, y-%d)\n",cd->newInsert, x, y); -*/ - if (x < titleSize || x > titleSize+STRING_SIZE || y < 1 || y > 5) - { - beep(); - cd->doit = False; - return; - } - else - return; -} - -static void CreateModifyWindow(Widget parent) -{ - Arg args[20]; - int n; - Widget wform, wtext, wdone, wcancel; - XmFontList fontlist; - XFontStruct * font; - XmStringCharSet cset = XmSTRING_DEFAULT_CHARSET; - - n = 0; - XtSetArg(args[n], XmNtitle, "Virtual VCR Program List Edit"); n++; - XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING);n++; - XtSetArg(args[n], XmNkeyboardFocusPolicy, XmPOINTER); n++; - XtSetArg(args[n], XmNwidth, 700); n++; - XtSetArg(args[n], XmNheight, 160); n++; - XtSetArg(args[n], XmNallowShellResize, False); n++; - - progmodifyshell = XtAppCreateShell("Program List", "virtual_vcr", - topLevelShellWidgetClass, display, args, n); - - // uncommented. - // progmodifyshell = XmCreateDialogShell(parent, "virtual_vcr", args, n); - - n = 0; - - /* Create form widget */ - n = 0; - XtSetArg (args[n], XmNallowShellResize, False); n++; - /* - XtSetArg (args[n], XmNheight, 300); n++; - XtSetArg (args[n], XmNwidth, 800); n++; - */ - wform = XmCreateForm(progmodifyshell, "Programs", args, n); - - XtManageChild(wform); - - font = XLoadQueryFont (XtDisplay (progmodifyshell), "8x13"); - charHeight = 13; - charWidth = 8; - fontlist = XmStringCreateFontList (font, cset); - - n=0; - XtSetArg (args[n], XmNwidth, 60); n++; - XtSetArg (args[n], XmNheight, 28); n++; - XtSetArg (args[n], XmNleftOffset, 20); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - wdone = XmCreatePushButton (wform, "Save", args, n); - XtManageChild(wdone); - XtAddCallback (wdone, XmNactivateCallback, (XtCallbackProc)modifysaveCB, NULL); - - n=0; - XtSetArg (args[n], XmNwidth, 60); n++; - XtSetArg (args[n], XmNheight, 28); n++; - XtSetArg (args[n], XmNrightOffset, 20); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - wcancel = XmCreatePushButton (wform, "Dismiss", args, n); - XtManageChild(wcancel); - XtAddCallback (wcancel, XmNactivateCallback, (XtCallbackProc)modifydismissCB, NULL); - - titleSize =ACE_OS::strlen (LINE1); - - n=0; - XtSetArg (args[n], XmNleftOffset, 5); n++; - XtSetArg (args[n], XmNtopOffset, 5); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg(args[n], XmNcolumns, titleSize + STRING_SIZE+1); n++; - XtSetArg(args[n], XmNrows, 7); n++; -/* - XtSetArg(args[n], XmNeditable, True); n++; -*/ - XtSetArg(args[n], XmNeditable, False); n++; - - XtSetArg(args[n], XmNmarginHeight, MarginHeight); n++; - XtSetArg(args[n], XmNmarginWidth, MarginWidth); n++; - XtSetArg(args[n], XmNborderWidth, 0); n++; - XtSetArg(args[n], XmNeditMode, XmMULTI_LINE_EDIT); n++; - /* - XtSetArg(args[n], XmNvalue, new_string1); n++; - */ - XtSetArg(args[n], XmNfontList, fontlist); n++; - wtext = XmCreateText(wform, "Virtual VCR program list modify text", args, n); - - XtManageChild(wtext); - - XmFontListFree (fontlist); - wprogmodify = wtext; -} - -Widget CreateProgramWindow(Widget parent, int cmdSock, int * playflag, Widget frametext) -{ - Arg args[20]; - int n; - Widget wform, frame1, frame2, wlist, - wdelete, wundo, winsert, wmodify, wplay, wdismiss; - XmFontList fontlist; - XFontStruct * font; - XmStringCharSet cset = XmSTRING_DEFAULT_CHARSET; - - cmdSocket = cmdSock; - playtag = playflag; - titlewidget = frametext; - - InitBuf(); - - n = 0; - XtSetArg(args[n], XmNtitle, "Virtual VCR Program List"); n++; - XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING);n++; - XtSetArg(args[n], XmNkeyboardFocusPolicy, XmPOINTER); n++; - XtSetArg(args[n], XmNwidth, 396); n++; - XtSetArg(args[n], XmNheight, 300); n++; - XtSetArg(args[n], XmNminWidth, 396); n++; - XtSetArg(args[n], XmNminHeight, 150); n++; - - progshell = XtAppCreateShell("Program List", "virtual_vcr", - topLevelShellWidgetClass, display, args, n); - /* - progshell = XmCreateDialogShell(parent, "virtual_vcr", args, n); - */ - font = XLoadQueryFont (XtDisplay (progshell), "courB14"); - fontlist = XmStringCreateFontList (font, cset); - - n = 0; - XtSetArg(args[n], XmNtitle, "Program List"); n++; - wform = XmCreateForm(progshell, "Programs", args, n); - - XtManageChild(wform); - - n = 0; - wdelete = XmCreatePushButton (wform, "Delete", args, n); - XtManageChild(wdelete); - XtAddCallback (wdelete, XmNactivateCallback, (XtCallbackProc)deleteCB, NULL); - wundo = XmCreatePushButton (wform, "Undo", args, n); - XtManageChild(wundo); - XtAddCallback (wundo, XmNactivateCallback, (XtCallbackProc)undoCB, NULL); - winsert = XmCreatePushButton (wform, "Insert", args, n); - XtManageChild(winsert); - XtAddCallback (winsert, XmNactivateCallback, (XtCallbackProc)insertCB, NULL); - wmodify = XmCreatePushButton (wform, "Modify", args, n); - XtManageChild(wmodify); - XtAddCallback (wmodify, XmNactivateCallback, (XtCallbackProc)modifyCB, NULL); - wplay = XmCreatePushButton (wform, "Select", args, n); - XtManageChild(wplay); - XtAddCallback (wplay, XmNactivateCallback, (XtCallbackProc)playCB, NULL); - wdismiss = XmCreatePushButton (wform, "Dismiss", args, n); - XtManageChild(wdismiss); - XtAddCallback (wdismiss, XmNactivateCallback, (XtCallbackProc)dismissCB, NULL); - - n=0; - XtSetArg (args[n], XmNwidth, 60); n++; - XtSetArg (args[n], XmNheight, 28); n++; - XtSetArg (args[n], XmNleftOffset, 5); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetValues (wdelete, args, n); - - n=0; - XtSetArg (args[n], XmNwidth, 60); n++; - XtSetArg (args[n], XmNheight, 28); n++; - XtSetArg (args[n], XmNleftOffset, 70); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetValues (wundo, args, n); - - n=0; - XtSetArg (args[n], XmNwidth, 60); n++; - XtSetArg (args[n], XmNheight, 28); n++; - XtSetArg (args[n], XmNleftOffset, 135); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetValues (winsert, args, n); - - n=0; - XtSetArg (args[n], XmNwidth, 60); n++; - XtSetArg (args[n], XmNheight, 28); n++; - XtSetArg (args[n], XmNleftOffset, 200); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetValues (wmodify, args, n); - - n=0; - XtSetArg (args[n], XmNwidth, 60); n++; - XtSetArg (args[n], XmNheight, 28); n++; - XtSetArg (args[n], XmNleftOffset, 265); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetValues (wplay, args, n); - - n=0; - XtSetArg (args[n], XmNwidth, 60); n++; - XtSetArg (args[n], XmNheight, 28); n++; - XtSetArg (args[n], XmNleftOffset, 330); n++; - XtSetArg (args[n], XmNbottomOffset, 5); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetValues (wdismiss, args, n); - - n = 0; - XtSetArg (args[n], XmNtopOffset, 2); n++; - XtSetArg (args[n], XmNleftOffset, 2); n++; - XtSetArg (args[n], XmNbottomOffset, 38); n++; - XtSetArg (args[n], XmNrightOffset, 2); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - XtSetArg(args[n], XmNfontList, fontlist); n++; - XtSetArg(args[n], XmNvisibleItemCount, NUM_LIST_ITEMS); n++; - if (items > 0) - { - XtSetArg(args[n], XmNitems, item); n++; - XtSetArg(args[n], XmNitemCount, items); n++; - XtSetArg(args[n], XmNselectedItems, item); n++; - XtSetArg(args[n], XmNselectedItemCount, 1); n++; - } - wlist = XmCreateScrolledList(wform, "ProgramList", args, n); - XtManageChild(wlist); - XmFontListFree(fontlist); - wproglist = wlist; - for (n = 0; n < items; n++) - XmStringFree(item[n]); - ACE_OS::free (item); - - n=0; - XtSetArg (args[n], XmNtopOffset, 2); n++; - XtSetArg (args[n], XmNleftOffset, 2); n++; - XtSetArg (args[n], XmNbottomOffset, 38); n++; - XtSetArg (args[n], XmNrightOffset, 2); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - frame2 = XmCreateFrame (wform, "frame", args, n); - XtManageChild(frame2); - - n=0; - XtSetArg (args[n], XmNtopOffset, 0); n++; - XtSetArg (args[n], XmNleftOffset, 0); n++; - XtSetArg (args[n], XmNbottomOffset, 0); n++; - XtSetArg (args[n], XmNrightOffset, 0); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - frame1 = XmCreateFrame (wform, "frame", args, n); - XtManageChild(frame1); - - CreateModifyWindow(parent); - - return progshell; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h deleted file mode 100644 index 023cd981944..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h +++ /dev/null @@ -1,128 +0,0 @@ -/* $Id$ */ - - -#ifdef __STDC__ -# define P(s) s -#else -# define P(s) () -#endif - - -/* util.c */ -void correct_underflow P((void )); -int next_bits P((int num , unsigned int mask )); -char *get_ext_data P((void )); -int next_start_code P((void )); -char *get_extra_bit_info P((void )); - -/* video.c */ -void init_stats P((void )); -void PrintAllStats P((void )); -double ReadSysClock P((void )); -void PrintTimeInfo P((void )); -VidStream *NewVidStream P((void )); -void DestroyVidStream P((VidStream *astream )); -PictImage *NewPictImage P((unsigned int width , unsigned int height )); -void DestroyPictImage P((PictImage *apictimage )); -int mpegVidRsrc P((char *p )); -void ToggleBFlag P((void )); -void TogglePFlag P((void )); - -/* parseblock.c */ -void ParseReconBlock P((int n )); -void ParseAwayBlock P((int n )); - -/* motionvector.c */ -void ComputeForwVector P((int *recon_right_for_ptr , int *recon_down_for_ptr )); -void ComputeBackVector P((int *recon_right_back_ptr , int *recon_down_back_ptr )); - -/* decoders.c */ -void init_tables P((void )); -void decodeDCTDCSizeLum P((unsigned int *value )); -void decodeDCTDCSizeChrom P((unsigned int *value )); -void decodeDCTCoeffFirst P((unsigned int *run , int *level )); -void decodeDCTCoeffNext P((unsigned int *run , int *level )); - -/* main.c */ -int get_more_data P((unsigned int *buf_start , int max_length , int *length_ptr , unsigned int **buf_ptr )); -int main P((int argc , char **argv )); -void usage P((char *s )); - -/* gdith.c */ -void InitColor P((void )); -int HandleXError P((Display *dpy , XErrorEvent *event )); -void InstallXErrorHandler P((void )); -void DeInstallXErrorHandler P((void )); -void ResizeDisplay P((int w , int h )); -void InitDisplay P((char *name )); -void InitGrayDisplay P((char *name )); -void InitMonoDisplay P((char *name )); -void InitColorDisplay P((char *name )); -void ExecuteDisplay P((VidStream *vid_stream )); - -/* fs2.c */ -void InitFS2Dither P((void )); -void FS2DitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *disp , int rows , int cols )); - -/* fs2fast.c */ -void InitFS2FastDither P((void )); -void FS2FastDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w )); - -/* fs4.c */ -void InitFS4Dither P((void )); -void FS4DitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *disp , int rows , int cols )); - -/* hybrid.c */ -void InitHybridDither P((void )); -void HybridDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w )); - -/* hybriderr.c */ -void InitHybridErrorDither P((void )); -void HybridErrorDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w )); - -/* 2x2.c */ -void Init2x2Dither P((void )); -void RandInit P((int h , int w )); -void PostInit2x2Dither P((void )); -void Twox2DitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w )); - -/* gray.c */ -void GrayDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w )); - -/* mono.c */ -void MonoDitherImage(register unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int h, int w); -void MonoThresholdImage(unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int h, int w); - -/* jrevdct.c */ -void init_pre_idct P((void )); -void j_rev_dct_sparse P((DCTBLOCK data , int pos )); -void j_rev_dct P((DCTBLOCK data )); -void j_rev_dct_sparse P((DCTBLOCK data , int pos )); -void j_rev_dct P((DCTBLOCK data )); - -/* 24bit.c */ -void InitColorDither P((void )); -void ColorDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int rows , int cols )); - -/* util32.c */ -Visual *FindFullColorVisual P((Display *dpy , int *depth )); -Window CreateFullColorWindow P((Display *dpy , int x , int y , int w , int h )); - -/* ordered.c */ -void InitOrderedDither P((void )); -void OrderedDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w )); - -/* ordered2.c */ -void InitOrdered2Dither P((void )); -void Ordered2DitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w )); - -/* mb_ordered.c */ -void InitMBOrderedDither P((void )); -void MBOrderedDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char *cb , unsigned char *out , int h , int w )); -void MBOrderedDitherDisplayCopy P((VidStream *vid_stream , int mb_addr , int motion_forw , int r_right_forw , int r_down_forw , int motion_back , int r_right_back , int r_down_back , unsigned char *past , unsigned char *future )); - -#undef P diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.cpp deleted file mode 100644 index 734029da118..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.cpp +++ /dev/null @@ -1,999 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with this file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -/* This software is modified on January 15, 1995 by: - * - * Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "mpeg_mib/mibload.h" -#include "interface/fb.xbm" -#include "interface/play.xbm" -#include "interface/step.xbm" -#include "interface/stop.xbm" -#include "interface/loop.xbm" -#include "interface/ff.xbm" -#include "interface/MainWindow.mib" -#include "interface/Info.mib" -#include "video.h" - -#include "include/common.h" -#include "newproto.h" -#include "global.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, ui, "$Id$") - -int cmdBusy = 0; - -extern char infomessage[]; - -/*****************************************************************************/ - -/* Private Variables and Methods */ - -static int playtag = 0; -static int cmdSocket = -1; - -/* Intrinsics Application Context */ -static XtAppContext App; -static Window monitorwindow = (int)NULL; -static mib_Widget *mainload, *infoload; -static Widget shell = (int)NULL, infoshell = (int)NULL, - parashell = (int)NULL, progshell = (int)NULL, - fileshell = (int)NULL; -static Widget frametext= (int)NULL; -static Widget volumescale = (int)NULL, balancescale = (int)NULL, - speedscale = (int)NULL, positionscale = (int)NULL; -static int frameshown = 0; - -#define MINX 500 -#define MINY 360 - -static Window displaywin = (int)NULL; -static int privcolormap = 0; - -static void exit_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void info_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void para_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void prog_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void file_callback(Widget, XtPointer, XmAnyCallbackStruct *); - -static void loopchange_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void normal_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void fb_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void stop_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void ff_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void step_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void play_callback(Widget, XtPointer, XmAnyCallbackStruct *); - -static void volume_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void balance_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void speed_callback(Widget, XtPointer, XmAnyCallbackStruct *); -static void position_callback(Widget, XtPointer, XmAnyCallbackStruct *); - -static void cmdSocket_callback(Widget, XtPointer, XmAnyCallbackStruct *); - -static void monitor_expose(Widget, XtPointer, XmDrawingAreaCallbackStruct *); - -static void infoclose_callback(Widget, XtPointer, XmAnyCallbackStruct *); - -static void CmdWrite(char * buf, int size) -{ - // ACE_DEBUG ((LM_DEBUG,"(%P|%t)before writing cmd\n")); - while (ACE_OS::write(cmdSocket, (buf), (size)) == -1) - { - if (errno == EINTR) continue; - ACE_OS::perror ("UI write to cmdSocket"); - ACE_OS::exit (1); - } - // ACE_DEBUG ((LM_DEBUG,"(%P|%t)After writing cmd\n")); -} - -/***************************************************************************** - - UICreate: Create/load in a motif interface. - - *****************************************************************************/ - -static void UICreate() -{ - - Widget toplevel; - - Widget mainwindow, - temp; - - Pixel fg, bg; - Pixmap button_pix; - - XmFontList fontlist; - XFontStruct * font; - - Arg args[20]; - int n, depth; - - static String fallbacks[] = { - "*Foreground: black", - "*BorderWidth: 0", - "*Background: lavender", - "*XmToggleButton.selectColor: yellow", - "*XmToggleButton.indicatorSize: 16", - "*XmToggleButtonGadget.selectColor: yellow", - "*XmToggleButtonGadget.indicatorSize: 16", - "*fontList: -adobe-helvetica-medium-r-normal--14-*-*-*-p-*-iso8859-1", - "*XmText*fontList: -adobe-courier-medium-r-normal--12-*-*-*-m-70-iso8859-1", - NULL - }; - -/*****************************************************************************/ - - n = 0; - - toplevel = XtAppInitialize(&App, "virtual_vcr", NULL, 0, &argc_share, - argv_share, fallbacks, args, n); - - display = XtDisplay(toplevel); - -/******************************************************************************/ - - n = 0; - XtSetArg(args[n], XmNtitle, "TAO Mpeg Player"); n++; - XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING);n++; - XtSetArg(args[n], XmNkeyboardFocusPolicy, XmPOINTER); n++; - XtSetArg(args[n], XmNwidth, MINX); n++; - XtSetArg(args[n], XmNminWidth, MINX); n++; - XtSetArg(args[n], XmNheight, MINY); n++; - XtSetArg(args[n], XmNminHeight, MINY); n++; - - shell = XtAppCreateShell("TAO Mpeg Player", "virtual_vcr", - topLevelShellWidgetClass, display, args, n); - -/*****************************************************************************/ - - n = 0; - XtSetArg(args[n], XmNtitle, "TAO Mpeg Player"); n++; - - mainwindow = XmCreateForm(shell, "MainForm", args, n); - XtManageChild(mainwindow); - { - XmStringCharSet cset = XmSTRING_DEFAULT_CHARSET; - XmString titleString; - - font = XLoadQueryFont (XtDisplay (shell), "courB14"); - fontlist = XmStringCreateFontList (font, cset); - - - titleString = XmStringCreateLtoR ("Balance", cset); - n = 0; - XtSetArg (args[n], XmNfontList, fontlist); n++; - XtSetArg (args[n], XmNshowValue, True); n++; - XtSetArg (args[n], XmNtitleString, titleString); n++; - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - XtSetArg (args[n], XmNmaximum, 100); n++; - XtSetArg (args[n], XmNvalue, 50); n++; - XtSetArg (args[n], XmNprocessingDirection, XmMAX_ON_RIGHT); n++; - XtSetArg (args[n], XmNscaleHeight, 17);n++; - XtSetArg (args[n], XmNscaleWidth, 100);n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomOffset, 4);n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, 8);n++; - balancescale = XmCreateScale(mainwindow, "scale", args, n); - XmStringFree (titleString); - XtManageChild (balancescale); - XtAddCallback (balancescale, XmNvalueChangedCallback, (XtCallbackProc)balance_callback, NULL); - XtAddCallback (balancescale, XmNdragCallback, (XtCallbackProc)balance_callback, NULL); - - - titleString = XmStringCreateLtoR ("Volume", cset); - n = 0; - XtSetArg (args[n], XmNfontList, fontlist); n++; - XtSetArg (args[n], XmNshowValue, True); n++; - XtSetArg (args[n], XmNtitleString, titleString); n++; - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - XtSetArg (args[n], XmNmaximum, 100); n++; - XtSetArg (args[n], XmNvalue, DEFAULT_volume); n++; - XtSetArg (args[n], XmNprocessingDirection, XmMAX_ON_RIGHT); n++; - XtSetArg (args[n], XmNscaleHeight, 17);n++; - XtSetArg (args[n], XmNscaleWidth, 100);n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomOffset, 4);n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, 128);n++; - volumescale = XmCreateScale(mainwindow, "scale", args, n); - XmStringFree (titleString); - XtManageChild (volumescale); - XtAddCallback (volumescale, XmNvalueChangedCallback, (XtCallbackProc)volume_callback, NULL); - XtAddCallback (volumescale, XmNdragCallback, (XtCallbackProc)volume_callback, NULL); - - - titleString = XmStringCreateLtoR ("Play Speed", cset); - n = 0; - XtSetArg (args[n], XmNfontList, fontlist); n++; - XtSetArg (args[n], XmNshowValue, True); n++; - XtSetArg (args[n], XmNtitleString, titleString); n++; - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - XtSetArg (args[n], XmNmaximum, 100); n++; - XtSetArg (args[n], XmNvalue, 50); n++; - XtSetArg (args[n], XmNprocessingDirection, XmMAX_ON_RIGHT); n++; - XtSetArg (args[n], XmNscaleHeight, 17);n++; - XtSetArg (args[n], XmNscaleWidth, 100);n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomOffset, 4);n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, 248);n++; - speedscale = XmCreateScale(mainwindow, "scale", args, n); - XmStringFree (titleString); - XtManageChild (speedscale); - XtAddCallback (speedscale, XmNvalueChangedCallback, (XtCallbackProc)speed_callback, NULL); - XtAddCallback (speedscale, XmNdragCallback, (XtCallbackProc)speed_callback, NULL); - - - titleString = XmStringCreateLtoR ("Position", cset); - n = 0; - XtSetArg (args[n], XmNfontList, fontlist); n++; - XtSetArg (args[n], XmNshowValue, True); n++; - XtSetArg (args[n], XmNtitleString, titleString); n++; - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - XtSetArg (args[n], XmNmaximum, POSITION_RANGE); n++; - XtSetArg (args[n], XmNprocessingDirection, XmMAX_ON_RIGHT); n++; - XtSetArg (args[n], XmNscaleHeight, 17);n++; - XtSetArg (args[n], XmNscaleWidth, 100);n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomOffset, 4);n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, 368);n++; - positionscale = XmCreateScale(mainwindow, "scale", args, n); - XmStringFree (titleString); - XtManageChild (positionscale); - XtAddCallback (positionscale, XmNvalueChangedCallback, (XtCallbackProc)position_callback, NULL); - XtAddCallback (positionscale, XmNdragCallback, (XtCallbackProc)position_callback, NULL); - - } - - mainload = mib_load_interface(mainwindow, MainMib, MI_FROMSTRING); - XtSetMappedWhenManaged(shell, False); - XtRealizeWidget(shell); - - frametext = mib_find_name(mainload, "TitleText")->me; - XtVaSetValues(frametext, - XmNfontList, fontlist, - XmNcursorPositionVisible, False, - XmNeditable, False, - NULL); - - temp = mib_find_name(mainload, "Monitor")->me; - XtAddCallback(temp, XmNexposeCallback, - (XtCallbackProc) monitor_expose, (XtPointer) NULL); - XtVaSetValues(temp, XmNforeground, - BlackPixel(display, DefaultScreen(display)), - XmNbackground, - BlackPixel(display, DefaultScreen(display)), - NULL); - monitorwindow = XtWindow(temp); - - temp = mib_find_name(mainload, "Info")->me; - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) info_callback, - (XtPointer) NULL); - - temp = mib_find_name(mainload, "Para")->me; - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) para_callback, - (XtPointer) NULL); - - temp = mib_find_name(mainload, "Prog")->me; - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) prog_callback, - (XtPointer) NULL); - - temp = mib_find_name(mainload, "File")->me; - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) file_callback, - (XtPointer) NULL); - - temp = mib_find_name(mainload, "Exit")->me; - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) exit_callback, - (XtPointer) NULL); - - temp = mib_find_name(mainload, "Loop")->me; - XtVaGetValues(temp, XmNforeground, &fg, - XmNbackground, &bg, XmNdepth, &depth, NULL); - button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), - (char *)loop_bits, loop_width, loop_height, fg, bg, depth); - /* - { - int i; - for (i = 0; i < sizeof(loop_bits); i++) - loop_bits[i] = ~loop_bits[i]; - } - */ - XtVaSetValues(temp, - XmNshadowThickness, 2, - - XmNwidth, 45, - XmNheight, 28, - - XmNindicatorType, XmN_OF_MANY, - - XmNindicatorOn, False, - - XmNfillOnSelect, True, - XmNlabelType, XmPIXMAP, - XmNhighlightThickness, 0, - XmNrubberPositioning, False, - XmNlabelPixmap, button_pix, - XmNselectPixmap, button_pix, -/* - XmNselectPixmap, (XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), - (char *)loop_bits, loop_width, loop_height, fg, bg, depth)), -*/ - NULL); - XtAddCallback(temp, XmNvalueChangedCallback, (XtCallbackProc) loopchange_callback, - (XtPointer) NULL); -/* - XtAddCallback(temp, XmNarmCallback, (XtCallbackProc) looparm_callback, - (XtPointer) NULL); - XtAddCallback(temp, XmNdisarmCallback, (XtCallbackProc) loopdisarm_callback, - (XtPointer) NULL); -*/ - temp = mib_find_name(mainload, "Normal")->me; - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) normal_callback, - (XtPointer) NULL); - - temp = mib_find_name(mainload, "Rewind")->me; - XtVaGetValues(temp, XmNforeground, &fg, - XmNbackground, &bg, XmNdepth, &depth, NULL); - button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), - (char *)fb_bits, fb_width, fb_height, fg, bg, depth); - XtVaSetValues(temp, XmNlabelType, XmPIXMAP, - XmNlabelPixmap, button_pix, NULL); - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) fb_callback, - (XtPointer) NULL); - - temp = mib_find_name(mainload, "Stop")->me; - XtVaGetValues(temp, XmNforeground, &fg, - XmNbackground, &bg, XmNdepth, &depth, NULL); - button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), - (char *)stop_bits, stop_width, stop_height, fg, bg, depth); - XtVaSetValues(temp, XmNlabelType, XmPIXMAP, - XmNlabelPixmap, button_pix, NULL); - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) stop_callback, - (XtPointer) NULL); - - temp = mib_find_name(mainload, "FF")->me; - XtVaGetValues(temp, XmNforeground, &fg, - XmNbackground, &bg, XmNdepth, &depth, NULL); - button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), - (char *)ff_bits, ff_width, ff_height, fg, bg, depth); - XtVaSetValues(temp, XmNlabelType, XmPIXMAP, - XmNlabelPixmap, button_pix, NULL); - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) ff_callback, - (XtPointer) NULL); - - temp = mib_find_name(mainload, "Step")->me; - XtVaGetValues(temp, XmNforeground, &fg, - XmNbackground, &bg, XmNdepth, &depth, NULL); - button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), - (char *)step_bits, step_width, step_height, fg, bg, depth); - XtVaSetValues(temp, XmNlabelType, XmPIXMAP, - XmNlabelPixmap, button_pix, NULL); - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) step_callback, - (XtPointer) NULL); - - temp = mib_find_name(mainload, "Play")->me; - XtVaGetValues(temp, XmNforeground, &fg, - XmNbackground, &bg, XmNdepth, &depth, NULL); - button_pix = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), - (char *)play_bits, play_width, play_height, fg, bg, depth); - XtVaSetValues(temp, XmNlabelType, XmPIXMAP, - XmNlabelPixmap, button_pix, NULL); - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) play_callback, - (XtPointer) NULL); - -/*****************************************************************************/ - - n = 0; - XtSetArg(args[n], XmNtitle, "Virtual VCR Infomation"); n++; - XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING);n++; - XtSetArg(args[n], XmNkeyboardFocusPolicy, XmPOINTER); n++; - XtSetArg(args[n], XmNwidth, MINX); n++; - XtSetArg(args[n], XmNheight, MINY); n++; - /* - infoshell = XtAppCreateShell("Info", "virtual_vcr", - topLevelShellWidgetClass, display, args, n); - */ - temp = XmCreateDialogShell(shell, "virtual_vcr", args, n); - n = 0; - XtSetArg(args[n], XmNtitle, "Virtual VCR Infomation"); n++; - - infoshell = XmCreateForm(temp, "virtual_vcr", args, n); - infoload = mib_load_interface(infoshell, InfoMib, - MI_FROMSTRING); - - temp = mib_find_name(infoload, "Dismiss")->me; - XtAddCallback(temp, XmNactivateCallback, (XtCallbackProc) infoclose_callback, - (XtPointer) NULL); - - temp = mib_find_name(infoload, "TextBig")->me; - XtVaSetValues(temp, XmNcursorPositionVisible, False, - XmNeditable, False, NULL); - XmTextSetString(temp, infomessage); - - XmFontListFree (fontlist); - - parashell = CreateParameterWindow(shell); - - progshell = CreateProgramWindow(shell, cmdSocket, &playtag, frametext); - - fileshell = CreateFileWindow(shell, cmdSocket, &playtag, frametext); - -} - -/*****************************************************************************/ - -Window MonitorWindow() -{ - return monitorwindow; -} - -/*****************************************************************************/ - -void UISetColormap() -{ - privcolormap = 1; -} - -/*****************************************************************************/ - -void UISetwin(Window win) -{ - displaywin = win; -} - -/*****************************************************************************/ - -void UISetFrame() -{ - char framestr[100]; - - sprintf(framestr, "%d of %d", shared->currentDisplay, shared->totalFrames); - XmTextFieldSetString(frametext, framestr); -} - -/*****************************************************************************/ - -void UIMinsize(int x, int y) -{ - int minx; - int miny; - int winx; - int winy; - - winx = x; - winy = y; - - x += 30; - y += 180; - - if (x < 450) x = MINX; - if (y < 350) y = MINY; - - minx = x; miny = y; - - if (privcolormap) - { - XtVaSetValues(shell, XmNcolormap, cmap, NULL); - } - if (shell) - { - XtResizeWidget(shell, (Dimension)minx, (Dimension)miny, (Dimension)0); - XtVaSetValues(shell, - XmNminWidth, MINX, - XmNminHeight, MINY, - XmNmaxWidth, minx, - XmNmaxHeight, miny, - NULL); - - XtMapWidget(shell); /* Map the shell now to avoid disappearing buttons! */ - if (displaywin) - { - x = winx; y = winy; - winx = minx - 30; winy = miny - 180; - XMoveWindow(display, displaywin, (winx - x)/2, (winy - y)/2+12); - } - } -} - -/***************************************************************************** - - From here on we have private methods: - - *****************************************************************************/ - -static void exit_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - ACE_OS::exit (0); -} - - -static void info_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - /* - XtRealizeWidget(infoshell); - */ - XtManageChild(infoshell); -} - -static void infoclose_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - /* - XtUnrealizeWidget(infoshell); - */ - XtUnmanageChild(infoshell); -} - -static void para_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - - XtRealizeWidget(parashell); - /* - XtManageChild(parashell); - */ -} - -static void prog_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - - XtRealizeWidget(progshell); - /* - XtManageChild(progshell); - */ -} - -static void file_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - /* - XtRealizeWidget(fileshell); - */ - XtManageChild (fileshell); -} - -/*****************************************************************************/ - -static void loopchange_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - static int loop = 0; - loop = !loop; - if (playtag) - { - char cmd = loop ? CmdLOOPenable : CmdLOOPdisable; - CmdWrite(&cmd, 1); - } - else - beep(); -} - -static void normal_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -/* set speed bar, suppose speed_callback should be called automatically */ -{ - char cmd = CmdSPEED; - int value = 50; - CmdWrite(&cmd, 1); - CmdWrite((char *)&value, 4); - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Reached in %s line %d\n",__FILE__,__LINE__)); - XmScaleSetValue(speedscale, 50); -} - -static void fb_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - if (playtag && !cmdBusy) - { - char cmd = CmdFB; - cmdBusy = 1; - CmdWrite(&cmd, 1); - } - else - beep(); -} - -static void stop_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - if (playtag && !cmdBusy) - { - char cmd = CmdSTOP; - cmdBusy = 1; - CmdWrite(&cmd, 1); - } - else - beep(); -} - -static void ff_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - if (playtag && !cmdBusy) - { - char cmd = CmdFF; - cmdBusy = 1; - CmdWrite(&cmd, 1); - } - else - beep(); -} - - -static void step_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - if (playtag && !cmdBusy) - { - char cmd = CmdSTEP; - cmdBusy = 1; - CmdWrite(&cmd, 1); - } - else { - /* - beep(); - */ - } -} - -static void play_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - ACE_DEBUG ((LM_DEBUG,"(%P)play_callback:cmdbusy= %d,playtag=%d\n",cmdBusy,playtag)); - if (playtag && !cmdBusy) - { - char cmd = CmdPLAY; - cmdBusy = 1; - CmdWrite(&cmd, 1); - } - else - beep(); -} - -static void volume_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - char cmd; - XmScaleCallbackStruct * call_value = (XmScaleCallbackStruct *) cbs; - int value = call_value ->value; - - switch (call_value->reason) - { - case XmCR_VALUE_CHANGED: - case XmCR_DRAG: - cmd = CmdVOLUME; - CmdWrite(&cmd, 1); - CmdWrite((char *)&value, 4); - break; - default: - fprintf(stderr, "Hit the default, incorrect reason sent for scale!!\n"); - break; - } -} - -static void speed_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - char cmd; - XmScaleCallbackStruct * call_value = (XmScaleCallbackStruct *) cbs; - int value = call_value ->value; - - switch (call_value->reason) - { - case XmCR_VALUE_CHANGED: - case XmCR_DRAG: - cmd = CmdSPEED; - CmdWrite(&cmd, 1); - CmdWrite((char *)&value, 4); - break; - default: - fprintf(stderr, "Hit the default, incorrect reason sent for scale!!\n"); - break; - } -} - -static void balance_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - char cmd; - XmScaleCallbackStruct * call_value = (XmScaleCallbackStruct *) cbs; - int value = call_value ->value; - - switch (call_value->reason) - { - case XmCR_VALUE_CHANGED: - case XmCR_DRAG: - cmd = CmdBALANCE; - CmdWrite(&cmd, 1); - CmdWrite((char *)&value, 4); - break; - default: - fprintf(stderr, "Hit the default, incorrect reason sent for scale!!\n"); - break; - } -} - -static void position_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - char cmd; - XmScaleCallbackStruct * call_value = (XmScaleCallbackStruct *) cbs; - int value = call_value ->value; - - switch (call_value->reason) - { - case XmCR_VALUE_CHANGED: - if (playtag && !cmdBusy) - { - cmdBusy = 1; - cmd = CmdPOSITIONrelease; - CmdWrite(&cmd, 1); - CmdWrite((char *)&value, 4); - } - else - { - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Reached in %s line %d\n",__FILE__,__LINE__)); - XmScaleSetValue(positionscale, shared->locationPosition); - /* - fprintf(stderr, "UI: shared->cmd = %d\n", shared->cmd); - if (shared->cmd != CmdPOSITION) - beep(); - */ - } - - break; - case XmCR_DRAG: - if (playtag && !cmdBusy) - { - cmdBusy = 1; - cmd = CmdPOSITION; - CmdWrite(&cmd, 1); - CmdWrite((char *)&value, 4); - } - break; - default: - fprintf(stderr, "Hit the default, incorrect reason sent for scale!!\n"); - break; - } -} - -static void cmdSocket_callback(Widget w, XtPointer data, XmAnyCallbackStruct *cbs) -{ - char cmd; -/* - fprintf(stderr, "UI in CmdSocket_callback.\n"); -*/ - while (read(cmdSocket, &cmd, 1) <= 0) - { - if (errno == EINTR) return; - ACE_OS::perror ("UI by callback read from CmdSocket"); - ACE_OS::exit (1); - } - // ACE_DEBUG ((LM_DEBUG,"(%P)cmdSocket_callback:cmd= %d",cmd)); - if (cmd == CmdDONE || cmd == CmdFAIL) - { - cmdBusy = 0; - if (shared->cmd == CmdINIT) - { - if (cmd == CmdDONE) - { - char cmd = CmdSPEED; - int value = 50; - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Reached in %s line %d\n",__FILE__,__LINE__)); - XmScaleSetValue(speedscale, 50); - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Reached in %s line %d\n",__FILE__,__LINE__)); - XmScaleSetValue(positionscale, 0); - CmdWrite(&cmd, 1); - CmdWrite((char *)&value, 4); - /* - fprintf(stderr, "UI: VCR program successfully initialized.\n"); - */ - playtag = 1; - } - else - { - fprintf(stderr, "UI: VCR program initialization failed.\n"); - playtag = 0; - } - } - else { - /* - fprintf(stderr, "UI: cmd-%d finished successfully.\n", shared->cmd); - */ - } - /* - UISetFrame(); - */ - } - else - { - static int prepos = 0; - int curpos; - char * ptr; - - if (cmd == CmdVPdisplayFrame) { - ACE_OS::read (cmdSocket, (char *)&ptr, sizeof(char *)); - } - VPcommand((int)cmd, ptr); - - if (cmd == CmdVPaudioPosition) - { - curpos = (shared->nextSample * 100) / shared->totalSamples; - if (shared->cmd == CmdPLAY && - (curpos <= prepos - 1 || curpos >= prepos + 1)) - { - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Reached in %s line %d,positionscale = %d,curpos = %d\n", - // __FILE__,__LINE__,positionscale,curpos)); - XmScaleSetValue(positionscale, curpos); - prepos = curpos; - } - } - else if (cmd == CmdVPdisplayFrame && shared->totalFrames) - { - curpos = (shared->currentDisplay * 100) / shared->totalFrames; - if ((shared->cmd == CmdSTEP || shared->cmd == CmdPLAY || - shared->cmd == CmdFF || shared->cmd == CmdFB) && - (curpos <= prepos - 1 || curpos >= prepos + 1)) - { - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Reached in %s line %d\n",__FILE__,__LINE__)); - XmScaleSetValue(positionscale, curpos); - prepos = curpos; - } - } - } -} - -static void monitor_expose(Widget w, XtPointer data, - XmDrawingAreaCallbackStruct *cbs) -{ - VPexpose(); -} - -#define BUFSIZE 256 - -void UIprocess(int cmdSock) -{ - char *title, *vh, *vf, *vb, *ah, *af, *ab; - int i; - cmdSocket = cmdSock; - UICreate(); - - VPinitWindow(shell, monitorwindow, cmdSock); - XtAppAddInput(App, cmdSock, (XtPointer)XtInputReadMask, - (XtInputCallbackProc)cmdSocket_callback, NULL); - - title = vh = vf = vb = ah = af = ab = NULL; - - for (i = 1; i < argc_share; i++) { - if (ACE_OS::strcmp (argv_share[i], "-v") == 0) { - if (argc_share > i + 1) { - i ++; - vh = argv_share[i]; - cerr << "vh = " << vh << endl; - } - else break; - } - else if (ACE_OS::strcmp (argv_share[i], "-a") == 0) { - if (argc_share > i + 1) { - i ++; - ah = argv_share[i]; - cerr << "ah = " << ah << endl; - } - else break; - } - else if (ACE_OS::strcmp (argv_share[i], "-p") == 0) { - if (argc_share > i + 1) { - i ++; - title = argv_share[i]; - } - } - } - - if (title != NULL) { /* the init program is supplied by -l */ - cerr << "title is not null \n"; - FILE * fp; - char buf[PATH_SIZE]; - char vh[PATH_SIZE]; - char vf[PATH_SIZE]; - char ah[PATH_SIZE]; - char af[PATH_SIZE]; - - get_full_path(title, buf, 256); - fp = fopen(buf, "r"); - if (fp != NULL) { - if ((!feof(fp)) && fgets(buf, PATH_SIZE, fp) != NULL) { - buf[strlen(buf)-1] = 0; - } - else buf[0] = 0; - if ((!feof(fp)) && fgets(vh, PATH_SIZE, fp) != NULL) { - vh[strlen(vh)-1] = 0; - } - else vh[0] = 0; - if ((!feof(fp)) && fgets(vf, PATH_SIZE, fp) != NULL) { - vf[strlen(vf)-1] = 0; - } - else vf[0] = 0; - if ((!feof(fp)) && fgets(ah, PATH_SIZE, fp) != NULL) { - ah[strlen(ah)-1] = 0; - } - else ah[0] = 0; - if ((!feof(fp)) && fgets(af, PATH_SIZE, fp) != NULL) { - af[strlen(af)-1] = 0; - } - else af[0] = 0; - - fclose(fp); - Fprintf(stderr, "Init program: title %s, vh %s, vf %s, ah %s, af %s\n", - buf, vh, vf, ah, af); - StartProgram(buf, vh, vf, ah, af); - } - } - else if (vh != NULL || ah != NULL) {/* init program supplied by -v and -a */ - char *ptr; - - /* form the title */ - if (vh != NULL) { - title = (char *)ACE_OS::malloc(strlen(vh) + 1); - if (title != NULL) { - strcpy(title, vh); - } - } - else { - title = (char *)ACE_OS::malloc(strlen(ah) + 1); - if (title != NULL) { - strcpy(title, ah); - } - } - if (title == NULL) { - title = "The program from the command line"; - } - - /* generate vh and vf */ - if (vh != NULL) { - if ((ptr = strchr(vh, ':')) != NULL) { - * ptr = 0; - vf = ptr + 1; - } - else { - vf = vh; - vh = ""; - } - } - else vh = vf = ""; - - /* generate ah and af */ - if (ah != NULL) { - if ((ptr = strchr(ah, ':')) != NULL) { - * ptr = 0; - af = ptr + 1; - } - else { - af = ah; - ah = ""; - } - } - else ah = af = ""; - - fprintf(stderr, "Init program: title %s, vh %s, vf %s, ah %s, af %s\n", - title, vh, vf, ah, af); - StartProgram(title, vh, vf, ah, af); - ACE_OS::free (title); - if (ab != NULL) ACE_OS::free (ab); - if (vb != NULL) ACE_OS::free (vb); - } - - XtAppMainLoop(App); -} - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h deleted file mode 100644 index a77b5fdbb4e..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h +++ /dev/null @@ -1,18 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with this file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -void UICreate(); -void UIEnd(); -Window MonitorWindow(); -void UISetwin(Window); -void UIMinsize(int, int); -void UISetFrame(); -void UISetColormap(); diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.cpp deleted file mode 100644 index 8fc6ac680b6..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.cpp +++ /dev/null @@ -1,468 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -#include -#include "video.h" -#include "proto.h" -#include "util.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, util, "$Id$") - -#define TRUE 1 -#define FALSE 0 - -/* Declarations of global variables used. */ - -unsigned int curBits; -int bitOffset; -int bufLength; -unsigned int *bitBuffer; - -/* Bit masks used by bit i/o operations. */ - -unsigned int nBitMask[] = { 0x00000000, 0x80000000, 0xc0000000, 0xe0000000, - 0xf0000000, 0xf8000000, 0xfc000000, 0xfe000000, - 0xff000000, 0xff800000, 0xffc00000, 0xffe00000, - 0xfff00000, 0xfff80000, 0xfffc0000, 0xfffe0000, - 0xffff0000, 0xffff8000, 0xffffc000, 0xffffe000, - 0xfffff000, 0xfffff800, 0xfffffc00, 0xfffffe00, - 0xffffff00, 0xffffff80, 0xffffffc0, 0xffffffe0, - 0xfffffff0, 0xfffffff8, 0xfffffffc, 0xfffffffe}; - -unsigned int bitMask[] = { 0xffffffff, 0x7fffffff, 0x3fffffff, 0x1fffffff, - 0x0fffffff, 0x07ffffff, 0x03ffffff, 0x01ffffff, - 0x00ffffff, 0x007fffff, 0x003fffff, 0x001fffff, - 0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff, - 0x0000ffff, 0x00007fff, 0x00003fff, 0x00001fff, - 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff, - 0x000000ff, 0x0000007f, 0x0000003f, 0x0000001f, - 0x0000000f, 0x00000007, 0x00000003, 0x00000001}; - -unsigned int rBitMask[] = { 0xffffffff, 0xfffffffe, 0xfffffffc, 0xfffffff8, - 0xfffffff0, 0xffffffe0, 0xffffffc0, 0xffffff80, - 0xffffff00, 0xfffffe00, 0xfffffc00, 0xfffff800, - 0xfffff000, 0xffffe000, 0xffffc000, 0xffff8000, - 0xffff0000, 0xfffe0000, 0xfffc0000, 0xfff80000, - 0xfff00000, 0xffe00000, 0xffc00000, 0xff800000, - 0xff000000, 0xfe000000, 0xfc000000, 0xf8000000, - 0xf0000000, 0xe0000000, 0xc0000000, 0x80000000}; - -unsigned int bitTest[] = { 0x80000000, 0x40000000, 0x20000000, 0x10000000, - 0x08000000, 0x04000000, 0x02000000, 0x01000000, - 0x00800000, 0x00400000, 0x00200000, 0x00100000, - 0x00080000, 0x00040000, 0x00020000, 0x00010000, - 0x00008000, 0x00004000, 0x00002000, 0x00001000, - 0x00000800, 0x00000400, 0x00000200, 0x00000100, - 0x00000080, 0x00000040, 0x00000020, 0x00000010, - 0x00000008, 0x00000004, 0x00000002, 0x00000001}; - - -/* - *-------------------------------------------------------------- - * - * correct_underflow -- - * - * Called when buffer does not have sufficient data to - * satisfy request for bits. - * Calls get_more_data, an application specific routine - * required to fill the buffer with more data. - * - * Results: - * None really. - * - * Side effects: - * buf_length and buffer fields in curVidStream structure - * may be changed. - * - *-------------------------------------------------------------- - */ - -void -correct_underflow() { - - int status; - - status = get_more_data(curVidStream->buf_start, - curVidStream->max_buf_length, - &bufLength, &bitBuffer); - - if (status < 0) { - if (!quietFlag) { - fprintf (stderr, "\n"); - ACE_OS::perror ("Unexpected read error."); - } - ACE_OS::exit (1); - } - else if ((status == 0) && (bufLength < 1)) { - if (!quietFlag) { - fprintf(stderr, "\nImproper or missing sequence end code.\n"); - } -#ifdef ANALYSIS - PrintAllStats(); -#endif - if (!quietFlag) { - PrintTimeInfo(); - } -/* - if (loopFlag) longjmp(env, 1); - DestroyVidStream(curVidStream); -*/ - ACE_OS::exit (0); - } -#ifdef UTIL2 - curBits = *bitBuffer << bitOffset; -#else - curBits = *bitBuffer; -#endif - -} - - -/* - *-------------------------------------------------------------- - * - * next_bits -- - * - * Compares next num bits to low order position in mask. - * Buffer pointer is NOT advanced. - * - * Results: - * TRUE, FALSE, or error code. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -int next_bits(int num, unsigned int mask) -{ - unsigned int stream; - int ret_value; - - /* If no current stream, return error. */ - - if (curVidStream == NULL) - return NO_VID_STREAM; - - /* Get next num bits, no buffer pointer advance. */ - - show_bitsn(num, stream); - - /* Compare bit stream and mask. Set return value toTRUE if equal, FALSE if - differs. - */ - - if (mask == stream) { - ret_value = TRUE; - } else ret_value = FALSE; - - /* Return return value. */ - - return ret_value; -} - - -/* - *-------------------------------------------------------------- - * - * get_ext_data -- - * - * Assumes that bit stream is at begining of extension - * data. Parses off extension data into dynamically - * allocated space until start code is hit. - * - * Results: - * Pointer to dynamically allocated memory containing - * extension data. - * - * Side effects: - * Bit stream irreversibly parsed. - * - *-------------------------------------------------------------- - */ - -char *get_ext_data () -{ - int size, marker; - char *dataPtr; - unsigned int data; - - /* Set initial ext data buffer size. */ - - size = EXT_BUF_SIZE; - - /* Allocate ext data buffer. */ - - dataPtr = (char *) ACE_OS::malloc(size); - - /* Initialize marker to keep place in ext data buffer. */ - - marker = 0; - - /* While next data is not start code... */ - while (!next_bits(24, 0x000001)) { - - /* Get next byte of ext data. */ - - get_bits8(data); - - /* Put ext data into ext data buffer. Advance marker. */ - - dataPtr[marker] = (char) data; - marker++; - - /* If end of ext data buffer reached, resize data buffer. */ - - if (marker == size) { - size += EXT_BUF_SIZE; - dataPtr = (char *) realloc(dataPtr, size); - } - } - - /* Realloc data buffer to free any extra space. */ - - dataPtr = (char *) realloc(dataPtr, marker); - - /* Return pointer to ext data buffer. */ - - return dataPtr; -} - - -/* - *-------------------------------------------------------------- - * - * next_start_code -- - * - * Parses off bitstream until start code reached. When done - * next 4 bytes of bitstream will be start code. Bit offset - * reset to 0. - * - * Results: - * Status code. - * - * Side effects: - * Bit stream irreversibly parsed. - * - *-------------------------------------------------------------- - */ - -int next_start_code() -{ - int state; - int byteoff; - unsigned int data; - - /* If no current stream, return error. */ - - if (curVidStream == NULL) - return NO_VID_STREAM; - - /* If insufficient buffer length, correct underflow. */ -/* - if (bufLength < 2) { - correct_underflow(); - } - */ - - /* If bit offset not zero, reset and advance buffer pointer. */ - - byteoff = bitOffset % 8; - - if (byteoff != 0) { - flush_bits((8-byteoff)); - } - - /* Set state = 0. */ - - state = 0; - - /* While buffer has data ... */ - - while(bufLength > 0) { - - /* If insufficient data exists, correct underflow. */ -/* - if (bufLength < 2) { - correct_underflow(); - } -*/ - /* If next byte is zero... */ - - get_bits8(data); - - if (data == 0) { - - /* If state < 2, advance state. */ - - if (state < 2) state++; - } - - /* If next byte is one... */ - - else if (data == 1) { - - /* If state == 2, advance state (i.e. start code found). */ - - if (state == 2) state++; - - /* Otherwise, reset state to zero. */ - - else state = 0; - } - - /* Otherwise byte is neither 1 or 0, reset state to 0. */ - - else { - state = 0; - } - - /* If state == 3 (i.e. start code found)... */ - - if (state == 3) { - - /* Set buffer pointer back and reset length & bit offsets so - next bytes will be beginning of start code. - */ - - bitOffset = bitOffset - 24; - -#ifdef ANALYSIS - bitCount -= 24; -#endif - - if (bitOffset < 0) { - bitOffset = 32 + bitOffset; - bufLength++; - bitBuffer--; -#ifdef UTIL2 - curBits = *bitBuffer << bitOffset; -#else - curBits = *bitBuffer; -#endif - } - else { -#ifdef UTIL2 - curBits = *bitBuffer << bitOffset; -#else - curBits = *bitBuffer; -#endif - } - - /* Return success. */ - - return OK; - } - } - - /* Return underflow error. */ - - return UNDERFLOW; -} - - -/* - *-------------------------------------------------------------- - * - * get_extra_bit_info -- - * - * Parses off extra bit info stream into dynamically - * allocated memory. Extra bit info is indicated by - * a flag bit set to 1, followed by 8 bits of data. - * This continues until the flag bit is zero. Assumes - * that bit stream set to first flag bit in extra - * bit info stream. - * - * Results: - * Pointer to dynamically allocated memory with extra - * bit info in it. Flag bits are NOT included. - * - * Side effects: - * Bit stream irreversibly parsed. - * - *-------------------------------------------------------------- - */ - -char *get_extra_bit_info () -{ - int size, marker; - char *dataPtr; - unsigned int data; - - /* Get first flag bit. */ - get_bits1(data); - - /* If flag is false, return NULL pointer (i.e. no extra bit info). */ - - if (!data) return NULL; - - /* Initialize size of extra bit info buffer and allocate. */ - - size = EXT_BUF_SIZE; - dataPtr = (char *) ACE_OS::malloc(size); - - /* Reset marker to hold place in buffer. */ - - marker = 0; - - /* While flag bit is true. */ - - while (data) { - - /* Get next 8 bits of data. */ - get_bits8(data); - - /* Place in extra bit info buffer. */ - - dataPtr[marker] = (char) data; - marker++; - - /* If buffer is full, reallocate. */ - - if (marker == size) { - size += EXT_BUF_SIZE; - dataPtr = (char *) realloc(dataPtr, size); - } - - /* Get next flag bit. */ - get_bits1(data); - } - - /* Reallocate buffer to free extra space. */ - - dataPtr = (char *) realloc(dataPtr, marker); - - /* Return pointer to extra bit info buffer. */ - - return dataPtr; -} - - - - - - - - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h deleted file mode 100644 index 3c68ea365cd..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h +++ /dev/null @@ -1,368 +0,0 @@ -/* $Id$ */ -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -/* Status codes for bit stream i/o operations. */ - -#ifndef AV_UTIL_H -#define AV_UTIL_H - -#define NO_VID_STREAM -1 -#define UNDERFLOW -2 -#define OK 1 -/* Size increment of extension data buffers. */ - -#define EXT_BUF_SIZE 1024 - -/* External declarations for bitstream i/o operations. */ -extern unsigned int bitMask[]; -extern unsigned int nBitMask[]; -extern unsigned int rBitMask[]; -extern unsigned int bitTest[]; - -/* External declarations of bitstream global variables. */ -extern unsigned int curBits; -extern int bitOffset; -extern int bufLength; -extern unsigned int *bitBuffer; - -/* Macro for updating bit counter if analysis tool is on. */ -#ifdef ANALYSIS -#define UPDATE_COUNT(numbits) bitCount += numbits -#else -#define UPDATE_COUNT(numbits) -#endif - -#ifdef NO_SANITY_CHECKS -#define get_bits1(result) \ -{ \ - UPDATE_COUNT(1); \ - result = ((curBits & 0x80000000) != 0); \ - curBits <<= 1; \ - bitOffset++; \ - \ - if (bitOffset & 0x20) { \ - bitOffset = 0; \ - bitBuffer++; \ - curBits = *bitBuffer; \ - bufLength--; \ - } \ -} - -#define get_bits2(result) \ -{ \ - UPDATE_COUNT(2); \ - bitOffset += 2; \ - \ - if (bitOffset & 0x20) { \ - bitOffset -= 32; \ - bitBuffer++; \ - bufLength--; \ - if (bitOffset) { \ - curBits |= (*bitBuffer >> (2 - bitOffset)); \ - } \ - result = ((curBits & 0xc0000000) >> 30); \ - curBits = *bitBuffer << bitOffset; \ - } \ - \ - result = ((curBits & 0xc0000000) >> 30); \ - curBits <<= 2; \ -} - -#define get_bitsX(num, mask, shift, result) \ -{ \ - UPDATE_COUNT(num); \ - bitOffset += num; \ - \ - if (bitOffset & 0x20) { \ - bitOffset -= 32; \ - bitBuffer++; \ - bufLength--; \ - if (bitOffset) { \ - curBits |= (*bitBuffer >> (num - bitOffset)); \ - } \ - result = ((curBits & mask) >> shift); \ - curBits = *bitBuffer << bitOffset; \ - } \ - else { \ - result = ((curBits & mask) >> shift); \ - curBits <<= num; \ - } \ -} -#else - -#define get_bits1(result) \ -{ \ - /* Check for underflow. */ \ - /* \ - if (bufLength < 2) { \ - correct_underflow(); \ - } */ \ - UPDATE_COUNT(1); \ - result = ((curBits & 0x80000000) != 0); \ - curBits <<= 1; \ - bitOffset++; \ - \ - if (bitOffset & 0x20) { \ - bitOffset = 0; \ - bitBuffer++; \ - curBits = *bitBuffer; \ - bufLength--; \ - } \ -} - -#define get_bits2(result) \ -{ \ - /* Check for underflow. */ \ - /* \ - if (bufLength < 2) { \ - correct_underflow(); \ - } */ \ - UPDATE_COUNT(2); \ - bitOffset += 2; \ - \ - if (bitOffset & 0x20) { \ - bitOffset -= 32; \ - bitBuffer++; \ - bufLength--; \ - if (bitOffset) { \ - curBits |= (*bitBuffer >> (2 - bitOffset)); \ - } \ - result = ((curBits & 0xc0000000) >> 30); \ - curBits = *bitBuffer << bitOffset; \ - } \ - \ - result = ((curBits & 0xc0000000) >> 30); \ - curBits <<= 2; \ -} - -#define get_bitsX(num, mask, shift, result) \ -{ \ - /* Check for underflow. */ \ - /* \ - if (bufLength < 2) { \ - correct_underflow(); \ - } */ \ - UPDATE_COUNT(num); \ - bitOffset += num; \ - \ - if (bitOffset & 0x20) { \ - bitOffset -= 32; \ - bitBuffer++; \ - bufLength--; \ - if (bitOffset) { \ - curBits |= (*bitBuffer >> (num - bitOffset)); \ - } \ - result = ((curBits & mask) >> shift); \ - curBits = *bitBuffer << bitOffset; \ - } \ - else { \ - result = ((curBits & mask) >> shift); \ - curBits <<= num; \ - } \ -} -#endif - -#define get_bits3(result) get_bitsX(3, 0xe0000000, 29, result) -#define get_bits4(result) get_bitsX(4, 0xf0000000, 28, result) -#define get_bits5(result) get_bitsX(5, 0xf8000000, 27, result) -#define get_bits6(result) get_bitsX(6, 0xfc000000, 26, result) -#define get_bits7(result) get_bitsX(7, 0xfe000000, 25, result) -#define get_bits8(result) get_bitsX(8, 0xff000000, 24, result) -#define get_bits9(result) get_bitsX(9, 0xff800000, 23, result) -#define get_bits10(result) get_bitsX(10, 0xffc00000, 22, result) -#define get_bits11(result) get_bitsX(11, 0xffe00000, 21, result) -#define get_bits12(result) get_bitsX(12, 0xfff00000, 20, result) -#define get_bits14(result) get_bitsX(14, 0xfffc0000, 18, result) -#define get_bits16(result) get_bitsX(16, 0xffff0000, 16, result) -#define get_bits18(result) get_bitsX(18, 0xffffc000, 14, result) -#define get_bits32(result) get_bitsX(32, 0xffffffff, 0, result) - -#define get_bitsn(num, result) get_bitsX((num), nBitMask[num], (32-(num)), result) - -#ifdef NO_SANITY_CHECKS -#define show_bits32(result) \ -{ \ - if (bitOffset) { \ - result = curBits | (*(bitBuffer+1) >> (32 - bitOffset)); \ - } \ - else { \ - result = curBits; \ - } \ -} - -#define show_bitsX(num, mask, shift, result) \ -{ \ - int bO; \ - bO = bitOffset + num; \ - if (bO > 32) { \ - bO -= 32; \ - result = ((curBits & mask) >> shift) | \ - (*(bitBuffer+1) >> (shift + (num - bO))); \ - } \ - else { \ - result = ((curBits & mask) >> shift); \ - } \ -} - -#else -#define show_bits32(result) \ -{ \ - /* Check for underflow. */ \ - /* if (bufLength < 2) { \ - correct_underflow(); \ - } */ \ - if (bitOffset) { \ - result = curBits | (*(bitBuffer+1) >> (32 - bitOffset)); \ - } \ - else { \ - result = curBits; \ - } \ -} - -#define show_bitsX(num, mask, shift, result) \ -{ \ - int bO; \ - \ - /* Check for underflow. */ \ - /* if (bufLength < 2) { \ - correct_underflow(); \ - } */ \ - bO = bitOffset + num; \ - if (bO > 32) { \ - bO -= 32; \ - result = ((curBits & mask) >> shift) | \ - (*(bitBuffer+1) >> (shift + (num - bO))); \ - } \ - else { \ - result = ((curBits & mask) >> shift); \ - } \ -} -#endif - -#define show_bits1(result) show_bitsX(1, 0x80000000, 31, result) -#define show_bits2(result) show_bitsX(2, 0xc0000000, 30, result) -#define show_bits3(result) show_bitsX(3, 0xe0000000, 29, result) -#define show_bits4(result) show_bitsX(4, 0xf0000000, 28, result) -#define show_bits5(result) show_bitsX(5, 0xf8000000, 27, result) -#define show_bits6(result) show_bitsX(6, 0xfc000000, 26, result) -#define show_bits7(result) show_bitsX(7, 0xfe000000, 25, result) -#define show_bits8(result) show_bitsX(8, 0xff000000, 24, result) -#define show_bits9(result) show_bitsX(9, 0xff800000, 23, result) -#define show_bits10(result) show_bitsX(10, 0xffc00000, 22, result) -#define show_bits11(result) show_bitsX(11, 0xffe00000, 21, result) -#define show_bits12(result) show_bitsX(12, 0xfff00000, 20, result) -#define show_bits13(result) show_bitsX(13, 0xfff80000, 19, result) -#define show_bits14(result) show_bitsX(14, 0xfffc0000, 18, result) -#define show_bits15(result) show_bitsX(15, 0xfffe0000, 17, result) -#define show_bits16(result) show_bitsX(16, 0xffff0000, 16, result) -#define show_bits17(result) show_bitsX(17, 0xffff8000, 15, result) -#define show_bits18(result) show_bitsX(18, 0xffffc000, 14, result) -#define show_bits19(result) show_bitsX(19, 0xffffe000, 13, result) -#define show_bits20(result) show_bitsX(20, 0xfffff000, 12, result) -#define show_bits21(result) show_bitsX(21, 0xfffff800, 11, result) -#define show_bits22(result) show_bitsX(22, 0xfffffc00, 10, result) -#define show_bits23(result) show_bitsX(23, 0xfffffe00, 9, result) -#define show_bits24(result) show_bitsX(24, 0xffffff00, 8, result) -#define show_bits25(result) show_bitsX(25, 0xffffff80, 7, result) -#define show_bits26(result) show_bitsX(26, 0xffffffc0, 6, result) -#define show_bits27(result) show_bitsX(27, 0xffffffe0, 5, result) -#define show_bits28(result) show_bitsX(28, 0xfffffff0, 4, result) -#define show_bits29(result) show_bitsX(29, 0xfffffff8, 3, result) -#define show_bits30(result) show_bitsX(30, 0xfffffffc, 2, result) -#define show_bits31(result) show_bitsX(31, 0xfffffffe, 1, result) - -#define show_bitsn(num,result) show_bitsX((num), (0xffffffff << (32-(num))), (32-(num)), result) - -#ifdef NO_SANITY_CHECKS -#define flush_bits32 \ -{ \ - UPDATE_COUNT(32); \ - \ - bitBuffer++; \ - bufLength--; \ - curBits = *bitBuffer << bitOffset; \ -} - -#define flush_bits(num) \ -{ \ - bitOffset += num; \ - \ - UPDATE_COUNT(num); \ - \ - if (bitOffset & 0x20) { \ - bitOffset -= 32; \ - bitBuffer++; \ - bufLength--; \ - curBits = *bitBuffer << bitOffset; \ - } \ - else { \ - curBits <<= num; \ - } \ -} -#else -#define flush_bits32 \ -{ \ - if (curVidStream == NULL) { \ - /* Deal with no vid stream here. */ \ - } \ - /* \ - if (bufLength < 2) { \ - correct_underflow(); \ - } \ - */ \ - UPDATE_COUNT(32); \ - \ - bitBuffer++; \ - bufLength--; \ - curBits = *bitBuffer << bitOffset; \ -} - -#define flush_bits(num) \ -{ \ - if (curVidStream == NULL) { \ - /* Deal with no vid stream here. */ \ - } \ - /* \ - if (bufLength < 2) { \ - correct_underflow(); \ - } \ - */ \ - UPDATE_COUNT(num); \ - \ - bitOffset += num; \ - \ - if (bitOffset & 0x20) { \ - bufLength--; \ - bitOffset -= 32; \ - bitBuffer++; \ - curBits = *bitBuffer << bitOffset; \ - } \ - else { \ - curBits <<= num; \ - } \ -} -#endif - -#define UTIL2 - -#endif /* if !defined (AV_UTIL_H) */ - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util32.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util32.cpp deleted file mode 100644 index 8ac1762823f..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util32.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* $Id$ */ - -#include -#include -#include -#include "video.h" -#include "proto.h" -#include "ui.h" /* include user interface */ -#include "ace/OS.h" - -ACE_RCSID(mpeg_client, util32, "$Id$") - -/* - * Return a pointer to a full color bit visual on the dpy - */ -Visual * -FindFullColorVisual (Display *dpy, int *depth) -{ - XVisualInfo vinfo; - XVisualInfo *vinfo_ret; - int numitems, maxdepth; - -#ifdef __cplusplus - vinfo.c_class = TrueColor; -#else - vinfo.class = TrueColor; -#endif - vinfo_ret = XGetVisualInfo(dpy, VisualClassMask, &vinfo, &numitems); - - if (numitems == 0) return NULL; - - maxdepth = 0; - while(numitems > 0) { - if (vinfo_ret[numitems-1].depth > maxdepth) { - maxdepth = vinfo_ret[numitems-1 ].depth; - } - numitems--; - } - XFree(vinfo_ret); - - if (maxdepth < 24) return NULL; - - if (XMatchVisualInfo(dpy, DefaultScreen(dpy), maxdepth, - TrueColor, &vinfo)) { - *depth = maxdepth; - return vinfo.visual; - } - - return NULL; -} - -Window -CreateFullColorWindow (Display *dpy, int x, int y, int w, int h) -{ - int depth; - Visual *visual; - XSetWindowAttributes xswa; - Window temp; - unsigned int mask; - unsigned int valclass; - int screen; - - screen = XDefaultScreen(dpy); - valclass = InputOutput; /* Could be InputOnly */ - visual = FindFullColorVisual (dpy, &depth); - if (visual == NULL) { - return 0; - } - mask = CWBackPixel | CWColormap | CWBorderPixel; - xswa.colormap = XCreateColormap(dpy, XRootWindow(dpy, screen), - visual, AllocNone); - xswa.background_pixel = BlackPixel(dpy, DefaultScreen(dpy)); - xswa.border_pixel = WhitePixel(dpy, DefaultScreen(dpy)); - - temp = XCreateWindow(dpy, MonitorWindow(), x, y, w, h, - 1, depth, valclass, visual, mask, &xswa); - - UISetwin(temp); - - return temp; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp deleted file mode 100644 index 0f2ab37c5af..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp +++ /dev/null @@ -1,1129 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -extern int vsp[2]; -extern void set_exit_routine_tag(int tag); - -#include "vb.h" - -ACE_RCSID(mpeg_client, vb, "$Id$") - -block ** VideoBuffer::head = 0; -block ** VideoBuffer::tail = 0; -char * VideoBuffer::buf = 0; -int VideoBuffer::bufsize = -1; -int VideoBuffer::sid = -1; -int VideoBuffer::countid = -1; -int VideoBuffer::exit_tag = -1; -int VideoBuffer::conn_tag = -1; -int VideoBuffer::savedSocket = -1; - -//constructor. -VideoBuffer::VideoBuffer (void) - :msg (0), - packet (0), - msgsn (-1), - ptr (0), - ptr1 (0), - tmp_buf (0), - cmdsn (-1), - fb_state (0), - qosRecomputes (0), - f (0), - fa (0), - reach_limit (0), - not_action (1) -#ifdef STAT - ,to_count (1), - gap_msgsn (-1) -#endif -{ -} - -// Destructor. -VideoBuffer::~VideoBuffer (void) -{ - if (ACE_Reactor::instance ()->remove_handler (this->handler_,ACE_Event_Handler::READ_MASK) == -1) - ACE_DEBUG ((LM_ERROR,"(%P)remove handler failed for Video_Notification_Handler\n")); - - delete this->handler_; - if (ACE_Reactor::instance ()->remove_handler (this,ACE_Event_Handler::READ_MASK) == -1) - ACE_DEBUG ((LM_ERROR,"(%P)remove handler failed for VideoBuffer\n")); -} - -/* size in byte */ -void -VideoBuffer::VBinitBuf (int size) -{ - bufsize = size - sizeof(struct header); - buf = creat_shared_mem(size); - head = &((struct header *)buf)->h; - tail = &((struct header *)buf)->t; - buf += sizeof(struct header); - sid = creat_semaphore(); - countid = creat_semaphore(); - enter_cs(countid); - *head = *tail = (struct block *)buf; - (*tail)->full = 0; - (*tail)->next = NULL; - (*tail)->shcode = SHCODE; -} - -/* block version */ -char* -VideoBuffer::VBgetBuf (int size) -{ - return 0; -} - -/* non-block check, return True/False*/ -int -VideoBuffer::VBcheckBuf (int size) -{ - return 0; -} - -void -VideoBuffer::VBputMsg (char * msgPtr) -{ -} - -/* block version */ -char * -VideoBuffer::VBgetMsg () -{ - char *vb_ptr; - -#ifdef STAT - if (shared->collectStat && *head == *tail) - shared->stat.VBemptyTimes ++; -#endif - // ACE_DEBUG ((LM_DEBUG,"(%P)waiting for countid\n")); - enter_cs(countid); - enter_cs(sid); - while (*tail != *head && (*tail)->full == 0) - *tail = (*tail)->next; - leave_cs(sid); - if (*head == *tail) - { - fprintf(stderr, "VB: getMsg run out of msg unexpectedly.\n"); - ACE_OS::exit (1); - } - vb_ptr = ((char*)*tail)+sizeof(**tail)+sizeof(VideoMessage); - - // fprintf(stderr,"VBgetMsg: buf:%x, msg:%x\n", (int)buf, (int)vb_ptr); - - return vb_ptr; -} - -/* non-block check, return Number of Msgs in buffer */ -int -VideoBuffer::VBcheckMsg () -{ - return get_semval(countid); -} - -int -VideoBuffer::VBbufEmpty (void) -{ - /* - Fprintf(stderr, "VB countid %d\n", get_semval(countid)); - */ - return get_semval(countid) <= 0; -} - -void -VideoBuffer::VBreclaimMsg (char * msgPtr) -{ - enter_cs(sid); - *tail = (*tail)->next; - leave_cs(sid); -} - -void -VideoBuffer::VBdeleteBuf (void) -{ - remove_shared_mem (buf - sizeof(struct header)); -} - -void -VideoBuffer::VBdeleteSem (void) -{ - remove_semaphore(sid); - remove_semaphore(countid); -} - -int -VideoBuffer::VBprocess (int init_socket, int normal_socket) -{ - this->initSocket = init_socket; - this->normalSocket = normal_socket; - msgsn = -1; - dataSocket = initSocket; - exit_tag = 0; - conn_tag = shared->videoMaxPktSize; - savedSocket = normalSocket; - - // ACE_DEBUG ((LM_DEBUG,"VideoBuffer::VBProcess ()\n")); - /* buffer big enough for discard mode packet stream */ - if (conn_tag < 0) - { - tmp_buf = (char *)ACE_OS::malloc(-conn_tag); - if (tmp_buf == NULL) { - fprintf(stderr, "AB failed to allocate %d bytes"); - ACE_OS::perror ("of tmp_buf"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - } - - ACE_NEW_RETURN (this->handler_, - Video_Notification_Handler (), - -1); - - // Register the notification handler with the reactor. - int result = ACE_Reactor::instance ()->register_handler (this->handler_, - ACE_Event_Handler::READ_MASK); - if (result != 0) - return result; - - result = ACE_Reactor::instance ()->register_handler (this, - ACE_Event_Handler::READ_MASK); - - if (result != 0) - return result; - - this->state_ = READ_HEADER; - temp = (char *)&msghd; - bytes = sizeof (msghd); - return 0; -} - -ACE_HANDLE -VideoBuffer::get_handle (void) const -{ - if (this->socket_flag_) - return this->normalSocket; - else - return this->initSocket; -} - -int -VideoBuffer::handle_input (ACE_HANDLE fd) -{ - // ACE_DEBUG ((LM_DEBUG,"VideoBuffer::handle_input:state = %d\n",this->state_)); - switch (this->state_) - { - case READ_NEXT_HEADER: - case READ_HEADER: - { - if (conn_tag >= 0) - len = ACE_OS::read (dataSocket,temp,bytes); - else - { - len = ACE_OS::read (dataSocket,tmp_buf,-conn_tag); - // fprintf (stderr,"VB read packet len = %d\n",len); - ACE_OS::memcpy ((char *)&msghd, tmp_buf, sizeof(msghd)); - } - if (len == -1) { - if (errno == EWOULDBLOCK || errno == EAGAIN) { - perror("VB sleep for 10ms"); - usleep(10000); - // set the pointers before going into the next loop. - temp = (char *)&msghd; - bytes = sizeof (msghd); - return 0; - } - ACE_OS::perror ("VB ACE_OS::read () data"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - if (len == 0) { /* EOF, connection closed by peer */ - fprintf(stderr, "Error: VB found dataSocket broken\n"); - for (;;) { - usleep(1000000); - } - } - if (conn_tag >= 0) - { - temp += len; - bytes -= len; - if (bytes != 0) - return 0; - else - len = sizeof (msghd); - } - if (len < sizeof(msghd)) - { - // go back to reading the next header. - temp = (char *)&msghd; - bytes = sizeof (msghd); - fprintf(stderr, "VD warn: PEEK1ed %dB < expected %dB\n",len, sizeof(msghd)); - // continue; - } -#ifdef NeedByteOrderConversion - msghd.packetsn = ntohl(msghd.packetsn); - msghd.packetSize = ntohl(msghd.packetSize); - msghd.msgsn = ntohl(msghd.msgsn); - msghd.msgOffset = ntohl(msghd.msgOffset); - msghd.msgSize = ntohl(msghd.msgSize); -#endif - - if (this->state_ == READ_NEXT_HEADER) - { -#ifdef STAT - { - int gap = msghd.msgsn - gap_msgsn; - gap = (gap >MSGGAP_MAX) ? MSGGAP_MAX : gap < MSGGAP_MIN ? MSGGAP_MIN : gap; - shared->stat.VBmsgGaps[gap - MSGGAP_MIN] ++; - if (gap >0) gap_msgsn = msghd.msgsn; - } -#endif - if (msghd.msgsn <= msgsn) - { /* outdated message, wait for next one */ - - fprintf(stderr, "VB discard outdated or dup msgsn %d, pktsn %d\n", - msghd.msgsn, msghd.packetsn); - - this->state_ = SKIP_NEXT_MESSAGE; - bytes = msghd.msgSize; - // skip_message(dataSocket, &msghd); - // continue; - return 0; - } - - if ((msghd.msgsn > msgsn + 1) || (msghd.msgOffset == 0)) - { - /* message out of order, abandon current packet */ - /* - fprintf(stderr, "VB msg out of order for current packet, discard it.\n"); - */ -#ifdef STAT - to_count = 0; -#endif - } - else - { - // ACE_DEBUG ((LM_DEBUG,"assigning next msgsn %d\n",msghd.msgsn)); - msgsn = msghd.msgsn; - this->state_ = READ_MESSAGE; - temp = ptr +sizeof (msghd); - bytes = msghd.msgSize; - // make a recursive call as we just have to do a memcpy from the buffer. - this->handle_input (dataSocket); - return 0; - } - } - - // fprintf(stderr, "VB PEEK1 a msg sn-%d, size-%d, pkt-%d, pktsize-%d\n",msghd.msgsn, msghd.msgSize, msghd.packetsn, msghd.packetSize); - -#ifdef STAT - if (to_count) { - int gap = msghd.msgsn - gap_msgsn; - gap = (gap >MSGGAP_MAX) ? MSGGAP_MAX : gap < MSGGAP_MIN ? MSGGAP_MIN : gap; - shared->stat.VBmsgGaps[gap - MSGGAP_MIN] ++; - if (gap >0) gap_msgsn = msghd.msgsn; - } - to_count = 1; -#endif - if (msghd.msgsn <= msgsn) /* outdated msg */ - { - fprintf(stderr, "VB discard outdated msgsn %d, pktsn %d when expecting first %d\n", - msghd.msgsn, msghd.packetsn,msgsn); - this->state_ = SKIP_MESSAGE; - bytes = msghd.msgSize; - // skip_message(dataSocket, &msghd); - // continue; - return 0; - } - else if (msghd.msgOffset != 0) /* not first msg of a packet */ - { - - /* - Fprintf(stderr, "VB discard non-first msg msgsn %d, pktsn %d\n", - msghd.msgsn, msghd.packetsn); - */ - this->state_ = SKIP_MESSAGE; - bytes = msghd.msgSize; - // skip_message(dataSocket, &msghd); - // continue; - return 0; - } - else - { - // ACE_DEBUG ((LM_DEBUG,"assigning msgsn %d\n",msghd.msgsn)); - msgsn = msghd.msgsn; - } - - /* allocate packet for the incoming msg */ - bsize = msghd.packetSize + sizeof(**head)*2 + sizeof(msghd); - bsize = ((bsize+3)>>2)<<2; - enter_cs(sid); - if (*head >= *tail) - { - if (bufsize - (int)((char*)*head - buf) >= bsize ) - msg =(VideoMessage *)((char*)*head + sizeof(**head)); - else if ((int)((char*)*tail - buf) >= bsize) - { - (*head)->next = (struct block *)buf; - (*head)->full = 0; - *head = (struct block *)buf; - msg = (VideoMessage *)(buf + sizeof(**head)); - *head = (struct block *)buf; - (*head)->shcode = SHCODE; - } - else /* not enough buffer, discard current message */ - { - leave_cs(sid); -#ifdef STAT - if (shared->collectStat) - shared->stat.VBdroppedFrames ++; -#endif - /* - Fprintf(stderr, "VB not enough space 1, drop msg.sn %d pktsn %d\n", - msghd.msgsn, msghd.packetsn); - */ - this->state_ = SKIP_MESSAGE; - bytes = msghd.msgSize; - // skip_message(dataSocket, &msghd); - // continue; - return 0; - } - } - else /* *head < *tail */ - if ((char*)*tail - (char*)*head >= bsize) - msg = (VideoMessage *)((char*)*head + sizeof(**head)); - else /* not enough buffer, abandon current message */ - { - leave_cs(sid); -#ifdef STAT - if (shared->collectStat) - shared->stat.VBdroppedFrames ++; -#endif - /* - Fprintf(stderr, "VB not enough space 1, drop msg.sn %d pktsn %d\n", - msghd.msgsn, msghd.packetsn); - - */ - this->state_ = SKIP_MESSAGE; - bytes = msghd.msgSize; - // skip_message(dataSocket, &msghd); - // continue; - return 0; - } - leave_cs(sid); - - //fprintf(stderr, "VB allocated a buffer for comming packet.\n"); - - psize = msghd.packetSize; - poffset = 0; - packet = (VideoPacket *)((char*)msg + sizeof(msghd)); - *(((int*)packet)+(msghd.packetSize>>2)) = 0; - /* clear the last no more than three bytes, for - proper detecting the end of packet by VD */ - ptr = (char*)msg; - this->state_ = READ_MESSAGE; - temp = ptr +sizeof (msghd); - bytes = msghd.msgSize; - } - break; - case SKIP_NEXT_MESSAGE: - case SKIP_MESSAGE: - { - char buffer[BUFSIZ]; - if (conn_tag >= 0) - { - int size = bytes > BUFSIZ ? BUFSIZ : bytes; - int res =ACE_OS::read (dataSocket, buffer, size); - bytes -= res; - - if (bytes != 0) - return 0; - } - if (this->state_ == SKIP_MESSAGE) - this->state_ = READ_HEADER; - else if (this->state_ == SKIP_NEXT_MESSAGE) - this->state_ = READ_NEXT_HEADER; - temp = (char *)&msghd; - bytes = sizeof (msghd); - break; - } - case READ_MESSAGE: - { - if (conn_tag >= 0) - { - int val; - val = ACE_OS::read (dataSocket,temp,bytes); - - if (val == -1 && (errno == EINTR || errno == EAGAIN | errno == EWOULDBLOCK)) - { /* interrupted or need to wait, try again */ - if (errno == EAGAIN | errno == EWOULDBLOCK) usleep(10000); - errno = 0; - return 0; - } - if (val == -1) - { - ACE_OS::perror ("Error -- Read from socket"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - if (val == 0) /* EOF encountered */ - { - ACE_DEBUG ((LM_DEBUG, "Error -- EOF reached while trying to read %d bytes.\n")); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - temp += val; - bytes -= val; - if (bytes < 0) /* weird thing is happening */ - { - ACE_DEBUG ((LM_DEBUG, "Error: read too much from socket, %d out of %d bytes.\n")); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - if (bytes != 0) - return 0; - } - else - memcpy(temp, tmp_buf + sizeof(msghd), bytes); - poffset += msghd.msgSize; - psize -= msghd.msgSize; - ptr += msghd.msgSize; - - // fprintf(stderr, "VB packet remain size %d\n", psize); - - if (psize == 0) - { - // ACE_DEBUG ((LM_DEBUG,"finished receiving current packet\n")); - /* finished receiving the current packet */ -#ifdef NeedByteOrderConversion - packet->cmd = ntohl(packet->cmd); - packet->cmdsn = ntohl(packet->cmdsn); - packet->sh = ntohl(packet->sh); - packet->gop = ntohl(packet->gop); - packet->frame = ntohl(packet->frame); - packet->display = ntohl(packet->display); - packet->future = ntohl(packet->future); - packet->past = ntohl(packet->past); - packet->currentUPF = ntohl(packet->currentUPF); - packet->dataBytes = ntohl(packet->dataBytes); -#endif - pcmdsn = packet->cmdsn; - pcmd = packet->cmd; - pfid = packet->frame; - pgop = packet->gop; - shared->VBheadFrame = (pcmd == CmdPLAY) ? pfid : pgop; - - shared->currentUPF = packet->currentUPF; - enter_cs(sid); - (*head)->full = 1; - psize = sizeof(**head) + sizeof(*msg) + msghd.packetSize; - psize = ((psize+3)>>2)<<2; - ptr = (char*)*head + psize; - (*head)->next = (struct block *) ptr; - (*head) = (struct block *)ptr; - (*head)->shcode = SHCODE; - leave_cs(countid); - leave_cs(sid); - - /* VB receives all frame except for the INIT one through normalSocket */ - if (dataSocket != normalSocket) - { - this->socket_flag_ = 1; - fprintf(stderr, "VB got INIT frame.\n"); - ACE_OS::write (initSocket, (char *)&initSocket, 1); /* write a garbage byte */ - // ACE_OS::close (initSocket); - // dataSocket = normalSocket; - // int result = ACE_Reactor::instance ()->remove_handler (this,ACE_Event_Handler::READ_MASK); - // if (result != 0) - // ACE_DEBUG ((LM_DEBUG,"remove handler failed for read_mask\n")); - - } - - /* following is synchronization feedback algorithm */ - this->sync_feedback (); - if (dataSocket != normalSocket) - { - dataSocket = normalSocket; - int result = ACE_Reactor::instance ()->register_handler (this,ACE_Event_Handler::READ_MASK); - if (result != 0) - ACE_DEBUG ((LM_DEBUG,"register handler failed for read_mask after datasocket change\n")); - return -1; - } - // return 0; - break; /* got the whole packet, break to the out-most loop for next packet */ - } /* end if (psize == 0) */ - else if (psize < 0) - { - fprintf(stderr, "VB error: received too many msgs for a packet.\n"); - ACE_Reactor::instance ()->end_event_loop (); - return -1; - } - this->state_ = READ_NEXT_HEADER; - temp = (char *)&msghd; - bytes = sizeof (msghd); - break; - } - } - return 0; -} - -int -VideoBuffer::handle_output (ACE_HANDLE fd) -{ - if ((this->state_ == WRITE_FEEDBACK1) || (this->state_ == WRITE_FEEDBACK2)) - { - // send the feedback to the server. - VideoFeedBackPara para; - para.cmdsn = htonl(shared->cmdsn); - para.addUsecPerFrame = htonl(fb_addupf); - para.addFrames = htonl(fb_addf); - para.needHeader = htonl(shared->needHeader); - shared->needHeader = 0; - para.frameRateLimit1000 = - htonl((long)(shared->frameRateLimit * 1000.0)); - para.sendPatternGops = htonl(shared->sendPatternGops); - ACE_OS::memcpy (para.sendPattern, shared->sendPattern, PATTERN_SIZE); - - // fprintf(stderr, "VB to send a fb packet..."); - - int res; - if (conn_tag != 0) - { /* packet stream */ - if (temp == 0) - { - temp = (char *)¶ - bytes = sizeof (para); - } - res = ACE_OS::write (dataSocket, temp, bytes); - if (res == -1) - { - if (errno == EINTR) - return 0; - if (errno == ENOBUFS) { - perror("VB Warning, fb packet discarded for"); - // Here we should handle the return -1 case! - fb_state = 4; - } - else - { - ACE_OS::perror ("VB error, fb packet sending failed"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - } - else if (res == 0) - { - ACE_OS::perror ("VB error, sending fb,socket closed"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - else - { - temp += res; - bytes -= res; - if (bytes != 0) - return 0; - } - } - else - { - res = ACE_OS::write (dataSocket, (char *)¶, sizeof(para)); - if (res == -1) - { - ACE_OS::perror ("VB error, fb packet sending failed"); - ACE_Reactor::instance ()->end_event_loop (); return -1; - } - if (res < sizeof(para)) - { - fprintf(stderr, "VB send_feedback() warn: res %dB < sizeof(para) %dB\n", - res, sizeof(para)); - } - } - if (errno != ENOBUFS) // fb_state == 4; - qosRecomputes = len; - ACE_Reactor::instance ()->remove_handler (this, - ACE_Event_Handler::WRITE_MASK); - if (this->state_ == WRITE_FEEDBACK2) - { - if (fb_state == 6) - { /* record the time if an action packet is - successfully send, and indicate that an - feedback action leads to state 6, which after - delay sometime leads to state 3. - The action_delay should have been related - to round-trip time. */ - action_time = get_usec(); - action_delay = shared->usecPerFrame * 100; - not_action = 0; - } - } - else if (this->state_ == WRITE_FEEDBACK2) - { - this->feedback_action (); - } -#ifdef STAT - { - int i; - if ((i = shared->stat.fbPacketNumber) < MAX_FB_PACKETS) { - shared->stat.fbPackets[i].frameId = shared->nextFrame; - shared->stat.fbPackets[i].addUsecPerFrame = addupf; - shared->stat.fbPackets[i].addFrames = addf; - shared->stat.fbPackets[i].frames = shared->sendPatternGops * - shared->patternSize; - shared->stat.fbPackets[i].framesDropped = shared->framesDropped; - shared->stat.fbPackets[i].frameRateLimit = shared->frameRateLimit; - shared->stat.fbPackets[i].advance = advance; - } - shared->stat.fbPacketNumber ++; - } -#endif - // Now return to the reading header position. - this->state_ = READ_HEADER; - temp = (char *)&msghd; - bytes = sizeof (msghd); - int result = ACE_Reactor::instance ()->remove_handler (this, - ACE_Event_Handler::WRITE_MASK); - if (result != 0) - ACE_DEBUG ((LM_DEBUG,"remove_handler failed for write")); - } - return 0; -} - -int -VideoBuffer::sync_feedback (void) -{ - int result; - if (shared->config.syncEffective) - { - if (fb_state > 1 && fb_state != 4 && (len = shared->qosRecomputes) != qosRecomputes) - { - /* QoS feedback packet is sent if at any time send pattern is - recomputed, and sync feedback is not in active fb_state*/ - this->state_ = WRITE_FEEDBACK1; - result = ACE_Reactor::instance ()->register_handler (this,ACE_Event_Handler::WRITE_MASK); - if (result != 0) - return result; - fb_addupf = 0; - fb_addf = 0; - fb_advance = advance; - temp = 0; - return 0; - } - this->feedback_action (); - } /* end if (shared->config.syncEffective) */ - else - fb_state = 0; - return 0; -} - -int -VideoBuffer::feedback_action (void) -{ - switch (fb_state) - { - case 4: /* active */ - if (pcmdsn != cmdsn) - { - cmdsn = pcmdsn; - if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) - fb_state = 0; - else - fb_state = 1; - break; - } - if (pcmd == CmdPLAY && shared->usecPerFrame != upf) - { - /* jump to fb_state 5 if speed changes */ - fb_state = 5; - break; - } - { - int interval = shared->usecPerFrame; - double val = (double)(pcmd == CmdPLAY ? - pfid - shared->nextFrame : - (pcmd == CmdFF ? - pgop - shared->nextGroup : - shared->nextGroup - pgop)); - fv = DoFilter(f, val); /* get average #frames in the whole client - pipeline, including all stages */ - val = val - fv; - fav = DoFilter(fa, val >= 0.0 ? val : -val); - /* get average #frames jitter in the whole client pipeline */ - - val = fav * interval * 6; - /* convert deviation in frame into microseconds, 6 is a magic number */ - - /* tries to recompute advance (in microseconds), and med/high/low - in adaptation to current jitter level */ - if ((val > advance && !reach_limit) || - (advance > min_advance && val < advance >> 3)) { - advance = (int) max(2 * val, min_advance); - med = advance / interval; - /* - if (pcmd == CmdPLAY) { - if (med < shared->VDframeNumber) { - med = shared->VDframeNumber; - } - } - else - */ - if (med < 2 ) { /* but keep minimum buffer fill level */ - med = 2; - } - if (med > (VB_BUF_SIZE / shared->averageFrameSize) / 2) { - reach_limit = 1; - med = (VB_BUF_SIZE / shared->averageFrameSize) / 2; - Fprintf(stderr, - "VB VSadvance control: VBbuf limit reached, med %d.\n", med); - } - else reach_limit = 0; - high = med + med / 2; - low = med - med / 2; - period = med * MAX_CLOCK_DRIFT; - Fprintf(stderr, - "VB: VS advance control: fav %5.2f, med %d, advance %d at nextFrame %d\n", - fav, med, advance, shared->nextFrame); - } - } - /* record the current time (fid or gopid) if buffer fill level drift - only very little */ - if ((int)fv == med) - { - init_fv = fv; - init_pos = pcmd == CmdPLAY ? pfid : pgop; - break; - } - /* - fprintf(stderr, "VB fb: fv %lf\n", fv); - */ - /* try send action if low/high water mark is passed, or qos recomputed */ - /* There is problem here, the deltas of upf are sent, instead of upf - and frame themself. This scheme is not robust in case case feedback - packets are lost, and get resent */ - len = shared->qosRecomputes; - if (fv >= high || fv <= low || len != qosRecomputes) - { - int addupf, addf; - int pos = pcmd == CmdPLAY ? pfid : pgop; - int dist = (int)(pcmd == CmdFB ? init_pos - pos : pos - init_pos); - if (fv >= high || fv <= low) - { - if (dist < period) - { /* try skip or stall */ - addf = (int)(med - fv); - addupf = 0; - } - else - { /* try adjust VS clock rate */ - int added = (int)((double)cupf * (fv - (double)med) / (double) dist); - addf = (int)(med - fv); - addupf = added; - cupf += added; - } - fb_state = 6; - } - else - { /* fb only recomputed sendpattern, no fb_state change */ - addupf = 0; - addf = 0; - } - - /* tries to send a feedback packet. */ - if (shared->live) - /* no sync feedback with live video */ - qosRecomputes = len; - else - { - this->state_ = WRITE_FEEDBACK2; - int result = ACE_Reactor::instance ()->register_handler (this,ACE_Event_Handler::WRITE_MASK); - if (result != 0) - return result; - fb_addupf = addupf; - fb_addf = addf; - fb_advance = advance; - return 0; - } - if (fb_state == 6) - { /* record the time if an action packet is - successfully send, and indicate that an - feedback action leads to fb_state 6, which after - delay sometime leads to fb_state 3. - The action_delay should have been related - to round-trip time. */ - action_time = get_usec(); - action_delay = shared->usecPerFrame * 100; - not_action = 0; - } - } - break; - case 6: /* reset after action */ - if (pcmdsn != cmdsn) - { - cmdsn = pcmdsn; - if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) - fb_state = 0; - else - fb_state = 1; - break; - } - if (pcmd == CmdPLAY && shared->usecPerFrame != upf) - { - fb_state = 5; - break; - } - /* Jump to transition fb_state 3 only after delay for some - time, when feedback action has been taken, and the - effect has been propogated back to the client */ - if (get_duration(action_time, get_usec()) >= action_delay) - fb_state = 3; - break; - case 5: /* reset after speed change, feedback stays in this - fb_state as long as play speed is changing */ - if (pcmdsn != cmdsn) - { - cmdsn = pcmdsn; - if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) - fb_state = 0; - else - fb_state = 1; - break; - } - /* Jump to transition fb_state 3, indicating that the transition - is not caused by feedback action */ - if (shared->currentUPF == shared->usecPerFrame) - { - not_action = 1; - fb_state = 3; - } - break; - case 2: /* delay after start, this delay is for avoiding feedback - action during server fast start-up. */ - if (pcmdsn != cmdsn) { - cmdsn = pcmdsn; - if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) { - fb_state = 0; - } - else { - fb_state = 1; - } - break; - } - if (pcmd == CmdPLAY) { - if (pfid - startpos >= delay) { - advance = shared->VStimeAdvance; - fb_state = 3; - } - } - else if (pcmd == CmdFF) { - if (pgop - startpos >= delay) { - advance = shared->VStimeAdvance; - fb_state = 3; - } - } - else { /* CmdFB */ - if (startpos - pgop >= delay) { - advance = shared->VStimeAdvance; - fb_state = 3; - } - } - break; - case 3: /* transient fb_state, entered after start-up delay, - action-delay, or play-speed change */ - if (pcmdsn != cmdsn) { - cmdsn = pcmdsn; - if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) { - fb_state = 0; - } - else { - fb_state = 1; - } - break; - } - /* Initialize both buffer-fill-level and jitter filters */ - if (f == NULL) { - f = NewFilter(FILTER_LOWPASS, shared->config.filterPara >= 1 ? - shared->config.filterPara : 100); - } - else { - f = ResetFilter(f, shared->config.filterPara >= 1 ? - shared->config.filterPara : 100); - } - if (fa == NULL) { - fa = NewFilter(FILTER_LOWPASS, shared->config.filterPara >= 1 ? - shared->config.filterPara : 100); - DoFilter(fa, 0.0); - } - else if (not_action) { /* reset jitter level filter only - if entering this fb_state is not - cause by feedback action */ - fa = ResetFilter(fa, shared->config.filterPara >= 1 ? - shared->config.filterPara : 100); - } - if (f == NULL || fa == NULL) { - ACE_OS::perror ("VB failed to allocate space for filters"); - fb_state = 0; - } - else { - init_fv = - DoFilter(f, (double)(pcmd == CmdPLAY ? - pfid - shared->nextFrame : - (pcmd == CmdFF ? - pgop - shared->nextGroup : - shared->nextGroup - pgop))); - init_pos = pcmd == CmdPLAY ? pfid : pgop; - upf = shared->currentUPF; - cupf = upf; - { - int interval = shared->usecPerFrame; - - /* upon speed change, 'advance', in microseconds, will - not change, but med/high/low will be updated. This - may suggest that in the new toolkit version of the - same feedback systems, the buffer-fill level and - jitter is measured directly in microseconds, not in - #frames then converting to microseconds. */ - med = advance / interval; - /* - if (pcmd == CmdPLAY) { - if (med < shared->VDframeNumber) { - med = shared->VDframeNumber; - min_advance = advance = med * interval; - } - } - else - */ - if (med < 2 ) { - med = 2; - advance = med * interval; - min_advance = max(advance, shared->VStimeAdvance); - } - else min_advance = shared->VStimeAdvance; - if (med > (VB_BUF_SIZE / shared->averageFrameSize) / 2) { - reach_limit = 1; - med = (VB_BUF_SIZE / shared->averageFrameSize) / 2; - if (not_action) { - Fprintf(stderr, - "VB start/speed-change: VBbuf limit reached, med %d.\n", med); - } - } - else reach_limit = 0; - } - high = med + med / 2; - low = med - med / 2; - delay = med * (SPEEDUP_INV_SCALE - 1); /* this delay is to avoid - feedback when VS is in - fast-start period */ - period = med * MAX_CLOCK_DRIFT; - if (not_action) { - Fprintf(stderr, - "VB start/speed-change: med %d, advance %d at nextFrame %d\n", - med, advance, shared->nextFrame); - } - fb_state = 4; - } - break; - case 0: /* idle */ - if (pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB) { - cmdsn = pcmdsn; - fb_state = 1; - } - break; - case 1: /* start */ - if (pcmdsn != cmdsn) { - cmdsn = pcmdsn; - if (!(pcmd == CmdPLAY || pcmd == CmdFF || pcmd == CmdFB)) { - fb_state = 0; - } - break; - } - startpos = pcmd == CmdPLAY ? pfid : pgop; - advance = shared->VStimeAdvance; - - /* following from vs.c: - timerAdjust = (VStimeAdvance * SPEEDUP_INV_SCALE) / currentUPF; - */ - med = advance / shared->usecPerFrame; - /* - if (pcmd != CmdPLAY) med /= shared->patternSize; - */ - delay = med * (SPEEDUP_INV_SCALE - 1); /* this delay is to avoid - feedback when VS is in - fast-start period */ - not_action = 1; - fb_state = 2; - break; - default: - fprintf(stderr, "VB: unknown Feedback fb_state %d reached.\n", fb_state); - fb_state = 0; - break; - } -} - -ACE_HANDLE -Notification_Handler::get_handle (void) const -{ - return -1; -} - -int -Notification_Handler::handle_input (ACE_HANDLE fd) -{ - ACE_DEBUG ((LM_DEBUG,"Notification_Handler::handle_input")); - char message[BUFSIZ]; - message [0] = 0; - // used to indicate that we should exit. - int result = - ACE_OS::read (fd,message,BUFSIZ); - - ACE_DEBUG ((LM_DEBUG,"result:%d,message[0]:%d\n",result,message[0])); - if (result == 0) - { - ACE_DEBUG ((LM_DEBUG,"AB process exiting, notification socket eof while reading\n")); - ACE_Reactor::instance ()->end_event_loop (); - return -1; - } - if (result == -1) - { - ACE_DEBUG ((LM_DEBUG,"AB process exiting, notification socket error while reading\n")); - ACE_Reactor::instance ()->end_event_loop (); - return -1; - } - ACE_DEBUG ((LM_DEBUG," %d %d\n",result,message[0])); - - switch (message[0]) - { - case EXIT: - ACE_DEBUG ((LM_DEBUG,"AB process exiting because of exit signal\n")); - set_exit_routine_tag(0); - VideoBuffer::VBdeleteBuf(); - ACE_Reactor::instance ()->end_event_loop (); - return -1; - default: - break; - } - return 0; -} - -ACE_HANDLE -Video_Notification_Handler::get_handle (void) const -{ - return vsp[1]; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.h deleted file mode 100644 index 6c0e4e69a86..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.h +++ /dev/null @@ -1,265 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// mpeg_client -// -// = FILENAME -// vb.h -// -// = DESCRIPTION -// Defines the video packet buffering process. -// -// = AUTHORS -// Nagarajan Surendran (naga@cs.wustl.edu) -// -// ============================================================================ - -#if !defined (AV_VB_H) -#define AV_VB_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if defined(__svr4__) || defined(IRIX) -#include -#include -#endif -#include "include/common.h" -#include "newproto.h" -#include "global.h" -#include "mpeg_shared/filters.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/com.h" -#include "ace/Event_Handler.h" -#include "ace/Reactor.h" - -/* magic number -- deviation is considered - caused by clock drift only if rate <= 1/MAX_CLOCK_DRIFT. - */ -#define MAX_CLOCK_DRIFT 50 -#define SHCODE 0x000001b3 -#define max(a,b) ((a)>(b) ? (a) : (b)) - -struct block -{ - unsigned shcode; - struct block * next; - int full; -}; - -struct header -{ - struct block *h, *t; -}; - -class Notification_Handler; - -class VideoBuffer :public ACE_Event_Handler -{ -public: - VideoBuffer (void); - // constructor. - - virtual ~VideoBuffer (void); - // destructor. - - virtual int handle_input (ACE_HANDLE fd); - // callback when data arrives on the video socket. - - virtual int handle_output (ACE_HANDLE fd); - // callback when data can be written on the video socket. - - ACE_HANDLE get_handle (void) const; - // gets the video socket. - - void VBinitBuf (int size); - // size in byte. - - char * VBgetBuf (int size); - // block version. - - int VBcheckBuf (int size); - // non-block check, return True/False - - void VBputMsg (char * msgPtr); - - char * VBgetMsg (); - // block version. - - int VBcheckMsg(); - // non-block check, return Number of Msgs in buffer. - - int VBbufEmpty(void); - - void VBreclaimMsg(char * msgPtr); - - static void VBdeleteBuf(void); - - static void VBdeleteSem(void); - - static void exit_on_kill(void); - - int VBprocess(int initSocket, int normalSocket); - -private: - - int sync_feedback (void); - int feedback_action (void); - - static block ** head; - static block ** tail; - static char * buf; - static int bufsize; - static int sid, countid; - static int exit_tag; - static int conn_tag; - static int savedSocket; - - VideoMessage *msg, msghd; - VideoPacket *packet; - int len, bsize, msgsn; - int psize, poffset; - char * ptr, *ptr1; - char *tmp_buf; - int dataSocket; - int initSocket,normalSocket; - - // following variables are for feedback - int pcmdsn, pcmd; - // to store the cmdsn and cmd of previous frame, - // to detect new commands - - int pfid, pgop; - // frame-id of gopid of previous frame - - int cmdsn; - // cmdsn of previous command - - int fb_state; - // state of the control law/regulator - - int startpos; - // gopid or frameid when the regulator is in 'start' state 1 - - int delay; - // #frames to delay after 'start' - - int qosRecomputes; - // indicate if qos has been recomputed recently - - int action_delay; - // microseconds to delay after feedback action - - int action_time; - // the time when feedback action is taken, used to enforce - // action_delay - - int upf, cupf; - // upf -- currentUPF as carried in all frames, - // cupf -- real current UPF, being adjusted by FB - - double fv; - // current buffer fill level in term of #frames - - double init_fv; - // init_fv and init_pos record the fv value and position - // (frameid or gopid) when fv is very close to med - - double init_pos; - int high, low, med; - // median, high and low water marks, in term of #frames - - int period; - // interms of #frames, (high-med, period) defined the max - // buffer fill drift which can be assumed as caused by - // clock drift - - Filter * f; - // buffer fill level filter - - int advance, min_advance; - // in microseconds, advance holds the - // current target buffer-fill-level as - // determined by jitter level - // estimate. min_advance sets a absolute - // minimun level, no matter how low jitter - // level is.'advance' does not change when - // play-speed changes, but med/high/low - // will be updated upon speed change - - double fav; - // #frames, jitter level output by the filter. - - Filter * fa; - // jitter filter. - - int reach_limit; - // indicate that the target 'advance' has reached client VB - // buffer limit, and can not further increase, even if - // jitter increases. - - int not_action; - // indicates entering state=3 is not caused by - // feedback action. If not_action = 1 entering state=3 - // is caused either by 'start' or speed change, and - // the jitter filter needs to be reset. - -#ifdef STAT - int to_count; - int gap_msgsn; -#endif - - Notification_Handler *handler_; - // handler to be used for exit notification. - - enum state {INVALID = -1, - READ_HEADER = 0, - READ_NEXT_HEADER = 1, - READ_MESSAGE = 2, - SKIP_MESSAGE = 3, - SKIP_NEXT_MESSAGE = 4, - WRITE_FEEDBACK1 = 5, - WRITE_FEEDBACK2 = 6}; - state state_; - - char *temp; - // temporary pointer. - int bytes; - // temporary placeholder for no.of bytes to be read. - - int fb_addupf; - int fb_addf; - int fb_advance; - - int socket_flag_; - // flag to indicate which socket to be used. -}; - -class Notification_Handler :public ACE_Event_Handler -{ -public: - virtual ACE_HANDLE get_handle (void) const; - // Get the Notification handle. - - virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); - // called when input events occur. - -}; - -class Video_Notification_Handler :public Notification_Handler -{ -public: - virtual ACE_HANDLE get_handle (void) const; - // Returns the video notification handle. -}; -#endif /* AV_VB_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vd.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vd.cpp deleted file mode 100644 index 9eb3e6e1c57..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vd.cpp +++ /dev/null @@ -1,933 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -extern int vdsp[2]; - -#include -#include -#include -#include -#include -/* -#include -#include -*/ -#include -#include -#include -#include "include/common.h" -#include "newproto.h" -#include "global.h" -#include "dither.h" -#include "video.h" -#include "proto.h" -#include "vb.h" - -ACE_RCSID(mpeg_client, vd, "$Id$") - -#define MAX_VDBLOCK_NUM 8 -#define CQUEUE_SIZE MAX_VDBLOCK_NUM + 2 -#define ESTACK 0 -#define CQUEUE 1 - -static int win_width, win_height; -static int ecountid, ccountid; -static int sid; - -extern VidStream * curVidStream; -extern VideoBuffer *vbuffer; - -static struct shared_mem_block -{ - int size; - int block_num; - int width, height; - int sptr, qhead, qtail; - FrameBlock *estack[MAX_VDBLOCK_NUM]; - FrameBlock *cqueue[CQUEUE_SIZE]; /* cqueue will never get full */ -} * shm = NULL; - -static void InitDitherEnv(void); -static void DitherFrame(PictImage * pict, FrameBlock * frame); -static void DoDitherImage(unsigned char *l, unsigned char *Cr, unsigned char *Cb, - unsigned char *disp, int h, int w); - -void VDinitBuf(int size) -/* size in bytes */ -{ - shm = (struct shared_mem_block *)creat_shared_mem_id(size, &shared->VDbufId); - shared->VDbufAddr = (char *)shm; - - shm->width = shm->height = 0; - shm->size = size - sizeof(*shm); - sid = creat_semaphore(); - ecountid = creat_semaphore(); - ccountid = creat_semaphore(); - enter_cs(ccountid); - enter_cs(ecountid); -} - -static void put_block(FrameBlock * bptr, int tag) -{ - if (tag == ESTACK) - { - shm->estack[shm->sptr] = bptr; - shm->sptr ++; - if (shm->sptr > MAX_VDBLOCK_NUM) - { - fprintf(stderr, "VD weird error: ESTACK full.\n"); - ACE_OS::exit (1); - } - } - else - { - if (shm->qtail == shm->qhead) /* empty queue */ - { - shm->qtail = 0; - shm->qhead = 1; - shm->cqueue[0] = bptr; - } - else - { - int val = CQUEUE_SIZE; - int pos = (shm->qhead - 1 + val) % val; /* pos = shm->qhead - 1 */ - if (shared->cmd == CmdPLAY) - while ((pos + 1) % val != shm->qtail) - { - if (shm->cqueue[pos]->display > bptr->display) - { - shm->cqueue[(pos + 1) % val] = shm->cqueue[pos]; - pos = (pos - 1 + val) % val; /* pos -= 1 */ - } - else - break; - } - shm->cqueue[(pos + 1) % val] = bptr; - shm->qhead = (shm->qhead + 1) % val; - } - } -} - -static FrameBlock * get_block(int tag) -{ - FrameBlock * ptr; - - if (tag == ESTACK) - { - if (shm->sptr <= 0) - { - fprintf(stderr, "VD get_block error: ESTACK empty.\n"); - return NULL; - } - shm->sptr --; - ptr = shm->estack[shm->sptr]; - } - else - { - if (shm->qtail == shm->qhead) - { - fprintf(stderr, "VD get_block error: CQUEUE empty.\n"); - return NULL; - } - ptr = shm->cqueue[shm->qtail]; - shm->qtail = (shm->qtail + 1) % (CQUEUE_SIZE); - } - return ptr; -} - -void VDresizeBuf(int height, int width) -{ - char * ptr = (char*)shm + sizeof(*shm); - int imagesize; - int i; - - enter_cs(sid); - - if (get_semval(ecountid) < 0) { - fprintf(stderr, "Error: pid %d get (ecountid) = %d < 0\n", - ACE_OS::getpid (), get_semval(ecountid)); - ACE_OS::exit (1); - } - /* - fprintf(stderr, "VD before resizeBuf(): get_semval(ecountid) = %d\n", - get_semval(ecountid)); - */ - while (get_semval(ecountid) > 0) enter_cs(ecountid); - - shm->width = width; - shm->height = height; - width = ((width+15)>>4) << 4; - height = ((height+15)>>4) << 4; - imagesize = (((height * width)+3)>>2)<<2; - if ((ditherType == Twox2_DITHER) || (ditherType == FULL_COLOR_DITHER)) - imagesize <<= 2; - - shm->block_num = (shm->size)/(sizeof(FrameBlock) + imagesize); - if (shm->block_num > MAX_VDBLOCK_NUM) - shm->block_num = MAX_VDBLOCK_NUM; - - Fprintf(stderr, "VD resizeBuf: got %d(max %d) blocks of size %d.\n", - shm->block_num, - (shm->size)/(sizeof(FrameBlock) + imagesize), - (sizeof(FrameBlock) + imagesize)); - - if (shm->block_num < 3) - { - fprintf(stderr, - "VD error: VDbuf fails to hold at least 3(three) block.\n"); - ACE_OS::exit (1); - } - shm->sptr = 0; /* empty stack */ - shm->qhead = shm->qtail = 0; /* empty cqueue */ - for (i=0; iblock_num; i++) - { - put_block((FrameBlock *)ptr, ESTACK); - ((FrameBlock *)ptr)->data = (unsigned char *)(ptr + sizeof(FrameBlock)); - ptr += sizeof(FrameBlock) + imagesize; - leave_cs(ecountid); - } - leave_cs(sid); - - shared->VDframeNumber = shm->block_num; - /* - fprintf(stderr, "VD after resizeBuf(): get_semval(ecountid) = %d\n", - get_semval(ecountid)); - */ -} - -FrameBlock * VDgetBuf(void) /* block version, return with interrupt */ -{ - FrameBlock * ptr; - enter_cs(ecountid); - enter_cs(sid); - ptr = get_block(ESTACK); - if (ptr != NULL) - ptr->refcount = 1; - leave_cs(sid); - if (ptr == NULL) - fprintf(stderr, "VD error: VDgetBuf should not return NULL.\n"); - /* - fprintf(stderr, "pid %d VDgetBuf() %u, ref %d, ecount %d\n", - ACE_OS::getpid (), (unsigned)ptr, ptr->refcount, get_semval(ecountid)); - */ - return ptr; -} - -int VDcheckBuf(void) /* non-block check, return True/False */ -{ - if (get_semval(ecountid) > 0) - return 1; - else - return 0; -} - -void VDputMsg(FrameBlock * msgPtr) -{ - enter_cs(sid); - put_block(msgPtr, CQUEUE); - leave_cs(ccountid); - leave_cs(sid); - /* - fprintf(stderr, "pid %d VDputMsg() %u, ref %d, ccount %d\n", - ACE_OS::getpid (), (unsigned)msgPtr, msgPtr->refcount, get_semval(ccountid)); - */ -} - -FrameBlock * VDgetMsg(void) /* block version, return with interrupt */ -{ - FrameBlock * ptr; - enter_cs(ccountid); - enter_cs(sid); - ptr = get_block(CQUEUE); - leave_cs(sid); - if (ptr == NULL) - fprintf(stderr, "VD error: VDgetMsg should not return NULL.\n"); - /* - fprintf(stderr, "pid %d VDgetMsg() %u, ref %d, ccount %d\n", - ACE_OS::getpid (), (unsigned)ptr, ptr->refcount, get_semval(ccountid)); - */ - return ptr; -} - -int VDcheckMsg(void) /* non-block check, return Number of Msg in buffer */ -{ - return get_semval(ccountid); -} - -int VDbufEmpty(void) -{ - /* - Fprintf(stderr, "VD ecountid %d, shm-block_num %d\n", - get_semval(ecountid), shm->block_num); - */ - return (get_semval(ecountid) == shm->block_num); -} - -FrameBlock * VDpeekMsg(void) -{ - FrameBlock * ptr; - - enter_cs(sid); - - if (shm->qhead == shm->qtail) - ptr = NULL; - else - ptr = shm->cqueue[shm->qtail]; - leave_cs(sid); - /* - if (ptr != NULL) { - fprintf(stderr, "pid %d VDpeekMsg() = %u, ref=%d\n", - ACE_OS::getpid (), (unsigned)ptr, ptr->refcount); - } - */ - return ptr; -} - -void VDreferMsg(FrameBlock * msgPtr) -{ - enter_cs(sid); - msgPtr->refcount ++; - leave_cs(sid); - /* - fprintf(stderr, "pid %d VDreferMsg() %u, ccount %d\n", - ACE_OS::getpid (), (unsigned)msgPtr, get_semval(ccountid)); - */ -} - -void VDreclaimMsg(FrameBlock * msgPtr) -{ - int ref; - enter_cs(sid); - ref = msgPtr->refcount; - if (msgPtr->refcount <= 1) - { - put_block(msgPtr, ESTACK); - leave_cs(ecountid); - } - else - msgPtr->refcount --; - leave_cs(sid); - /* - fprintf(stderr, "pid %d VDreclaimMsg() %u, ref %d, ecount %d\n", - ACE_OS::getpid (), (unsigned)msgPtr, ref, get_semval(ecountid)); - */ - if (ref <= 0) { - Fprintf(stderr, "pid %d VDreclaimMsg() %u WEIRD, :ref %d:, ecount %d\n", - ACE_OS::getpid (), (unsigned)msgPtr, ref, get_semval(ecountid)); - } -} - -void VDdeleteBuf(void) -{ - remove_shared_mem((char*)shm); -} - -void VDdeleteSem(void) -{ - remove_semaphore(ecountid); - remove_semaphore(ccountid); - remove_semaphore(sid); -} - -int -get_more_data(unsigned int *buf_start, int max_length, - int *length_ptr, unsigned int **buf_ptr) -{ - fprintf(stderr, - "Fatel error: vd.c get_more_data() should not be called, bufLength = %d.!\n", - *length_ptr); - fprintf(stderr, " **** Please report this bug. ****\n"); - // ACE_OS::exit (1); - return 0; -} - -static void printPacket(VideoPacket *p) -{ - fprintf(stderr, "VD: Packet(%x)=cmd-%d, cmdsn-%d sh-%d, gop-%d\n", - (int)p, p->cmd, p->cmdsn, p->sh, p->gop); - fprintf(stderr, " frame-%d, display-%d, future-%d, past-%d, bytes-%d\n", - p->frame, p->display, p->future, - p->past, p->dataBytes); -} - - -void VDprocess (int CTRpid) -{ - FrameBlock * curBlk = NULL; - PictImage * curPict = NULL; - - InitDitherEnv(); - - curVidStream = NewVidStream(); - if (curVidStream == NULL) - { - fprintf(stderr, "VD: unable to allocat curVidStream.\n"); - ACE_OS::exit (1); - } - - for(;;) - { - int curcmd, curcmdsn; - int i; - int single_tag; - VideoPacket *p; - - if (curBlk != NULL) { - VDreclaimMsg(curBlk); - curBlk = NULL; - } - p = (VideoPacket*)vbuffer->VBgetMsg(); /* guarranteed to get a Packet */ - - // printPacket(p); - // fprintf(stderr, "VD: got frame %d\n", p->frame); - - curcmd = shared->cmd; - curcmdsn = shared->cmdsn; - if (p->cmdsn != shared->cmdsn) - { - /* - fprintf(stderr, "VD: frame not for current Cmd, discard it:p->cmdsn:%d,shared->cmdsn:%d\n", - p->cmdsn,shared->cmdsn); - printPacket(p); - */ - vbuffer->VBreclaimMsg((char*)p); - continue; - } - if (curcmd == CmdINIT) - { - /* free/allocate all PictImages, resize VDbuffer */ - curVidStream->future = curVidStream->past = curVidStream->current = NULL; - win_width = ((shared->horizontalSize + 15)>>4)<<4; - win_height = ((shared->verticalSize + 15)>>4)<<4; - for (i = 0; i < RING_BUF_SIZE; i++) - { - if (curVidStream->ring[i] != NULL) - DestroyPictImage(curVidStream->ring[i]); - curVidStream->ring[i] = - NewPictImage(win_width, win_height); - } - for (i = 0; i < 500; i ++) { - if (!VDbufEmpty()) usleep(1000); - else break; - } - if (!VDbufEmpty()) { - fprintf(stderr, "VD error: VDbuf can't become empty.\n"); - exit(1); - } - VDresizeBuf(shared->verticalSize, shared->horizontalSize); - } - else if (curcmd == CmdPLAY || curcmd == CmdSTEP) - { - /* to check if the packet can be decoded or not */ - if (p->future == -1) - { /* swap because the existing VD decoding algorithm refer to 'future' frame - to decode a P frame */ - int tmp = p->past; - p->past = p->future; - /* following is the bug found on 2-14-96, this may be the cause of decoding - P frames incorrectly, and showing corrupted messages, when previous I/P - frames are dropped. This happens frequently when the server is a remote one. - - p->future = p->past; - - */ - p->future = tmp; - - } - if ((p->future >= 0 && - (curVidStream->future == NULL || curVidStream->future->frame != p->future)) || - (p->past >= 0 && - (curVidStream->past == NULL || curVidStream->past->frame != p->past))) - { - /* - fprintf(stderr, - "VD: unable to decode packet -- future and/or past frame no available.\n"); - printPacket(p); - */ - if (curcmd == CmdSTEP && curcmdsn == shared->cmdsn) { - /* - Fprintf(stderr, "VD failed to decode f%d, USR1 to CTR for STEP\n", p->frame); - */ - char message[BUFSIZ]; - message [0]= DECODED; - int result = ACE_OS::write (vdsp[1],&message,BUFSIZ); - if (result == -1) - perror ("VD:Decode Notify"); - if (result == 0) - perror ("VD:Socket Closed"); - } -#ifdef STAT - else if (shared->collectStat && curcmd == CmdPLAY) - shared->stat.VDnoRef ++; -#endif - vbuffer->VBreclaimMsg((char*)p); - continue; - } - } - curBlk = VDgetBuf(); - - single_tag = 0; - /* to check if it's in time for PLAY, FF and FB */ - if (curcmd == CmdPLAY) - { - -#if 0 - /* checking against sendPattern seems irreasonable, because send-pattern of a less - frame-rate is not necessarily a subset of the one of a bigger frame-rate. - */ - /* check against sendPattern */ - if (p->frame - shared->firstGopFrames > 0) - { - int i = (p->frame - shared->firstGopFrames) % - (shared->patternSize * shared->sendPatternGops); - if (shared->sendPattern[i] == 0) - { - vbuffer->VBreclaimMsg((char*)p); -#ifdef STAT - if (shared->collectStat) - shared->stat.VDagainstSendPattern ++; -#endif - continue; - } - } -#endif - - if (vbuffer->VBcheckMsg() > 0) { /* a frame is to be dropped only if - there are more frames in VB */ - if (p->past >= 0) { /* 'B' */ - if (p->display <= shared->nextFrame) { -#ifdef STAT - if (shared->collectStat) - shared->stat.VDtooLateB ++; -#endif - goto frameTooLate; - } - } - else if (p->future >= 0) { /* 'P' */ - if (shared->lastIframeDecoded + shared->IframeGap <= shared->nextFrame) { -#ifdef STAT - if (shared->collectStat) - shared->stat.VDtooLateP ++; -#endif - goto frameTooLate; - } - } - else { /* 'I' */ - if (!shared->live) - { - if (p->display + shared->IframeGap <= shared->nextFrame) { -#ifdef STAT - if (shared->collectStat) - shared->stat.VDtooLateI ++; -#endif - frameTooLate: - if (shared->rtplay) /* too late, drop the frame */ - { - vbuffer->VBreclaimMsg((char*)p); - /* - Fprintf(stderr, "VD: frame %d too late, shared->nextFrame %d.\n", - p->frame, shared->nextFrame); - */ - continue; - } - } - } - else { /* live video */ - if (p->display < shared->nextFrame) { - vbuffer->VBreclaimMsg((char*)p); - /* - Fprintf(stderr, "VD live video frame %d too late, nextFrame=%d\n", - p->frame, shared->nextFrame); - */ - continue; - } - } - } - } - } - else if (curcmd == CmdFF) - { - if (p->gop < shared->nextGroup && VDcheckMsg() > 0) - { - /* - fprintf(stderr, "VD: a frame too late and dropped when FF.\n"); - printPacket(p); - */ - vbuffer->VBreclaimMsg((char*)p); - continue; - } - } - else if (curcmd == CmdFB) - { - if (p->gop > shared->nextGroup && VDcheckMsg() > 0) - { - /* - fprintf(stderr, "VD: a frame too late and dropped when FB.\n"); - printPacket(p); - */ - vbuffer->VBreclaimMsg((char*)p); - continue; - } - } - else - single_tag = 1; - - if (shared->videoFormat == VIDEO_JPEG || shared->videoFormat == VIDEO_SIF) { - int picsize = win_width * win_height; - unsigned char * l, *cr, *cb; - - if (shared->videoFormat == VIDEO_SIF) { - l = (unsigned char*)p + sizeof(*p); - cr = l + picsize; - cb = l + picsize + (picsize >> 2); - } - else { /* decode the JPEG frame */ - l = cr = cb = (unsigned char *)curBlk->data; - memcpy(l, (unsigned char*)p + sizeof(*p), p->dataBytes); - } - DoDitherImage(l, cr, cb, - (unsigned char *)curBlk->data, win_height, win_width); - curBlk->sh = p->sh; - curBlk->gop = p->gop; - curBlk->frame = p->frame; - curBlk->display = p->display; - curBlk->future = p->future; - curBlk->past = p->past; - VDputMsg(curBlk); - curBlk = NULL; - /* - Fprintf(stderr, "VD: SIF frame %d decoded.\n", p->frame); - */ - goto end_decode_loop; - } -#ifdef NeedByteOrderConversion - else { - unsigned int * ptr = (unsigned int *)((char*)p + sizeof(*p)); - /* the added two extra words to max_buf_length: one is for SHCODE, already - in right byte order, the second is for prevent calling of get_more_data(). - (which seem required for the UCB decoder used here ), this second word - contains value used by VB algorithm, and can't be changed elsewhere. - So they should not be swapped byte order. */ - for (i=0; i<((p->dataBytes + 11)>>2) - 2; i++) - { - *ptr = ntohl(*ptr); - ptr++; - } - } -#endif - - if (!mpegVidRsrc((char*)p)) /* successfully decoded */ - { - curPict = curVidStream->current; - - // fprintf(stderr, "VD successfully decodes a frame.\n"); - // printPacket(p); - - if (curcmd == CmdPLAY && shared->rtplay) - { - if ((curVidStream->picture.code_type == I_TYPE) || - (curVidStream->picture.code_type == P_TYPE)) - { - if (curVidStream->future == NULL) - { - curVidStream->future = curVidStream->current; - curVidStream->future->locked |= FUTURE_LOCK; - } - else - { - if (curVidStream->past != NULL) - { - curVidStream->past->locked &= ~PAST_LOCK; - } - else if (curcmd == CmdPLAY) { - /* this case should happen only at the begining of PLAY */ - DitherFrame(curVidStream->future, VDgetBuf()); - } - curVidStream->past = curVidStream->future; - curVidStream->past->locked &= ~FUTURE_LOCK; - curVidStream->past->locked |= PAST_LOCK; - curVidStream->future = curVidStream->current; - curVidStream->future->locked |= FUTURE_LOCK; - } - } - } - else if (curcmd == CmdSTEP || curcmd == CmdPLAY) /* !shared->rtplay */ - { - if ((curVidStream->picture.code_type == I_TYPE) || - (curVidStream->picture.code_type == P_TYPE)) - { - if (curVidStream->future == NULL) - { - curVidStream->future = curVidStream->current; - curVidStream->future->locked |= FUTURE_LOCK; - } - else - { - if (curVidStream->past != NULL) - { - curVidStream->past->locked &= ~PAST_LOCK; - } - curVidStream->past = curVidStream->future; - curVidStream->past->locked &= ~FUTURE_LOCK; - curVidStream->past->locked |= PAST_LOCK; - curVidStream->future = curVidStream->current; - curVidStream->future->locked |= FUTURE_LOCK; - curPict = curVidStream->past; - } - } - } - else /* only I-frame for all other Cmds */ - { - if (curVidStream->future != NULL) { - curVidStream->future->locked &= ~FUTURE_LOCK; - curVidStream->future = NULL; - } - if (curVidStream->past != NULL) - { - curVidStream->past->locked &= ~PAST_LOCK; - curVidStream->past = NULL; - } - /* - curVidStream->future = curVidStream->current; - curVidStream->future->locked |= FUTURE_LOCK; - */ - } - - if (p->past == -1 && p->future == -1) - shared->lastIframeDecoded = p->frame; - -#ifdef STAT - if (shared->collectStat && p->cmd != CmdREF) - { - int val = curPict->frame; - shared->stat.VDframesDecoded[val>>3] |= 1 << (val % 8); - shared->stat.VDlastFrameDecoded = val; - } -#endif - /* - if (single_tag && p->cmd != CmdREF) - { - fprintf(stderr, "VD: display %d for single.\n", curPict->display); - } - */ - /* - Fprintf(stderr, "p->cmd %d, p->cmdsn %d, shared->cmdsn %d\n", - p->cmd, p->cmdsn, shared->cmdsn); - */ - if (p->cmd != CmdREF && curcmdsn == shared->cmdsn) { - DitherFrame(curPict, curBlk); - curBlk = NULL; - } - } - else /* decoding failed */ - { - - fprintf(stderr, "VD error -- tried but failed decoding the packet.\n"); - printPacket(p); - } - - end_decode_loop: - - /* signal CTR for singlular operation: STEP, POSITION, INIT */ - if (single_tag && p->cmd != CmdREF && curcmdsn == shared->cmdsn) - { - - fprintf(stderr, "VD decoded f%d, USR1 to CTR\n", p->frame); - char message[BUFSIZ]; - message[0]= DECODED; - int result = ACE_OS::write (vdsp[1],&message,BUFSIZ); - if (result == -1) - perror ("VD:Decode Notify"); - if (result == 0) - perror ("VD:Socket Closed"); - } - vbuffer->VBreclaimMsg((char*)p); - } -} - - -static void InitDitherEnv(void) -{ - lum_values = (int *) ACE_OS::malloc(LUM_RANGE*sizeof(int)); - cr_values = (int *) ACE_OS::malloc(CR_RANGE*sizeof(int)); - cb_values = (int *) ACE_OS::malloc(CB_RANGE*sizeof(int)); - init_tables(); - - while (!shared->pixelValid) { - usleep(10000); - } - ACE_OS::memcpy (pixel, shared->pixel, 256); - - switch (ditherType) { - - case HYBRID_DITHER: - - InitColor(); - InitHybridDither(); - break; - - case HYBRID2_DITHER: - InitColor(); - InitHybridErrorDither(); - break; - - case FS4_DITHER: - InitColor(); - InitFS4Dither(); - break; - - case FS2_DITHER: - InitColor(); - InitFS2Dither(); - break; - - case FS2FAST_DITHER: - InitColor(); - InitFS2FastDither(); - break; - - case Twox2_DITHER: - InitColor(); - Init2x2Dither(); - PostInit2x2Dither(); - break; - - case GRAY_DITHER: - break; - - case FULL_COLOR_DITHER: - InitColorDither(); - break; - - case ORDERED_DITHER: - InitColor(); - InitOrderedDither(); - break; - - case MONO_DITHER: - case MONO_THRESHOLD: - break; - - case ORDERED2_DITHER: - InitColor(); - InitOrdered2Dither(); - break; - } -} - -/* - *-------------------------------------------------------------- - * - * DoDitherImage -- - * - * Called when image needs to be dithered. Selects correct - * dither routine based on info in ditherType. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -static void DoDitherImage(unsigned char *l, unsigned char *Cr, unsigned char *Cb, - unsigned char *disp, int h, int w) -{ - - switch(ditherType) { - case HYBRID_DITHER: - HybridDitherImage(l, Cr, Cb, disp, h, w); - break; - - case HYBRID2_DITHER: - HybridErrorDitherImage(l, Cr, Cb, disp, h, w); - break; - - case FS2FAST_DITHER: - FS2FastDitherImage(l, Cr, Cb, disp, h, w); - break; - - case FS2_DITHER: - FS2DitherImage(l, Cr, Cb, disp, h, w); - break; - - case FS4_DITHER: - FS4DitherImage(l, Cr, Cb, disp, h, w); - break; - - case Twox2_DITHER: - Twox2DitherImage(l, Cr, Cb, disp, h, w); - break; - - case FULL_COLOR_DITHER: - ColorDitherImage(l, Cr, Cb, disp, h, w); - break; - - case GRAY_DITHER: - GrayDitherImage(l, Cr, Cb, disp, h, w); - break; - - case NO_DITHER: - break; - - case ORDERED_DITHER: - OrderedDitherImage(l, Cr, Cb, disp, h, w); - break; - - case MONO_DITHER: - MonoDitherImage(l, Cr, Cb, disp, h, w); - break; - - case MONO_THRESHOLD: - MonoThresholdImage(l, Cr, Cb, disp, h, w); - break; - - case ORDERED2_DITHER: - Ordered2DitherImage(l, Cr, Cb, disp, h, w); - break; - - case MBORDERED_DITHER: - MBOrderedDitherImage(l, Cr, Cb, disp, h, w); - break; - } -} - -static void DitherFrame(PictImage * pict, FrameBlock *frame) -{ - DoDitherImage((unsigned char *)pict->luminance, - (unsigned char *)pict->Cr, (unsigned char *)pict->Cb, - (unsigned char *)frame->data, win_height, win_width); - frame->sh = pict->sh; - frame->gop = pict->gop; - frame->frame = pict->frame; - frame->display = pict->display; - frame->future = pict->future; - frame->past = pict->past; - VDputMsg(frame); -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.cpp deleted file mode 100644 index 31666f570e2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.cpp +++ /dev/null @@ -1,3761 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -/* - * This file contains C code that implements - * the video decoder model. - */ - -#include -#include -#include - -#ifndef MIPS -#include -#else -#include -#include -#endif - -#include "include/common.h" -#include "decoders.h" -#include "video.h" -#include "util.h" -#include "proto.h" -#include "global.h" -#include "ui.h" - -ACE_RCSID(mpeg_client, video, "$Id$") - -/* Declarations of functions. */ -static void ReconIMBlock(VidStream *vid_stream, int bnum); -static void ReconPMBlock(VidStream *vid_stream, int bnum, - int recon_right_for, int recon_down_for, int zflag); -static void ReconBMBlock(VidStream *vid_stream, - int bnum, int recon_right_back, - int recon_down_back, int zflag); -static void ReconBiMBlock(VidStream *vid_stream, int bnum, int recon_right_for, - int recon_down_for, int recon_right_back, - int recon_down_back, int zflag); -static void ReconSkippedBlock(unsigned char *source, unsigned char *dest, - int row, int col, int row_size, int right, int down, - int right_half, int down_half, int width); -static int ParseSeqHead(VidStream *vid_stream); -static int ParseGOP(VidStream *vid_stream); -static int ParsePicture(VidStream *vid_stream,TimeStamp time_stamp); -static int ParseSlice(VidStream *vid_stream); -static int ParseMacroBlock(VidStream *vid_stream); -static void ProcessSkippedPFrameMBlocks(VidStream *vid_stream); -static void ProcessSkippedBFrameMBlocks(VidStream *vid_stream); - -extern int ditherType; -char *ditherFlags; - -/* Macro for returning 1 if num is positive, -1 if negative, 0 if 0. */ - -#define Sign(num) ((num > 0) ? 1 : ((num == 0) ? 0 : -1)) - -/* Declare global pointer to vid stream used for current decoding. */ - -VidStream *curVidStream = NULL; - -/* Set up array for fast conversion from zig zag order to row/column - coordinates. -*/ - -int zigzag[64][2] = { - 0, 0, 1, 0, 0, 1, 0, 2, 1, 1, 2, 0, 3, 0, 2, 1, 1, 2, 0, 3, 0, 4, 1, 3, - 2, 2, 3, 1, 4, 0, 5, 0, 4, 1, 3, 2, 2, 3, 1, 4, 0, 5, 0, 6, 1, 5, 2, 4, - 3, 3, 4, 2, 5, 1, 6, 0, 7, 0, 6, 1, 5, 2, 4, 3, 3, 4, 2, 5, 1, 6, 0, 7, - 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 6, 2, 7, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 6, - 2, 7, 3, 7, 4, 6, 5, 5, 6, 4, 7, 3, 7, 4, 6, 5, 5, 6, 4, 7, 5, 7, 6, 6, -7, 5, 7, 6, 6, 7, 7, 7}; -/* Array mapping zigzag to array pointer offset. */ - -int zigzag_direct[64] = { - 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, - 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, - 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, -58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63}; -/* Set up array for fast conversion from row/column coordinates to - zig zag order. -*/ - -int scan[8][8] = { - {0, 1, 5, 6, 14, 15, 27, 28}, - {2, 4, 7, 13, 16, 26, 29, 42}, - {3, 8, 12, 17, 25, 30, 41, 43}, - {9, 11, 18, 24, 31, 40, 44, 53}, - {10, 19, 23, 32, 39, 45, 52, 54}, - {20, 22, 33, 38, 46, 51, 55, 60}, - {21, 34, 37, 47, 50, 56, 59, 61}, -{35, 36, 48, 49, 57, 58, 62, 63}}; -/* Initialize P and B skip flags. */ - -static int No_P_Flag = 0; -static int No_B_Flag = 0; - -/* Max lum, chrom indices for illegal block checking. */ - -static int lmaxx; -static int lmaxy; -static int cmaxx; -static int cmaxy; - -/* - * We use a lookup table to make sure values stay in the 0..255 range. - * Since this is cropping (ie, x = (x < 0)?0:(x>255)?255:x; ), wee call this - * table the "crop table". - * MAX_NEG_CROP is the maximum neg/pos value we can handle. - */ - -#define MAX_NEG_CROP 384 -#define NUM_CROP_ENTRIES (256+2*MAX_NEG_CROP) -#define assertCrop(x) assert(((x) >= -MAX_NEG_CROP) && \ - ((x) <= 256+MAX_NEG_CROP)) -static unsigned char cropTbl[NUM_CROP_ENTRIES]; - -/* - The following accounts for time and size spent in various parsing acitivites - if ANALYSIS has been defined. -*/ - -#ifdef ANALYSIS - - -unsigned int bitCount = 0; - -int showmb_flag = 0; -int showEachFlag = 0; - -typedef struct { - int frametype; - unsigned int totsize; - unsigned int number; - unsigned int i_mbsize; - unsigned int p_mbsize; - unsigned int b_mbsize; - unsigned int bi_mbsize; - unsigned int i_mbnum; - unsigned int p_mbnum; - unsigned int b_mbnum; - unsigned int bi_mbnum; - unsigned int i_mbcbp[64]; - unsigned int p_mbcbp[64]; - unsigned int b_mbcbp[64]; - unsigned int bi_mbcbp[64]; - unsigned int i_mbcoeff[64]; - unsigned int p_mbcoeff[64]; - unsigned int b_mbcoeff[64]; - unsigned int bi_mbcoeff[64]; - double tottime; -} Statval; - -Statval stat_a[4]; -unsigned int pictureSizeCount; -unsigned int mbSizeCount; -unsigned int *mbCBPPtr, *mbCoeffPtr, *mbSizePtr; -unsigned int cacheHit[8][8]; -unsigned int cacheMiss[8][8]; - -static void -init_stat_struct(astat) - Statval *astat; -{ - int j; - - astat->frametype = 0; - astat->totsize = 0; - astat->number = 0; - astat->i_mbsize = 0; - astat->p_mbsize = 0; - astat->b_mbsize = 0; - astat->bi_mbsize = 0; - astat->i_mbnum = 0; - astat->p_mbnum = 0; - astat->b_mbnum = 0; - astat->bi_mbnum = 0; - - for (j = 0; j < 64; j++) { - - astat->i_mbcbp[j] = 0; - astat->p_mbcbp[j] = 0; - astat->b_mbcbp[j] = 0; - astat->bi_mbcbp[j] = 0; - astat->i_mbcoeff[j] = 0; - astat->p_mbcoeff[j] = 0; - astat->b_mbcoeff[j] = 0; - astat->bi_mbcoeff[j] = 0; - } - astat->tottime = 0.0; -} - -void -init_stats() -{ - int i, j; - - for (i = 0; i < 4; i++) { - init_stat_struct(&(stat_a[i])); - stat_a[i].frametype = i; - } - - for (i = 0; i < 8; i++) { - for (j = 0; j < 8; j++) { - cacheHit[i][j] = 0; - cacheMiss[i][j] = 0; - } - } - - bitCount = 0; -} - -static void -PrintOneStat() -{ - int i; - - printf("\n"); - switch (stat_a[0].frametype) { - case I_TYPE: - printf("I FRAME\n"); - break; - case P_TYPE: - printf("P FRAME\n"); - break; - case B_TYPE: - printf("B FRAME\n"); - break; - } - - printf("Size: %d bytes + %d bits\n", stat_a[0].totsize / 8, stat_a[0].totsize % 8); - if (stat_a[0].i_mbnum > 0) { - printf("\tI Macro Block Stats:\n"); - printf("\t%d I Macroblocks\n", stat_a[0].i_mbnum); - printf("\tAvg. Size: %d bytes + %d bits\n", - stat_a[0].i_mbsize / (8 * stat_a[0].i_mbnum), - (stat_a[0].i_mbsize * stat_a[0].i_mbnum) % 8); - printf("\t\tCoded Block Pattern Histogram:\n"); - for (i = 0; i < 64; i += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].i_mbcbp[i], - stat_a[0].i_mbcbp[i + 1], stat_a[0].i_mbcbp[i + 2], stat_a[0].i_mbcbp[i + 3], - stat_a[0].i_mbcbp[i + 4], stat_a[0].i_mbcbp[i + 5], stat_a[0].i_mbcbp[i + 6], - stat_a[0].i_mbcbp[i + 7]); - } - printf("\n\t\tNumber of Coefficients/Block Histogram:\n"); - for (i = 0; i < 64; i += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].i_mbcoeff[i], - stat_a[0].i_mbcoeff[i + 1], stat_a[0].i_mbcoeff[i + 2], - stat_a[0].i_mbcoeff[i + 3], stat_a[0].i_mbcoeff[i + 4], - stat_a[0].i_mbcoeff[i + 5], stat_a[0].i_mbcoeff[i + 6], - stat_a[0].i_mbcoeff[i + 7]); - } - } - if (stat_a[0].p_mbnum > 0) { - printf("\tP Macro Block Stats:\n"); - printf("\t%d P Macroblocks\n", stat_a[0].p_mbnum); - printf("\tAvg. Size: %d bytes + %d bits\n", - stat_a[0].p_mbsize / (8 * stat_a[0].p_mbnum), - (stat_a[0].p_mbsize / stat_a[0].p_mbnum) % 8); - printf("\t\tCoded Block Pattern Histogram:\n"); - for (i = 0; i < 64; i += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].p_mbcbp[i], - stat_a[0].p_mbcbp[i + 1], stat_a[0].p_mbcbp[i + 2], stat_a[0].p_mbcbp[i + 3], - stat_a[0].p_mbcbp[i + 4], stat_a[0].p_mbcbp[i + 5], stat_a[0].p_mbcbp[i + 6], - stat_a[0].p_mbcbp[i + 7]); - } - printf("\n\t\tNumber of Coefficients/Block Histogram:\n"); - for (i = 0; i < 64; i += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].p_mbcoeff[i], - stat_a[0].p_mbcoeff[i + 1], stat_a[0].p_mbcoeff[i + 2], - stat_a[0].p_mbcoeff[i + 3], stat_a[0].p_mbcoeff[i + 4], - stat_a[0].p_mbcoeff[i + 5], stat_a[0].p_mbcoeff[i + 6], - stat_a[0].p_mbcoeff[i + 7]); - } - } - if (stat_a[0].b_mbnum > 0) { - printf("\tB Macro Block Stats:\n"); - printf("\t%d B Macroblocks\n", stat_a[0].b_mbnum); - printf("\tAvg. Size: %d bytes + %d bits\n", - stat_a[0].b_mbsize / (8 * stat_a[0].b_mbnum), - (stat_a[0].b_mbsize / stat_a[0].b_mbnum) % 8); - printf("\t\tCoded Block Pattern Histogram:\n"); - for (i = 0; i < 64; i += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].b_mbcbp[i], - stat_a[0].b_mbcbp[i + 1], stat_a[0].b_mbcbp[i + 2], stat_a[0].b_mbcbp[i + 3], - stat_a[0].b_mbcbp[i + 4], stat_a[0].b_mbcbp[i + 5], stat_a[0].b_mbcbp[i + 6], - stat_a[0].b_mbcbp[i + 7]); - } - printf("\n\t\tNumber of Coefficients/Block Histogram:\n"); - for (i = 0; i < 64; i += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].b_mbcoeff[i], - stat_a[0].b_mbcoeff[i + 1], stat_a[0].b_mbcoeff[i + 2], - stat_a[0].b_mbcoeff[i + 3], stat_a[0].b_mbcoeff[i + 4], - stat_a[0].b_mbcoeff[i + 5], stat_a[0].b_mbcoeff[i + 6], - stat_a[0].b_mbcoeff[i + 7]); - } - } - if (stat_a[0].bi_mbnum > 0) { - printf("\tBi Macro Block Stats:\n"); - printf("\t%d Bi Macroblocks\n", stat_a[0].bi_mbnum); - printf("\tAvg. Size: %d bytes + %d bits\n", - stat_a[0].bi_mbsize / (8 * stat_a[0].bi_mbnum), - (stat_a[0].bi_mbsize * stat_a[0].bi_mbnum) % 8); - printf("\t\tCoded Block Pattern Histogram:\n"); - for (i = 0; i < 64; i += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].bi_mbcbp[i], - stat_a[0].bi_mbcbp[i + 1], stat_a[0].bi_mbcbp[i + 2], stat_a[0].bi_mbcbp[i + 3], - stat_a[0].bi_mbcbp[i + 4], stat_a[0].bi_mbcbp[i + 5], stat_a[0].bi_mbcbp[i + 6], - stat_a[0].bi_mbcbp[i + 7]); - } - printf("\n\t\tNumber of Coefficients/Block Histogram:\n"); - for (i = 0; i < 64; i += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[0].bi_mbcoeff[i], - stat_a[0].bi_mbcoeff[i + 1], stat_a[0].bi_mbcoeff[i + 2], - stat_a[0].bi_mbcoeff[i + 3], stat_a[0].bi_mbcoeff[i + 4], - stat_a[0].bi_mbcoeff[i + 5], stat_a[0].bi_mbcoeff[i + 6], - stat_a[0].bi_mbcoeff[i + 7]); - } - } - printf("\nTime to Decode: %g secs.\n", stat_a[0].tottime); - printf("****************\n"); -} - -void -PrintAllStats() -{ - int i, j; - unsigned int supertot, supernum; - double supertime; - - printf("\n"); - printf("General Info: \n"); - printf("Width: %d\nHeight: %d\n", curVidStream->mb_width * 16, curVidStream->mb_height * 16); - - for (i = 1; i < 4; i++) { - - if (stat_a[i].number == 0) - continue; - - switch (i) { - case 1: - printf("I FRAMES\n"); - break; - case 2: - printf("P FRAMES\n"); - break; - case 3: - printf("B FRAMES\n"); - break; - } - - printf("Number: %d\n", stat_a[i].number); - printf("Avg. Size: %d bytes + %d bits\n", - stat_a[i].totsize / (8 * stat_a[i].number), (stat_a[i].totsize / stat_a[i].number) % 8); - if (stat_a[i].i_mbnum > 0) { - printf("\tI Macro Block Stats:\n"); - printf("\t%d I Macroblocks\n", stat_a[i].i_mbnum); - printf("\tAvg. Size: %d bytes + %d bits\n", - stat_a[i].i_mbsize / (8 * stat_a[i].i_mbnum), - (stat_a[i].i_mbsize / stat_a[i].i_mbnum) % 8); - printf("\t\tCoded Block Pattern Histogram:\n"); - for (j = 0; j < 64; j += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].i_mbcbp[j], - stat_a[i].i_mbcbp[j + 1], stat_a[i].i_mbcbp[j + 2], stat_a[i].i_mbcbp[j + 3], - stat_a[i].i_mbcbp[j + 4], stat_a[i].i_mbcbp[j + 5], stat_a[i].i_mbcbp[j + 6], - stat_a[i].i_mbcbp[j + 7]); - } - printf("\n\t\tNumber of Coefficients/Block Histogram:\n"); - for (j = 0; j < 64; j += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].i_mbcoeff[j], - stat_a[i].i_mbcoeff[j + 1], stat_a[i].i_mbcoeff[j + 2], - stat_a[i].i_mbcoeff[j + 3], stat_a[i].i_mbcoeff[j + 4], - stat_a[i].i_mbcoeff[j + 5], stat_a[i].i_mbcoeff[j + 6], - stat_a[i].i_mbcoeff[j + 7]); - } - } - if (stat_a[i].p_mbnum > 0) { - printf("\tP Macro Block Stats:\n"); - printf("\t%d P Macroblocks\n", stat_a[i].p_mbnum); - printf("\tAvg. Size: %d bytes + %d bits\n", - stat_a[i].p_mbsize / (8 * stat_a[i].p_mbnum), - (stat_a[i].p_mbsize / stat_a[i].p_mbnum) % 8); - printf("\t\tCoded Block Pattern Histogram:\n"); - for (j = 0; j < 64; j += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].p_mbcbp[j], - stat_a[i].p_mbcbp[j + 1], stat_a[i].p_mbcbp[j + 2], stat_a[i].p_mbcbp[j + 3], - stat_a[i].p_mbcbp[j + 4], stat_a[i].p_mbcbp[j + 5], stat_a[i].p_mbcbp[j + 6], - stat_a[i].p_mbcbp[j + 7]); - } - printf("\n\t\tNumber of Coefficients/Block Histogram:\n"); - for (j = 0; j < 64; j += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].p_mbcoeff[j], - stat_a[i].p_mbcoeff[j + 1], stat_a[i].p_mbcoeff[j + 2], - stat_a[i].p_mbcoeff[j + 3], stat_a[i].p_mbcoeff[j + 4], - stat_a[i].p_mbcoeff[j + 5], stat_a[i].p_mbcoeff[j + 6], - stat_a[i].p_mbcoeff[j + 7]); - } - } - if (stat_a[i].b_mbnum > 0) { - printf("\tB Macro Block Stats:\n"); - printf("\t%d B Macroblocks\n", stat_a[i].b_mbnum); - printf("\tAvg. Size: %d bytes + %d bits\n", - stat_a[i].b_mbsize / (8 * stat_a[i].b_mbnum), - (stat_a[i].b_mbsize * stat_a[i].b_mbnum) % 8); - printf("\t\tCoded Block Pattern Histogram:\n"); - for (j = 0; j < 64; j += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].b_mbcbp[j], - stat_a[i].b_mbcbp[j + 1], stat_a[i].b_mbcbp[j + 2], stat_a[i].b_mbcbp[j + 3], - stat_a[i].b_mbcbp[j + 4], stat_a[i].b_mbcbp[j + 5], stat_a[i].b_mbcbp[j + 6], - stat_a[i].b_mbcbp[j + 7]); - } - printf("\n\t\tNumber of Coefficients/Block Histogram:\n"); - for (j = 0; j < 64; j += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].b_mbcoeff[j], - stat_a[i].b_mbcoeff[j + 1], stat_a[i].b_mbcoeff[j + 2], - stat_a[i].b_mbcoeff[j + 3], stat_a[i].b_mbcoeff[j + 4], - stat_a[i].b_mbcoeff[j + 5], stat_a[i].b_mbcoeff[j + 6], - stat_a[i].b_mbcoeff[j + 7]); - } - } - if (stat_a[i].bi_mbnum > 0) { - printf("\tBi Macro Block Stats:\n"); - printf("\t%d Bi Macroblocks\n", stat_a[i].bi_mbnum); - printf("\tAvg. Size: %d bytes + %d bits\n", - stat_a[i].bi_mbsize / (8 * stat_a[i].bi_mbnum), - (stat_a[i].bi_mbsize * stat_a[i].bi_mbnum) % 8); - printf("\t\tCoded Block Pattern Histogram:\n"); - for (j = 0; j < 64; j += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].bi_mbcbp[j], - stat_a[i].bi_mbcbp[j + 1], stat_a[i].bi_mbcbp[j + 2], stat_a[i].bi_mbcbp[j + 3], - stat_a[i].bi_mbcbp[j + 4], stat_a[i].bi_mbcbp[j + 5], stat_a[i].bi_mbcbp[j + 6], - stat_a[i].bi_mbcbp[j + 7]); - } - printf("\n\t\tNumber of Coefficients/Block Histogram:\n"); - for (j = 0; j < 64; j += 8) { - printf("\t%.6d %.6d %.6d %.6d %.6d %.6d %.6d %.6d\n", stat_a[i].bi_mbcoeff[j], - stat_a[i].bi_mbcoeff[j + 1], stat_a[i].bi_mbcoeff[j + 2], - stat_a[i].bi_mbcoeff[j + 3], stat_a[i].bi_mbcoeff[j + 4], - stat_a[i].bi_mbcoeff[j + 5], stat_a[i].bi_mbcoeff[j + 6], - stat_a[i].bi_mbcoeff[j + 7]); - } - } - printf("\nAvg. Time to Decode: %f secs.\n", - (stat_a[i].tottime / ((double) stat_a[i].number))); - printf("\n"); - printf("*************************\n\n"); - } - - supertot = stat_a[1].totsize + stat_a[2].totsize + stat_a[3].totsize; - supernum = stat_a[1].number + stat_a[2].number + stat_a[3].number; - supertime = stat_a[1].tottime + stat_a[2].tottime + stat_a[3].tottime; - - printf("Total Number of Frames: %d\n", supernum); - printf("Avg Frame Size: %d bytes %d bits\n", - supertot / (8 * supernum), (supertot / supernum) % 8); - printf("Total Time Decoding: %g secs.\n", supertime); - printf("Avg Decoding Time/Frame: %g secs.\n", supertime / ((double) supernum)); - printf("Avg Decoding Frames/Sec: %g secs.\n", ((double) supernum) / supertime); - printf("\n"); - - printf("Cache Hits/Miss\n"); - for (i = 0; i < 8; i++) { - printf("%.6d/%.6d\t%.6d/%.6d\t%.6d/%.6d\t%.6d/%.6d\n", - cacheHit[i][0], cacheMiss[i][0], cacheHit[i][1], cacheMiss[i][1], - cacheHit[i][2], cacheMiss[i][2], cacheHit[i][3], cacheMiss[i][3]); - printf("%.6d/%.6d\t%.6d/%.6d\t%.6d/%.6d\t%.6d/%.6d\n", - cacheHit[i][4], cacheMiss[i][4], cacheHit[i][5], cacheMiss[i][5], - cacheHit[i][6], cacheMiss[i][6], cacheHit[i][7], cacheMiss[i][7]); - } - -} - -static void -CollectStats() -{ - int i, j; - - i = stat_a[0].frametype; - - stat_a[i].totsize += stat_a[0].totsize; - stat_a[i].number += stat_a[0].number; - stat_a[i].i_mbsize += stat_a[0].i_mbsize; - stat_a[i].p_mbsize += stat_a[0].p_mbsize; - stat_a[i].b_mbsize += stat_a[0].b_mbsize; - stat_a[i].bi_mbsize += stat_a[0].bi_mbsize; - stat_a[i].i_mbnum += stat_a[0].i_mbnum; - stat_a[i].p_mbnum += stat_a[0].p_mbnum; - stat_a[i].b_mbnum += stat_a[0].b_mbnum; - stat_a[i].bi_mbnum += stat_a[0].bi_mbnum; - - for (j = 0; j < 64; j++) { - - stat_a[i].i_mbcbp[j] += stat_a[0].i_mbcbp[j]; - stat_a[i].p_mbcbp[j] += stat_a[0].p_mbcbp[j]; - stat_a[i].b_mbcbp[j] += stat_a[0].b_mbcbp[j]; - stat_a[i].bi_mbcbp[j] += stat_a[0].bi_mbcbp[j]; - stat_a[i].i_mbcoeff[j] += stat_a[0].i_mbcoeff[j]; - stat_a[i].p_mbcoeff[j] += stat_a[0].p_mbcoeff[j]; - stat_a[i].b_mbcoeff[j] += stat_a[0].b_mbcoeff[j]; - stat_a[i].bi_mbcoeff[j] += stat_a[0].bi_mbcoeff[j]; - } - - stat_a[i].tottime += stat_a[0].tottime; - - init_stat_struct(&(stat_a[0])); -} - -static unsigned int -bitCountRead() -{ - return bitCount; -} - -static void -StartTime() -{ - stat_a[0].tottime = ReadSysClock(); -} - -static void -EndTime() -{ - stat_a[0].tottime = ReadSysClock() - stat_a[0].tottime; -} -#endif - -double realTimeStart; -int totNumFrames = 0; - -double -ReadSysClock() -{ - struct timeval tv; - (void) gettimeofday(&tv, (struct timezone *)NULL); - return (tv.tv_sec + tv.tv_usec / 1000000.0); -} - -void -PrintTimeInfo() -{ - double spent; - - spent = ReadSysClock() - realTimeStart; - - if (!quietFlag) { - printf("\nReal Time Spent (After Initializations): %f secs.\n", spent); - printf("Avg. Frames/Sec: %f\n", ((double) totNumFrames) / spent); -/* - print_delta(); -*/ - } -} - - - -/* - *-------------------------------------------------------------- - * - * NewVidStream -- - * - * Allocates and initializes a VidStream structure. Takes - * as parameter requested size for buffer length. - * - * Results: - * A pointer to the new VidStream structure. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -VidStream * NewVidStream(void) -{ - int i, j; - VidStream *new_stream; - static unsigned char default_intra_matrix[64] = { - 8, 16, 19, 22, 26, 27, 29, 34, - 16, 16, 22, 24, 27, 29, 34, 37, - 19, 22, 26, 27, 29, 34, 34, 38, - 22, 22, 26, 27, 29, 34, 37, 40, - 22, 26, 27, 29, 32, 35, 40, 48, - 26, 27, 29, 32, 35, 40, 48, 58, - 26, 27, 29, 34, 38, 46, 56, 69, - 27, 29, 35, 38, 46, 56, 69, 83}; - - /* Allocate memory for new structure. */ - - new_stream = (VidStream *) ACE_OS::malloc(sizeof(VidStream)); - - /* Initialize pointers to extension and user data. */ - - new_stream->group.ext_data = new_stream->group.user_data = - new_stream->picture.extra_info = new_stream->picture.user_data = - new_stream->picture.ext_data = new_stream->slice.extra_info = - new_stream->ext_data = new_stream->user_data = NULL; - - /* Copy default intra matrix. */ - - for (i = 0; i < 8; i++) { - for (j = 0; j < 8; j++) { - new_stream->intra_quant_matrix[j][i] = default_intra_matrix[i * 8 + j]; - } - } - - /* Initialize crop table. */ - - for (i = (-MAX_NEG_CROP); i < NUM_CROP_ENTRIES - MAX_NEG_CROP; i++) { - if (i <= 0) { - cropTbl[i + MAX_NEG_CROP] = 0; - } else if (i >= 255) { - cropTbl[i + MAX_NEG_CROP] = 255; - } else { - cropTbl[i + MAX_NEG_CROP] = i; - } - } - - /* Initialize non intra quantization matrix. */ - - for (i = 0; i < 8; i++) { - for (j = 0; j < 8; j++) { - new_stream->non_intra_quant_matrix[j][i] = 16; - } - } - - /* Initialize pointers to image spaces. */ - - new_stream->current = new_stream->past = new_stream->future = NULL; - for (i = 0; i < RING_BUF_SIZE; i++) { - new_stream->ring[i] = NULL; - } - - - /* Initialize bitstream i/o fields. */ - - new_stream->max_buf_length = 0; - new_stream->bit_offset = 0; - new_stream->buf_length = 0; - new_stream->buffer = new_stream->buf_start = NULL; - - - /* Return structure. */ - - return new_stream; -} - - - -/* - *-------------------------------------------------------------- - * - * DestroyVidStream -- - * - * Deallocates a VidStream structure. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ -void -DestroyVidStream(VidStream *astream) -{ - int i; - - if (astream->ext_data != NULL) - ACE_OS::free (astream->ext_data); - - if (astream->user_data != NULL) - ACE_OS::free (astream->user_data); - - if (astream->group.ext_data != NULL) - ACE_OS::free (astream->group.ext_data); - - if (astream->group.user_data != NULL) - ACE_OS::free (astream->group.user_data); - - if (astream->picture.extra_info != NULL) - ACE_OS::free (astream->picture.extra_info); - - if (astream->picture.ext_data != NULL) - ACE_OS::free (astream->picture.ext_data); - - if (astream->picture.user_data != NULL) - ACE_OS::free (astream->picture.user_data); - - if (astream->slice.extra_info != NULL) - ACE_OS::free (astream->slice.extra_info); - - if (astream->buf_start != NULL) - ACE_OS::free (astream->buf_start); - - for (i = 0; i < RING_BUF_SIZE; i++) { - if (astream->ring[i] != NULL) { - DestroyPictImage(astream->ring[i]); - astream->ring[i] = NULL; - } - } - - ACE_OS::free ((char *) astream); -} - - - - -/* - *-------------------------------------------------------------- - * - * NewPictImage -- - * - * Allocates and initializes a PictImage structure. - * The width and height of the image space are passed in - * as parameters. - * - * Results: - * A pointer to the new PictImage structure. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -PictImage * -NewPictImage(unsigned int width, unsigned int height) -{ - PictImage *new_pi; - - /* Allocate memory space for new structure. */ - - new_pi = (PictImage *) ACE_OS::malloc(sizeof(PictImage)); - new_pi->luminance = (unsigned char *) ACE_OS::malloc(width * height); - new_pi->Cr = (unsigned char *) ACE_OS::malloc(width * height / 4); - new_pi->Cb = (unsigned char *) ACE_OS::malloc(width * height / 4); - - /* Reset locked flag. */ - - new_pi->locked = 0; - - /* Return pointer to new structure. */ - - return new_pi; -} - - - -/* - *-------------------------------------------------------------- - * - * DestroyPictImage -- - * - * Deallocates a PictImage structure. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ -void -DestroyPictImage(PictImage *apictimage) -{ - if (apictimage->luminance != NULL) { - ACE_OS::free (apictimage->luminance); - } - if (apictimage->Cr != NULL) { - ACE_OS::free (apictimage->Cr); - } - if (apictimage->Cb != NULL) { - ACE_OS::free (apictimage->Cb); - } - ACE_OS::free (apictimage); -} - - - -/* - *-------------------------------------------------------------- - * - * mpegVidRsrc -- - * - * Parses bit stream until a picture is decoded - * - * Results: - * 0 - successfully decoded a frame, -1 - failed - * - * Side effects: - * Bit stream is irreversibly parsed. - * - *-------------------------------------------------------------- - */ -int mpegVidRsrc(char *packet) -{ - TimeStamp time_stamp = 0; - VidStream *vid_stream = curVidStream; - unsigned int data; - int i, status; - VideoPacket *p = (VideoPacket *) packet; - - /* initialize buffer info and allocate ring item for current frame */ - (curVidStream->buf_start) = (curVidStream->buffer) = - (unsigned int *)(packet + sizeof(*p)); - curVidStream->max_buf_length = curVidStream->buf_length = - (p->dataBytes + 11)>>2; - curVidStream->bit_offset = 0; - - i = 0; - while (curVidStream->ring[i]->locked != 0) - if (++i >= RING_BUF_SIZE) { - ACE_OS::perror ("VD fatal error. Ring buffer full."); - ACE_OS::exit (1); - } - curVidStream->current = curVidStream->ring[i]; - curVidStream->current->sh = p->sh; - curVidStream->current->gop = p->gop; - curVidStream->current->frame = p->frame; - curVidStream->current->display = p->display; - curVidStream->current->future = p->future; - curVidStream->current->past = p->past; - - bitOffset = curVidStream->bit_offset; -#ifdef UTIL2 - curBits = *curVidStream->buffer << bitOffset; -#else - curBits = *curVidStream->buffer; -#endif - bufLength = curVidStream->buf_length; - bitBuffer = curVidStream->buffer; - - /* - * If called for the INIT command, find start code, make sure it is a - * sequence start code. - */ - - if (shared->cmd == CmdINIT) { - next_start_code(); - show_bits32(data); - if (data != SEQ_START_CODE) { - fprintf(stderr, "VD error: This is not first packet of the an MPEG stream, data %u.", data); - DestroyVidStream(curVidStream); - ACE_OS::exit (1); - } - } - /* Get next 32 bits (size of start codes). */ - - show_bits32(data); - - /* Process according to start code */ - - switch (data) - { - case SEQ_END_CODE: - - /* Display last frame. */ - /* - fprintf(stderr, "VD: SEQ_END_CODE decoded.\n"); - */ - if (vid_stream->future != NULL) - { - vid_stream->current = vid_stream->future; - return 0; - } - else - { - fprintf(stderr, "VD error: no more picture for SEQ_END_CODE\n"); - return -1; - } - - case SEQ_START_CODE: - - /* Sequence start code. Parse sequence header. */ - - if (ParseSeqHead(vid_stream) != PARSE_OK) - { - fprintf(stderr, "VD error on decoding SequenceHeader.\n"); - return -1; - } - - /* - * modify vid_stream after sequence start code so that application above can use - * info in header. - */ - - vid_stream->buffer = bitBuffer; - vid_stream->buf_length = bufLength; - vid_stream->bit_offset = bitOffset; - vid_stream->shid = ((VideoPacket *)packet)->sh; - - case GOP_START_CODE: - - /* Group of Pictures start code. Parse gop header. */ - - if (ParseGOP(vid_stream) != PARSE_OK) - { - fprintf(stderr, "VD error on decoding GOP\n"); - return -1; - } - - vid_stream->gopid = ((VideoPacket *)packet)->gop; - - case PICTURE_START_CODE: - - /* Picture start code. Parse picture header and first slice header. */ - - if (vid_stream->gopid != ((VideoPacket *)packet)->gop || - vid_stream->shid != ((VideoPacket *)packet)->sh) - { - shared->needHeader = 1; - /* - fprintf(stderr, "VD error: SeqHeader and/or GOP not available for the picture"); - */ - return -1; - } - - if (ParsePicture(vid_stream, time_stamp) != PARSE_OK) - { - /* - fprintf(stderr, "VD error on parsing Picture header\n"); - */ - return -1; - } - /* parse all the following slices */ - for (;;) - { - if (ParseSlice(vid_stream) != PARSE_OK) - { - fprintf(stderr, "VD error on decoding a Slice header.\n"); - return -1; - } - /* Parse all following macroblocks. */ - for (;;) - { - int res; - /* Check to see if actually a startcode and not a macroblock. */ - if (!next_bits(23, 0x00000000)) - { - /* Not start code. Parse Macroblock. */ - if ((res = ParseMacroBlock(vid_stream)) != PARSE_OK) - { - fprintf(stderr, "VD error on parsing a MacroBlock, res = %d\n", res); - return -1; - } - } - else - { - /* Not macroblock, actually start code. Get start code. */ - next_start_code(); - show_bits32(data); - - /* If start code is outside range of slice start codes, frame is - complete, display frame, otherwise another slice */ - if ((data < SLICE_MIN_START_CODE) || (data > SLICE_MAX_START_CODE)) - return 0; - else - break; - } - } - } - break; - default: - fprintf(stderr, "VD error: fail to clasify the packet.\n"); - return -1; - } - fprintf(stderr, "VD get wired.\n"); - return -1; -} - - -/* - *-------------------------------------------------------------- - * - * ParseSeqHead -- - * - * Assumes bit stream is at the begining of the sequence - * header start code. Parses off the sequence header. - * - * Results: - * Fills the vid_stream structure with values derived and - * decoded from the sequence header. Allocates the pict image - * structures based on the dimensions of the image space - * found in the sequence header. - * - * Side effects: - * Bit stream irreversibly parsed off. - * - *-------------------------------------------------------------- - */ - -static int -ParseSeqHead(VidStream *vid_stream) -{ - - unsigned int data; - int i; - - /* Flush off sequence start code. */ - - flush_bits32; - - /* Get horizontal size of image space. */ - - get_bits12(data); - vid_stream->h_size = data; - - /* Get vertical size of image space. */ - - get_bits12(data); - vid_stream->v_size = data; - - /* Calculate macroblock width and height of image space. */ - - vid_stream->mb_width = (vid_stream->h_size + 15) / 16; - vid_stream->mb_height = (vid_stream->v_size + 15) / 16; - - /* If dither type is MBORDERED allocate ditherFlags. */ - - if (ditherType == MBORDERED_DITHER) { - ditherFlags = (char *) ACE_OS::malloc(vid_stream->mb_width*vid_stream->mb_height); - } - - /* Initialize lmaxx, lmaxy, cmaxx, cmaxy. */ - - lmaxx = vid_stream->mb_width*16-1; - lmaxy = vid_stream->mb_height*16-1; - cmaxx = vid_stream->mb_width*8-1; - cmaxy = vid_stream->mb_height*8-1; - - /* Parse of aspect ratio code. */ - - get_bits4(data); - vid_stream->aspect_ratio = (unsigned char) data; - - /* Parse off picture rate code. */ - - get_bits4(data); - vid_stream->picture_rate = (unsigned char) data; - - /* Parse off bit rate. */ - - get_bits18(data); - vid_stream->bit_rate = data; - - /* Flush marker bit. */ - - flush_bits(1); - - /* Parse off vbv buffer size. */ - - get_bits10(data); - vid_stream->vbv_buffer_size = data; - - /* Parse off contrained parameter flag. */ - - get_bits1(data); - if (data) { - vid_stream->const_param_flag = TRUE; - } else - vid_stream->const_param_flag = FALSE; - - /* - * If intra_quant_matrix_flag set, parse off intra quant matrix values. - */ - - get_bits1(data); - if (data) { - for (i = 0; i < 64; i++) { - get_bits8(data); - - vid_stream->intra_quant_matrix[zigzag[i][1]][zigzag[i][0]] = - (unsigned char) data; - } - } - /* - * If non intra quant matrix flag set, parse off non intra quant matrix - * values. - */ - - get_bits1(data); - if (data) { - for (i = 0; i < 64; i++) { - get_bits8(data); - - vid_stream->non_intra_quant_matrix[zigzag[i][1]][zigzag[i][0]] = - (unsigned char) data; - } - } - /* Go to next start code. */ - - next_start_code(); - - /* - * If next start code is extension start code, parse off extension data. - */ - - if (next_bits(32, EXT_START_CODE)) { - flush_bits32; - if (vid_stream->ext_data != NULL) { - ACE_OS::free (vid_stream->ext_data); - vid_stream->ext_data = NULL; - } - vid_stream->ext_data = get_ext_data(); - } - /* If next start code is user start code, parse off user data. */ - - if (next_bits(32, USER_START_CODE)) { - flush_bits32; - if (vid_stream->user_data != NULL) { - ACE_OS::free (vid_stream->user_data); - vid_stream->user_data = NULL; - } - vid_stream->user_data = get_ext_data(); - } - return PARSE_OK; -} - - - -/* - *-------------------------------------------------------------- - * - * ParseGOP -- - * - * Parses of group of pictures header from bit stream - * associated with vid_stream. - * - * Results: - * Values in gop header placed into video stream structure. - * - * Side effects: - * Bit stream irreversibly parsed. - * - *-------------------------------------------------------------- - */ - -static int -ParseGOP(VidStream *vid_stream) -{ - unsigned int data; - - /* Flush group of pictures start code. WWWWWWOOOOOOOSSSSSSHHHHH!!! */ - - flush_bits32; - - /* Parse off drop frame flag. */ - - get_bits1(data); - if (data) { - vid_stream->group.drop_flag = TRUE; - } else - vid_stream->group.drop_flag = FALSE; - - /* Parse off hour component of time code. */ - - get_bits5(data); - vid_stream->group.tc_hours = data; - - /* Parse off minute component of time code. */ - - get_bits6(data); - vid_stream->group.tc_minutes = data; - - /* Flush marker bit. */ - - flush_bits(1); - - /* Parse off second component of time code. */ - - get_bits6(data); - vid_stream->group.tc_seconds = data; - - /* Parse off picture count component of time code. */ - - get_bits6(data); - vid_stream->group.tc_pictures = data; - /* - Fprintf(stderr, "GOP time_code:%d:%02d:%02d-%02d\n", - vid_stream->group.tc_hours, - vid_stream->group.tc_minutes, - vid_stream->group.tc_seconds, - vid_stream->group.tc_pictures); - */ - /* Parse off closed gop and broken link flags. */ - - get_bits2(data); - if (data > 1) { - vid_stream->group.closed_gop = TRUE; - if (data > 2) { - vid_stream->group.broken_link = TRUE; - } else - vid_stream->group.broken_link = FALSE; - } else { - vid_stream->group.closed_gop = FALSE; - if (data) { - vid_stream->group.broken_link = TRUE; - } else - vid_stream->group.broken_link = FALSE; - } - - /* Goto next start code. */ - - next_start_code(); - - /* If next start code is extension data, parse off extension data. */ - - if (next_bits(32, EXT_START_CODE)) { - flush_bits32; - if (vid_stream->group.ext_data != NULL) { - ACE_OS::free (vid_stream->group.ext_data); - vid_stream->group.ext_data = NULL; - } - vid_stream->group.ext_data = get_ext_data(); - } - /* If next start code is user data, parse off user data. */ - - if (next_bits(32, USER_START_CODE)) { - flush_bits32; - if (vid_stream->group.user_data != NULL) { - ACE_OS::free (vid_stream->group.user_data); - vid_stream->group.user_data = NULL; - } - vid_stream->group.user_data = get_ext_data(); - } - return PARSE_OK; -} - - - -/* - *-------------------------------------------------------------- - * - * ParsePicture -- - * - * Parses picture header. Marks picture to be presented - * at particular time given a time stamp. - * - * Results: - * Values from picture header put into video stream structure. - * - * Side effects: - * Bit stream irreversibly parsed. - * - *-------------------------------------------------------------- - */ - -static int -ParsePicture(VidStream *vid_stream,TimeStamp time_stamp) -{ - unsigned int data; - int i; - - /* Flush header start code. */ - flush_bits32; - - /* Parse off temporal reference. */ - get_bits10(data); - vid_stream->picture.temp_ref = data; - /* - Fprintf(stderr, "Pic temp_ref %d\n", vid_stream->picture.temp_ref); - */ - /* Parse of picture type. */ - get_bits3(data); - vid_stream->picture.code_type = data; - - if ((vid_stream->picture.code_type == B_TYPE) && - (No_B_Flag || - (vid_stream->past == NULL) || - (vid_stream->future == NULL))) - return SKIP_PICTURE; - - if ((vid_stream->picture.code_type == P_TYPE) && - (No_P_Flag || (vid_stream->future == NULL))) - return SKIP_PICTURE; - - /* Parse off vbv buffer delay value. */ - get_bits16(data); - vid_stream->picture.vbv_delay = data; - - /* If P or B type frame... */ - - if ((vid_stream->picture.code_type == 2) || (vid_stream->picture.code_type == 3)) { - - /* Parse off forward vector full pixel flag. */ - get_bits1(data); - if (data) - vid_stream->picture.full_pel_forw_vector = TRUE; - else - vid_stream->picture.full_pel_forw_vector = FALSE; - - /* Parse of forw_r_code. */ - get_bits3(data); - - /* Decode forw_r_code into forw_r_size and forw_f. */ - - vid_stream->picture.forw_r_size = data - 1; - vid_stream->picture.forw_f = (1 << vid_stream->picture.forw_r_size); - } - /* If B type frame... */ - - if (vid_stream->picture.code_type == 3) { - - /* Parse off back vector full pixel flag. */ - get_bits1(data); - if (data) - vid_stream->picture.full_pel_back_vector = TRUE; - else - vid_stream->picture.full_pel_back_vector = FALSE; - - /* Parse off back_r_code. */ - get_bits3(data); - - /* Decode back_r_code into back_r_size and back_f. */ - - vid_stream->picture.back_r_size = data - 1; - vid_stream->picture.back_f = (1 << vid_stream->picture.back_r_size); - } - /* Get extra bit picture info. */ - - if (vid_stream->picture.extra_info != NULL) { - ACE_OS::free (vid_stream->picture.extra_info); - vid_stream->picture.extra_info = NULL; - } - vid_stream->picture.extra_info = get_extra_bit_info(); - - /* Goto next start code. */ - next_start_code(); - - /* If start code is extension start code, parse off extension data. */ - - if (next_bits(32, EXT_START_CODE)) { - flush_bits32; - - if (vid_stream->picture.ext_data != NULL) { - ACE_OS::free (vid_stream->picture.ext_data); - vid_stream->picture.ext_data = NULL; - } - vid_stream->picture.ext_data = get_ext_data(); - } - /* If start code is user start code, parse off user data. */ - - if (next_bits(32, USER_START_CODE)) { - flush_bits32; - - if (vid_stream->picture.user_data != NULL) { - ACE_OS::free (vid_stream->picture.user_data); - vid_stream->picture.user_data = NULL; - } - vid_stream->picture.user_data = get_ext_data(); - } - - /* Reset past macroblock address field. */ - - vid_stream->mblock.past_mb_addr = -1; - - return PARSE_OK; -} - -/* - *-------------------------------------------------------------- - * - * ParseSlice -- - * - * Parses off slice header. - * - * Results: - * Values found in slice header put into video stream structure. - * - * Side effects: - * Bit stream irreversibly parsed. - * - *-------------------------------------------------------------- - */ - -static int -ParseSlice(VidStream *vid_stream) -{ - unsigned int data; - - /* Flush slice start code. */ - - flush_bits(24); - - /* Parse off slice vertical position. */ - - get_bits8(data); - vid_stream->slice.vert_pos = data; - - /* Parse off quantization scale. */ - - get_bits5(data); - vid_stream->slice.quant_scale = data; - - /* Parse off extra bit slice info. */ - - if (vid_stream->slice.extra_info != NULL) { - ACE_OS::free (vid_stream->slice.extra_info); - vid_stream->slice.extra_info = NULL; - } - vid_stream->slice.extra_info = get_extra_bit_info(); - - /* Reset past intrablock address. */ - - vid_stream->mblock.past_intra_addr = -2; - - /* Reset previous recon motion vectors. */ - - vid_stream->mblock.recon_right_for_prev = 0; - vid_stream->mblock.recon_down_for_prev = 0; - vid_stream->mblock.recon_right_back_prev = 0; - vid_stream->mblock.recon_down_back_prev = 0; - - /* Reset macroblock address. */ - - vid_stream->mblock.mb_address = ((vid_stream->slice.vert_pos - 1) * - vid_stream->mb_width) - 1; - - /* Reset past dct dc y, cr, and cb values. */ - - vid_stream->block.dct_dc_y_past = 1024; - vid_stream->block.dct_dc_cr_past = 1024; - vid_stream->block.dct_dc_cb_past = 1024; - - return PARSE_OK; -} - - - -/* - *-------------------------------------------------------------- - * - * ParseMacroBlock -- - * - * Parseoff macroblock. Reconstructs DCT values. Applies - * inverse DCT, reconstructs motion vectors, calculates and - * set pixel values for macroblock in current pict image - * structure. - * - * Results: - * Here's where everything really happens. Welcome to the - * heart of darkness. - * - * Side effects: - * Bit stream irreversibly parsed off. - * - *-------------------------------------------------------------- - */ - -static int -ParseMacroBlock(VidStream *vid_stream) -{ - int addr_incr; - unsigned int data; - int mask, i, recon_right_for, recon_down_for, recon_right_back, - recon_down_back; - int zero_block_flag; - BOOLEAN mb_quant, mb_motion_forw, mb_motion_back, mb_pattern; - int no_dith_flag = 0; - -#ifdef ANALYSIS - mbSizeCount = bitCountRead(); -#endif - - /* - * Parse off macroblock address increment and add to macroblock address. - */ - do { - DecodeMBAddrInc(addr_incr); - if (addr_incr == MB_ESCAPE) { - vid_stream->mblock.mb_address += 33; - addr_incr = MB_STUFFING; - } - } while (addr_incr == MB_STUFFING); - vid_stream->mblock.mb_address += addr_incr; - - if (vid_stream->mblock.mb_address > ((vid_stream->mb_height) * (vid_stream->mb_width) - 1)) - { - fprintf(stderr, "mblock.mb_address-%d, mb_height-%d, mb_width-%d, addr_incr-%d\n", - vid_stream->mblock.mb_address, vid_stream->mb_height, vid_stream->mb_width, addr_incr); - return SKIP_TO_START_CODE; - } - - /* - * If macroblocks have been skipped, process skipped macroblocks. - */ - - if (vid_stream->mblock.mb_address - vid_stream->mblock.past_mb_addr > 1) { - if (vid_stream->picture.code_type == P_TYPE) - ProcessSkippedPFrameMBlocks(vid_stream); - else if (vid_stream->picture.code_type == B_TYPE) - ProcessSkippedBFrameMBlocks(vid_stream); - } - /* Set past macroblock address to current macroblock address. */ - vid_stream->mblock.past_mb_addr = vid_stream->mblock.mb_address; - - /* Based on picture type decode macroblock type. */ - switch (vid_stream->picture.code_type) { - case I_TYPE: - DecodeMBTypeI(mb_quant, mb_motion_forw, mb_motion_back, mb_pattern, - vid_stream->mblock.mb_intra); - break; - - case P_TYPE: - DecodeMBTypeP(mb_quant, mb_motion_forw, mb_motion_back, mb_pattern, - vid_stream->mblock.mb_intra); - break; - - case B_TYPE: - DecodeMBTypeB(mb_quant, mb_motion_forw, mb_motion_back, mb_pattern, - vid_stream->mblock.mb_intra); - break; - } - - /* If quantization flag set, parse off new quantization scale. */ - - if (mb_quant == TRUE) { - get_bits5(data); - vid_stream->slice.quant_scale = data; - } - /* If forward motion vectors exist... */ - if (mb_motion_forw == TRUE) { - - /* Parse off and decode horizontal forward motion vector. */ - DecodeMotionVectors(vid_stream->mblock.motion_h_forw_code); - - /* If horiz. forward r data exists, parse off. */ - - if ((vid_stream->picture.forw_f != 1) && - (vid_stream->mblock.motion_h_forw_code != 0)) { - get_bitsn(vid_stream->picture.forw_r_size, data); - vid_stream->mblock.motion_h_forw_r = data; - } - /* Parse off and decode vertical forward motion vector. */ - DecodeMotionVectors(vid_stream->mblock.motion_v_forw_code); - - /* If vert. forw. r data exists, parse off. */ - - if ((vid_stream->picture.forw_f != 1) && - (vid_stream->mblock.motion_v_forw_code != 0)) { - get_bitsn(vid_stream->picture.forw_r_size, data); - vid_stream->mblock.motion_v_forw_r = data; - } - } - /* If back motion vectors exist... */ - if (mb_motion_back == TRUE) { - - /* Parse off and decode horiz. back motion vector. */ - DecodeMotionVectors(vid_stream->mblock.motion_h_back_code); - - /* If horiz. back r data exists, parse off. */ - - if ((vid_stream->picture.back_f != 1) && - (vid_stream->mblock.motion_h_back_code != 0)) { - get_bitsn(vid_stream->picture.back_r_size, data); - vid_stream->mblock.motion_h_back_r = data; - } - /* Parse off and decode vert. back motion vector. */ - DecodeMotionVectors(vid_stream->mblock.motion_v_back_code); - - /* If vert. back r data exists, parse off. */ - - if ((vid_stream->picture.back_f != 1) && - (vid_stream->mblock.motion_v_back_code != 0)) { - get_bitsn(vid_stream->picture.back_r_size, data); - vid_stream->mblock.motion_v_back_r = data; - } - } -#ifdef ANALYSIS - if (vid_stream->mblock.mb_intra) { - stat_a[0].i_mbnum++; - mbCBPPtr = stat_a[0].i_mbcbp; - mbCoeffPtr = stat_a[0].i_mbcoeff; - mbSizePtr = &(stat_a[0].i_mbsize); - } else if (mb_motion_back && mb_motion_forw) { - stat_a[0].bi_mbnum++; - mbCBPPtr = stat_a[0].bi_mbcbp; - mbCoeffPtr = stat_a[0].bi_mbcoeff; - mbSizePtr = &(stat_a[0].bi_mbsize); - } else if (mb_motion_back) { - stat_a[0].b_mbnum++; - mbCBPPtr = stat_a[0].b_mbcbp; - mbCoeffPtr = stat_a[0].b_mbcoeff; - mbSizePtr = &(stat_a[0].b_mbsize); - } else { - stat_a[0].p_mbnum++; - mbCBPPtr = stat_a[0].p_mbcbp; - mbCoeffPtr = stat_a[0].p_mbcoeff; - mbSizePtr = &(stat_a[0].p_mbsize); - } -#endif - - /* If mblock pattern flag set, parse and decode CBP (code block pattern). */ - if (mb_pattern == TRUE) { - DecodeCBP(vid_stream->mblock.cbp); - } - /* Otherwise, set CBP to zero. */ - else - vid_stream->mblock.cbp = 0; - - -#ifdef ANALYSIS - mbCBPPtr[vid_stream->mblock.cbp]++; -#endif - - /* Reconstruct motion vectors depending on picture type. */ - if (vid_stream->picture.code_type == P_TYPE) { - - /* - * If no forw motion vectors, reset previous and current vectors to 0. - */ - - if (!mb_motion_forw) { - recon_right_for = 0; - recon_down_for = 0; - vid_stream->mblock.recon_right_for_prev = 0; - vid_stream->mblock.recon_down_for_prev = 0; - } - /* - * Otherwise, compute new forw motion vectors. Reset previous vectors to - * current vectors. - */ - - else { - ComputeForwVector(&recon_right_for, &recon_down_for); - } - } - if (vid_stream->picture.code_type == B_TYPE) { - - /* Reset prev. and current vectors to zero if mblock is intracoded. */ - - if (vid_stream->mblock.mb_intra) { - vid_stream->mblock.recon_right_for_prev = 0; - vid_stream->mblock.recon_down_for_prev = 0; - vid_stream->mblock.recon_right_back_prev = 0; - vid_stream->mblock.recon_down_back_prev = 0; - } else { - - /* If no forw vectors, current vectors equal prev. vectors. */ - - if (!mb_motion_forw) { - recon_right_for = vid_stream->mblock.recon_right_for_prev; - recon_down_for = vid_stream->mblock.recon_down_for_prev; - } - /* - * Otherwise compute forw. vectors. Reset prev vectors to new values. - */ - - else { - ComputeForwVector(&recon_right_for, &recon_down_for); - } - - /* If no back vectors, set back vectors to prev back vectors. */ - - if (!mb_motion_back) { - recon_right_back = vid_stream->mblock.recon_right_back_prev; - recon_down_back = vid_stream->mblock.recon_down_back_prev; - } - /* Otherwise compute new vectors and reset prev. back vectors. */ - - else { - ComputeBackVector(&recon_right_back, &recon_down_back); - } - - /* - * Store vector existance flags in structure for possible skipped - * macroblocks to follow. - */ - - vid_stream->mblock.bpict_past_forw = mb_motion_forw; - vid_stream->mblock.bpict_past_back = mb_motion_back; - } - } - - /* For each possible block in macroblock. */ - if (ditherType == GRAY_DITHER || - ditherType == MONO_DITHER || - ditherType == MONO_THRESHOLD) { - for (mask = 32, i = 0; i < 4; mask >>= 1, i++) { - - /* If block exists... */ - if ((vid_stream->mblock.mb_intra) || (vid_stream->mblock.cbp & mask)) { - zero_block_flag = 0; - ParseReconBlock(i); - } else { - zero_block_flag = 1; - } - - /* If macroblock is intra coded... */ - if (vid_stream->mblock.mb_intra) { - ReconIMBlock(vid_stream, i); - } else if (mb_motion_forw && mb_motion_back) { - ReconBiMBlock(vid_stream, i, recon_right_for, recon_down_for, - recon_right_back, recon_down_back, zero_block_flag); - } else if (mb_motion_forw || (vid_stream->picture.code_type == P_TYPE)) { - ReconPMBlock(vid_stream, i, recon_right_for, recon_down_for, - zero_block_flag); - } else if (mb_motion_back) { - ReconBMBlock(vid_stream, i, recon_right_back, recon_down_back, - zero_block_flag); - } - } - /* Kill the Chrominace blocks... */ - if ((vid_stream->mblock.mb_intra) || (vid_stream->mblock.cbp & 0x2)) { - ParseAwayBlock(4); - } - if ((vid_stream->mblock.mb_intra) || (vid_stream->mblock.cbp & 0x1)) { - ParseAwayBlock(5); - } - } else { - if ((ditherType == MBORDERED_DITHER) && - (vid_stream->mblock.cbp == 0) && - (vid_stream->picture.code_type == 3) && - (!vid_stream->mblock.mb_intra) && - (!(mb_motion_forw && mb_motion_back))) { - /* - MBOrderedDitherDisplayCopy(vid_stream, vid_stream->mblock.mb_address, - mb_motion_forw, recon_right_for, recon_down_for, - mb_motion_back, recon_right_back, recon_down_back, - vid_stream->past->display, vid_stream->future->display); - ditherFlags[vid_stream->mblock.mb_address] = 0; - no_dith_flag = 1; - */ - } - else { - for (mask = 32, i = 0; i < 6; mask >>= 1, i++) { - - /* If block exists... */ - if ((vid_stream->mblock.mb_intra) || (vid_stream->mblock.cbp & mask)) { - zero_block_flag = 0; - ParseReconBlock(i); - } else { - zero_block_flag = 1; - } - - /* If macroblock is intra coded... */ - if (vid_stream->mblock.mb_intra) { - ReconIMBlock(vid_stream, i); - } else if (mb_motion_forw && mb_motion_back) { - ReconBiMBlock(vid_stream, i, recon_right_for, recon_down_for, - recon_right_back, recon_down_back, zero_block_flag); - } else if (mb_motion_forw || (vid_stream->picture.code_type == P_TYPE)) { - ReconPMBlock(vid_stream, i, recon_right_for, recon_down_for, - zero_block_flag); - } else if (mb_motion_back) { - ReconBMBlock(vid_stream, i, recon_right_back, recon_down_back, - zero_block_flag); - } - } - } - } - - if ((ditherType == MBORDERED_DITHER) && (!no_dith_flag)) { - if ((vid_stream->picture.code_type == 2) && - (vid_stream->mblock.cbp == 0) && - (!vid_stream->mblock.mb_intra)) { - /* - MBOrderedDitherDisplayCopy(vid_stream, vid_stream->mblock.mb_address, - 1, recon_right_for, recon_down_for, - 0, 0, 0, - vid_stream->future->display, - (unsigned char *) NULL); - ditherFlags[vid_stream->mblock.mb_address] = 0; - */ - } - else { - ditherFlags[vid_stream->mblock.mb_address] = 1; - } - } - - - /* If D Type picture, flush marker bit. */ - if (vid_stream->picture.code_type == 4) - flush_bits(1); - - /* If macroblock was intracoded, set macroblock past intra address. */ - if (vid_stream->mblock.mb_intra) - vid_stream->mblock.past_intra_addr = - vid_stream->mblock.mb_address; - -#ifdef ANALYSIS - *mbSizePtr += bitCountRead() - mbSizeCount; -#endif - return PARSE_OK; -} - - - -/* - *-------------------------------------------------------------- - * - * ReconIMBlock -- - * - * Reconstructs intra coded macroblock. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -static void -ReconIMBlock(VidStream *vid_stream, int bnum) -{ - int mb_row, mb_col, row, col, row_size, rr; - unsigned char *dest; - - /* Calculate macroblock row and column from address. */ - - mb_row = vid_stream->mblock.mb_address / vid_stream->mb_width; - mb_col = vid_stream->mblock.mb_address % vid_stream->mb_width; - - - /* If block is luminance block... */ - - if (bnum < 4) { - - /* Calculate row and col values for upper left pixel of block. */ - - row = mb_row * 16; - col = mb_col * 16; - if (bnum > 1) - row += 8; - if (bnum % 2) - col += 8; - - /* Set dest to luminance plane of current pict image. */ - - dest = vid_stream->current->luminance; - - /* Establish row size. */ - - row_size = vid_stream->mb_width * 16; - } - /* Otherwise if block is Cr block... */ - - else if (bnum == 4) { - - /* Set dest to Cr plane of current pict image. */ - - dest = vid_stream->current->Cr; - - /* Establish row size. */ - - row_size = vid_stream->mb_width * 8; - - /* Calculate row,col for upper left pixel of block. */ - - row = mb_row * 8; - col = mb_col * 8; - } - /* Otherwise block is Cb block, and ... */ - - else { - - /* Set dest to Cb plane of current pict image. */ - - dest = vid_stream->current->Cb; - - /* Establish row size. */ - - row_size = vid_stream->mb_width * 8; - - /* Calculate row,col for upper left pixel value of block. */ - - row = mb_row * 8; - col = mb_col * 8; - } - - /* - * For each pixel in block, set to cropped reconstructed value from inverse - * dct. - */ - { - short *sp = &vid_stream->block.dct_recon[0][0]; - unsigned char *cm = cropTbl + MAX_NEG_CROP; - dest += row * row_size + col; - for (rr = 0; rr < 4; rr++, sp += 16, dest += row_size) { - dest[0] = cm[sp[0]]; - assertCrop(sp[0]); - dest[1] = cm[sp[1]]; - assertCrop(sp[1]); - dest[2] = cm[sp[2]]; - assertCrop(sp[2]); - dest[3] = cm[sp[3]]; - assertCrop(sp[3]); - dest[4] = cm[sp[4]]; - assertCrop(sp[4]); - dest[5] = cm[sp[5]]; - assertCrop(sp[5]); - dest[6] = cm[sp[6]]; - assertCrop(sp[6]); - dest[7] = cm[sp[7]]; - assertCrop(sp[7]); - - dest += row_size; - dest[0] = cm[sp[8]]; - assertCrop(sp[8]); - dest[1] = cm[sp[9]]; - assertCrop(sp[9]); - dest[2] = cm[sp[10]]; - assertCrop(sp[10]); - dest[3] = cm[sp[11]]; - assertCrop(sp[11]); - dest[4] = cm[sp[12]]; - assertCrop(sp[12]); - dest[5] = cm[sp[13]]; - assertCrop(sp[13]); - dest[6] = cm[sp[14]]; - assertCrop(sp[14]); - dest[7] = cm[sp[15]]; - assertCrop(sp[15]); - } - } -} - - - -/* - *-------------------------------------------------------------- - * - * ReconPMBlock -- - * - * Reconstructs forward predicted macroblocks. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -static void -ReconPMBlock(VidStream *vid_stream, int bnum, - int recon_right_for, int recon_down_for, int zflag) -{ - int mb_row, mb_col, row, col, row_size, rr; - unsigned char *dest, *past; - static int right_for, down_for, right_half_for, down_half_for; - unsigned char *rindex1, *rindex2; - unsigned char *index; - short int *blockvals; - -#ifdef LOOSE_MPEG - int maxx, maxy; - int illegalBlock = 0; - int row_start, row_end, rfirst, rlast, col_start, col_end, cfirst, clast; -#endif - - /* Calculate macroblock row and column from address. */ - - mb_row = vid_stream->mblock.mb_address / vid_stream->mb_width; - mb_col = vid_stream->mblock.mb_address % vid_stream->mb_width; - - if (bnum < 4) { - - /* Calculate right_for, down_for motion vectors. */ - - right_for = recon_right_for >> 1; - down_for = recon_down_for >> 1; - right_half_for = recon_right_for & 0x1; - down_half_for = recon_down_for & 0x1; - - /* Set dest to luminance plane of current pict image. */ - - dest = vid_stream->current->luminance; - - if (vid_stream->picture.code_type == B_TYPE) { - if (vid_stream->past != NULL) - past = vid_stream->past->luminance; - } else { - - /* Set predicitive frame to current future frame. */ - - if (vid_stream->future != NULL) - past = vid_stream->future->luminance; - } - - /* Establish row size. */ - - row_size = vid_stream->mb_width << 4; - - /* Calculate row,col of upper left pixel in block. */ - - row = mb_row << 4; - col = mb_col << 4; - if (bnum > 1) - row += 8; - if (bnum % 2) - col += 8; - -#ifdef LOOSE_MPEG - /* Check for block illegality. */ - - maxx = lmaxx; maxy = lmaxy; - - if (row + down_for + 7 > maxy) illegalBlock |= 0x4; - else if (row + down_for < 0) illegalBlock |= 0x1; - - if (col + right_for + 7 > maxx) illegalBlock |= 0x2; - else if (col + right_for < 0) illegalBlock |= 0x8; - -#endif - } - /* Otherwise, block is NOT luminance block, ... */ - - else { - - /* Construct motion vectors. */ - - recon_right_for /= 2; - recon_down_for /= 2; - right_for = recon_right_for >> 1; - down_for = recon_down_for >> 1; - right_half_for = recon_right_for & 0x1; - down_half_for = recon_down_for & 0x1; - - /* Establish row size. */ - - row_size = vid_stream->mb_width << 3; - - /* Calculate row,col of upper left pixel in block. */ - - row = mb_row << 3; - col = mb_col << 3; - -#ifdef LOOSE_MPEG - /* Check for block illegality. */ - - maxx = cmaxx; maxy = cmaxy; - - if (row + down_for + 7 > maxy) illegalBlock |= 0x4; - else if (row + down_for < 0) illegalBlock |= 0x1; - - if (col + right_for + 7 > maxx) illegalBlock |= 0x2; - else if (col + right_for < 0) illegalBlock |= 0x8; - -#endif - - /* If block is Cr block... */ - - if (bnum == 4) { - - /* Set dest to Cr plane of current pict image. */ - - dest = vid_stream->current->Cr; - - if (vid_stream->picture.code_type == B_TYPE) { - - if (vid_stream->past != NULL) - past = vid_stream->past->Cr; - } else { - if (vid_stream->future != NULL) - past = vid_stream->future->Cr; - } - } - /* Otherwise, block is Cb block... */ - - else { - - /* Set dest to Cb plane of current pict image. */ - - dest = vid_stream->current->Cb; - - if (vid_stream->picture.code_type == B_TYPE) { - if (vid_stream->past != NULL) - past = vid_stream->past->Cb; - } else { - if (vid_stream->future != NULL) - past = vid_stream->future->Cb; - } - } - } - - /* For each pixel in block... */ - -#ifdef LOOSE_MPEG - - if (illegalBlock) { - if (illegalBlock & 0x1) { - row_start = 0; - row_end = row+down_for+8; - rfirst = rlast = 8 - row_end; - } - else if (illegalBlock & 0x4) { - row_start = row + down_for; - row_end = maxy+1; - rlast = row_end - row_start - 1; - rfirst = 0; - } - else { - row_start = row+down_for; - row_end = row_start+8; - rfirst = 0; - } - - if (illegalBlock & 0x8) { - col_start = 0; - col_end = col + right_for + 8; - cfirst = clast = 8 - col_end; - } - else if (illegalBlock & 0x2) { - col_start = col + right_for; - col_end = maxx + 1; - clast = col_end - col_start - 1; - cfirst = 0; - } - else { - col_start = col + right_for; - col_end = col_start + 8; - cfirst = 0; - } - - for (rr = row_start; rr < row_end; rr++) { - rindex1 = past + (rr * row_size) + col_start; - index = dest + ((row + rfirst) * row_size) + col + cfirst; - for (cc = col_start; cc < col_end; cc++) { - *index++ = *rindex1++; - } - } - - if (illegalBlock & 0x1) { - for (rr = rlast -1; rr >=0; rr--) { - index = dest + ((row + rr) * row_size) + col; - rindex1 = dest + ((row + rlast) * row_size) + col; - for (cc = 0; cc < 8; cc ++) { - *index++ = *rindex1++; - } - } - } - else if (illegalBlock & 0x4) { - for (rr = rlast+1; rr < 8; rr++) { - index = dest + ((row + rr) * row_size) + col; - rindex1 = dest + ((row + rlast) * row_size) + col; - for (cc = 0; cc < 8; cc ++) { - *index++ = *rindex1++; - } - } - } - - if (illegalBlock & 0x2) { - for (cc = clast+1; cc < 8; cc++) { - index = dest + (row * row_size) + (col + cc); - rindex1 = dest + (row * row_size) + (col + clast); - for (rr = 0; rr < 8; rr++) { - *index = *rindex1; - index += row_size; - rindex1 += row_size; - } - } - } - else if (illegalBlock & 0x8) { - for (cc = clast-1; cc >= 0; cc--) { - index = dest + (row * row_size) + (col + cc); - rindex1 = dest + (row * row_size) + (col + clast); - for (rr = 0; rr < 8; rr++) { - *index = *rindex1; - index += row_size; - rindex1 += row_size; - } - } - } - - if (!zflag) { - for (rr = 0; rr < 8; rr++) { - index = dest + (row*row_size) + col; - blockvals = &(vid_stream->block.dct_recon[rr][0]); - index[0] += blockvals[0]; - index[1] += blockvals[1]; - index[2] += blockvals[2]; - index[3] += blockvals[3]; - index[4] += blockvals[4]; - index[5] += blockvals[5]; - index[6] += blockvals[6]; - index[7] += blockvals[7]; - } - } - } - else { - -#endif - - index = dest + (row * row_size) + col; - rindex1 = past + (row + down_for) * row_size + col + right_for; - - blockvals = &(vid_stream->block.dct_recon[0][0]); - - /* - * Calculate predictive pixel value based on motion vectors and copy to - * dest plane. - */ - - if ((!down_half_for) && (!right_half_for)) { - unsigned char *cm = cropTbl + MAX_NEG_CROP; - if (!zflag) - for (rr = 0; rr < 4; rr++) { - index[0] = cm[(int) rindex1[0] + (int) blockvals[0]]; - index[1] = cm[(int) rindex1[1] + (int) blockvals[1]]; - index[2] = cm[(int) rindex1[2] + (int) blockvals[2]]; - index[3] = cm[(int) rindex1[3] + (int) blockvals[3]]; - index[4] = cm[(int) rindex1[4] + (int) blockvals[4]]; - index[5] = cm[(int) rindex1[5] + (int) blockvals[5]]; - index[6] = cm[(int) rindex1[6] + (int) blockvals[6]]; - index[7] = cm[(int) rindex1[7] + (int) blockvals[7]]; - index += row_size; - rindex1 += row_size; - - index[0] = cm[(int) rindex1[0] + (int) blockvals[8]]; - index[1] = cm[(int) rindex1[1] + (int) blockvals[9]]; - index[2] = cm[(int) rindex1[2] + (int) blockvals[10]]; - index[3] = cm[(int) rindex1[3] + (int) blockvals[11]]; - index[4] = cm[(int) rindex1[4] + (int) blockvals[12]]; - index[5] = cm[(int) rindex1[5] + (int) blockvals[13]]; - index[6] = cm[(int) rindex1[6] + (int) blockvals[14]]; - index[7] = cm[(int) rindex1[7] + (int) blockvals[15]]; - blockvals += 16; - index += row_size; - rindex1 += row_size; - } - else { - if (right_for & 0x1) { - /* No alignment, use bye copy */ - for (rr = 0; rr < 4; rr++) { - index[0] = rindex1[0]; - index[1] = rindex1[1]; - index[2] = rindex1[2]; - index[3] = rindex1[3]; - index[4] = rindex1[4]; - index[5] = rindex1[5]; - index[6] = rindex1[6]; - index[7] = rindex1[7]; - index += row_size; - rindex1 += row_size; - - index[0] = rindex1[0]; - index[1] = rindex1[1]; - index[2] = rindex1[2]; - index[3] = rindex1[3]; - index[4] = rindex1[4]; - index[5] = rindex1[5]; - index[6] = rindex1[6]; - index[7] = rindex1[7]; - index += row_size; - rindex1 += row_size; - } - } else if (right_for & 0x2) { - /* Half-word bit aligned, use 16 bit copy */ - short *src = (short *)rindex1; - short *dest = (short *)index; - row_size >>= 1; - for (rr = 0; rr < 4; rr++) { - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; - dest[3] = src[3]; - dest += row_size; - src += row_size; - - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; - dest[3] = src[3]; - dest += row_size; - src += row_size; - } - } else { - /* Word aligned, use 32 bit copy */ - int *src = (int *)rindex1; - int *dest = (int *)index; - row_size >>= 2; - for (rr = 0; rr < 4; rr++) { - dest[0] = src[0]; - dest[1] = src[1]; - dest += row_size; - src += row_size; - - dest[0] = src[0]; - dest[1] = src[1]; - dest += row_size; - src += row_size; - } - } - } - } else { - unsigned char *cm = cropTbl + MAX_NEG_CROP; - rindex2 = rindex1 + right_half_for + (down_half_for * row_size); - if (!zflag) - for (rr = 0; rr < 4; rr++) { - index[0] = cm[((int) (rindex1[0] + rindex2[0]) >> 1) + blockvals[0]]; - index[1] = cm[((int) (rindex1[1] + rindex2[1]) >> 1) + blockvals[1]]; - index[2] = cm[((int) (rindex1[2] + rindex2[2]) >> 1) + blockvals[2]]; - index[3] = cm[((int) (rindex1[3] + rindex2[3]) >> 1) + blockvals[3]]; - index[4] = cm[((int) (rindex1[4] + rindex2[4]) >> 1) + blockvals[4]]; - index[5] = cm[((int) (rindex1[5] + rindex2[5]) >> 1) + blockvals[5]]; - index[6] = cm[((int) (rindex1[6] + rindex2[6]) >> 1) + blockvals[6]]; - index[7] = cm[((int) (rindex1[7] + rindex2[7]) >> 1) + blockvals[7]]; - index += row_size; - rindex1 += row_size; - rindex2 += row_size; - - index[0] = cm[((int) (rindex1[0] + rindex2[0]) >> 1) + blockvals[8]]; - index[1] = cm[((int) (rindex1[1] + rindex2[1]) >> 1) + blockvals[9]]; - index[2] = cm[((int) (rindex1[2] + rindex2[2]) >> 1) + blockvals[10]]; - index[3] = cm[((int) (rindex1[3] + rindex2[3]) >> 1) + blockvals[11]]; - index[4] = cm[((int) (rindex1[4] + rindex2[4]) >> 1) + blockvals[12]]; - index[5] = cm[((int) (rindex1[5] + rindex2[5]) >> 1) + blockvals[13]]; - index[6] = cm[((int) (rindex1[6] + rindex2[6]) >> 1) + blockvals[14]]; - index[7] = cm[((int) (rindex1[7] + rindex2[7]) >> 1) + blockvals[15]]; - blockvals += 16; - index += row_size; - rindex1 += row_size; - rindex2 += row_size; - } - else - for (rr = 0; rr < 4; rr++) { - index[0] = (int) (rindex1[0] + rindex2[0]) >> 1; - index[1] = (int) (rindex1[1] + rindex2[1]) >> 1; - index[2] = (int) (rindex1[2] + rindex2[2]) >> 1; - index[3] = (int) (rindex1[3] + rindex2[3]) >> 1; - index[4] = (int) (rindex1[4] + rindex2[4]) >> 1; - index[5] = (int) (rindex1[5] + rindex2[5]) >> 1; - index[6] = (int) (rindex1[6] + rindex2[6]) >> 1; - index[7] = (int) (rindex1[7] + rindex2[7]) >> 1; - index += row_size; - rindex1 += row_size; - rindex2 += row_size; - - index[0] = (int) (rindex1[0] + rindex2[0]) >> 1; - index[1] = (int) (rindex1[1] + rindex2[1]) >> 1; - index[2] = (int) (rindex1[2] + rindex2[2]) >> 1; - index[3] = (int) (rindex1[3] + rindex2[3]) >> 1; - index[4] = (int) (rindex1[4] + rindex2[4]) >> 1; - index[5] = (int) (rindex1[5] + rindex2[5]) >> 1; - index[6] = (int) (rindex1[6] + rindex2[6]) >> 1; - index[7] = (int) (rindex1[7] + rindex2[7]) >> 1; - index += row_size; - rindex1 += row_size; - rindex2 += row_size; - } - } - -#ifdef LOOSE_MPEG - } -#endif -} - - -/* - *-------------------------------------------------------------- - * - * ReconBMBlock -- - * - * Reconstructs back predicted macroblocks. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -static void -ReconBMBlock(VidStream *vid_stream, - int bnum, int recon_right_back, int recon_down_back, int zflag) -{ - int mb_row, mb_col, row, col, row_size, rr; - unsigned char *dest, *future; - int right_back, down_back, right_half_back, down_half_back; - unsigned char *rindex1, *rindex2; - unsigned char *index; - short int *blockvals; - -#ifdef LOOSE_MPEG - int illegalBlock = 0; - int maxx, maxy; - int row_start, row_end, rlast, rfirst, col_start, col_end, clast, cfirst; -#endif - - /* Calculate macroblock row and column from address. */ - - mb_row = vid_stream->mblock.mb_address / vid_stream->mb_width; - mb_col = vid_stream->mblock.mb_address % vid_stream->mb_width; - - /* If block is luminance block... */ - - if (bnum < 4) { - - /* Calculate right_back, down_bakc motion vectors. */ - - right_back = recon_right_back >> 1; - down_back = recon_down_back >> 1; - right_half_back = recon_right_back & 0x1; - down_half_back = recon_down_back & 0x1; - - /* Set dest to luminance plane of current pict image. */ - - dest = vid_stream->current->luminance; - - /* - * If future frame exists, set future to luminance plane of future frame. - */ - - if (vid_stream->future != NULL) - future = vid_stream->future->luminance; - - /* Establish row size. */ - - row_size = vid_stream->mb_width << 4; - - /* Calculate row,col of upper left pixel in block. */ - - row = mb_row << 4; - col = mb_col << 4; - if (bnum > 1) - row += 8; - if (bnum % 2) - col += 8; - -#ifdef LOOSE_MPEG - - /* Check for block illegality. */ - - maxx = lmaxx; maxy = lmaxy; - - if (row + down_back + 7 > maxy) illegalBlock |= 0x4; - else if (row + down_back < 0) illegalBlock |= 0x1; - - if (col + right_back + 7 > maxx) illegalBlock |= 0x2; - else if (col + right_back < 0) illegalBlock |= 0x8; - -#endif - - } - /* Otherwise, block is NOT luminance block, ... */ - - else { - - /* Construct motion vectors. */ - - recon_right_back /= 2; - recon_down_back /= 2; - right_back = recon_right_back >> 1; - down_back = recon_down_back >> 1; - right_half_back = recon_right_back & 0x1; - down_half_back = recon_down_back & 0x1; - - /* Establish row size. */ - - row_size = vid_stream->mb_width << 3; - - /* Calculate row,col of upper left pixel in block. */ - - row = mb_row << 3; - col = mb_col << 3; - -#ifdef LOOSE_MPEG - - /* Check for block illegality. */ - - maxx = cmaxx; maxy = cmaxy; - - if (row + down_back + 7 > maxy) illegalBlock |= 0x4; - else if (row + down_back < 0) illegalBlock |= 0x1; - - if (col + right_back + 7 > maxx) illegalBlock |= 0x2; - else if (col + right_back < 0) illegalBlock |= 0x8; - -#endif - - /* If block is Cr block... */ - - if (bnum == 4) { - - /* Set dest to Cr plane of current pict image. */ - - dest = vid_stream->current->Cr; - - /* - * If future frame exists, set future to Cr plane of future image. - */ - - if (vid_stream->future != NULL) - future = vid_stream->future->Cr; - } - /* Otherwise, block is Cb block... */ - - else { - - /* Set dest to Cb plane of current pict image. */ - - dest = vid_stream->current->Cb; - - /* - * If future frame exists, set future to Cb plane of future frame. - */ - - if (vid_stream->future != NULL) - future = vid_stream->future->Cb; - } - } - - /* For each pixel in block do... */ - -#ifdef LOOSE_MPEG - - if (illegalBlock) { - if (illegalBlock & 0x1) { - row_start = 0; - row_end = row+down_back+8; - rfirst = rlast = 8 - row_end; - } - else if (illegalBlock & 0x4) { - row_start = row + down_back; - row_end = maxy+1; - rlast = row_end - row_start - 1; - rfirst = 0; - } - else { - row_start = row+down_back; - row_end = row_start+8; - rfirst = 0; - } - - if (illegalBlock & 0x8) { - col_start = 0; - col_end = col + right_back + 8; - cfirst = clast = 8 - col_end; - } - else if (illegalBlock & 0x2) { - col_start = col + right_back; - col_end = maxx + 1; - clast = col_end - col_start - 1; - cfirst = 0; - } - else { - col_start = col + right_back; - col_end = col_start + 8; - cfirst = 0; - } - - for (rr = row_start; rr < row_end; rr++) { - rindex1 = future + (rr * row_size) + col_start; - index = dest + ((row + rfirst) * row_size) + col + cfirst; - for (cc = col_start; cc < col_end; cc++) { - *index++ = *rindex1++; - } - } - - if (illegalBlock & 0x1) { - for (rr = rlast -1; rr >=0; rr--) { - index = dest + ((row + rr) * row_size) + col; - rindex1 = dest + ((row + rlast) * row_size) + col; - for (cc = 0; cc < 8; cc ++) { - *index++ = *rindex1++; - } - } - } - else if (illegalBlock & 0x4) { - for (rr = rlast+1; rr < 8; rr++) { - index = dest + ((row + rr) * row_size) + col; - rindex1 = dest + ((row + rlast) * row_size) + col; - for (cc = 0; cc < 8; cc ++) { - *index++ = *rindex1++; - } - } - } - - if (illegalBlock & 0x2) { - for (cc = clast+1; cc < 8; cc++) { - index = dest + (row * row_size) + (col + cc); - rindex1 = dest + (row * row_size) + (col + clast); - for (rr = 0; rr < 8; rr++) { - *index = *rindex1; - index += row_size; - rindex1 += row_size; - } - } - } - else if (illegalBlock & 0x8) { - for (cc = clast-1; cc >= 0; cc--) { - index = dest + (row * row_size) + (col + cc); - rindex1 = dest + (row * row_size) + (col + clast); - for (rr = 0; rr < 8; rr++) { - *index = *rindex1; - index += row_size; - rindex1 += row_size; - } - } - } - - if (!zflag) { - for (rr = 0; rr < 8; rr++) { - index = dest + (row*row_size) + col; - blockvals = &(vid_stream->block.dct_recon[rr][0]); - index[0] += blockvals[0]; - index[1] += blockvals[1]; - index[2] += blockvals[2]; - index[3] += blockvals[3]; - index[4] += blockvals[4]; - index[5] += blockvals[5]; - index[6] += blockvals[6]; - index[7] += blockvals[7]; - } - } - } - else { - -#endif - - index = dest + (row * row_size) + col; - rindex1 = future + (row + down_back) * row_size + col + right_back; - - blockvals = &(vid_stream->block.dct_recon[0][0]); - - if ((!right_half_back) && (!down_half_back)) { - unsigned char *cm = cropTbl + MAX_NEG_CROP; - if (!zflag) - for (rr = 0; rr < 4; rr++) { - index[0] = cm[(int) rindex1[0] + (int) blockvals[0]]; - index[1] = cm[(int) rindex1[1] + (int) blockvals[1]]; - index[2] = cm[(int) rindex1[2] + (int) blockvals[2]]; - index[3] = cm[(int) rindex1[3] + (int) blockvals[3]]; - index[4] = cm[(int) rindex1[4] + (int) blockvals[4]]; - index[5] = cm[(int) rindex1[5] + (int) blockvals[5]]; - index[6] = cm[(int) rindex1[6] + (int) blockvals[6]]; - index[7] = cm[(int) rindex1[7] + (int) blockvals[7]]; - index += row_size; - rindex1 += row_size; - - index[0] = cm[(int) rindex1[0] + (int) blockvals[8]]; - index[1] = cm[(int) rindex1[1] + (int) blockvals[9]]; - index[2] = cm[(int) rindex1[2] + (int) blockvals[10]]; - index[3] = cm[(int) rindex1[3] + (int) blockvals[11]]; - index[4] = cm[(int) rindex1[4] + (int) blockvals[12]]; - index[5] = cm[(int) rindex1[5] + (int) blockvals[13]]; - index[6] = cm[(int) rindex1[6] + (int) blockvals[14]]; - index[7] = cm[(int) rindex1[7] + (int) blockvals[15]]; - blockvals += 16; - index += row_size; - rindex1 += row_size; - } - else { - if (right_back & 0x1) { - /* No alignment, use bye copy */ - for (rr = 0; rr < 4; rr++) { - index[0] = rindex1[0]; - index[1] = rindex1[1]; - index[2] = rindex1[2]; - index[3] = rindex1[3]; - index[4] = rindex1[4]; - index[5] = rindex1[5]; - index[6] = rindex1[6]; - index[7] = rindex1[7]; - index += row_size; - rindex1 += row_size; - - index[0] = rindex1[0]; - index[1] = rindex1[1]; - index[2] = rindex1[2]; - index[3] = rindex1[3]; - index[4] = rindex1[4]; - index[5] = rindex1[5]; - index[6] = rindex1[6]; - index[7] = rindex1[7]; - index += row_size; - rindex1 += row_size; - } - } else if (right_back & 0x2) { - /* Half-word bit aligned, use 16 bit copy */ - short *src = (short *)rindex1; - short *dest = (short *)index; - row_size >>= 1; - for (rr = 0; rr < 4; rr++) { - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; - dest[3] = src[3]; - dest += row_size; - src += row_size; - - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; - dest[3] = src[3]; - dest += row_size; - src += row_size; - } - } else { - /* Word aligned, use 32 bit copy */ - int *src = (int *)rindex1; - int *dest = (int *)index; - row_size >>= 2; - for (rr = 0; rr < 4; rr++) { - dest[0] = src[0]; - dest[1] = src[1]; - dest += row_size; - src += row_size; - - dest[0] = src[0]; - dest[1] = src[1]; - dest += row_size; - src += row_size; - } - } - } - } else { - unsigned char *cm = cropTbl + MAX_NEG_CROP; - rindex2 = rindex1 + right_half_back + (down_half_back * row_size); - if (!zflag) - for (rr = 0; rr < 4; rr++) { - index[0] = cm[((int) (rindex1[0] + rindex2[0]) >> 1) + blockvals[0]]; - index[1] = cm[((int) (rindex1[1] + rindex2[1]) >> 1) + blockvals[1]]; - index[2] = cm[((int) (rindex1[2] + rindex2[2]) >> 1) + blockvals[2]]; - index[3] = cm[((int) (rindex1[3] + rindex2[3]) >> 1) + blockvals[3]]; - index[4] = cm[((int) (rindex1[4] + rindex2[4]) >> 1) + blockvals[4]]; - index[5] = cm[((int) (rindex1[5] + rindex2[5]) >> 1) + blockvals[5]]; - index[6] = cm[((int) (rindex1[6] + rindex2[6]) >> 1) + blockvals[6]]; - index[7] = cm[((int) (rindex1[7] + rindex2[7]) >> 1) + blockvals[7]]; - index += row_size; - rindex1 += row_size; - rindex2 += row_size; - - index[0] = cm[((int) (rindex1[0] + rindex2[0]) >> 1) + blockvals[8]]; - index[1] = cm[((int) (rindex1[1] + rindex2[1]) >> 1) + blockvals[9]]; - index[2] = cm[((int) (rindex1[2] + rindex2[2]) >> 1) + blockvals[10]]; - index[3] = cm[((int) (rindex1[3] + rindex2[3]) >> 1) + blockvals[11]]; - index[4] = cm[((int) (rindex1[4] + rindex2[4]) >> 1) + blockvals[12]]; - index[5] = cm[((int) (rindex1[5] + rindex2[5]) >> 1) + blockvals[13]]; - index[6] = cm[((int) (rindex1[6] + rindex2[6]) >> 1) + blockvals[14]]; - index[7] = cm[((int) (rindex1[7] + rindex2[7]) >> 1) + blockvals[15]]; - blockvals += 16; - index += row_size; - rindex1 += row_size; - rindex2 += row_size; - } - else - for (rr = 0; rr < 4; rr++) { - index[0] = (int) (rindex1[0] + rindex2[0]) >> 1; - index[1] = (int) (rindex1[1] + rindex2[1]) >> 1; - index[2] = (int) (rindex1[2] + rindex2[2]) >> 1; - index[3] = (int) (rindex1[3] + rindex2[3]) >> 1; - index[4] = (int) (rindex1[4] + rindex2[4]) >> 1; - index[5] = (int) (rindex1[5] + rindex2[5]) >> 1; - index[6] = (int) (rindex1[6] + rindex2[6]) >> 1; - index[7] = (int) (rindex1[7] + rindex2[7]) >> 1; - index += row_size; - rindex1 += row_size; - rindex2 += row_size; - - index[0] = (int) (rindex1[0] + rindex2[0]) >> 1; - index[1] = (int) (rindex1[1] + rindex2[1]) >> 1; - index[2] = (int) (rindex1[2] + rindex2[2]) >> 1; - index[3] = (int) (rindex1[3] + rindex2[3]) >> 1; - index[4] = (int) (rindex1[4] + rindex2[4]) >> 1; - index[5] = (int) (rindex1[5] + rindex2[5]) >> 1; - index[6] = (int) (rindex1[6] + rindex2[6]) >> 1; - index[7] = (int) (rindex1[7] + rindex2[7]) >> 1; - index += row_size; - rindex1 += row_size; - rindex2 += row_size; - } - } - -#ifdef LOOSE_MPEG - } -#endif - -} - - -/* - *-------------------------------------------------------------- - * - * ReconBiMBlock -- - * - * Reconstructs bidirectionally predicted macroblocks. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -static void -ReconBiMBlock(VidStream *vid_stream, int bnum, int recon_right_for, - int recon_down_for, int recon_right_back, - int recon_down_back, int zflag) -{ - int mb_row, mb_col, row, col, row_size, rr; - unsigned char *dest, *past, *future; - int right_for, down_for, right_half_for, down_half_for; - int right_back, down_back, right_half_back, down_half_back; - unsigned char *index, *rindex1, *bindex1; - short int *blockvals; - int forw_row_start, back_row_start, forw_col_start, back_col_start; - -#ifdef LOOSE_MPEG - int illegal_forw = 0; - int illegal_back = 0; -#endif - - /* Calculate macroblock row and column from address. */ - - mb_row = vid_stream->mblock.mb_address / vid_stream->mb_width; - mb_col = vid_stream->mblock.mb_address % vid_stream->mb_width; - - /* If block is luminance block... */ - - if (bnum < 4) { - - /* - * Calculate right_for, down_for, right_half_for, down_half_for, - * right_back, down_bakc, right_half_back, and down_half_back, motion - * vectors. - */ - - right_for = recon_right_for >> 1; - down_for = recon_down_for >> 1; - right_half_for = recon_right_for & 0x1; - down_half_for = recon_down_for & 0x1; - - right_back = recon_right_back >> 1; - down_back = recon_down_back >> 1; - right_half_back = recon_right_back & 0x1; - down_half_back = recon_down_back & 0x1; - - /* Set dest to luminance plane of current pict image. */ - - dest = vid_stream->current->luminance; - - /* If past frame exists, set past to luminance plane of past frame. */ - - if (vid_stream->past != NULL) - past = vid_stream->past->luminance; - - /* - * If future frame exists, set future to luminance plane of future frame. - */ - - if (vid_stream->future != NULL) - future = vid_stream->future->luminance; - - /* Establish row size. */ - - row_size = (vid_stream->mb_width << 4); - - /* Calculate row,col of upper left pixel in block. */ - - row = (mb_row << 4); - col = (mb_col << 4); - if (bnum > 1) - row += 8; - if (bnum & 0x01) - col += 8; - - forw_col_start = col + right_for; - forw_row_start = row + down_for; - - back_col_start = col + right_back; - back_row_start = row + down_back; - -#ifdef LOOSE_MPEG - - /* Check for illegal pred. blocks. */ - - - if (forw_col_start+8 > lmaxx) illegal_forw = 1; - else if (forw_col_start < 0) illegal_forw = 1; - - if (forw_row_start+8 > lmaxy) illegal_forw = 1; - else if (forw_row_start < 0) illegal_forw = 1; - - if (back_col_start+8 > lmaxx) illegal_back = 1; - else if (back_col_start < 0) illegal_back = 1; - - if (back_row_start+8 > lmaxy) illegal_back = 1; - else if (back_row_start < 0) illegal_back = 1; - -#endif - - } - /* Otherwise, block is NOT luminance block, ... */ - - else { - - /* Construct motion vectors. */ - - recon_right_for /= 2; - recon_down_for /= 2; - right_for = recon_right_for >> 1; - down_for = recon_down_for >> 1; - right_half_for = recon_right_for & 0x1; - down_half_for = recon_down_for & 0x1; - - recon_right_back /= 2; - recon_down_back /= 2; - right_back = recon_right_back >> 1; - down_back = recon_down_back >> 1; - right_half_back = recon_right_back & 0x1; - down_half_back = recon_down_back & 0x1; - - /* Establish row size. */ - - row_size = (vid_stream->mb_width << 3); - - /* Calculate row,col of upper left pixel in block. */ - - row = (mb_row << 3); - col = (mb_col << 3); - - forw_col_start = col + right_for; - forw_row_start = row + down_for; - - back_col_start = col + right_back; - back_row_start = row + down_back; - -#ifdef LOOSE_MPEG - - /* Check for illegal pred. blocks. */ - - if (forw_col_start+8 > cmaxx) illegal_forw = 1; - else if (forw_col_start < 0) illegal_forw = 1; - - if (forw_row_start+8 > cmaxy) illegal_forw = 1; - else if (forw_row_start < 0) illegal_forw = 1; - - if (back_col_start+8 > cmaxx) illegal_back = 1; - else if (back_col_start < 0) illegal_back = 1; - - if (back_row_start+8 > cmaxy) illegal_back = 1; - else if (back_row_start < 0) illegal_back = 1; - -#endif - - /* If block is Cr block... */ - - if (bnum == 4) { - - /* Set dest to Cr plane of current pict image. */ - - dest = vid_stream->current->Cr; - - /* If past frame exists, set past to Cr plane of past image. */ - - if (vid_stream->past != NULL) - past = vid_stream->past->Cr; - - /* - * If future frame exists, set future to Cr plane of future image. - */ - - if (vid_stream->future != NULL) - future = vid_stream->future->Cr; - } - /* Otherwise, block is Cb block... */ - - else { - - /* Set dest to Cb plane of current pict image. */ - - dest = vid_stream->current->Cb; - - /* If past frame exists, set past to Cb plane of past frame. */ - - if (vid_stream->past != NULL) - past = vid_stream->past->Cb; - - /* - * If future frame exists, set future to Cb plane of future frame. - */ - - if (vid_stream->future != NULL) - future = vid_stream->future->Cb; - } - } - - /* For each pixel in block... */ - - index = dest + (row * row_size) + col; - -#ifdef LOOSE_MPEG - if (illegal_forw) - rindex1 = future + back_row_start * row_size + back_col_start; - else -#endif - rindex1 = past + forw_row_start * row_size + forw_col_start; - -#ifdef LOOSE_MPEG - if (illegal_back) - bindex1 = past + forw_row_start * row_size + forw_col_start; - else -#endif - bindex1 = future + back_row_start * row_size + back_col_start; - - blockvals = (short int *) &(vid_stream->block.dct_recon[0][0]); - - { - unsigned char *cm = cropTbl + MAX_NEG_CROP; - if (!zflag) - for (rr = 0; rr < 4; rr++) { - index[0] = cm[((int) (rindex1[0] + bindex1[0]) >> 1) + blockvals[0]]; - index[1] = cm[((int) (rindex1[1] + bindex1[1]) >> 1) + blockvals[1]]; - index[2] = cm[((int) (rindex1[2] + bindex1[2]) >> 1) + blockvals[2]]; - index[3] = cm[((int) (rindex1[3] + bindex1[3]) >> 1) + blockvals[3]]; - index[4] = cm[((int) (rindex1[4] + bindex1[4]) >> 1) + blockvals[4]]; - index[5] = cm[((int) (rindex1[5] + bindex1[5]) >> 1) + blockvals[5]]; - index[6] = cm[((int) (rindex1[6] + bindex1[6]) >> 1) + blockvals[6]]; - index[7] = cm[((int) (rindex1[7] + bindex1[7]) >> 1) + blockvals[7]]; - index += row_size; - rindex1 += row_size; - bindex1 += row_size; - - index[0] = cm[((int) (rindex1[0] + bindex1[0]) >> 1) + blockvals[8]]; - index[1] = cm[((int) (rindex1[1] + bindex1[1]) >> 1) + blockvals[9]]; - index[2] = cm[((int) (rindex1[2] + bindex1[2]) >> 1) + blockvals[10]]; - index[3] = cm[((int) (rindex1[3] + bindex1[3]) >> 1) + blockvals[11]]; - index[4] = cm[((int) (rindex1[4] + bindex1[4]) >> 1) + blockvals[12]]; - index[5] = cm[((int) (rindex1[5] + bindex1[5]) >> 1) + blockvals[13]]; - index[6] = cm[((int) (rindex1[6] + bindex1[6]) >> 1) + blockvals[14]]; - index[7] = cm[((int) (rindex1[7] + bindex1[7]) >> 1) + blockvals[15]]; - blockvals += 16; - index += row_size; - rindex1 += row_size; - bindex1 += row_size; - } - - else - for (rr = 0; rr < 4; rr++) { - index[0] = (int) (rindex1[0] + bindex1[0]) >> 1; - index[1] = (int) (rindex1[1] + bindex1[1]) >> 1; - index[2] = (int) (rindex1[2] + bindex1[2]) >> 1; - index[3] = (int) (rindex1[3] + bindex1[3]) >> 1; - index[4] = (int) (rindex1[4] + bindex1[4]) >> 1; - index[5] = (int) (rindex1[5] + bindex1[5]) >> 1; - index[6] = (int) (rindex1[6] + bindex1[6]) >> 1; - index[7] = (int) (rindex1[7] + bindex1[7]) >> 1; - index += row_size; - rindex1 += row_size; - bindex1 += row_size; - - index[0] = (int) (rindex1[0] + bindex1[0]) >> 1; - index[1] = (int) (rindex1[1] + bindex1[1]) >> 1; - index[2] = (int) (rindex1[2] + bindex1[2]) >> 1; - index[3] = (int) (rindex1[3] + bindex1[3]) >> 1; - index[4] = (int) (rindex1[4] + bindex1[4]) >> 1; - index[5] = (int) (rindex1[5] + bindex1[5]) >> 1; - index[6] = (int) (rindex1[6] + bindex1[6]) >> 1; - index[7] = (int) (rindex1[7] + bindex1[7]) >> 1; - index += row_size; - rindex1 += row_size; - bindex1 += row_size; - } - } -} - -/* - *-------------------------------------------------------------- - * - * ProcessSkippedPFrameMBlocks -- - * - * Processes skipped macroblocks in P frames. - * - * Results: - * Calculates pixel values for luminance, Cr, and Cb planes - * in current pict image for skipped macroblocks. - * - * Side effects: - * Pixel values in pict image changed. - * - *-------------------------------------------------------------- - */ - -static void -ProcessSkippedPFrameMBlocks(VidStream *vid_stream) -{ - int row_size, half_row, mb_row, mb_col, row, col, rr; - int addr, row_incr, half_row_incr, crow, ccol; - int *dest, *src, *dest1, *src1; - - /* Calculate row sizes for luminance and Cr/Cb macroblock areas. */ - - row_size = vid_stream->mb_width << 4; - half_row = (row_size >> 1); - row_incr = row_size >> 2; - half_row_incr = half_row >> 2; - - /* For each skipped macroblock, do... */ - - for (addr = vid_stream->mblock.past_mb_addr + 1; - addr < vid_stream->mblock.mb_address; addr++) { - - /* Calculate macroblock row and col. */ - - mb_row = addr / vid_stream->mb_width; - mb_col = addr % vid_stream->mb_width; - - /* Calculate upper left pixel row,col for luminance plane. */ - - row = mb_row << 4; - col = mb_col << 4; - - - /* For each row in macroblock luminance plane... */ - - dest = (int *)(vid_stream->current->luminance + (row * row_size) + col); - src = (int *)(vid_stream->future->luminance + (row * row_size) + col); - - for (rr = 0; rr < 8; rr++) { - - /* Copy pixel values from last I or P picture. */ - - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; - dest[3] = src[3]; - dest += row_incr; - src += row_incr; - - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; - dest[3] = src[3]; - dest += row_incr; - src += row_incr; - } - - /* - * Divide row,col to get upper left pixel of macroblock in Cr and Cb - * planes. - */ - - crow = row >> 1; - ccol = col >> 1; - - /* For each row in Cr, and Cb planes... */ - - dest = (int *)(vid_stream->current->Cr + (crow * half_row) + ccol); - src = (int *)(vid_stream->future->Cr + (crow * half_row) + ccol); - dest1 = (int *)(vid_stream->current->Cb + (crow * half_row) + ccol); - src1 = (int *)(vid_stream->future->Cb + (crow * half_row) + ccol); - - for (rr = 0; rr < 4; rr++) { - - /* Copy pixel values from last I or P picture. */ - - dest[0] = src[0]; - dest[1] = src[1]; - - dest1[0] = src1[0]; - dest1[1] = src1[1]; - - dest += half_row_incr; - src += half_row_incr; - dest1 += half_row_incr; - src1 += half_row_incr; - - dest[0] = src[0]; - dest[1] = src[1]; - - dest1[0] = src1[0]; - dest1[1] = src1[1]; - - dest += half_row_incr; - src += half_row_incr; - dest1 += half_row_incr; - src1 += half_row_incr; - } - - if (ditherType == MBORDERED_DITHER) { - /* - MBOrderedDitherDisplayCopy(vid_stream, addr, - 1, 0, 0, 0, 0, 0, - vid_stream->future->display, - (unsigned char *) NULL); - ditherFlags[addr] = 0; - */ - } - } - - vid_stream->mblock.recon_right_for_prev = 0; - vid_stream->mblock.recon_down_for_prev = 0; -} - - - - -/* - *-------------------------------------------------------------- - * - * ProcessSkippedBFrameMBlocks -- - * - * Processes skipped macroblocks in B frames. - * - * Results: - * Calculates pixel values for luminance, Cr, and Cb planes - * in current pict image for skipped macroblocks. - * - * Side effects: - * Pixel values in pict image changed. - * - *-------------------------------------------------------------- - */ - -static void -ProcessSkippedBFrameMBlocks(VidStream *vid_stream) -{ - int row_size, half_row, mb_row, mb_col, row, col, rr; - int right_half_for, down_half_for, c_right_half_for, c_down_half_for; - int right_half_back, down_half_back, c_right_half_back, c_down_half_back; - int addr, right_for, down_for; - int recon_right_for, recon_down_for; - int recon_right_back, recon_down_back; - int right_back, down_back; - int c_right_for, c_down_for; - int c_right_back, c_down_back; - unsigned char forw_lum[256]; - unsigned char forw_cr[64], forw_cb[64]; - unsigned char back_lum[256], back_cr[64], back_cb[64]; - int row_incr, half_row_incr; - int ccol, crow; - - /* Calculate row sizes for luminance and Cr/Cb macroblock areas. */ - - row_size = vid_stream->mb_width << 4; - half_row = (row_size >> 1); - row_incr = row_size >> 2; - half_row_incr = half_row >> 2; - - /* Establish motion vector codes based on full pixel flag. */ - - if (vid_stream->picture.full_pel_forw_vector) { - recon_right_for = vid_stream->mblock.recon_right_for_prev << 1; - recon_down_for = vid_stream->mblock.recon_down_for_prev << 1; - } else { - recon_right_for = vid_stream->mblock.recon_right_for_prev; - recon_down_for = vid_stream->mblock.recon_down_for_prev; - } - - if (vid_stream->picture.full_pel_back_vector) { - recon_right_back = vid_stream->mblock.recon_right_back_prev << 1; - recon_down_back = vid_stream->mblock.recon_down_back_prev << 1; - } else { - recon_right_back = vid_stream->mblock.recon_right_back_prev; - recon_down_back = vid_stream->mblock.recon_down_back_prev; - } - - - /* If only one motion vector, do display copy, else do full - calculation. - */ - - if (ditherType == MBORDERED_DITHER) { - if (vid_stream->mblock.bpict_past_forw && - !vid_stream->mblock.bpict_past_back) { - for (addr = vid_stream->mblock.past_mb_addr+1; - addr < vid_stream->mblock.mb_address; addr++) { - /* - MBOrderedDitherDisplayCopy(vid_stream, addr, - 1, recon_right_for, recon_down_for, - 0, 0, 0, vid_stream->past->display, - vid_stream->future->display); - ditherFlags[addr] = 0; - */ - } - return; - } - if (vid_stream->mblock.bpict_past_back && - !vid_stream->mblock.bpict_past_forw) { - for (addr = vid_stream->mblock.past_mb_addr+1; - addr < vid_stream->mblock.mb_address; addr++) { - /* - MBOrderedDitherDisplayCopy(vid_stream, addr, - 0, 0, 0, - 1, recon_right_back, recon_down_back, - vid_stream->past->display, vid_stream->future->display); - ditherFlags[addr] = 0; - */ - } - return; - } - } - - /* Calculate motion vectors. */ - - if (vid_stream->mblock.bpict_past_forw) { - right_for = recon_right_for >> 1; - down_for = recon_down_for >> 1; - right_half_for = recon_right_for & 0x1; - down_half_for = recon_down_for & 0x1; - - recon_right_for /= 2; - recon_down_for /= 2; - c_right_for = recon_right_for >> 1; - c_down_for = recon_down_for >> 1; - c_right_half_for = recon_right_for & 0x1; - c_down_half_for = recon_down_for & 0x1; - - } - if (vid_stream->mblock.bpict_past_back) { - right_back = recon_right_back >> 1; - down_back = recon_down_back >> 1; - right_half_back = recon_right_back & 0x1; - down_half_back = recon_down_back & 0x1; - - recon_right_back /= 2; - recon_down_back /= 2; - c_right_back = recon_right_back >> 1; - c_down_back = recon_down_back >> 1; - c_right_half_back = recon_right_back & 0x1; - c_down_half_back = recon_down_back & 0x1; - - } - /* For each skipped macroblock, do... */ - - for (addr = vid_stream->mblock.past_mb_addr + 1; - addr < vid_stream->mblock.mb_address; addr++) { - - /* Calculate macroblock row and col. */ - - mb_row = addr / vid_stream->mb_width; - mb_col = addr % vid_stream->mb_width; - - /* Calculate upper left pixel row,col for luminance plane. */ - - row = mb_row << 4; - col = mb_col << 4; - crow = row / 2; - ccol = col / 2; - - /* If forward predicted, calculate prediction values. */ - - if (vid_stream->mblock.bpict_past_forw) { - - ReconSkippedBlock(vid_stream->past->luminance, forw_lum, - row, col, row_size, right_for, down_for, - right_half_for, down_half_for, 16); - ReconSkippedBlock(vid_stream->past->Cr, forw_cr, crow, - ccol, half_row, - c_right_for, c_down_for, c_right_half_for, c_down_half_for, 8); - ReconSkippedBlock(vid_stream->past->Cb, forw_cb, crow, - ccol, half_row, - c_right_for, c_down_for, c_right_half_for, c_down_half_for, 8); - } - /* If back predicted, calculate prediction values. */ - - if (vid_stream->mblock.bpict_past_back) { - ReconSkippedBlock(vid_stream->future->luminance, back_lum, - row, col, row_size, right_back, down_back, - right_half_back, down_half_back, 16); - ReconSkippedBlock(vid_stream->future->Cr, back_cr, crow, - ccol, half_row, - c_right_back, c_down_back, - c_right_half_back, c_down_half_back, 8); - ReconSkippedBlock(vid_stream->future->Cb, back_cb, crow, - ccol, half_row, - c_right_back, c_down_back, - c_right_half_back, c_down_half_back, 8); - } - if (vid_stream->mblock.bpict_past_forw && - !vid_stream->mblock.bpict_past_back) { - - int *dest, *dest1; - int *src, *src1; - dest = (int *)(vid_stream->current->luminance + (row * row_size) + col); - src = (int *)forw_lum; - - for (rr = 0; rr < 16; rr++) { - - /* ACE_OS::memcpy (dest, forw_lum+(rr<<4), 16); */ - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; - dest[3] = src[3]; - dest += row_incr; - src += 4; - } - - dest = (int *)(vid_stream->current->Cr + (crow * half_row) + ccol); - dest1 = (int *)(vid_stream->current->Cb + (crow * half_row) + ccol); - src = (int *)forw_cr; - src1 = (int *)forw_cb; - - for (rr = 0; rr < 8; rr++) { - /* - * ACE_OS::memcpy (dest, forw_cr+(rr<<3), 8); ACE_OS::memcpy (dest1, forw_cb+(rr<<3), - * 8); - */ - - dest[0] = src[0]; - dest[1] = src[1]; - - dest1[0] = src1[0]; - dest1[1] = src1[1]; - - dest += half_row_incr; - dest1 += half_row_incr; - src += 2; - src1 += 2; - } - } else if (vid_stream->mblock.bpict_past_back && - !vid_stream->mblock.bpict_past_forw) { - - int *src, *src1; - int *dest, *dest1; - dest = (int *)(vid_stream->current->luminance + (row * row_size) + col); - src = (int *)back_lum; - - for (rr = 0; rr < 16; rr++) { - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; - dest[3] = src[3]; - dest += row_incr; - src += 4; - } - - - dest = (int *)(vid_stream->current->Cr + (crow * half_row) + ccol); - dest1 = (int *)(vid_stream->current->Cb + (crow * half_row) + ccol); - src = (int *)back_cr; - src1 = (int *)back_cb; - - for (rr = 0; rr < 8; rr++) { - /* - * ACE_OS::memcpy (dest, back_cr+(rr<<3), 8); ACE_OS::memcpy (dest1, back_cb+(rr<<3), - * 8); - */ - - dest[0] = src[0]; - dest[1] = src[1]; - - dest1[0] = src1[0]; - dest1[1] = src1[1]; - - dest += half_row_incr; - dest1 += half_row_incr; - src += 2; - src1 += 2; - } - } else { - - unsigned char *src1, *src2, *src1a, *src2a; - unsigned char *dest, *dest1; - dest = vid_stream->current->luminance + (row * row_size) + col; - src1 = forw_lum; - src2 = back_lum; - - for (rr = 0; rr < 16; rr++) { - dest[0] = (int) (src1[0] + src2[0]) >> 1; - dest[1] = (int) (src1[1] + src2[1]) >> 1; - dest[2] = (int) (src1[2] + src2[2]) >> 1; - dest[3] = (int) (src1[3] + src2[3]) >> 1; - dest[4] = (int) (src1[4] + src2[4]) >> 1; - dest[5] = (int) (src1[5] + src2[5]) >> 1; - dest[6] = (int) (src1[6] + src2[6]) >> 1; - dest[7] = (int) (src1[7] + src2[7]) >> 1; - dest[8] = (int) (src1[8] + src2[8]) >> 1; - dest[9] = (int) (src1[9] + src2[9]) >> 1; - dest[10] = (int) (src1[10] + src2[10]) >> 1; - dest[11] = (int) (src1[11] + src2[11]) >> 1; - dest[12] = (int) (src1[12] + src2[12]) >> 1; - dest[13] = (int) (src1[13] + src2[13]) >> 1; - dest[14] = (int) (src1[14] + src2[14]) >> 1; - dest[15] = (int) (src1[15] + src2[15]) >> 1; - dest += row_size; - src1 += 16; - src2 += 16; - } - - - dest = vid_stream->current->Cr + (crow * half_row) + ccol; - dest1 = vid_stream->current->Cb + (crow * half_row) + ccol; - src1 = forw_cr; - src2 = back_cr; - src1a = forw_cb; - src2a = back_cb; - - for (rr = 0; rr < 8; rr++) { - dest[0] = (int) (src1[0] + src2[0]) >> 1; - dest[1] = (int) (src1[1] + src2[1]) >> 1; - dest[2] = (int) (src1[2] + src2[2]) >> 1; - dest[3] = (int) (src1[3] + src2[3]) >> 1; - dest[4] = (int) (src1[4] + src2[4]) >> 1; - dest[5] = (int) (src1[5] + src2[5]) >> 1; - dest[6] = (int) (src1[6] + src2[6]) >> 1; - dest[7] = (int) (src1[7] + src2[7]) >> 1; - dest += half_row; - src1 += 8; - src2 += 8; - - dest1[0] = (int) (src1a[0] + src2a[0]) >> 1; - dest1[1] = (int) (src1a[1] + src2a[1]) >> 1; - dest1[2] = (int) (src1a[2] + src2a[2]) >> 1; - dest1[3] = (int) (src1a[3] + src2a[3]) >> 1; - dest1[4] = (int) (src1a[4] + src2a[4]) >> 1; - dest1[5] = (int) (src1a[5] + src2a[5]) >> 1; - dest1[6] = (int) (src1a[6] + src2a[6]) >> 1; - dest1[7] = (int) (src1a[7] + src2a[7]) >> 1; - dest1 += half_row; - src1a += 8; - src2a += 8; - } - } - - if (ditherType == MBORDERED_DITHER) { - ditherFlags[addr] = 1; - } - } -} - - - - -/* - *-------------------------------------------------------------- - * - * ReconSkippedBlock -- - * - * Reconstructs predictive block for skipped macroblocks - * in B Frames. - * - * Results: - * No return values. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -static void -ReconSkippedBlock(unsigned char *source, unsigned char *dest, - int row, int col, int row_size, int right, int down, - int right_half, int down_half, int width) -{ - int rr; - unsigned char *source2; - - source += ((row + down) * row_size) + col + right; - - if (width == 16) { - if ((!right_half) && (!down_half)) { - if (right & 0x1) { - /* No alignment, use bye copy */ - for (rr = 0; rr < 16; rr++) { - dest[0] = source[0]; - dest[1] = source[1]; - dest[2] = source[2]; - dest[3] = source[3]; - dest[4] = source[4]; - dest[5] = source[5]; - dest[6] = source[6]; - dest[7] = source[7]; - dest[8] = source[8]; - dest[9] = source[9]; - dest[10] = source[10]; - dest[11] = source[11]; - dest[12] = source[12]; - dest[13] = source[13]; - dest[14] = source[14]; - dest[15] = source[15]; - dest += 16; - source += row_size; - } - } else if (right & 0x2) { - /* Half-word bit aligned, use 16 bit copy */ - short *src = (short *)source; - short *d = (short *)dest; - row_size >>= 1; - for (rr = 0; rr < 16; rr++) { - d[0] = src[0]; - d[1] = src[1]; - d[2] = src[2]; - d[3] = src[3]; - d[4] = src[4]; - d[5] = src[5]; - d[6] = src[6]; - d[7] = src[7]; - d += 8; - src += row_size; - } - } else { - /* Word aligned, use 32 bit copy */ - int *src = (int *)source; - int *d = (int *)dest; - row_size >>= 2; - for (rr = 0; rr < 16; rr++) { - d[0] = src[0]; - d[1] = src[1]; - d[2] = src[2]; - d[3] = src[3]; - d += 4; - src += row_size; - } - } - } else { - source2 = source + right_half + (row_size * down_half); - for (rr = 0; rr < width; rr++) { - dest[0] = (int) (source[0] + source2[0]) >> 1; - dest[1] = (int) (source[1] + source2[1]) >> 1; - dest[2] = (int) (source[2] + source2[2]) >> 1; - dest[3] = (int) (source[3] + source2[3]) >> 1; - dest[4] = (int) (source[4] + source2[4]) >> 1; - dest[5] = (int) (source[5] + source2[5]) >> 1; - dest[6] = (int) (source[6] + source2[6]) >> 1; - dest[7] = (int) (source[7] + source2[7]) >> 1; - dest[8] = (int) (source[8] + source2[8]) >> 1; - dest[9] = (int) (source[9] + source2[9]) >> 1; - dest[10] = (int) (source[10] + source2[10]) >> 1; - dest[11] = (int) (source[11] + source2[11]) >> 1; - dest[12] = (int) (source[12] + source2[12]) >> 1; - dest[13] = (int) (source[13] + source2[13]) >> 1; - dest[14] = (int) (source[14] + source2[14]) >> 1; - dest[15] = (int) (source[15] + source2[15]) >> 1; - dest += width; - source += row_size; - source2 += row_size; - } - } - } else { /* (width == 8) */ - assert(width == 8); - if ((!right_half) && (!down_half)) { - if (right & 0x1) { - for (rr = 0; rr < width; rr++) { - dest[0] = source[0]; - dest[1] = source[1]; - dest[2] = source[2]; - dest[3] = source[3]; - dest[4] = source[4]; - dest[5] = source[5]; - dest[6] = source[6]; - dest[7] = source[7]; - dest += 8; - source += row_size; - } - } else if (right & 0x02) { - short *d = (short *)dest; - short *src = (short *)source; - row_size >>= 1; - for (rr = 0; rr < width; rr++) { - d[0] = src[0]; - d[1] = src[1]; - d[2] = src[2]; - d[3] = src[3]; - d += 4; - src += row_size; - } - } else { - int *d = (int *)dest; - int *src = (int *)source; - row_size >>= 2; - for (rr = 0; rr < width; rr++) { - d[0] = src[0]; - d[1] = src[1]; - d += 2; - src += row_size; - } - } - } else { - source2 = source + right_half + (row_size * down_half); - for (rr = 0; rr < width; rr++) { - dest[0] = (int) (source[0] + source2[0]) >> 1; - dest[1] = (int) (source[1] + source2[1]) >> 1; - dest[2] = (int) (source[2] + source2[2]) >> 1; - dest[3] = (int) (source[3] + source2[3]) >> 1; - dest[4] = (int) (source[4] + source2[4]) >> 1; - dest[5] = (int) (source[5] + source2[5]) >> 1; - dest[6] = (int) (source[6] + source2[6]) >> 1; - dest[7] = (int) (source[7] + source2[7]) >> 1; - dest += width; - source += row_size; - source2 += row_size; - } - } - } -} - -/* - *-------------------------------------------------------------- - * - * ToggleBFlag -- - * - * Called to set no b frame processing flag. - * - * Results: - * No_B_Flag flag is toggled from present value to opposite value. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -ToggleBFlag() -{ - if (No_B_Flag) { - No_B_Flag = 0; - } else - No_B_Flag = 1; -} - - - - -/* - *-------------------------------------------------------------- - * - * TogglePFlag -- - * - * Called to set no p frame processing flag. - * - * Results: - * No_P_Flag flag is toggled from present value to opposite value. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -TogglePFlag() -{ - if (No_P_Flag) { - No_P_Flag = 0; - } else - No_P_Flag = 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h deleted file mode 100644 index 9e2a9336f14..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h +++ /dev/null @@ -1,285 +0,0 @@ -/* $Id$ */ -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ -#include -#include - -#include -#include - -#ifdef SH_MEM -#include -#include -#include -#endif - -/* X11/xmd.h correctly defines INT32, etc */ -#ifndef XMD_H -typedef int INT32; -typedef short INT16; -typedef char INT8; -#endif -typedef unsigned int UINT32; -typedef unsigned short UINT16; -typedef unsigned char UINT8; - -/* Define Parsing error codes. */ - -#define SKIP_PICTURE -10 -#define SKIP_TO_START_CODE -1 -#define PARSE_OK 1 - -/* Define BOOLEAN, TRUE, and FALSE. */ - -#define BOOLEAN int -#define TRUE 1 - -#define FALSE 0 - -/* Set ring buffer size. */ - -#define RING_BUF_SIZE 5 - -/* Macros for picture code type. */ - -#define I_TYPE 1 -#define P_TYPE 2 -#define B_TYPE 3 - -/* Start codes. */ - -#define SEQ_END_CODE 0x000001b7 -#define SEQ_START_CODE 0x000001b3 -#define GOP_START_CODE 0x000001b8 -#define PICTURE_START_CODE 0x00000100 -#define SLICE_MIN_START_CODE 0x00000101 -#define SLICE_MAX_START_CODE 0x000001af -#define EXT_START_CODE 0x000001b5 -#define USER_START_CODE 0x000001b2 - -/* Number of macroblocks to process in one call to mpegVidRsrc. */ - -#define MB_QUANTUM 100 - -/* Macros used with macroblock address decoding. */ - -#define MB_STUFFING 34 -#define MB_ESCAPE 35 - -/* Lock flags for pict images. */ - -#define DISPLAY_LOCK 0x01 -#define PAST_LOCK 0x02 -#define FUTURE_LOCK 0x04 - -#define HYBRID_DITHER 0 -#define HYBRID2_DITHER 1 -#define FS4_DITHER 2 -#define FS2_DITHER 3 -#define FS2FAST_DITHER 4 -#define Twox2_DITHER 5 -#define GRAY_DITHER 6 -#define FULL_COLOR_DITHER 7 -#define NO_DITHER 8 -#define ORDERED_DITHER 9 -#define MONO_DITHER 10 -#define MONO_THRESHOLD 11 -#define ORDERED2_DITHER 12 -#define MBORDERED_DITHER 13 - -/* External declaration of row,col to zig zag conversion matrix. */ - -extern int scan[][8]; - -/* Temporary definition of time stamp structure. */ - -typedef int TimeStamp; - -/* Structure with reconstructed pixel values. */ - -typedef struct pict_image { - int sh, gop, frame, display, future, past; - int locked; /* lock flag. */ - unsigned char *luminance; /* Luminance plane. */ - unsigned char *Cr; /* Cr plane. */ - unsigned char *Cb; /* Cb plane. */ -} PictImage; - -/* Group of pictures structure. */ - -typedef struct GoP { - BOOLEAN drop_flag; /* Flag indicating dropped frame. */ - unsigned int tc_hours; /* Hour component of time code. */ - unsigned int tc_minutes; /* Minute component of time code. */ - unsigned int tc_seconds; /* Second component of time code. */ - unsigned int tc_pictures; /* Picture counter of time code. */ - BOOLEAN closed_gop; /* Indicates no pred. vectors to - previous group of pictures. */ - BOOLEAN broken_link; /* B frame unable to be decoded. */ - char *ext_data; /* Extension data. */ - char *user_data; /* User data. */ -} GoP; - -/* Picture structure. */ - -typedef struct pict { - unsigned int temp_ref; /* Temporal reference. */ - unsigned int code_type; /* Frame type: P, B, I */ - unsigned int vbv_delay; /* Buffer delay. */ - BOOLEAN full_pel_forw_vector; /* Forw. vectors specified in full - pixel values flag. */ - unsigned int forw_r_size; /* Used for vector decoding. */ - unsigned int forw_f; /* Used for vector decoding. */ - BOOLEAN full_pel_back_vector; /* Back vectors specified in full - pixel values flag. */ - unsigned int back_r_size; /* Used in decoding. */ - unsigned int back_f; /* Used in decoding. */ - char *extra_info; /* Extra bit picture info. */ - char *ext_data; /* Extension data. */ - char *user_data; /* User data. */ -} Pict; - -/* Slice structure. */ - -typedef struct slice { - unsigned int vert_pos; /* Vertical position of slice. */ - unsigned int quant_scale; /* Quantization scale. */ - char *extra_info; /* Extra bit slice info. */ -} Slice; - -/* Macroblock structure. */ - -typedef struct macroblock { - int mb_address; /* Macroblock address. */ - int past_mb_addr; /* Previous mblock address. */ - int motion_h_forw_code; /* Forw. horiz. motion vector code. */ - unsigned int motion_h_forw_r; /* Used in decoding vectors. */ - int motion_v_forw_code; /* Forw. vert. motion vector code. */ - unsigned int motion_v_forw_r; /* Used in decdoinge vectors. */ - int motion_h_back_code; /* Back horiz. motion vector code. */ - unsigned int motion_h_back_r; /* Used in decoding vectors. */ - int motion_v_back_code; /* Back vert. motion vector code. */ - unsigned int motion_v_back_r; /* Used in decoding vectors. */ - unsigned int cbp; /* Coded block pattern. */ - BOOLEAN mb_intra; /* Intracoded mblock flag. */ - BOOLEAN bpict_past_forw; /* Past B frame forw. vector flag. */ - BOOLEAN bpict_past_back; /* Past B frame back vector flag. */ - int past_intra_addr; /* Addr of last intracoded mblock. */ - int recon_right_for_prev; /* Past right forw. vector. */ - int recon_down_for_prev; /* Past down forw. vector. */ - int recon_right_back_prev; /* Past right back vector. */ - int recon_down_back_prev; /* Past down back vector. */ -} Macroblock; - -/* Block structure. */ - -typedef struct { - short int dct_recon[8][8]; /* Reconstructed dct coeff matrix. */ - short int dct_dc_y_past; /* Past lum. dc dct coefficient. */ - short int dct_dc_cr_past; /* Past cr dc dct coefficient. */ - short int dct_dc_cb_past; /* Past cb dc dct coefficient. */ -} Block; - -/* Video stream structure. */ - -typedef struct vid_stream { - int shid; /* id of latest sequence header */ - unsigned int h_size; /* Horiz. size in pixels. */ - unsigned int v_size; /* Vert. size in pixels. */ - unsigned int mb_height; /* Vert. size in mblocks. */ - unsigned int mb_width; /* Horiz. size in mblocks. */ - unsigned char aspect_ratio; /* Code for aspect ratio. */ - unsigned char picture_rate; /* Code for picture rate. */ - unsigned int bit_rate; /* Bit rate. */ - unsigned int vbv_buffer_size; /* Minimum buffer size. */ - BOOLEAN const_param_flag; /* Contrained parameter flag. */ - unsigned char intra_quant_matrix[8][8]; /* Quantization matrix for - intracoded frames. */ - unsigned char non_intra_quant_matrix[8][8]; /* Quanitization matrix for - non intracoded frames. */ - char *ext_data; /* Extension data. */ - char *user_data; /* User data. */ - int gopid; /* id of latest group id */ - GoP group; /* Current group of pict. */ - Pict picture; /* Current picture. */ - Slice slice; /* Current slice. */ - Macroblock mblock; /* Current macroblock. */ - Block block; /* Current block. */ - int state; /* State of decoding. */ - int bit_offset; /* Bit offset in stream. */ - unsigned int *buffer; /* Pointer to next byte in - buffer. */ - int buf_length; /* Length of remaining buffer.*/ - unsigned int *buf_start; /* Pointer to buffer start. */ - int max_buf_length; /* Max lenght of buffer. */ - PictImage *past; /* Past predictive frame. */ - PictImage *future; /* Future predictive frame. */ - PictImage *current; /* Current frame. */ - PictImage *ring[RING_BUF_SIZE]; /* Ring buffer of frames. */ -} VidStream; - -/* Declaration of global pointer to current video stream. */ - -extern VidStream *curVidStream; - -/* Declarataion of global display pointer. */ -extern Display *display; - -/* Shared memory flag. */ -extern int shmemFlag; - -/* Quiet mode flag. */ -extern int quietFlag; - -/* Dither flags external declaration. */ -extern char *ditherFlags; - -/* Definition of Contant integer scale factor. */ - -#define CONST_BITS 13 - -/* Misc DCT definitions */ -#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ -#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ - -#define GLOBAL /* a function referenced thru EXTERNs */ - -typedef short DCTELEM; -typedef DCTELEM DCTBLOCK[DCTSIZE2]; - - -#ifdef SH_MEM -extern int gXErrorFlag; -#endif - -extern double realTimeStart; -extern int totNumFrames; -extern int loopFlag; -extern int noDisplayFlag; -extern jmp_buf env; - -#ifdef ANALYSIS -extern unsigned int bitCount; -extern int showEachFlag; -extern unsigned int cacheHit[8][8]; -extern unsigned int cacheMiss[8][8]; -#endif - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vp.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vp.cpp deleted file mode 100644 index e7e75e08e06..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vp.cpp +++ /dev/null @@ -1,921 +0,0 @@ -/* $Id$ */ - -/* - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice and the following - * two paragraphs appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#include -#include -#include -#include -/* -#include -#include -*/ -#include -#include -#include - -#ifdef SH_MEM /* this is already defined in video.h */ -#include -#include -#include -#endif - -#include "include/common.h" -#include "newproto.h" -#include "global.h" -#include "dither.h" -#include "video.h" - -#include -#include "proto.h" -#include "ui.h" - -ACE_RCSID(mpeg_client, vp, "$Id$") - -/* Declaration of global variable to hold dither info. */ - -extern int ditherType; - -/* Structures used by the X server. */ - -extern Display *display; -extern Colormap cmap; - -static int cmdSocket = -1; -static int win_width, win_height; -static Window window; -static GC gc; - -static int usingShm = 0; -#ifdef SH_MEM -static XShmSegmentInfo shminfo; /* Segment info. */ -#endif -static XImage *ximage = NULL; - - -/* - *-------------------------------------------------------------- - * - * InitColor -- - * - * Initialized lum, cr, and cb quantized range value arrays. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -void -InitColor() -{ - int i; - - for (i=0; i 255.0) fr = 255.0; - - if (fg < 0.0) fg = 0.0; - else if (fg > 255.0) fg = 255.0; - - if (fb < 0.0) fb = 0.0; - else if (fb > 255.0) fb = 255.0; - - *r = (unsigned char) fr; - *g = (unsigned char) fg; - *b = (unsigned char) fb; - -} - -#ifdef SH_MEM - -int gXErrorFlag = 0; - -int HandleXError(Display * dpy, XErrorEvent * event) -{ - gXErrorFlag = 1; - return 0; -} - -void InstallXErrorHandler() -{ - int HandleXError(Display *,XErrorEvent *); - - XSetErrorHandler(HandleXError); - XFlush(display); -} - -void DeInstallXErrorHandler() -{ - XSetErrorHandler(NULL); - XFlush(display); -} -#endif - -/* - *-------------------------------------------------------------- - * - * MakeWindow -- - * - * Create X Window for image display - * - * Results: - * Read the code. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - -#ifdef SH_MEM -int CompletionType = -1; -#endif - -// int XShmGetEventBase (Display*); - -static void -MakeWindow(void) -{ - - XSizeHints hint; - unsigned int fg, bg; - char *hello = "MPEG Play"; - int screen; - - if (ditherType == NO_DITHER) return; -/* - UICreate(); -*/ - -#ifdef SH_MEM - if (shmemFlag && display != NULL) - { - if (!XShmQueryExtension(display)) - { - shmemFlag = 0; - fprintf(stderr, "VP: Shared memory not supported, Reverting to normal Xlib.\n"); - } - else - { - shmemFlag = 1; - /* - fprintf(stderr, "VP: try using shared mem, but STOPPED temporarily.\n"); - shmemFlag = 0; - */ - } - } - else if (shmemFlag) - { - fprintf(stderr, "VP unexpected: display is NULL.\n"); - ACE_OS::exit (1); - } - if(shmemFlag) - CompletionType = /*XShmGetEventBase(display) +*/ ShmCompletion; -#endif - - screen = DefaultScreen (display); - - /* Fill in hint structure */ - - hint.x = 0; - hint.y = 0; - hint.width = 150; - hint.height = 150; - hint.flags = PPosition | PSize; - - /* Get some colors */ - - bg = WhitePixel (display, screen); - fg = BlackPixel (display, screen); - - /* Make the window */ - - if (ditherType == FULL_COLOR_DITHER) { - window = CreateFullColorWindow (display, hint.x, hint.y, hint.width, hint.height); - if (window == 0) { - fprintf (stderr, "-color option only valid on full color display\n"); - exit (-1); - } - } else if (ditherType == MONO_DITHER || ditherType == MONO_THRESHOLD) { - window = XCreateSimpleWindow (display, - MonitorWindow(), - hint.x, hint.y, - hint.width, hint.height, - 4, fg, bg); - UISetwin(window); - } else { - XVisualInfo vinfo; - - if (!XMatchVisualInfo (display, screen, 8, PseudoColor, - &vinfo)) { - - if (!XMatchVisualInfo(display, screen, 8, GrayScale, - &vinfo)) { - fprintf(stderr, "It seems you have a true-color/mono monitor,\n"); - fprintf(stderr, "please try 'vcr -dither color' or 'vcr -dither mono'\n"); - exit(-1); - } - } - - window = XCreateSimpleWindow (display, - MonitorWindow(), - hint.x, hint.y, - hint.width, hint.height, - 4, fg, bg); - UISetwin(window); - } - - XSelectInput(display, window, StructureNotifyMask); - - /* Tell other applications about this window */ - - XSetStandardProperties (display, window, hello, hello, None, NULL, 0, &hint); - - /* Map window. */ - - XMapWindow(display, window); - - /* Wait for map. */ - while(1) { - XEvent xev; - - XNextEvent(display, &xev); - if(xev.type == MapNotify && xev.xmap.event == window) - break; - } - XSelectInput(display, window, NoEventMask); -} - - -/* - *-------------------------------------------------------------- - * - * InitDisplay -- - * - * Initialized display, sets up colormap, etc. - * - * Results: - * None. - * - * Side effects: - * None. - * - *-------------------------------------------------------------- - */ - - -static char window_name[64]; -#include - -void InitDisplay(char *name) -{ - - int ncolors = LUM_RANGE*CB_RANGE*CR_RANGE; - XColor xcolor; - int i, lum_num, cr_num, cb_num; - unsigned char r, g, b; - Colormap dcmap; - - if (ditherType == NO_DITHER) return; - - strcpy(window_name, name); - - MakeWindow(); - - gc = XCreateGC(display, window, 0, 0); - - dcmap = cmap = XDefaultColormap(display, DefaultScreen(display)); - - xcolor.flags = DoRed | DoGreen | DoBlue; - - retry_alloc_colors: - for (i=0; idata = data; - XPutImage(display, window, gc, ximage, 0, 0, 0, 0, - ximage->width, ximage->height); - XFlush(display); - ximage->data = NULL; - ACE_OS::free (data); - } -} - - -void VPresizeWindow(int h, int w) -{ - int i; - char dummy; - Visual *fc_visual; - int depth; - static int ph = 0; - static int pw = 0; - - if (ph == h && pw == w) { - ClearWindow(); - return; - } - ph = h; - pw = w; - - /* Excerpt from man page of XDestroyImage(3X11): - Note that when the image is created using XCreateImage(), - XGetImage(), or XSubImage(), the destroy procedure that the - XDestroyImage function call frees both the image structure - and the data pointed to by the image structure. */ - if (ximage != NULL) ximage->data = NULL; - - if (ditherType == NO_DITHER) return; - - win_width = ((w + 15)>>4)<<4; - win_height = ((h + 15)>>4)<<4; - - i = (ditherType == Twox2_DITHER) ? 2 : 1; - XResizeWindow(display, window, w*i, h*i); - UIMinsize(w*i, h*i); - - /* ximage allocate/resize */ - -#ifdef SH_MEM - if (shmemFlag && display != NULL) - { - InstallXErrorHandler(); - } -#endif - - if (ximage != NULL) - { -#ifdef SH_MEM - if (shmemFlag && usingShm == 1) - { - XDestroyImage(ximage); - ximage = NULL; - } - else -#endif - { - XDestroyImage(ximage); - ximage = NULL; - } - } -#ifdef SH_MEM - if (shmemFlag) - { - /* - Visual *fc_visual; - int depth; - Visual *FindFullColorVisual(); - */ - usingShm = 1; - - if (ditherType == Twox2_DITHER) - { - ximage = XShmCreateImage(display, None, 8, ZPixmap, NULL, - &(shminfo), win_width * 2, win_height * 2); - } - else if (ditherType == FULL_COLOR_DITHER) - { - fc_visual = FindFullColorVisual(display, &depth); - ximage = XShmCreateImage(display, fc_visual, depth, ZPixmap, - NULL, &(shminfo), win_width, win_height); - } - else if (ditherType == MONO_DITHER || ditherType == MONO_THRESHOLD) - { - ximage = XShmCreateImage(display, None, 1, XYBitmap, - NULL, &(shminfo), win_width, win_height); - } - else - { - ximage = XShmCreateImage(display, None, 8, ZPixmap, NULL, - &(shminfo), win_width, win_height); - } - if (ximage == NULL) - { - fprintf(stderr, "Shared memory error, disabling.\n"); - goto shmemerror; - } - - if (gXErrorFlag) - { - XDestroyImage(ximage); - ximage = NULL; - fprintf(stderr, "Shared memory error, disabling.\n"); - gXErrorFlag = 0; - goto shmemerror; - } - } - else -#endif - { -shmemerror: - - usingShm = 0; - - if (ditherType == Twox2_DITHER) - { - ximage = XCreateImage(display, None, 8, ZPixmap, 0, &dummy, - win_width * 2, - win_height * 2, 8, 0); - } - else if (ditherType == FULL_COLOR_DITHER) - { - fc_visual = FindFullColorVisual(display, &depth); - ximage = XCreateImage (display, fc_visual, depth, ZPixmap, - 0, &dummy, win_width, - win_height, 32, 0); - } - else if (ditherType == MONO_DITHER || ditherType == MONO_THRESHOLD) - { - ximage = XCreateImage (display, None, 1, XYBitmap, 0, &dummy, - win_width, - win_height, 8, 0); - ximage->byte_order = MSBFirst; - ximage->bitmap_bit_order = MSBFirst; - } - else - { - ximage = XCreateImage(display, None, 8, ZPixmap, 0, &dummy, - win_width, - win_height, 8, 0); - } - if (ximage == NULL) - { - ACE_OS::perror ("VP error: fails to XCreateImage ximage"); - ACE_OS::exit (1); - } - } -#ifdef SH_MEM - if (shmemFlag && display != NULL) - { - DeInstallXErrorHandler(); - } -#endif - ximage->data = NULL; - /* - fprintf(stderr, "win_width %d, win_height %d, times %d\n", - win_width, win_height, win_width * win_height); - */ - ClearWindow(); - /* - fprintf(stderr, "VP window resized as width-%d, height-%d.\n", w, h); - */ -} - -/* parameter 'position' is for VPcontinuous command only */ -void VPcommand(int cmd, char * ptr) -{ - FrameBlock *buf = (FrameBlock *)ptr; - /* - fprintf(stderr, "VP get cmd %d.\n", cmd); - */ - switch (cmd) - { - case CmdVPdisplayFrame: - if (shared->cmd != CmdSTOP) { - shared->currentGroup = buf->gop; - shared->currentFrame = buf->frame; - shared->currentDisplay = buf->display; - ximage->data = (char *)buf->data; - VPexpose(); - } - VDreclaimMsg(buf); - return; - - case CmdVPinitScreen: - - VPresizeWindow(shared->verticalSize, shared->horizontalSize); - return; - - case CmdVPclearScreen: - - ClearWindow(); - /* - fprintf(stderr, "VP screen cleaned for audio-only case.\n"); - */ - break; - - default: /* all unknown cmds shall be processed by UI */ - - break; - } -} - -void VPexpose(void) -{ - if (ximage == NULL) { - return; - } - else if (ximage->data == NULL) { - return; - } -#ifdef SH_MEM - if (shmemFlag && usingShm) - { - XShmPutImage(display, window, gc, ximage, 0, 0, 0, 0, - ximage->width, ximage->height, True); - XFlush(display); - while(1) - { - XEvent xev; - - XNextEvent(display, &xev); - if(xev.type == CompletionType) - break; - } - } - else -#endif - { - XPutImage(display, window, gc, ximage, 0, 0, 0, 0, - ximage->width, ximage->height); - XFlush(display); - } -} - -static void DisplayInitialization(void) -{ -/* - printf("to initialize display.\n"); -*/ - switch (ditherType) { - - case HYBRID_DITHER: - - InitColor(); - InitDisplay(displayName); - break; - - case HYBRID2_DITHER: - InitColor(); - InitDisplay(displayName); - break; - - case FS4_DITHER: - InitColor(); - InitDisplay(displayName); - break; - - case FS2_DITHER: - InitColor(); - InitDisplay(displayName); - break; - - case FS2FAST_DITHER: - InitColor(); - InitDisplay(displayName); - break; - - case Twox2_DITHER: - InitColor(); - InitDisplay(displayName); - break; - - case GRAY_DITHER: - InitGrayDisplay(displayName); - break; - - case FULL_COLOR_DITHER: - InitColorDisplay(displayName); - break; - - case NO_DITHER: - shmemFlag = 0; - break; - - case ORDERED_DITHER: - InitColor(); - InitDisplay(displayName); - break; - - case MONO_DITHER: - case MONO_THRESHOLD: - InitMonoDisplay(displayName); - break; - - case ORDERED2_DITHER: - InitColor(); - InitDisplay(displayName); - break; - - case MBORDERED_DITHER: - InitColor(); - InitDisplay(displayName); - break; - - } -/* - printf("finished init display.\n"); -*/ -} - -void VPinitWindow(Widget shell, Window monitorWindow, int cmdSock) -{ - cmdSocket = cmdSock; - lum_values = (int *) ACE_OS::malloc(LUM_RANGE*sizeof(int)); - cr_values = (int *) ACE_OS::malloc(CR_RANGE*sizeof(int)); - cb_values = (int *) ACE_OS::malloc(CB_RANGE*sizeof(int)); - - DisplayInitialization(); - ACE_OS::memcpy (shared->pixel, pixel, 256); - shared->pixelValid = 1; - - ACE_OS::free (lum_values); - ACE_OS::free (cr_values); - ACE_OS::free (cb_values); -#ifdef SH_MEM - if (shmemFlag && display != NULL) - { - InstallXErrorHandler(); - - shminfo.shmid = shared->VDbufId; - shminfo.shmaddr = shared->VDbufAddr; - shminfo.readOnly = False; - XShmAttach(display, &(shminfo)); - XSync(display, False); - - if (gXErrorFlag) - { - Fprintf(stderr, "Shared memory error, disabling.\n"); - gXErrorFlag = 0; - shmemFlag = 0; - } - DeInstallXErrorHandler(); - } -#endif - - remove_shmem_id(shared->VDbufId); - VPresizeWindow(150, 200); -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile deleted file mode 100644 index 50035b33830..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile +++ /dev/null @@ -1,314 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -MAKEFILE = Makefile -LIBNAME = libmpeg_mib -LIB = $(LIBNAME).a -SHLIB = $(LIBNAME).$(SOEXT) - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -# On non-Windows environment, we should at least define -# the export_include IDL flag. -FILES= mibButton \ - mibDrawArea \ - mibFrame \ - mibLabel \ - mibList \ - mibMenu \ - mibRadioBox \ - mibScale \ - mibScrollBar \ - mibTextBig \ - mibTextBox \ - mibToggle \ - mibload \ - -DEFS = $(addsuffix .h,$(FILES)) -LSRC = $(addsuffix .cpp,$(FILES)) - -##LIBS += -lTAO -lACE - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets (and local hacks) -#---------------------------------------------------------------------------- - -LDFLAGS += -L/project/doc/pkg/X11/lib/ -lXm -lXt -lXext -lSM -lICE -lX11 -L/project/doc/pkg/X11/lib -lsocket -lnsl -ldl -CPPFLAGS += -DSH_MEM -DNDEBUG -I/project/doc/pkg/X11/include - -clean: - -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state - -realclean: clean - -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES)) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/mibButton.o .obj/mibButton.so .shobj/mibButton.o .shobj/mibButton.so: mibButton.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibDrawArea.o .obj/mibDrawArea.so .shobj/mibDrawArea.o .shobj/mibDrawArea.so: mibDrawArea.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibFrame.o .obj/mibFrame.so .shobj/mibFrame.o .shobj/mibFrame.so: mibFrame.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibLabel.o .obj/mibLabel.so .shobj/mibLabel.o .shobj/mibLabel.so: mibLabel.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibList.o .obj/mibList.so .shobj/mibList.o .shobj/mibList.so: mibList.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibMenu.o .obj/mibMenu.so .shobj/mibMenu.o .shobj/mibMenu.so: mibMenu.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibRadioBox.o .obj/mibRadioBox.so .shobj/mibRadioBox.o .shobj/mibRadioBox.so: mibRadioBox.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibScale.o .obj/mibScale.so .shobj/mibScale.o .shobj/mibScale.so: mibScale.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibScrollBar.o .obj/mibScrollBar.so .shobj/mibScrollBar.o .shobj/mibScrollBar.so: mibScrollBar.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibTextBig.o .obj/mibTextBig.so .shobj/mibTextBig.o .shobj/mibTextBig.so: mibTextBig.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibTextBox.o .obj/mibTextBox.so .shobj/mibTextBox.o .shobj/mibTextBox.so: mibTextBox.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibToggle.o .obj/mibToggle.so .shobj/mibToggle.o .shobj/mibToggle.so: mibToggle.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h -.obj/mibload.o .obj/mibload.so .shobj/mibload.o .shobj/mibload.so: mibload.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i mibwidgets.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp deleted file mode 100644 index 0cecd771f5c..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibButton, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for Button */ -/*****************************************************************************/ - -mib_Widget *mib_create_Button(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Button *myres; - unsigned char *label_text; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - myres = (mib_Button *)ACE_OS::malloc(sizeof(mib_Button)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(7); - sprintf(temp->mib_class,"Button"); - temp->mib_class_num = MIB_BUTTON; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - - if (mib_fill == WDEFAULT) - { - myres->label = (char *)ACE_OS::malloc(strlen(label)+1); - strcpy(myres->label,label); - } - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - label_text = XmStringCreateLtoR(label, XmSTRING_DEFAULT_CHARSET); - - XtSetArg (args[n], XmNlabelString, label_text); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - temp->me = XtCreateManagedWidget(name, xmPushButtonWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WDEFAULT) - { - XmStringFree(label_text); - } - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_Button(mib_Widget *thisw) -{ - mib_Button *temp = (mib_Button *)thisw->myres; - - ACE_OS::free(temp->label); - ACE_OS::free(temp); -} - -void mib_save_Button(mib_Widget *thisw, FILE *fout) -{ - mib_Button *temp = (mib_Button *)thisw->myres; - - fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->label); -} - -void mib_code_gen_Button(mib_Widget *thisw, FILE *fout) -{ -} - -int mib_load_Button(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_Button *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[20]; - int n, got_line, vallen; - - myres = (mib_Button *)thisw->myres; - - got_line = mib_read_line(fin, res, val); - if (!got_line) - return 0; - - if (!strcmp(res,"label")) - { - vallen =ACE_OS::strlen (val); - if (vallen < 2) - return 0; - val[vallen-1] = '\0'; - myres->label = (char *)ACE_OS::malloc(vallen-1); - sprintf(myres->label,"%s",&(val[1])); - - label_text = XmStringCreateLtoR(myres->label, XmSTRING_DEFAULT_CHARSET); - - n = 0; - XtSetArg (args[n], XmNlabelString, label_text); n++; - XtSetValues(thisw->me, args, n); - - XmStringFree(label_text); - - } - else - return 0; - - got_line = mib_read_line(fin, res, val); - if (!got_line) - return 0; - - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp deleted file mode 100644 index c9e47b61e65..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibDrawArea, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for DrawingArea */ -/*****************************************************************************/ - -mib_Widget *mib_create_DrawingArea(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_DrawingArea *myres; - Widget wtemp; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - myres = (mib_DrawingArea *)ACE_OS::malloc(sizeof(mib_DrawingArea)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(12); - sprintf(temp->mib_class,"DrawingArea"); - temp->mib_class_num = MIB_DRAWINGAREA; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->nothing = 0; - - /* create Xt widget */ - - - n = 0; - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNbackground, WhitePixel(dpy, DefaultScreen(dpy))); n++; - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - temp->me = XtCreateManagedWidget(name, xmDrawingAreaWidgetClass, - temp->parent->me, args, n); - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_DrawingArea(mib_Widget *thisw) -{ - mib_DrawingArea *temp = (mib_DrawingArea *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_DrawingArea(mib_Widget *thisw, FILE *fout) -{ -} - -int mib_load_DrawingArea(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp deleted file mode 100644 index 0323daba556..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibFrame, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for Frames */ -/*****************************************************************************/ - -mib_Widget *mib_create_Frame(mib_Widget *parent, char *name, char *frame_type, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Frame *myres; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_Frame *)ACE_OS::malloc(sizeof(mib_Frame)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(6); - sprintf(temp->mib_class,"Frame"); - temp->mib_class_num = MIB_FRAME; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->shadowtype = 0; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - - if (mib_fill == WDEFAULT) - if (!strcmp("InFrame",frame_type)) - { - XtSetArg (args[n], XmNshadowType, XmSHADOW_IN); n++; - } - else - if (!strcmp("OutFrame",frame_type)) - { - XtSetArg (args[n], XmNshadowType, XmSHADOW_OUT); n++; - myres->shadowtype = 1; - } - else - if (!strcmp("EtchedInFrame",frame_type)) - { - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++; - myres->shadowtype = 2; - } - else - if (!strcmp("EtchedOutFrame",frame_type)) - { - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_OUT); n++; - myres->shadowtype = 3; - } - - temp->me = XtCreateManagedWidget(name, xmFrameWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_Frame(mib_Widget *thisw) -{ - mib_Frame *temp = (mib_Frame *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_Frame(mib_Widget *thisw, FILE *fout) -{ - mib_Frame *temp = (mib_Frame *)thisw->myres; - - fprintf(fout,"shadowtype: %d\\n\\\n", temp->shadowtype); -} - -int mib_load_Frame(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_Frame *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[5]; - int n; - - myres = (mib_Frame *)thisw->myres; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"shadowtype")) - { - sscanf(val,"%d",&(myres->shadowtype)); - - n = 0; - switch (myres->shadowtype) { - case 0: - XtSetArg (args[n], XmNshadowType, XmSHADOW_IN); n++; - break; - case 1: - XtSetArg (args[n], XmNshadowType, XmSHADOW_OUT); n++; - break; - case 2: - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++; - break; - case 3: - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_OUT); n++; - break; - default: - break; - } - XtSetValues(thisw->me, args, n); - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp deleted file mode 100644 index 855c58d5a0a..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibLabel, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for Label */ -/*****************************************************************************/ - -mib_Widget *mib_create_Label(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Label *myres; - unsigned char *label_text; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_Label *)ACE_OS::malloc(sizeof(mib_Label)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(6); - sprintf(temp->mib_class,"Label"); - temp->mib_class_num = MIB_LABEL; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - - if (mib_fill == WDEFAULT) - { - myres->label = (char *)ACE_OS::malloc(strlen(label)+1); - strcpy(myres->label,label); - } - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - label_text = XmStringCreateLtoR(label, XmSTRING_DEFAULT_CHARSET); - - XtSetArg (args[n], XmNlabelString, label_text); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - temp->me = XtCreateManagedWidget(name, xmLabelWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WDEFAULT) - XmStringFree(label_text); - - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_Label(mib_Widget *thisw) -{ - mib_Label *temp = (mib_Label *)thisw->myres; - - ACE_OS::free(temp->label); - ACE_OS::free(temp); -} - -void mib_save_Label(mib_Widget *thisw, FILE *fout) -{ - mib_Label *temp = (mib_Label *)thisw->myres; - - fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->label); -} - -int mib_load_Label(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_Label *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[5]; - int n, vallen; - - myres = (mib_Label *)thisw->myres; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"label")) - { - vallen =ACE_OS::strlen (val); - if (vallen < 2) - return 0; - val[vallen-1] = '\0'; - myres->label = (char *)ACE_OS::malloc(vallen-1); - sprintf(myres->label,"%s",&(val[1])); - label_text = XmStringCreateLtoR(myres->label, XmSTRING_DEFAULT_CHARSET); - - n = 0; - XtSetArg (args[n], XmNlabelString, label_text); n++; - XtSetValues(thisw->me, args, n); - - XmStringFree(label_text); - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp deleted file mode 100644 index 63c72635b66..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibList, "$Id$") - -extern Display *dpy; -extern GC mib_gc; -static Widget real_list; - -/* Code for Lists */ -/*****************************************************************************/ - -mib_Widget *mib_create_List(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_List *myres; - Widget wtemp; - unsigned char *label_text; - char ttext[30]; - Arg args[20]; - String myname; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_List *)ACE_OS::malloc(sizeof(mib_List)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(5); - sprintf(temp->mib_class,"List"); - temp->mib_class_num = MIB_LIST; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy); n++; - } - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++; - - temp->me = XtCreateManagedWidget(name, xmFrameWidgetClass, - temp->parent->me, args, n); - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNorientation, XmVERTICAL); n++; - - if (mib_fill == WEMPTY) - { - XtSetArg (args[n], XmNlistSizePolicy, XmCONSTANT); n++; - } - - wtemp = XmCreateScrolledList(temp->me, name, args, n); - myres->real_list = wtemp; - real_list = wtemp; - - XtManageChild(wtemp); - - if (mib_fill != WEMPTY) - real_list = NULL; - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - label_text = XmStringCreateLtoR("Simple", XmSTRING_DEFAULT_CHARSET); - XmListAddItem(wtemp, label_text, 0); - XmStringFree(label_text); - label_text = XmStringCreateLtoR("List", XmSTRING_DEFAULT_CHARSET); - XmListAddItem(wtemp, label_text, 0); - XmStringFree(label_text); - for (n=0;n<200;n++) - { - sprintf(ttext,"Item %d ",n); - label_text = XmStringCreateLtoR(ttext, XmSTRING_DEFAULT_CHARSET); - XmListAddItem(wtemp, label_text, 0); - XmStringFree(label_text); - } - - mib_apply_eventhandlers(temp->me, temp); - mib_apply_eventhandlers(wtemp, temp); - } - - return temp; -} - -void mib_delete_List(mib_Widget *thisw) -{ - mib_List *temp = (mib_List *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_List(mib_Widget *thisw, FILE *fout) -{ -} - -int mib_load_List(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - - - if (real_list) - thisw->me = real_list; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp deleted file mode 100644 index ae5d4490305..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibMenu, "$Id$") - -extern Display *dpy; -extern GC mib_gc; -static int delhandler; /* delay adding event handler until menu - is actually created */ - -/* Code for Menu */ -/*****************************************************************************/ - -mib_Widget *mib_create_Menu(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Menu *myres; - Widget wtemp; - char label_temp[50]; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_Menu *)ACE_OS::malloc(sizeof(mib_Menu)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(8); - sprintf(temp->mib_class,"Menu"); - temp->mib_class_num = MIB_MENU; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 0; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->numitems = 0; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - } - XtSetArg (args[n], XmNrubberPositioning, False); n++; - - temp->me = XtCreateManagedWidget(name, xmRowColumnWidgetClass, - temp->parent->me, args, n); - - n = 0; - - delhandler = 1; - if (mib_fill == WDEFAULT) - { - delhandler = 0; - myres->numitems = 3; - myres->my_menu = (MenuItem *)ACE_OS::malloc(sizeof(MenuItem) * (myres->numitems+1)); - myres->items = (Widget *)ACE_OS::malloc(sizeof(Widget) * myres->numitems); - sprintf(label_temp, "Item 1"); - myres->my_menu[0].label = (char *)ACE_OS::malloc(strlen(label_temp)+1); - strcpy(myres->my_menu[0].label,label_temp); - myres->my_menu[0].wclass = &xmPushButtonGadgetClass; - myres->my_menu[0].mnemonic = '1'; - myres->my_menu[0].accelerator = NULL; - myres->my_menu[0].accel_text = NULL; - myres->my_menu[0].accel_text = NULL; - myres->my_menu[0].callback = NULL; - myres->my_menu[0].callback_data = NULL; - myres->my_menu[0].subitems = (struct _menu_item *)1; - - sprintf(label_temp, "Item 2"); - myres->my_menu[1].label = (char *)ACE_OS::malloc(strlen(label_temp)+1); - strcpy(myres->my_menu[1].label,label_temp); - myres->my_menu[1].wclass = &xmPushButtonGadgetClass; - myres->my_menu[1].mnemonic = '2'; - myres->my_menu[1].accelerator = NULL; - myres->my_menu[1].accel_text = NULL; - myres->my_menu[1].accel_text = NULL; - myres->my_menu[1].callback = NULL; - myres->my_menu[1].callback_data = NULL; - myres->my_menu[1].subitems = (struct _menu_item *)1; - - sprintf(label_temp, "Item 3"); - myres->my_menu[2].label = (char *)ACE_OS::malloc(strlen(label_temp)+1); - strcpy(myres->my_menu[2].label,label_temp); - myres->my_menu[2].wclass = &xmPushButtonGadgetClass; - myres->my_menu[2].mnemonic = '2'; - myres->my_menu[2].accelerator = NULL; - myres->my_menu[2].accel_text = NULL; - myres->my_menu[2].accel_text = NULL; - myres->my_menu[2].callback = NULL; - myres->my_menu[2].callback_data = NULL; - myres->my_menu[2].subitems = (struct _menu_item *)1; - - myres->my_menu[3].label = NULL; - - wtemp = BuildMenu(temp->me, XmMENU_OPTION, NULL, 'M', myres->my_menu); - XtManageChild(wtemp); - } - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - - /* default menu */ - - if (!delhandler) - { - mib_apply_eventhandlers(wtemp, temp); - mib_apply_eventhandlers(temp->me, temp); - } - } - - if (mib_fill == WEMPTY) - delhandler = 0; - - return temp; -} - -void mib_delete_Menu(mib_Widget *thisw) -{ - mib_Menu *temp = (mib_Menu *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_Menu(mib_Widget *thisw, FILE *fout) -{ - mib_Menu *temp = (mib_Menu *)thisw->myres; - int count; - - fprintf(fout, "numitems: %d\\n\\\n", temp->numitems); - - for (count=0; count < temp->numitems; count++) - { - fprintf(fout, "item: \\\"%s\\\"\\n\\\n", temp->my_menu[count].label); - } - -} - -int mib_load_Menu(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - int count, vallen; - Widget wtemp; - mib_Menu *myres = (mib_Menu *)thisw->myres; - - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res, "numitems")) - { - myres->numitems = 0; - sscanf(val, "%d", &(myres->numitems)); - if (!(myres->numitems)) - return 0; - - myres->my_menu = (MenuItem *)ACE_OS::malloc(sizeof(MenuItem) * (myres->numitems+1)); - myres->items = (Widget *)ACE_OS::malloc(sizeof(Widget) * myres->numitems); - for (count = 0; count < myres->numitems; count++) - { - if (!mib_read_line(fin, res, val)) - return 0; - vallen =ACE_OS::strlen (val); - if (vallen < 2) - return 0; - val[vallen-1] = '\0'; - myres->my_menu[count].label = (char *)ACE_OS::malloc(vallen-1); - sprintf(myres->my_menu[count].label, "%s", &(val[1])); - myres->my_menu[count].wclass = &xmPushButtonGadgetClass; - myres->my_menu[count].mnemonic = NULL; - myres->my_menu[count].accelerator = NULL; - myres->my_menu[count].accel_text = NULL; - myres->my_menu[count].accel_text = NULL; - myres->my_menu[count].callback = NULL; - myres->my_menu[count].callback_data = NULL; - myres->my_menu[count].subitems = (struct _menu_item *)1; - } - myres->my_menu[myres->numitems].label = NULL; - - wtemp = BuildMenu(thisw->me, XmMENU_OPTION, NULL, NULL, myres->my_menu); - XtManageChild(wtemp); - - if (delhandler) - { - mib_apply_eventhandlers(wtemp, thisw); - mib_apply_eventhandlers(thisw->me, thisw); - } - else - thisw->me = wtemp; - - for (count = 0; count < myres->numitems; count++) - { - /* thisw hack extracts the widget for each item in the menu - for possible use by the programmer */ - myres->items[count] = (Widget)(myres->my_menu[count].subitems); - } - - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp deleted file mode 100644 index a341abf2667..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibRadioBox, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for RadioBox */ -/*****************************************************************************/ - -mib_Widget *mib_create_RadioBox(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_RadioBox *myres; - Widget wtemp; - unsigned char *label_text; - char label_temp[50]; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_RadioBox *)ACE_OS::malloc(sizeof(mib_RadioBox)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(9); - sprintf(temp->mib_class,"RadioBox"); - temp->mib_class_num = MIB_RADIOBOX; - - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 0; - - /* initialize private resources */ - - temp->myres = (void *)myres; - - myres->numlabel = 0; - - if (mib_fill == WDEFAULT) - { - myres->numlabel = 2; - myres->labels = (char **)ACE_OS::malloc(10); - myres->buttons = (Widget *)ACE_OS::malloc(sizeof(Widget) * myres->numlabel); - sprintf(label_temp, "Radio 1"); - myres->labels[0] = (char *)ACE_OS::malloc(strlen(label_temp)+1); - strcpy(myres->labels[0],label_temp); - sprintf(label_temp, "Radio 2"); - myres->labels[1] = (char *)ACE_OS::malloc(strlen(label_temp)+1); - strcpy(myres->labels[1],label_temp); - } - - - /* create Xt widget */ - - n = 0; - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - temp->me = XmCreateRadioBox(temp->parent->me, "Radio", args, n); - wtemp = temp->me; - - - if (mib_fill == WDEFAULT) - { - n = 0; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - XtCreateManagedWidget("Radio 1", xmToggleButtonGadgetClass, - wtemp, args, n); - - n = 0; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - XtCreateManagedWidget("Radio 2", xmToggleButtonGadgetClass, - wtemp, args, n); - } - - - XtManageChild(wtemp); - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_RadioBox(mib_Widget *thisw) -{ - mib_RadioBox *temp = (mib_RadioBox *)thisw->myres; - int count; - - for (count=0; count < temp->numlabel; count++) - ACE_OS::free(temp->labels[count]); - - ACE_OS::free(temp); -} - -void mib_save_RadioBox(mib_Widget *thisw, FILE *fout) -{ - mib_RadioBox *temp = (mib_RadioBox *)thisw->myres; - int count; - - fprintf(fout,"numlabel: %d\\n\\\n", temp->numlabel); - - for (count=0; count < temp->numlabel; count++) - { - fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->labels[count]); - } -} - -int mib_load_RadioBox(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - int count, vallen, n; - Arg args[5]; - mib_RadioBox *myres; - - myres = (mib_RadioBox *)thisw->myres; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"numlabel")) - { - myres->numlabel = 0; - sscanf(val,"%d",&(myres->numlabel)); - if (!(myres->numlabel)) - return 0; - - myres->labels = (char **)ACE_OS::malloc((myres->numlabel+1)*4); - myres->buttons = (Widget *)ACE_OS::malloc(sizeof(Widget)*(myres->numlabel)); - for (count=0; count < myres->numlabel; count++) - { - if (!mib_read_line(fin, res, val)) - return 0; - vallen =ACE_OS::strlen (val); - if (vallen < 2) - return 0; - val[vallen-1] = '\0'; - myres->labels[count] = (char *)ACE_OS::malloc(vallen-1); - sprintf(myres->labels[count],"%s",&(val[1])); - - n = 0; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - myres->buttons[count] = XtCreateManagedWidget(myres->labels[count], - xmToggleButtonGadgetClass, thisw->me, args, n); - - } - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp deleted file mode 100644 index 68a4d125c58..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibScale, "$Id$") - -extern Display *dpy; -extern GC mib_gc; -static int scaleflag; - -/* Code for Scale */ -/*****************************************************************************/ - -mib_Widget *mib_create_Scale(mib_Widget *parent, char *name, char *orient, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Scale *myres; - Arg args[20]; - int n; - - - scaleflag = 0; - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_Scale *)ACE_OS::malloc(sizeof(mib_Scale)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(10); - sprintf(temp->mib_class,"Scale"); - temp->mib_class_num = MIB_SCALE; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->orientation = 0; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - - - if (mib_fill == WDEFAULT) - if (!strcmp("VertScale",orient)) - { - XtSetArg (args[n], XmNorientation, XmVERTICAL); n++; - } - else - if (!strcmp("HorzScale",orient)) - { - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - myres->orientation = 1; - } - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNshowArrows, False); n++; - XtSetArg (args[n], XmNsliderSize, 30); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - temp->me = XtCreateManagedWidget(name, xmScrollBarWidgetClass, - temp->parent->me, args, n); - else - temp->me = XtCreateManagedWidget(name, xmScaleWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WEMPTY) - scaleflag = 1; - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_Scale(mib_Widget *thisw) -{ - mib_Scale *temp = (mib_Scale *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_Scale(mib_Widget *thisw, FILE *fout) -{ - mib_Scale *temp = (mib_Scale *)thisw->myres; - - fprintf(fout,"orientation: %d\\n\\\n", temp->orientation); -} - -int mib_load_Scale(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_Scale *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[5]; - int n; - Dimension myht,mywd; - - - myres = (mib_Scale *)thisw->myres; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"orientation")) - { - sscanf(val,"%d",&(myres->orientation)); - - n = 0; - if (scaleflag) - { - if (!myres->orientation) - { - XtSetArg (args[n], XmNscaleWidth, thisw->width); n++; - } - else - { - XtSetArg (args[n], XmNscaleWidth, thisw->height); n++; - } - - XtSetValues(thisw->me, args, n); - - } - - n = 0; - switch (myres->orientation) { - case 0: - XtSetArg (args[n], XmNorientation, XmVERTICAL); n++; - break; - case 1: - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - break; - default: - break; - } - XtSetValues(thisw->me, args, n); - - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp deleted file mode 100644 index 168f86ae391..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibScrollBar, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for ScrollBars */ -/*****************************************************************************/ - -mib_Widget *mib_create_ScrollBar(mib_Widget *parent, char *name, char *orient, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_ScrollBar *myres; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_ScrollBar *)ACE_OS::malloc(sizeof(mib_ScrollBar)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(10); - sprintf(temp->mib_class,"ScrollBar"); - temp->mib_class_num = MIB_SCROLLBAR; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->orientation = 0; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - - if (mib_fill == WDEFAULT) - if (!strcmp("VertScrollBar",orient)) - { - XtSetArg (args[n], XmNorientation, XmVERTICAL); n++; - } - else - if (!strcmp("HorzScrollBar",orient)) - { - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - myres->orientation = 1; - } - - temp->me = XtCreateManagedWidget(name, xmScrollBarWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_ScrollBar(mib_Widget *thisw) -{ - mib_ScrollBar *temp = (mib_ScrollBar *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_ScrollBar(mib_Widget *thisw, FILE *fout) -{ - mib_ScrollBar *temp = (mib_ScrollBar *)thisw->myres; - - fprintf(fout,"orientation: %d\\n\\\n", temp->orientation); -} - -int mib_load_ScrollBar(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_ScrollBar *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[5]; - int n; - - myres = (mib_ScrollBar *)thisw->myres; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"orientation")) - { - sscanf(val,"%d",&(myres->orientation)); - - n = 0; - switch (myres->orientation) { - case 0: - XtSetArg (args[n], XmNorientation, XmVERTICAL); n++; - break; - case 1: - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - break; - default: - break; - } - XtSetValues(thisw->me, args, n); - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp deleted file mode 100644 index 26a085371cd..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibTextBig, "$Id$") - -extern Display *dpy; -extern GC mib_gc; -static Widget real_text; - -/* Code of TextBig */ -/*****************************************************************************/ - -mib_Widget *mib_create_TextBig(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_TextBig *myres; - Widget wtemp; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_TextBig *)ACE_OS::malloc(sizeof(mib_TextBig)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(8); - sprintf(temp->mib_class,"TextBig"); - temp->mib_class_num = MIB_TEXTBIG; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->nothing = 0; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - } - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++; - - temp->me = XtCreateManagedWidget(name, xmFrameWidgetClass, - temp->parent->me, args, n); - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - XtSetArg (args[n], XmNrows, 200); n++; - XtSetArg (args[n], XmNcolumns, 200); n++; - } - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNeditMode, XmMULTI_LINE_EDIT); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - wtemp = XmCreateScrolledText(temp->me, name, args, n); - real_text = wtemp; - - XtManageChild(wtemp); - - if (mib_fill != WEMPTY) - real_text = NULL; - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - XmTextSetString(wtemp,"Big Text Field\nwith Scrollbars\n\n\n\n\n\n\n "); - - mib_apply_eventhandlers(wtemp, temp); - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_TextBig(mib_Widget *thisw) -{ - mib_TextBig *temp = (mib_TextBig *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_TextBig(mib_Widget *thisw, FILE *fout) -{ -} - -int mib_load_TextBig(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - - if (real_text) - thisw->me = real_text; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp deleted file mode 100644 index bee0af42fef..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibTextBox, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for TextBox */ -/*****************************************************************************/ - -mib_Widget *mib_create_TextBox(mib_Widget *parent, char *name, char *contents, - int posx, int posy, int width, int height, - int mib_fill) -{ - mib_Widget *temp; - mib_TextBox *myres; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - myres = (mib_TextBox *)ACE_OS::malloc(sizeof(mib_TextBox)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(8); - sprintf(temp->mib_class,"TextBox"); - temp->mib_class_num = MIB_TEXTBOX; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->init_contents = NULL; - - if (mib_fill == WDEFAULT) - { - if (contents != NULL) - { - myres->init_contents = (char *)ACE_OS::malloc(strlen(contents)+1); - strcpy(myres->init_contents, contents); - } - } - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - temp->me = XtCreateManagedWidget(name, xmTextFieldWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - XmTextFieldSetString(temp->me, "Text Field"); - - } - - return temp; -} - -void mib_delete_TextBox(mib_Widget *thisw) -{ - mib_TextBox *temp = (mib_TextBox *)thisw->myres; - - if (temp->init_contents != NULL) - ACE_OS::free(temp->init_contents); -} - -void mib_save_TextBox(mib_Widget *thisw, FILE *fout) -{ -} - -int mib_load_TextBox(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"EndWidget.")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp deleted file mode 100644 index fdae77499c6..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibToggle, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for Toggle */ -/*****************************************************************************/ - -mib_Widget *mib_create_Toggle(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Toggle *myres; - unsigned char *label_text; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_Toggle *)ACE_OS::malloc(sizeof(mib_Toggle)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(7); - sprintf(temp->mib_class,"Toggle"); - temp->mib_class_num = MIB_TOGGLE; - temp->width = 0 /*width*/; - temp->height = 0 /*height*/; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 0; - - /* initialize private resources */ - - temp->myres = (void *)myres; - - myres->isize = 0; - if (mib_fill == WDEFAULT) - { - myres->label = (char *)ACE_OS::malloc(strlen(label)+1); - strcpy(myres->label,label); - } - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - label_text = XmStringCreateLtoR(label, XmSTRING_DEFAULT_CHARSET); - - XtSetArg (args[n], XmNlabelString, label_text); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; -/* XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++;*/ - } - - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - XtSetArg (args[n], XmNspacing, 4); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNindicatorType, XmN_OF_MANY); - - temp->me = XtCreateManagedWidget(name, xmToggleButtonWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WDEFAULT) - { - XmStringFree(label_text); - } - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_Toggle(mib_Widget *thisw) -{ - mib_Toggle *temp = (mib_Toggle *)thisw->myres; - - ACE_OS::free(temp->label); - ACE_OS::free(temp); -} - -void mib_save_Toggle(mib_Widget *thisw, FILE *fout) -{ - mib_Toggle *temp = (mib_Toggle *)thisw->myres; - - fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->label); - fprintf(fout,"indicatorSize: %d\\n\\\n", temp->isize); -} - -int mib_load_Toggle(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_Toggle *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[20]; - int n, got_line, vallen; - - myres = (mib_Toggle *)thisw->myres; - - got_line = mib_read_line(fin, res, val); - if (!got_line) - return 0; - - if (!strcmp(res,"label")) - { - vallen =ACE_OS::strlen (val); - if (vallen < 2) - return 0; - val[vallen-1] = '\0'; - myres->label = (char *)ACE_OS::malloc(vallen-1); - sprintf(myres->label,"%s",&(val[1])); - - label_text = XmStringCreateLtoR(myres->label, XmSTRING_DEFAULT_CHARSET); - - n = 0; - XtSetArg (args[n], XmNlabelString, label_text); n++; - thisw->width = 0; - thisw->height = 0; - XtSetArg (args[n], XmNwidth, thisw->width); n++; - XtSetArg (args[n], XmNheight, thisw->height); n++; - XtSetValues(thisw->me, args, n); - XmStringFree(label_text); - - } - else - return 0; - - got_line = mib_read_line(fin, res, val); - if (!got_line) - return 0; - - if (!strcmp(res, "indicatorSize")) - { - sscanf(val, "%d", &(myres->isize)); - if (myres->isize) - XtVaSetValues(thisw->me, XmNindicatorSize, (Dimension)myres->isize, - XmNmarginBottom, 0, XmNmarginTop, 0, XmNmarginLeft, 0, - XmNmarginRight, 0, XmNspacing, 0, NULL); - got_line = mib_read_line(fin, res, val); - if (!got_line) - return 0; - } - - if (ACE_OS::strcmp (res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp deleted file mode 100644 index 39b27581451..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp +++ /dev/null @@ -1,804 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibload, "$Id$") - -mib_Widget *mib_root_Widget; -Display *dpy; -GC mib_gc; -static struct _mib_event_handle_funcs { -#ifdef __cplusplus - void (*mib_pick_mib_Widget)( Widget, XtPointer, - XEvent *, Boolean * ); - void (*mib_move_mib_Widget)( Widget, XtPointer, - XEvent *, Boolean *); - void (*mib_unpick_mib_Widget)( Widget, XtPointer, - XEvent *, Boolean * ); -#else - void (*mib_pick_mib_Widget)(/* Widget, XtPointer, - XButtonPressedEvent *, Boolean * */); - void (*mib_move_mib_Widget)(/* Widget, XtPointer, - XPointerMovedEvent *, Boolean * */); - void (*mib_unpick_mib_Widget)(/* Widget, XtPointer, - XButtonReleasedEvent *, Boolean * */); -#endif -} mib_events; - -mib_widget_funcs mwfuncs[] = -{ - { NULL, NULL, NULL, NULL, NULL }, - { "TextBox", mib_create_TextBox, mib_delete_TextBox, - mib_save_TextBox, mib_load_TextBox}, - { "Button", mib_create_Button, mib_delete_Button, - mib_save_Button, mib_load_Button}, - { "Toggle", mib_create_Toggle, mib_delete_Toggle, - mib_save_Toggle, mib_load_Toggle}, - { "RadioBox", mib_create_RadioBox, mib_delete_RadioBox, - mib_save_RadioBox, mib_load_RadioBox}, - { "DrawingArea", mib_create_DrawingArea, mib_delete_DrawingArea, - mib_save_DrawingArea, mib_load_DrawingArea}, - { "Label", mib_create_Label, mib_delete_Label, - mib_save_Label, mib_load_Label}, - { "Frame", mib_create_Frame, mib_delete_Frame, - mib_save_Frame, mib_load_Frame}, - { "ScrollBar", mib_create_ScrollBar, mib_delete_ScrollBar, - mib_save_ScrollBar, mib_load_ScrollBar}, - { "TextBig", mib_create_TextBig, mib_delete_TextBig, - mib_save_TextBig, mib_load_TextBig}, - { "List", mib_create_List, mib_delete_List, - mib_save_List, mib_load_List}, - { "Scale", mib_create_Scale, mib_delete_Scale, - mib_save_Scale, mib_load_Scale}, - { "Menu", mib_create_Menu, mib_delete_Menu, - mib_save_Menu, mib_load_Menu}, - { NULL, NULL, NULL, NULL, NULL }, -}; - -/*****************************************************************************/ - -void mib_add_mib_Widget(mib_Widget *thisw, mib_Widget *parent) -{ - mib_Widget *tmp; - - if (parent->child == NULL) - { - parent->child = thisw; - thisw->prev = parent; - thisw->parent = parent; - thisw->sibling = NULL; - thisw->child = NULL; - } - else - { - tmp = parent->child; - while (tmp->sibling != NULL) - tmp = tmp->sibling; - tmp->sibling = thisw; - thisw->prev = tmp; - thisw->parent = parent; - thisw->sibling = NULL; - thisw->child = NULL; - } -} - -/*****************************************************************************/ - -void mib_add_backward(mib_Widget *thisw, mib_Widget *parent) -{ - mib_Widget *tmp; - - if (parent->child == NULL) - { - parent->child = thisw; - thisw->prev = parent; - thisw->parent = parent; - thisw->sibling = NULL; - thisw->child = NULL; - } - else - { - tmp = parent->child; - parent->child = thisw; - thisw->prev = parent; - thisw->parent = parent; - thisw->sibling = tmp; - thisw->child = NULL; - tmp->prev = thisw; - } -} - -/*****************************************************************************/ - -void mib_remove_mib_Widget(mib_Widget *thisw) -{ - int count; - mib_Widget *pnt; - - XtVaSetValues(mib_root_Widget->me, XmNresizePolicy, XmRESIZE_NONE, NULL); - XtDestroyWidget(thisw->me); - - while (thisw->child != NULL) - mib_remove_mib_Widget(thisw->child); - - if (thisw->parent == thisw) - { - mib_clear_myres(thisw); - return; - } - - if (thisw->prev == thisw->parent) - { - thisw->parent->child = thisw->sibling; - if (thisw->sibling != NULL) - thisw->sibling->prev = thisw->parent; - } - else - { - thisw->prev->sibling = thisw->sibling; - if (thisw->sibling != NULL) - thisw->sibling->prev = thisw->prev; - } - - mib_clear_myres(thisw); -} - -/*****************************************************************************/ - -void mib_clear_myres(mib_Widget *thisw) -{ - ACE_OS::free(thisw->mib_class); - ACE_OS::free(thisw->name); - - if ((thisw->mib_class_num < 1) || (thisw->mib_class_num > MI_NUMCLASSES)) - return; - - mwfuncs[thisw->mib_class_num].mib_delete(thisw); - ACE_OS::free(thisw); -} - -/*****************************************************************************/ - -mib_Widget *mib_new_mib_Widget() -{ - mib_Widget *thisw; - thisw = (mib_Widget *)ACE_OS::malloc(sizeof(mib_Widget)); - thisw->me = NULL; - thisw->mib_class_num = MIB_NULL; - thisw->mib_selected = 0; - thisw->mib_resizing = 0; - thisw->myres = NULL; - thisw->parent = NULL; - thisw->sibling = NULL; - thisw->prev = NULL; - thisw->child = NULL; - thisw->width = 0; - thisw->height = 0; - thisw->topAttachment = 0; - thisw->bottomAttachment = 0; - thisw->leftAttachment = 0; - thisw->rightAttachment = 0; - thisw->topOffset = 0; - thisw->bottomOffset = 0; - thisw->leftOffset = 0; - thisw->rightOffset = 0; - - return thisw; -} - -/*****************************************************************************/ - -mib_Widget *mib_find_name(mib_Widget *temp, char *name) -{ - mib_Widget *child = temp->child; - mib_Widget *ret = NULL; - - if (!strcmp(temp->name, name)) - return temp; - - if (child != NULL) - if (ret = mib_find_name(child, name)) - return ret; - - child = temp->sibling; - if (child != NULL) - if (ret = mib_find_name(child, name)) - return ret; - - return NULL; -} - -/*****************************************************************************/ - -Widget -BuildMenu(Widget parent, int menu_type, char *menu_title, char menu_mnemonic, - MenuItem *items) -{ - Widget menu, cascade, widget; - int i; - XmString str; - - if (menu_type == XmMENU_PULLDOWN || menu_type == XmMENU_OPTION) - menu = XmCreatePulldownMenu(parent, "_pulldown", NULL, 0); - else if (menu_type == XmMENU_POPUP) - menu = XmCreatePopupMenu(parent, "_popup", NULL, 0); - else { - XtWarning("Invalid menu type passed to BuildMenu()"); - return NULL; - } - - /* Pulldown menus require a cascade button to be made */ - if (menu_type == XmMENU_PULLDOWN) { - str = XmStringCreateSimple(menu_title); - cascade = XtVaCreateManagedWidget(menu_title, - xmCascadeButtonGadgetClass, parent, - XmNsubMenuId, menu, - XmNlabelString, str, - XmNmnemonic, menu_mnemonic, - NULL); - XmStringFree(str); - } else if (menu_type == XmMENU_OPTION) { - /* Option menus are a special case, but not hard to handle */ - Arg args[2]; - str = XmStringCreateSimple(menu_title); - XtSetArg(args[0], XmNsubMenuId, menu); - XtSetArg(args[1], XmNlabelString, str); - /* This really isn't a cascade, but thisw is the widget handle - * we're going to return at the end of the function. - */ - cascade = XmCreateOptionMenu(parent, menu_title, args, 2); - XmStringFree(str); - } - - /* Now add the menu items */ - for (i = 0; items[i].label != NULL; i++) { - /* If subitems exist, create the pull-right menu by calling thisw - * function recursively. Since the function returns a cascade - * button, the widget returned is used.. - */ - if (items[i].subitems) - if (menu_type == XmMENU_OPTION) { - widget = XtVaCreateManagedWidget(items[i].label, - *items[i].wclass, menu, NULL); - items[i].subitems = (struct _menu_item *) widget; - /* daeron mod (tm) :-) ... we now use thisw to pass back each - widget we create to the mibMenu functions so that it can - be stored as part of the mibMenu structure */ - - /* XtWarning("You can't have submenus from option menu items."); - continue;*/ - } else - widget = BuildMenu(menu, XmMENU_PULLDOWN, - items[i].label, items[i].mnemonic, items[i].subitems); - else - { - widget = XtVaCreateManagedWidget(items[i].label, - *items[i].wclass, menu, - NULL); - /* ditto here from above ... - Daeron mod (tm) */ - items[i].subitems = (struct _menu_item *) widget; - } - - /* Whether the item is a real item or a cascade button with a - * menu, it can still have a mnemonic. - */ - if (items[i].mnemonic) - XtVaSetValues(widget, XmNmnemonic, items[i].mnemonic, NULL); - - /* any item can have an accelerator, except cascade menus. But, - * we don't worry about that; we know better in our declarations. - */ - if (items[i].accelerator) { - str = XmStringCreateSimple(items[i].accel_text); - XtVaSetValues(widget, - XmNaccelerator, items[i].accelerator, - XmNacceleratorText, str, - NULL); - XmStringFree(str); - } - - if (items[i].callback) - XtAddCallback(widget, - (items[i].wclass == &xmToggleButtonWidgetClass || - items[i].wclass == &xmToggleButtonGadgetClass)? - XmNvalueChangedCallback : /* ToggleButton class */ - XmNactivateCallback, /* PushButton class */ - items[i].callback, items[i].callback_data); - } - - /* for popup menus, just return the menu; pulldown menus, return - * the cascade button; option menus, return the thing returned - * from XmCreateOptionMenu(). This isn't a menu, or a cascade button! - */ - return menu_type == XmMENU_POPUP? menu : cascade; -} - -/*****************************************************************************/ - -mib_Widget *mib_load_interface(Widget parent, char *from, int file_type) -{ - mib_Buffer thiswfile; - mib_Widget *thisw; - FILE *infile; - char *instring; - char ch; - - thiswfile.buf_type = file_type; - - dpy = XtDisplay(parent); - - if ((file_type == MI_FROMFILE) || (file_type == MI_EDITFROMFILE)) - { - if (!(infile = fopen(from,"r"))) - return NULL; - - ch = '\0'; - while ((ch != '\n')&&(!feof(infile))) /* throw away first line */ - ch = (char)fgetc(infile); - - thiswfile.buffer = (void *)infile; - thiswfile.point = 0; - - if (!mib_load_Root(parent, &thisw, &thiswfile)) - { - /* delete thisw */ - return NULL; - } - else - { - fclose(infile); - return thisw; - } - } - else - if ((file_type == MI_FROMSTRING) || (file_type == MI_EDITFROMSTRING)) - { - instring = from; - if (instring == NULL) - return NULL; - - thiswfile.buffer = (void *)instring; - thiswfile.buflen =ACE_OS::strlen (instring); - thiswfile.point = 0; - - if (!mib_load_Root(parent, &thisw, &thiswfile)) - { - /* delete thisw */ - return NULL; - } - else - return thisw; - } - else - return NULL; - -} - -/*****************************************************************************/ - -int mib_load_mib_class(mib_Widget **thisw, mib_Widget *parent, char *name, - char *iname, mib_Buffer *fin ) -{ - int namelen, editstate, count, set; - - if ((fin->buf_type == MI_EDITFROMFILE) || - (fin->buf_type == MI_EDITFROMSTRING)) - editstate = WEDIT; - else - editstate = WEMPTY; - - namelen =ACE_OS::strlen (name); - if (namelen < 2) - return 0; - - name[namelen-1] = '\0'; - name[0] = ' '; - - count = 1; - - while (mwfuncs[count].name) - { - if (!strcmp(&(name[1]), mwfuncs[count].name)) - { - *thisw = mwfuncs[count].mib_create(parent, iname, NULL, 0, 0, 0, 0, - editstate); - return 1; - } - count++; - } - - (*thisw)->parent = (*thisw); - return 1; -} - -/*****************************************************************************/ - -mib_Widget *mib_load_public(mib_Widget *root, mib_Widget *thisw, mib_Buffer *fin) -{ - int got_line, done; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - char valcp[MI_MAXSTRLEN]; - Arg args[20]; - int mynum, n; - - got_line = 1; - done = 0; - - /* thisw loop reads basic info about Widget */ - while (got_line && (!done)) - { - got_line = mib_read_line(fin, res, val); - if (!strcmp(res,"Ref")) - sscanf(val, "%d", &mynum); - else - if (!strcmp(res,"Widget")) - { - strcpy(valcp,val); - done = 1; - } - } - - done = 0; - - while (got_line && (!done)) - { - got_line = mib_read_line(fin, res, val); - if (!strcmp(res, "Children")) - n = 0; - else - if (!strcmp(res, "Parent")) /* don't support complete widget tree yet */ - n = 0; - else - if (!strcmp(res,"Public-")) - n = 0; - else - if (!strcmp(res,"Name")) - { - val[strlen(val)-1] = '\0'; - mib_load_mib_class(&thisw, root, valcp, &(val[1]), fin); - thisw->name = (char *)ACE_OS::malloc(strlen(val)); - sprintf(thisw->name,"%s",&(val[1])); - thisw->mib_mynum = mynum; - done = 1; - } - else - return 0; - } - - if (!got_line) - return NULL; - - done = 0; - - /* second loop reads public info */ - while (got_line && (!done)) - { - got_line = mib_read_line(fin, res, val); - if (!strcmp(res,"Xmwidth")) - sscanf(val,"%d",&(thisw->width)); - else - if (!strcmp(res,"Xmheight")) - sscanf(val,"%d",&(thisw->height)); - else - if (!strcmp(res,"XmtopAttachment")) - sscanf(val,"%d",&(thisw->topAttachment)); - else - if (!strcmp(res,"XmbottomAttachment")) - sscanf(val,"%d",&(thisw->bottomAttachment)); - else - if (!strcmp(res,"XmleftAttachment")) - sscanf(val,"%d",&(thisw->leftAttachment)); - else - if (!strcmp(res,"XmrightAttachment")) - sscanf(val,"%d",&(thisw->rightAttachment)); - else - if (!strcmp(res,"XmtopOffset")) - sscanf(val,"%d",&(thisw->topOffset)); - else - if (!strcmp(res,"XmbottomOffset")) - sscanf(val,"%d",&(thisw->bottomOffset)); - else - if (!strcmp(res,"XmleftOffset")) - sscanf(val,"%d",&(thisw->leftOffset)); - else - if (!strcmp(res,"XmrightOffset")) - sscanf(val,"%d",&(thisw->rightOffset)); - else - if (!strcmp(res,"Private-")) - done = 1; - } - - n = 0; - if ((fin->buf_type == MI_EDITFROMFILE) || - (fin->buf_type == MI_EDITFROMSTRING)) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, thisw->leftOffset); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, thisw->topOffset); n++; - if (thisw == root) - { - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNrightOffset, thisw->rightOffset); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomOffset, thisw->bottomOffset); n++; - } - } - else - { - if (thisw->leftAttachment) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, thisw->leftOffset);n++; - } - if (thisw->topAttachment) - { - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, thisw->topOffset);n++; - } - if (thisw->bottomAttachment) - { - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomOffset, thisw->bottomOffset);n++; - } - if (thisw->rightAttachment) - { - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNrightOffset, thisw->rightOffset);n++; - } - } - - XtSetArg (args[n], XmNwidth, thisw->width); n++; - XtSetArg (args[n], XmNheight, thisw->height); n++; - - XtSetValues(thisw->me, args, n); - - return thisw; -} - -/*****************************************************************************/ - -int mib_load_private(mib_Widget *thisw, mib_Buffer *fin) -{ - - if (thisw->mib_class_num == MIB_NULL) - return 1; - - if ((thisw->mib_class_num < 1) || (thisw->mib_class_num > MI_NUMCLASSES)) - return 0; - - mwfuncs[thisw->mib_class_num].mib_load(thisw, fin); - - return 1; -} - -/*****************************************************************************/ - -int mib_load_Root(Widget parent, mib_Widget **thisw, mib_Buffer *fin) -{ - - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - char name[MI_MAXSTRLEN]; - int num_widgets, count, n, got_line; - Arg args[20]; - XGCValues gcvals; - XtGCMask val_mask; - mib_Widget *temp; - - got_line = mib_read_line(fin, res, val); - if (!strcmp(res,"TotalWidgets")) - sscanf(val, "%d", &num_widgets); - else - return 0; - - (*thisw) = mib_new_mib_Widget(); - (*thisw)->mib_class = (char*)ACE_OS::malloc(9); - sprintf((*thisw)->mib_class,"RootForm"); - -/* (*thisw)->me = XmCreateForm(parent, "MainForm", args, 0); */ - - (*thisw)->me = parent; - - if (!mib_load_public((*thisw), (*thisw), fin)) - return 0; - - /* we don't expect any private resources for the root widget */ - - got_line = mib_read_line(fin, res, val); - if (ACE_OS::strcmp (res,"EndWidget.")) - return 0; - -/* XtManageChild((*thisw)->me); -*/ - XtVaSetValues((*thisw)->me, XmNresizePolicy, XmRESIZE_NONE, NULL); - - count = num_widgets - 1; - while (count > 0) - { - - if (!(temp = mib_load_public((*thisw), temp, fin))) - { - /* delete temp */ - return 0; - } - - if (!mib_load_private(temp,fin)) - { - /* delete temp */ - return 0; - } - count--; - - } - - mib_reset_size((*thisw)); - - XtVaSetValues((*thisw)->me, XmNresizePolicy, XmRESIZE_ANY, NULL); - - val_mask = (long)0; - mib_gc = XtGetGC((*thisw)->me, val_mask, &gcvals); - - return 1; -} - -/*****************************************************************************/ - -int mib_read_line(mib_Buffer *bufin, char *res, char *val) -{ - FILE *fin; - char *strin; - char ch; - int count, mark; - char inbuf[MI_MAXSTRLEN]; - - if ((bufin->buf_type == MI_FROMFILE) || (bufin->buf_type == MI_EDITFROMFILE)) - { - fin = (FILE *)bufin->buffer; - ch = '\0'; - count = 0; - mark = 0; - while ((ch != '\n')&&(!feof(fin))&&(count 0) - { - if (inbuf[count-1] == 'n') - inbuf[count-1] = '\0'; - } - else - return 0; - - } - else - if ((bufin->buf_type == MI_FROMSTRING) || - (bufin->buf_type == MI_EDITFROMSTRING)) - { - strin = (char *)bufin->buffer; - count = bufin->point; - mark = 0; - - if (count >= bufin->buflen) - return 0; - - while ((strin[count] != '\n') && (count < bufin->buflen)) - { - if ((mark == 0) && (strin[count] == ':')) - mark = count; - count++; - } - - strin[count] = '\0'; - if (count >= bufin->buflen) - return 0; - sprintf(inbuf,"%s",&(strin[bufin->point])); - strin[count] = '\n'; - if (mark != 0) - mark -= bufin->point; - bufin->point = count+1; - } - else - return 0; - - if (mark == 0) - { - sprintf(res,"%s",inbuf); - sprintf(val,"\0"); - } - else - { - inbuf[mark] = '\0'; - sprintf(res,"%s",inbuf); - inbuf[mark] = ' '; - if ((int)(strlen(inbuf)-mark) > 1) - sprintf(val,"%s",&(inbuf[mark+2])); - else - sprintf(val,"\0"); - } - - return 1; -} - -/*****************************************************************************/ - -void mib_reset_size(mib_Widget *temp) -{ - Arg args[5]; - int n; - - mib_Widget *child = temp->child; - - if (temp->mib_class_num != MIB_NULL) - { - n = 0; - XtSetArg (args[n], XmNwidth, temp->width); n++; - XtSetArg (args[n], XmNheight, temp->height); n++; - - XtSetValues(temp->me, args, n); - } - - if (child != NULL) - mib_reset_size(child); - - child = temp->sibling; - if (child != NULL) - mib_reset_size(child); -} - -/*****************************************************************************/ - -#ifdef __cplusplus -void mib_set_eventhandlers(void a(Widget, XtPointer, - XEvent *, Boolean * ), - void b( Widget, XtPointer, - XEvent *, Boolean* ), - void c(Widget, XtPointer, - XEvent *, Boolean *) - ) -#else -void mib_set_eventhandlers(void * a, void * b, void * c) -#endif -{ - mib_events.mib_pick_mib_Widget = a; - mib_events.mib_move_mib_Widget = b; - mib_events.mib_unpick_mib_Widget = c; -} - -/*****************************************************************************/ - -void mib_apply_eventhandlers(Widget thisw, mib_Widget *actual) -{ - XtAddEventHandler(thisw, ButtonPressMask, FALSE, - mib_events.mib_pick_mib_Widget, (XtPointer)actual); - XtAddEventHandler(thisw, Button3MotionMask, FALSE, - mib_events.mib_move_mib_Widget, (XtPointer)actual); - XtAddEventHandler(thisw, ButtonReleaseMask, FALSE, - mib_events.mib_unpick_mib_Widget, (XtPointer)actual); - -} - -/*****************************************************************************/ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h deleted file mode 100644 index 050dd00c110..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h +++ /dev/null @@ -1,172 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with this file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "ace/OS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - - -/* Structure of mib_Widget */ -/*****************************************************************************/ - -typedef struct _mib_Widget { - char *mib_class; /* name of mib class (Button, TextBox, etc..)*/ - int mib_class_num; /* class number for ez reference :) */ - int mib_mynum; /* numbering for storage format */ - Widget me; /* Xt widget */ - int mib_selected; /* is selected */ - int mib_resizing; /* is resizing 1, or being moved 0 */ - int mib_resizetype;/* 1 = upper left, 2 = upper, 3 = ... */ - int mib_allowresize; /* can this widget be resized ? */ - - int clkx, clky; /* where user clicked */ - - void *myres; /* my resources (different for each widget) */ - - char *name; /* reference name of this widget */ - int width, height; /* width and height */ - - int topAttachment, bottomAttachment, leftAttachment, rightAttachment; - /* attachments 1=attached 0=not-attached */ - - int topOffset, bottomOffset, leftOffset, rightOffset; - /* offsets if attached */ - - struct _mib_Widget *parent; /* pointer to parent */ - struct _mib_Widget *sibling; /* remaining linked list of sibling widgets */ - struct _mib_Widget *prev; /* previous sibling or parent */ - struct _mib_Widget *child; /* linked list of children widgets */ -} mib_Widget; - -/* mib_Buffer structure */ -/*****************************************************************************/ - -typedef struct _mib_Buffer { - void *buffer; /* pointer to either a file or a char string */ - int buf_type; /* type of buffer (defined above) */ - int point; /* pointer for string */ - int buflen; /* length of string buffer */ -} mib_Buffer; - -/* mib_Widget functions */ -/*****************************************************************************/ - -void mib_add_mib_Widget(mib_Widget *, mib_Widget *); -void mib_add_backward(mib_Widget *, mib_Widget *); -void mib_remove_mib_Widget(mib_Widget *); -void mib_clear_myres(mib_Widget *); -#ifdef __cplusplus -mib_Widget *mib_new_mib_Widget(); -#else -mib_Widget *mib_new_mib_Widget(); -#endif -mib_Widget *mib_find_name(mib_Widget *, char *); -mib_Widget *mib_load_interface(Widget, char *, int); -int mib_count_all(mib_Widget *, int); -int mib_load_Root(Widget, mib_Widget **, mib_Buffer *); -mib_Widget *mib_load_public(mib_Widget *, mib_Widget *, mib_Buffer *); -int mib_load_mib_class(mib_Widget **, mib_Widget *, char *, char *, - mib_Buffer *); -int mib_load_private(mib_Widget *, mib_Buffer *); -void mib_reset_size(mib_Widget *); -int mib_read_line(mib_Buffer *, char *, char *); -#ifdef __cplusplus -void mib_set_eventhandlers(void (a)(...), void (b)(...), void (c)(...)); -#else -void mib_set_eventhandlers(void *, void *, void *); -#endif -void mib_apply_eventhandlers(Widget, mib_Widget *); - -/* supporting functions and structures */ -/*****************************************************************************/ - -typedef struct _menu_item { - char *label; - WidgetClass *wclass; - char mnemonic; - char *accelerator; - char *accel_text; -#ifdef __cplusplus - void (*callback)(Widget,void*,void*); -#else - void (*callback)(); -#endif - XtPointer callback_data; - struct _menu_item *subitems; -} MenuItem; - -Widget BuildMenu(Widget, int, char *, char, MenuItem *); - -/* mib class numbers */ - -#define MIB_NULL 0 -#define MIB_TEXTBOX 1 -#define MIB_BUTTON 2 -#define MIB_TOGGLE 3 -#define MIB_RADIOBOX 4 -#define MIB_DRAWINGAREA 5 -#define MIB_LABEL 6 -#define MIB_FRAME 7 -#define MIB_SCROLLBAR 8 -#define MIB_TEXTBIG 9 -#define MIB_LIST 10 -#define MIB_SCALE 11 -#define MIB_MENU 12 - -/* number of classes */ -#define MI_NUMCLASSES 12 - -/* for specifying creation of a widget with - default private values, no values at all (empty), - or no values and editable */ - -#define WDEFAULT 1 -#define WEMPTY 2 -#define WEDIT 3 - -/* for specifing whether we are loading an - interface from a file or from a string and whether it - is editable :) */ - -#define MI_FROMFILE 1 -#define MI_EDITFROMFILE 2 -#define MI_FROMSTRING 3 -#define MI_EDITFROMSTRING 4 - -#define MI_MAXSTRLEN 200 /* maximum string length */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h deleted file mode 100644 index 5d38ec199b8..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h +++ /dev/null @@ -1,225 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with this file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -/* Structure of mib_TextBox */ -/*****************************************************************************/ - -typedef struct _mib_TextBox { - char *init_contents; /* initial text contents */ - -} mib_TextBox; - -/* mib_TextBox functions */ -/*****************************************************************************/ -mib_Widget *mib_create_TextBox(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_TextBox(mib_Widget *); -void mib_save_TextBox(mib_Widget *, FILE *); -int mib_load_TextBox(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_Button */ -/*****************************************************************************/ - -typedef struct _mib_Button { - char *label; /* label on button */ - -} mib_Button; - -/* mib_Button functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Button(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Button(mib_Widget *); -void mib_save_Button(mib_Widget *, FILE *); -int mib_load_Button(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_Toggle */ -/*****************************************************************************/ - -typedef struct _mib_Toggle { - char *label; /* label on toggle */ - int isize; - -} mib_Toggle; - -/* mib_Toggle functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Toggle(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Toggle(mib_Widget *); -void mib_save_Toggle(mib_Widget *, FILE *); -int mib_load_Toggle(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_RadioBox */ -/*****************************************************************************/ -typedef struct _mib_RadioBox { - char **labels; /* array of labels */ - int numlabel; /* number of labels */ - Widget *buttons; /* pointers to each button */ - -} mib_RadioBox; - -/* mib_RadioBox functions */ - -/*****************************************************************************/ -mib_Widget *mib_create_RadioBox(mib_Widget *, char *, char*, int, int, int, - int, int); -void mib_delete_RadioBox(mib_Widget *); -void mib_save_RadioBox(mib_Widget *, FILE *); -int mib_load_RadioBox(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_DrawingArea */ -/*****************************************************************************/ -typedef struct _mib_DrawingArea { - int nothing; /* couldn't think of anything yet */ - -} mib_DrawingArea; - -/* mib_DrawingArea functions */ -/*****************************************************************************/ -mib_Widget *mib_create_DrawingArea(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_DrawingArea(mib_Widget *); -void mib_save_DrawingArea(mib_Widget *, FILE *); -int mib_load_DrawingArea(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_Label */ -/*****************************************************************************/ -typedef struct _mib_Label { - char *label; /* text in label */ - -} mib_Label; - -/* mib_Label functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Label(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Label(mib_Widget *); -void mib_save_Label(mib_Widget *, FILE *); -int mib_load_Label(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_Frame */ -/*****************************************************************************/ -typedef struct _mib_Frame { - int shadowtype; /* 0 = in, 1 = out, 2 = etched_in, 3 = etched_out */ - -} mib_Frame; - -/* mib_Frame functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Frame(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Frame(mib_Widget *); -void mib_save_Frame(mib_Widget *, FILE *); -int mib_load_Frame(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_ScrollBar */ -/*****************************************************************************/ -typedef struct _mib_ScrollBar { - int orientation; - -} mib_ScrollBar; - -/* mib_ScrollBar functions */ -/*****************************************************************************/ -mib_Widget *mib_create_ScrollBar(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_ScrollBar(mib_Widget *); -void mib_save_ScrollBar(mib_Widget *, FILE *); -int mib_load_ScrollBar(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_TextBig */ -/*****************************************************************************/ -typedef struct _mib_TextBig { - int nothing; /* couldn't think of anything yet */ - -} mib_TextBig; - -/* mib_TextBig functions */ -/*****************************************************************************/ -mib_Widget *mib_create_TextBig(mib_Widget *, char *, char *, int, int, int, int, int); -void mib_delete_TextBig(mib_Widget *); -void mib_save_TextBig(mib_Widget *, FILE *); -int mib_load_TextBig(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_List */ -/*****************************************************************************/ -typedef struct _mib_List { - Widget real_list; - -} mib_List; - -/* mib_List functions */ -/*****************************************************************************/ -mib_Widget *mib_create_List(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_List(mib_Widget *); -void mib_save_List(mib_Widget *, FILE *); -int mib_load_List(mib_Widget *, mib_Buffer *); - -/* Structure of mib_Scale */ -/*****************************************************************************/ -typedef struct _mib_Scale { - int orientation; - -} mib_Scale; - -/* mib_Scale functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Scale(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Scale(mib_Widget *); -void mib_save_Scale(mib_Widget *, FILE *); -int mib_load_Scale(mib_Widget *, mib_Buffer *); - -/* Structure of mib_Menu */ -/*****************************************************************************/ -typedef struct _mib_Menu { - int numitems; /* number of items in menu*/ - MenuItem *my_menu; /* array of menu items */ - Widget *items; /* pointers to each item */ - -} mib_Menu; - -/* mib_Menu functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Menu(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Menu(mib_Widget *); -void mib_save_Menu(mib_Widget *, FILE *); -int mib_load_Menu(mib_Widget *, mib_Buffer *); - -/*****************************************************************************/ - -typedef struct _mib_widget_funcs { - char *name; -#ifdef __cplusplus - mib_Widget *(*mib_create)(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill); - void (*mib_delete)(mib_Widget *thisw); - void (*mib_save)(mib_Widget *thisw, FILE *fout); - int (*mib_load)(mib_Widget *thisw, mib_Buffer *fin); -#else - mib_Widget *(*mib_create)(); - void (*mib_delete)(); - void (*mib_save)(); - int (*mib_load)(); -#endif -} mib_widget_funcs; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.cpp deleted file mode 100644 index 84b8887e0d5..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.cpp +++ /dev/null @@ -1,158 +0,0 @@ -// $Id$ - -#include "Audio_Control_State.h" -#include "Audio_Control_i.h" - -ACE_RCSID(mpeg_server, Audio_Control_State, "$Id$") - -Audio_Control_State::Audio_Control_State (void) - :audio_global_ (AUDIO_GLOBAL::instance ()), - audio_control_i_ (AUDIO_CONTROL_I::instance ()) -{ -} - -Audio_Control_State::Audio_States -Audio_Control_State::get_state (void) -{ - return this->state_; -} - -void -Audio_Control_State::set_state (Audio_States state) -{ - this->state_ = state; -} - -CORBA::Boolean -Audio_Control_State::play (const Audio_Control::PLAYPara & para, - CORBA::Long_out ats) -{ - return 0; -} - -CORBA::Boolean -Audio_Control_State::speed (const Audio_Control::SPEEDPara & para) -{ - return 0; -} - -CORBA::Boolean -Audio_Control_State::stop (CORBA::Long cmdsn) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_Control_State::stop ()\n")); - return 1; -} - -void -Audio_Control_State::close (void) -{ - return; -} - -Audio_Control_Waiting_State::Audio_Control_Waiting_State (void) -{ - this->state_ = AUDIO_WAITING; - this->audio_global_->state = Audio_Global::AUDIO_WAITING; -} - -CORBA::Boolean -Audio_Control_Waiting_State::play (const Audio_Control::PLAYPara & para, - CORBA::Long_out ats) -{ - int result; - - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_Control_Waiting_State::play ()\n")); - this->audio_global_->cmd = CmdPLAY; - - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) play_audio () called \n")); - - this->audio_global_->nextsample = para.nextSample; - this->audio_global_->cmdsn = para.sn; - this->audio_global_->sps = para.samplesPerSecond; - this->audio_global_->spslimit = para.spslimit; - this->audio_global_->spp = para.samplesPerPacket; - this->audio_global_->addSamples = para.ABsamples / 2; - if (this->audio_global_->spp * this->audio_global_->audioPara.bytesPerSample > this->audio_global_->databuf_size) { - this->audio_global_->spp = this->audio_global_->databuf_size / this->audio_global_->audioPara.bytesPerSample; - } - /* - SFprintf(stderr, "AS got CmdPLAY: sps %d\n", sps); - */ - - fprintf(stderr, "AS: nextSample = %d for PLAY.\n", para.nextSample); - - - this->audio_global_->upp = (int)(1000000.0 / ((double)(this->audio_global_->sps) / (double)(this->audio_global_->spp))); - this->audio_global_->nextTime = get_usec(); - - ats = this->audio_global_->nextTime; // out parameter. - if (this->audio_global_->live_source) { - StartPlayLiveAudio(); - } - - this->audio_global_->hasdata = 1; - this->audio_global_->packets = 0; - - this->audio_global_->send_audio (); - - this->audio_global_->state = Audio_Global::AUDIO_PLAY; - this->audio_control_i_->change_state (AUDIO_CONTROL_PLAY_STATE::instance ()); - return 1; -} - -void -Audio_Control_Waiting_State::close (void) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_Control_Waiting_State::close ()\n")); - this->audio_global_->cmd = CmdCLOSE; - ACE_DEBUG ((LM_DEBUG,"(%P|%t) A session closed\n")); - TAO_ORB_Core_instance ()->orb ()->shutdown (); - return ; -} - -Audio_Control_Play_State::Audio_Control_Play_State (void) -{ - this->state_ = AUDIO_PLAY; -} - -CORBA::Boolean -Audio_Control_Play_State::speed (const Audio_Control::SPEEDPara & para) -{ - this->audio_global_->sps = para.samplesPerSecond; - this->audio_global_->spslimit = para.spslimit; - this->audio_global_->spp = para.samplesPerPacket; - if (this->audio_global_->spp * this->audio_global_->audioPara.bytesPerSample > this->audio_global_->databuf_size) { - this->audio_global_->spp = this->audio_global_->databuf_size / this->audio_global_->audioPara.bytesPerSample; - } - this->audio_global_->delta_sps = 0; /* reset compensation value */ - this->audio_global_->upp = (int)(1000000.0 / ((double)(this->audio_global_->sps) / (double)(this->audio_global_->spp))); - /* - SFprintf(stderr, "AS got CmdSPEED: sps %d\n", sps); - */ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_Control_Play_State::speed ()\n")); - return 1; -} - -CORBA::Boolean -Audio_Control_Play_State::stop (CORBA::Long cmdsn) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_Control_Play_State::stop ()\n")); - if (this->audio_global_->live_source) { - StopPlayLiveAudio(); - } - this->audio_global_->state = Audio_Global::AUDIO_WAITING; - this->audio_control_i_->change_state (AUDIO_CONTROL_WAITING_STATE::instance ()); - return 1; -} - -void -Audio_Control_Play_State::close (void) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_Control_Play_State::close ()\n")); - if (this->audio_global_->live_source) { - StopPlayLiveAudio(); - } - // shutdown the ORB - TAO_ORB_Core_instance ()->orb ()->shutdown (); - return; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.h deleted file mode 100644 index e585f00f01b..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.h +++ /dev/null @@ -1,84 +0,0 @@ -/* _*_ C++ _*_ */ -// $Id$ - -#ifndef _MPEG_AUDIO_CONTROL_STATE_H -#define _MPEG_AUDIO_CONTROL_STATE_H - -#include "ace/Singleton.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "mpeg_shared/Audio_ControlS.h" -#include "Globals.h" - -class Audio_Control_i; - -class Audio_Control_State -{ -public: - Audio_Control_State (void); - // constructor - - enum Audio_States - { - AUDIO_WAITING =0, - AUDIO_PLAY =1 - }; - - Audio_States get_state (void); - // returns the current state. - - void set_state (Audio_States state); - // sets the state. - - virtual CORBA::Boolean play (const Audio_Control::PLAYPara & para, - CORBA::Long_out ats) ; - - virtual CORBA::Boolean speed (const Audio_Control::SPEEDPara & para) ; - - virtual CORBA::Boolean stop (CORBA::Long cmdsn) ; - - virtual void close (void) ; -protected: - Audio_States state_; - // The state - - Audio_Global *audio_global_; - // Pointer to the global. - Audio_Control_i *audio_control_i_; -}; - - -class Audio_Control_Waiting_State : public virtual Audio_Control_State -{ -public: - Audio_Control_Waiting_State (void); - // Default constructor. - - virtual CORBA::Boolean play (const Audio_Control::PLAYPara ¶, - CORBA::Long_out ats); - - virtual void close (void); -}; - -class Audio_Control_Play_State: public virtual Audio_Control_State -{ -public: - Audio_Control_Play_State (void); - // Default constructor - - virtual CORBA::Boolean speed (const Audio_Control::SPEEDPara & para); - - virtual CORBA::Boolean stop (CORBA::Long cmdsn); - - virtual void close (void); -}; - -typedef ACE_Singleton - AUDIO_CONTROL_WAITING_STATE; -typedef ACE_Singleton - AUDIO_CONTROL_PLAY_STATE; - -#endif /*_MPEG_AUDIO_CONTROL_STATE_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.cpp deleted file mode 100644 index 63a3be6a005..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.cpp +++ /dev/null @@ -1,258 +0,0 @@ -// $Id$ - -#include "Audio_Control_State.h" -#include "Audio_Control_i.h" - -ACE_RCSID(mpeg_server, Audio_Control_i, "$Id$") - -Audio_Control_i::Audio_Control_i (void) - :audio_global_ (AUDIO_GLOBAL::instance ()), - reactor_ (TAO_ORB_Core_instance ()->reactor ()) -{ -} - -int -Audio_Control_i::create_handlers (void) -{ - ACE_NEW_RETURN (this->data_handler_, - Audio_Data_Handler (this->audio_global_->audioSocket, - this->audio_global_), - -1); - - ACE_NEW_RETURN (this->sig_handler_, - Audio_Sig_Handler (this->audio_global_), - -1); - return 0; -} - -CORBA::Boolean -Audio_Control_i::init_audio (const Audio_Control::INITaudioPara & para, - Audio_Control::INITaudioReply_out reply, - CORBA::Environment &env) -{ - int result; - int failureType; /* 0 - can't open file, 1 - can't open live source */ - - for (int i=0 ; i< para.audiofile.length (); i++) - this->audio_global_->audioFile[i] = para.audiofile [i]; - this->audio_global_->audioFile [i] = 0; - - if (Mpeg_Global::session_num > Mpeg_Global::session_limit || para.version != VERSION) - return 0; // failure - - ACE_OS::memcpy (&(this->audio_global_->audioPara), ¶.para, sizeof(this->audio_global_->audioPara)); - /* - fprintf(stderr, "Client Audio para: encode %d, ch %d, sps %d, bps %d.\n", - para.para.encodeType, para.para.channels, - para.para.samplesPerSecond, para.para.bytesPerSample); - */ - { - int len =ACE_OS::strlen (this->audio_global_->audioFile); - if (strncasecmp("LiveAudio", this->audio_global_->audioFile, 9) && - strcasecmp(".au", this->audio_global_->audioFile+len-3)) - { -// ACE_ERROR_RETURN ((LM_ERROR, -// "(%p|%t) Audio_Control_i::init_audio () failed\n"), -// 0); - cerr << "init_audio failed in line " << __LINE__ << endl; - return 0; - - } - } - - ACE_DEBUG ((LM_DEBUG, "(%P|%t)Audio file %s got.\n", this->audio_global_->audioFile)); - - - if (!strncasecmp("LiveAudio", this->audio_global_->audioFile, 9)) - { - // May need to be uncommented for live audio. - // this->audio_global_->fd = OpenLiveAudio(&(para.para)); - if (this->audio_global_->fd == -1) { - failureType = 1; - goto failure; - } - this->audio_global_->fileSize =0x7fffffff; - this->audio_global_->totalSamples = this->audio_global_->fileSize / this->audio_global_->audioPara.bytesPerSample; - this->audio_global_->live_source = 1; - } - else - { - LeaveLiveAudio(); - this->audio_global_->fd = open(this->audio_global_->audioFile, O_RDONLY); - if (this->audio_global_->fd == -1) - { - ACE_ERROR ((LM_ERROR, "AS error on opening audio file %s,%p", this->audio_global_->audioFile)); - failureType = 0; - goto failure; - } - - /* Try to get this->audio_global_->audioFile format this->audio_global_->audioPara here */ - - /* figure out this->audio_global_->totalSamples */ - this->audio_global_->fileSize = lseek(this->audio_global_->fd, 0L, SEEK_END); - lseek(this->audio_global_->fd, 0L, SEEK_SET); - this->audio_global_->totalSamples = this->audio_global_->fileSize / this->audio_global_->audioPara.bytesPerSample; - - fprintf(stderr, "Total Samples=%d in audio file %ss.\n", this->audio_global_->totalSamples, this->audio_global_->audioFile); - - } - - reply.para.encodeType = this->audio_global_->audioPara.encodeType; - reply.para.channels = this->audio_global_->audioPara.channels; - reply.para.samplesPerSecond = this->audio_global_->audioPara.samplesPerSecond; - reply.para.bytesPerSample = this->audio_global_->audioPara.bytesPerSample; - reply.totalSamples = this->audio_global_->totalSamples; - - reply.live = this->audio_global_->live_source; - reply.format = AUDIO_RAW; - - return 1; - failure: - { - - fprintf(stderr, "AS error: failed initializing audio file.\n"); - - return 0; - } - -} - - -CORBA::Boolean -Audio_Control_i::play (const Audio_Control::PLAYPara & para, - CORBA::Long_out ats, - CORBA::Environment &env) - -{ - return this->state_->play (para,ats); -} - -CORBA::Boolean -Audio_Control_i::speed (const Audio_Control::SPEEDPara & para, - CORBA::Environment &env) - -{ - return this->state_->speed (para); -} - -CORBA::Boolean -Audio_Control_i::stop (CORBA::Long cmdsn, - CORBA::Environment &env) -{ - return this->state_->stop (cmdsn); -} - -CORBA::Boolean -Audio_Control_i::set_peer (char *&peer, - CORBA::Environment &env) -{ - ACE_INET_Addr client_data_addr (peer); - // Data (UDP) Address of the client. - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) set_peer called: %s,%s,%d\n", - peer, - client_data_addr.get_host_addr (), - client_data_addr.get_port_number ())); - - - if (this->dgram_.open (client_data_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) UDP open failed: %p\n"), - -1); - - ACE_INET_Addr server_data_addr; - // Data (UDP) Address of this server. - - if (this->dgram_.get_local_addr - (server_data_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) UDP get_local_addr failed: %p\n"), - -1); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Audio_Server: My UDP port number is %d\n", - server_data_addr.get_port_number ())); - - this->audio_global_->audioSocket = this->dgram_.get_handle (); - this->create_handlers () ; // very important. - if (this->register_handlers () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Audio_Control_i::set_peer: register_handlers failed\n"), - -1); - - ACE_DEBUG ((LM_DEBUG,"(%P|%t) set_peer: server port = %d\n",server_data_addr.get_port_number ())); - ACE_NEW_RETURN (peer, - char [BUFSIZ], - 0); - server_data_addr.set (server_data_addr.get_port_number (), - server_data_addr.get_host_name ()); - server_data_addr.addr_to_string (peer, - BUFSIZ); - - - return 1; -} - -void -Audio_Control_i::close (CORBA::Environment &env) -{ - this->state_->close (); - return; -} - -int -Audio_Control_i::register_handlers (void) -{ - int result; - - // change the state of audio control to be waiting state - this->change_state (AUDIO_CONTROL_WAITING_STATE::instance ()); - - // Register the event handlers with the Reactor - // first the data handler, i.e. UDP - result = this->reactor_->register_handler (this->data_handler_, - ACE_Event_Handler::READ_MASK); - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) register_handler for data_handler failed\n"), - -1); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) registered this->audio_global_->fd for data handler = (%d)\n", - this->data_handler_->get_handle ())); - - // finally, the signal handler, for periodic transmission - // of packets - result = this->sig_handler_->register_handler (); - - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) register_handler for sig_handler" - "failed!\n"), - -1); - - return 0; -} - -void -Audio_Control_i::change_state (Audio_Control_State *state) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Audio_Control_i::Changing to state %d\n", - state->get_state ())); - this->state_ = state; -} - -// Returns the current state object . -Audio_Control_State * -Audio_Control_i::get_state (void) -{ - return this->state_; -} - -Audio_Control_i::~Audio_Control_i () -{ - delete this->data_handler_; - delete this->sig_handler_; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.h deleted file mode 100644 index 001bfccb423..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.h +++ /dev/null @@ -1,80 +0,0 @@ -/* _*_ C++ _*_ */ -//$Id$ - -#ifndef _AV_AUDIO_CONTROL_H -#define _AV_AUDIO_CONTROL_H - -#include "mpeg_shared/Audio_ControlS.h" -#include "Globals.h" -#include "Audio_Server.h" - -class Audio_Control_State; - -class Audio_Control_i - :public virtual POA_Audio_Control -{ -public: - Audio_Control_i (void); - // Default Constructor - - ~Audio_Control_i (void); - // Default destructor - - int create_handlers (void); - // creates the data and sig handlers. - - virtual CORBA::Boolean init_audio ( - const Audio_Control::INITaudioPara & para, - Audio_Control::INITaudioReply_out reply_para, - CORBA::Environment &_tao_environment - ) ; - - virtual CORBA::Boolean play ( - const Audio_Control::PLAYPara & para, - CORBA::Long_out ats, - CORBA::Environment &_tao_environment - ) ; - - virtual CORBA::Boolean speed ( - const Audio_Control::SPEEDPara & para, - CORBA::Environment &_tao_environment - ) ; - - virtual CORBA::Boolean stop ( - CORBA::Long cmdsn, - CORBA::Environment &_tao_environment - ) ; - - virtual CORBA::Boolean set_peer ( - char *&peer, - CORBA::Environment &_tao_environment - ) ; - - virtual void close ( - CORBA::Environment &_tao_environment - ) ; - - void change_state (Audio_Control_State *state); - // Changes the state of the Audio Control object. - - Audio_Control_State *get_state (void); - // gets the state. -private: - int register_handlers (void); - - ACE_Reactor *reactor_; - - Audio_Control_State *state_; - - Audio_Data_Handler *data_handler_; - - Audio_Sig_Handler *sig_handler_; - - ACE_SOCK_CODgram dgram_; - - Audio_Global *audio_global_; -}; - -typedef ACE_Singleton AUDIO_CONTROL_I; - -#endif /*_AV_AUDIO_CONTROL_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.cpp deleted file mode 100644 index 51cdd49362d..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.cpp +++ /dev/null @@ -1,300 +0,0 @@ -// $Id$ - -#include "Audio_Server.h" -#include "Audio_Control_i.h" -#include "Audio_Control_State.h" - -ACE_RCSID(mpeg_server, Audio_Server, "$Id$") - -//---------------------------------------- -// Audio_Sig_Handler methods. - -Audio_Sig_Handler::Audio_Sig_Handler (Audio_Global *audio_global) - :audio_global_ (audio_global) -{ -} - -int -Audio_Sig_Handler::register_handler (void) -{ - // Assign the Sig_Handler a dummy I/O descriptor. Note that even - // though we open this file "Write Only" we still need to use the - // ACE_Event_Handler::NULL_MASK when registering this with the - // ACE_Reactor (see below). - this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY); - ACE_ASSERT (this->handle_ != -1); - - // Register signal handler object. Note that NULL_MASK is used to - // keep the ACE_Reactor from calling us back on the "/dev/null" - // descriptor. - if (TAO_ORB_Core_instance ()->reactor ()->register_handler - (this, ACE_Event_Handler::NULL_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - - // Create a sigset_t corresponding to the signals we want to catch. - ACE_Sig_Set sig_set; - - // sig_set.sig_add (SIGINT); - // sig_set.sig_add (SIGQUIT); - sig_set.sig_add (SIGALRM); - - // Register the signal handler object to catch the signals. - if (TAO_ORB_Core_instance ()->reactor ()->register_handler (sig_set, - this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - return 0; -} -// Called by the ACE_Reactor to extract the fd. - -ACE_HANDLE -Audio_Sig_Handler::get_handle (void) const -{ - return this->handle_; -} - -int -Audio_Sig_Handler::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n")); - return 0; -} - -int -Audio_Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n")); - return 0; -} - -// This method handles all the signals that are being caught by this -// object. In our simple example, we are simply catching SIGALRM, -// SIGINT, and SIGQUIT. Anything else is logged and ignored. -// -// There are several advantages to using this approach. First, -// the behavior triggered by the signal is handled in the main event -// loop, rather than in the signal handler. Second, the ACE_Reactor's -// signal handling mechanism eliminates the need to use global signal -// handler functions and data. - -int -Audio_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) -{ - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum)); - - switch (signum) - { - case SIGALRM: - if (this->audio_global_->state == Audio_Global::AUDIO_PLAY) - this->audio_global_->send_audio ();// honor the signal only if you're in play state. - break; - default: - ACE_DEBUG ((LM_DEBUG, - "(%t) %S: not handled, returning to program\n", - signum)); - break; - } - // ACE_DEBUG ((LM_DEBUG,"returning from handle_signal")); - return 0; -} - -//---------------------------------------------- -// Audio_Data_Handler methods - -Audio_Data_Handler::Audio_Data_Handler (ACE_HANDLE data_fd, - Audio_Global *audio_global) - :data_fd_ (data_fd), - audio_global_ (audio_global) -{ -} - -ACE_HANDLE -Audio_Data_Handler::get_handle (void) const -{ - return this->data_fd_; -} - -int -Audio_Data_Handler::handle_input (ACE_HANDLE fd) -{ - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_Data_Handler::handle_input ()\n")); - int bytes, len; - for (;;) { - if (this->audio_global_->conn_tag >= 0) { - len = wait_read_bytes(this->audio_global_->audioSocket, (char *)this->audio_global_->fbpara, sizeof(*(this->audio_global_->fbpara))); - if (len == 0) return(1); /* connection broken */ - else if (len < 0) { /* unexpected error */ - ACE_OS::perror ("AS read1 FB"); - return(-1); - } - } - else { /* discard mode packet stream, read the whole packet */ - len = ::read(this->audio_global_->audioSocket, (char *)this->audio_global_->fbpara, FBBUF_SIZE); - } - if (len == -1) { - if (errno == EINTR) continue; /* interrupt */ - else { - if (errno != EPIPE && errno != ECONNRESET)ACE_OS::perror ("AS failed to ACE_OS::read () fbmsg header"); - break; - } - } - break; - } - //~~ check for end of file. - if (len == 0) - { - ACE_DEBUG ((LM_DEBUG,"(%P|%t)End of file while reading feedback packedt\n")); - TAO_ORB_Core_instance ()->reactor ()->end_event_loop (); - return 0; - } - - if (len < sizeof(*this->audio_global_->fbpara)) { - if (len > 0) fprintf(stderr, - "AS warn ACE_OS::read () len %dB < sizeof(*this->audio_global_->fbpara) %dB\n", - len, sizeof(*this->audio_global_->fbpara)); - // continue; - // simulate the continue ?? - this->audio_global_->send_audio (); - } -#ifdef NeedByteOrderConversion - this->audio_global_->fbpara->type = ntohl(this->audio_global_->fbpara->type); -#endif - bytes = (this->audio_global_->fbpara->type > 0) ? - sizeof(APdescriptor) * (this->audio_global_->fbpara->type - 1) : - 0; - if (bytes > 0) { - if (this->audio_global_->conn_tag >= 0) { /* not discard mode packet stream, - read the rest of packet */ - len = wait_read_bytes(this->audio_global_->audioSocket, - ((char *)this->audio_global_->fbpara) + sizeof(*this->audio_global_->fbpara), - bytes); - if (len == 0) return(1); /* connection broken */ - else if (len < 0) { /* unexpected error */ - ACE_OS::perror ("AS read2 FB"); - return(-1); - } - len += sizeof(*this->audio_global_->fbpara); - } - } - bytes += sizeof(*this->audio_global_->fbpara); - if (len < bytes) { - if (len > 0) fprintf(stderr, - "AS only read partial FBpacket, %dB out of %dB.\n", - len, bytes); - // continue; - this->audio_global_->send_audio (); - } - if (this->audio_global_->live_source) { /* ignore all feedback messags for live source */ - // continue; - this->audio_global_->send_audio (); - } - -#ifdef NeedByteOrderConversion - this->audio_global_->fbpara->cmdsn = ntohl(this->audio_global_->fbpara->cmdsn); -#endif - if (len != sizeof(*this->audio_global_->fbpara) + - (this->audio_global_->fbpara->type ? (this->audio_global_->fbpara->type -1) * sizeof(APdescriptor) : 0)) { - /* unknown message, discard */ - SFprintf(stderr, "AS Unkown fb msg: len = %d, type = %d\n", - len, this->audio_global_->fbpara->type); - // continue; - this->audio_global_->send_audio (); - } - if (this->audio_global_->fbpara->cmdsn != this->audio_global_->cmdsn) { /* discard the outdated message */ - // continue; - this->audio_global_->send_audio (); - } -#ifdef NeedByteOrderConversion - { - int i, * ptr = (int *)this->audio_global_->fbpara + 2; - for (i = 0; i < (len >> 2) - 2; i++) *ptr = ntohl(*ptr); - } -#endif - if (this->audio_global_->fbpara->type == 0) { /* feedback message */ - /* - SFprintf(stderr, "AS got fbmsg: addsamples %d, addsps %d\n", - this->audio_global_->fbpara->data.fb.addSamples, this->audio_global_->fbpara->data.fb.addsps); - */ - this->audio_global_->addSamples += this->audio_global_->fbpara->data.fb.addSamples; - if (this->audio_global_->fbpara->data.fb.addsps) { - this->audio_global_->delta_sps += this->audio_global_->fbpara->data.fb.addsps; - this->audio_global_->upp = (int)(1000000.0 / ((double)(this->audio_global_->sps + this->audio_global_->delta_sps) / (double)this->audio_global_->spp)); - } - } - else { /* resend requests */ - APdescriptor * req = &(this->audio_global_->fbpara->data.ap); - int i; - /* - SFprintf(stderr, "AS got %d resend reqs\n", this->audio_global_->fbpara->type); - */ - for (i = 0; i < this->audio_global_->fbpara->type; i ++) { - this->audio_global_->ResendPacket(req->firstSample, req->samples); - req ++; - } - } - // send a audio frame.?? - this->audio_global_->send_audio (); - return 0; -} - -// Audio_Server_StreamEndPoint methods. - -int -Audio_Server_StreamEndPoint::handle_open (void) -{ - return 0; -} - -int -Audio_Server_StreamEndPoint::handle_close (void) -{ - // called when streamendpoint is being destructed - return 0; -} - -int -Audio_Server_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return 0; -} - -int -Audio_Server_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return 0; -} - -int -Audio_Server_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return 0; -} - -CORBA::Boolean -Audio_Server_StreamEndPoint::handle_connection_requested (AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_Server_StreamEndPoint::handle_connection_requested:() %s \n", - // the_spec[0])); - - char *server_string; - - server_string = CORBA::string_dup ((const char *) the_spec [0]); - CORBA::Boolean result; - result = AUDIO_CONTROL_I::instance ()->set_peer (server_string,env); - // Get media control from my vdev and call set_peer on that. - - the_spec.length (1); - the_spec [0]=server_string; - - return result; -} - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.h deleted file mode 100644 index 473827a2adb..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.h +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- C++ -*- */ -//$Id$ - -#ifndef _AUDIO_SERVER_H -#define _AUDIO_SERVER_H - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "include/common.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/com.h" -#include "server_proto.h" - -#include "ace/SOCK_CODgram.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/SOCK_Stream.h" -#include "tao/TAO.h" -#include "mpeg_shared/Audio_ControlS.h" -#include "orbsvcs/CosNamingC.h" -#include "Globals.h" - -class Audio_Sig_Handler - : public virtual ACE_Event_Handler -{ - // = TITLE - // Defines the signal handler for the audio process. -public: - Audio_Sig_Handler (Audio_Global *audio_global); - // Constructor. - - virtual ACE_HANDLE get_handle (void) const; - - int register_handler (void); - // this will register this sig_handler - // with the reactor for SIGALRM - - virtual int shutdown (ACE_HANDLE, - ACE_Reactor_Mask); - - virtual int handle_input (ACE_HANDLE); - - virtual int handle_signal (ACE_HANDLE signum, - siginfo_t * = 0, - ucontext_t* = 0); -private: - ACE_HANDLE handle_; - // my handle - Audio_Global *audio_global_; -}; - -class Audio_Data_Handler : public virtual ACE_Event_Handler -{ -public: - Audio_Data_Handler (ACE_HANDLE data_fd, - Audio_Global *audio_global); - - // Constructor - - virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); - // Called when data shows up. - - virtual ACE_HANDLE get_handle (void) const; - // Get the handle used by this event handler - -private: - ACE_HANDLE data_fd_; - Audio_Global *audio_global_; -}; - -// The stream endpoint -class Audio_Server_StreamEndPoint : - public virtual TAO_Server_StreamEndPoint -{ -public: - virtual int handle_open (void) ; - // called when streamendpoint is instantiated - - virtual int handle_close (void) ; - // called when streamendpoint is being destructed - - virtual int handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - // Application needs to define this - - virtual int handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - // Application needs to define this - - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - // Application needs to define this - - virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - -private: - ACE_SOCK_CODgram dgram_; -}; - -#endif /*_AUDIO_SERVER_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp deleted file mode 100644 index faa30df58a7..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp +++ /dev/null @@ -1,2935 +0,0 @@ -// $Id$ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#include "Globals.h" - -ACE_RCSID(mpeg_server, Globals, "$Id$") - -int Mpeg_Global::parentpid = -1; -int Mpeg_Global::listenSocketIn = -1; -int Mpeg_Global::listenSocketUn = -1; -struct linger Mpeg_Global::linger = {1,1}; -int Mpeg_Global::live_audio = 0; -int Mpeg_Global::live_video = 0; /* 0 - no, 1 - to open, 2 - opened */ -int Mpeg_Global::drift_ppm = 0; /* clock drift in ppm */ -int Mpeg_Global::session_limit = SESSION_NUM; -int Mpeg_Global::session_num = 0; -int Mpeg_Global::rttag = 0; - -int Video_Timer_Global::timerHeader = 0; -int Video_Timer_Global::timerGroup = 0; -int Video_Timer_Global::timerFrame = 0; -int Video_Timer_Global::timerOn = 0; -int Video_Timer_Global::timerAdjust = 0; -int Video_Timer_Global::preTimerVal = 0; - -// Initialize the nasty int's, doubles and their friends. - -Video_Global::Video_Global (void) -{ - data_host = 0; - live_source = 0; - video_format = 0; - - pkts_sent = 0; - start_time = 0; - - conn_tag = -1; - - normalExit = 1; - - serviceSocket = 0; - videoSocket = -1; - - ACE_OS::memset (videoFile, - 0, - PATH_SIZE); - fp = 0; - - needHeader = 0; - - lastRef [0] = lastRef [1] = 0; - - lastRefPtr = 0; - currentUPF = 0; - addedUPF = 0; - addedSignals = 0; - VStimeAdvance = 0; - fps = 0; /* current frames-per-second: playback speed */ - frameRateLimit = 0; - - packet = 0; - packetBufSize = 0; - msgsn = 0; - packetsn = 0; - msgsize = 0; - - precmd = 0; - cmd = 0; - cmdsn = 0; - nextFrame = 0; - nextGroup = 0; - firstPatternSize = 0; - firstSendPattern = 0; - sendPatternGops = 0; - ACE_OS::memset (sendPattern, - 0, - PATTERN_SIZE); - -#ifdef STAT - framesSent = 0; -#endif /* STAT */ - - fileSize = 0; - maxS = 0; - maxG = 0; - maxI = 0; - maxP = 0; - maxB = 0; - minS = 0x7fffffff; - minG = 0x7fffffff; - minI = 0x7fffffff; - minP = 0x7fffffff; - minB = 0x7fffffff; - - numS = 0; - numG = 0; - numF = 0; - numI = 0; - numP = 0; - numB = 0; - - averageFrameSize = 0; - horizontalSize = 0; - verticalSize = 0; - pelAspectRatio = 0; - pictureRate = 0; - vbvBufferSize = 0; - firstGopFrames = 0; - patternSize = 0; - - ACE_OS::memset (pattern, - 0, - PATTERN_SIZE); - - // struct pointers - systemHeader = 0; - - gopTable = 0; - - frameTable = 0; - - // playvideo local vars - - preGroup = -1; - preHeader = -1; - preFrame = -1; - - fast_preGroup = -1; - fast_preHeader= -1; -} - -int -Video_Global::FBread (char *buf, int size) -{ - int res; - - while ((res = (this->conn_tag >= 0 ? wait_read_bytes (this->videoSocket, buf, size) : - read (this->videoSocket, buf, size))) == -1) - { - if (errno == EINTR) {errno = 0; continue; } - if (errno == EPIPE || errno == ECONNRESET) exit (0); - perror ("VS reads Feedback this->packet"); - return -1; - } - - if (res < size) - { - if (res) - // @@ Can you please convert the printfs() and perrors to use - // the appropriate ACE_DEBUG and ACE_ERROR macros? - fprintf (stderr, "VS warn: FBread () res %dB < size %dB\n", res, size); - return -1; - } - return 0; -} - -// send a given this->packet pointed by 'this->packet' to the network. - -int -Video_Global::first_packet_send_to_network (int timeToUse) -{ - int count = 0; - VideoMessage * msghd = (VideoMessage *) (((char *) this->packet) - sizeof (VideoMessage)); - int sent = 0; - int packetSize = ntohl (this->packet->dataBytes); - - msghd->packetsn = htonl (this->packetsn ++); - msghd->packetSize = htonl (packetSize + sizeof (* this->packet)); - - fprintf (stderr, "VS to send FIRST pkt %d of size %d.\n", - ntohl (msghd->packetsn), ntohl (msghd->packetSize)); - - - { - VideoMessage * msg = NULL; - int size = packetSize + sizeof (* this->packet); /* msghd->this->packetSize */ - int offset = 0; - int targetTime; - - if (size > this->msgsize) - { - if (!timeToUse) - { - timeToUse = (this->msgsize + sizeof (*msg) + 28) * 2; - /* - set the max network as 500KB. - 28 - UDP header size - */ - /* - fprintf (stderr, "computed timeToUse %d. ", timeToUse); - */ - } - else - { - timeToUse = (timeToUse * 7) >> 3; - /* - fprintf (stderr, "preset timeToUse %d.", timeToUse); - */ - timeToUse /= (size + this->msgsize - 1) / this->msgsize; - timeToUse = min (timeToUse, (this->msgsize + sizeof (*msg) + 28) * 100); - /* limit min network bandwidth = 10K */ - } - - } - while (size > 0) - { - int segsize, sentsize; - int resent = 0; - - if (msg == NULL) - { /* first message for current this->packet - */ - count = 0; - msg = msghd; - targetTime = get_usec (); - } - else { -#if 0 - /* the select () is not precise enough for being used here*/ - int sleepTime; - targetTime += timeToUse; - sleepTime = get_duration (get_usec (), targetTime); - if (sleepTime >= 5000) { /* resolution of timer is 10,000 usec */ - usleep (sleepTime); /* not first message, wait for a while */ - } -#endif - /* - count ++; - if (! (count % 10)) usleep (10000); - */ - msg = (VideoMessage *) ((char *)msg + this->msgsize); - memcpy ((char *)msg, (char *)msghd, sizeof (* msg)); - } - - msg->msgsn = htonl (this->msgsn++); - msg->msgOffset = htonl (offset); - msg->msgSize = htonl (min (size, this->msgsize)); - // send the header seperately first - segsize = sizeof (*msg); - // ACE_DEBUG ((LM_DEBUG, - // "(%P|%t) Sending the header, of size %d\n", - // segsize)); - - while (write (this->videoSocket, - (char *)msg, - segsize) == -1) - { - if (errno == EINTR) - continue; - if (errno == ENOBUFS) { - if (resent) { - perror ("Warning, pkt discarded because"); - sent = -1; - break; - } - else { - resent = 1; - perror ("VS to sleep 5ms"); - usleep (5000); - continue; - } - } - if (errno != EPIPE) { - fprintf (stderr, "VS error on send this->packet %d of size %d ", - this->msgsn-1, min (size, this->msgsize)+sizeof (*msg)); - perror (""); - } - exit (errno != EPIPE); - } - - - // segsize = min (size, this->msgsize)+sizeof (*msg); - segsize = min (size, this->msgsize); - - if (this->conn_tag != 0) { /* this->packet stream */ - // cerr << "vs sending " << segsize << " on fd = " << this->videoSocket << endl; - // ACE_DEBUG ((LM_DEBUG,"packetsn = %d,msgsn = %d\n", - // msg->packetsn,msg->msgsn)); - - while ((sentsize = write (this->videoSocket, - (char *)msg + sizeof (*msg), - segsize)) == -1) { - if (errno == EINTR) - continue; - if (errno == ENOBUFS) { - if (resent) { - perror ("Warning, pkt discarded because"); - sent = -1; - break; - } - else { - resent = 1; - perror ("VS to sleep 5ms"); - usleep (5000); - continue; - } - } - if (errno != EPIPE) { - fprintf (stderr, "VS error on send this->packet %d of size %d ", - this->msgsn-1, min (size, this->msgsize)+sizeof (*msg)); - perror (""); - } - exit (errno != EPIPE); - } - } - else { - sentsize = wait_write_bytes (this->videoSocket, (char *)msg, segsize); - if (sentsize == -1) { - if (errno != EPIPE) { - fprintf (stderr, "VS error on send this->packet %d of size %d ", - this->msgsn-1, min (size, this->msgsize)+sizeof (*msg)); - perror (""); - } - exit (errno != EPIPE); - } - } - if (sentsize < segsize) { - SFprintf (stderr, "VS warning: message size %dB, sent only %dB\n", - segsize, sentsize); - } - if (sent == -1) - break; - /* - fprintf (stderr, "VS: message %d of size %d sent.\n", - this->msgsn-1, min (size, this->msgsize)+sizeof (*msg)); - */ - size -= this->msgsize; - offset += this->msgsize; - } - } - - fprintf (stderr, "sent = %d\n", sent); - - if (!sent) this->pkts_sent ++; - return sent; -} - -/* - * send a this->packet with given this->systemHeader (optional), gop (optional) and frame. - * - * sh - system header id, if -1, then no system header will be sent. - * otherwise, only when frame == 0, the given system header will be sent. - * gop - group of pictures, gop header will be sent when frame == 0 - * (first I frame ); - * frame - frame to be sent, offset internal to given gop. - */ - -/* returns: 0 - this->packet sent, -1 - this->packet not sent (failed) */ - -int -Video_Global::SendPacket (int shtag, - int gop, - int frame, - int timeToUse, - int first_time) -/* frame maybe out of range (PLAY, STEP), in this case, END_SEQ is sent - to force display of last frame in VD */ -{ - char * buf = ((char *) this->packet) + sizeof (VideoPacket); - int f = this->gopTable[gop].previousFrames + frame; - int sh = this->gopTable[gop].systemHeader; - /* - SFprintf (stderr, "VS to send this->packet gop-%d, frame-%d.\n", gop, frame); - */ - - this->packet->currentUPF = ntohl (this->currentUPF); - - if (frame >= this->gopTable[gop].totalFrames) - { - this->packet->cmd = htonl (this->cmd); - this->packet->cmdsn = htonl (this->cmdsn); - this->packet->sh = htonl (sh); - this->packet->gop = htonl (gop); - this->packet->frame = htonl (this->numF); - this->packet->display = htonl (this->numF-1); - this->packet->future = htonl ((unsigned)-1); - this->packet->past = htonl ((unsigned)-1); - this->packet->dataBytes = htonl (4); - * (int*) ((char*)this->packet + sizeof (*this->packet)) = htonl (SEQ_END_CODE); - - return send_to_network (timeToUse); - } - - if (frame) - shtag = 0; - else if (this->needHeader) - { - shtag = 1; - this->needHeader = 0; - } - - this->packet->cmd = htonl (this->cmd); - this->packet->cmdsn = htonl (this->cmdsn); - this->packet->sh = htonl (sh); - this->packet->gop = htonl (gop); - this->packet->frame = htonl (f); - if (this->frameTable[f].type == 'B') - { - int pre1 = -1, pre2 = -1, i = f; - while (i>0) - if (this->frameTable[--i].type != 'B') - { - pre1 = i; - break; - } - while (i>0) - if (this->frameTable[--i].type != 'B') - { - pre2 = i; - break; - } - if (pre2 == -1) - { - /* - fprintf (stderr, - "frame %d-%d (%d) is a B without past ref, no to be sent.\n", - gop, frame, f); - */ - return -1; - } - if (pre1 != this->lastRef[this->lastRefPtr] || - pre2 != this->lastRef[1 - this->lastRefPtr]) - { - /* - fprintf (stderr, - "send of B frame %d gaveup for past %d/future %d ref not sent.\n", - f, pre2, pre1); - */ - return -1; - } - this->packet->display = htonl (f); - this->packet->future = htonl (pre1); - this->packet->past = htonl (pre2); - } - else - { - int next = f; - int pre = f; - - while (next < this->numF && this->frameTable[++next].type == 'B'); - while (pre > 0 && this->frameTable[--pre].type == 'B'); - if (this->frameTable[f].type == 'P' && pre != this->lastRef[this->lastRefPtr]) - { - /* - fprintf (stderr, - "send of P frame %d gaveup for past ref %d not sent.\n", - f, pre); - fprintf (stderr, "ref0=%d, ref1=%d, ptr=%d.\n", - this->lastRef[0], this->lastRef[1], this->lastRefPtr); - */ - return -1; - } - this->packet->display = htonl (next); - this->packet->future = htonl ((unsigned)-1); - this->packet->past = htonl (this->frameTable[f].type == 'P' ? pre : (unsigned)-1); - } - { - char * ptr = buf; - int size = 0, offset = 0, i; - if (shtag) /* send system header */ - { - size = this->systemHeader[sh].size; - FileRead (this->systemHeader[sh].offset, ptr, size); - ptr += size; - } - if (!frame) /* send gop header */ - { - size = this->gopTable[gop].headerSize; - FileRead (this->gopTable[gop].offset, ptr, size); - ptr += size; - } - size = this->frameTable[f].size; - for (i=this->gopTable[gop].previousFrames; iframeTable[i].size; - FileRead ((this->gopTable[gop].firstIoffset + offset), ptr, size); - ptr += size; - this->packet->dataBytes = htonl (ptr - buf); - } - - { - int sent; - if (first_time == 1) - { - // ACE_DEBUG ((LM_DEBUG, - // "(%P|%t) Sending first frame to client\n")); - sent = first_packet_send_to_network (timeToUse); - } - else - sent = send_to_network (timeToUse); - if (!sent) - { - /* - fprintf (stderr, "%c%d\n", this->frameTable[f].type, f); - fprintf (stderr, "%c frame %d sent.\n", this->frameTable[f].type, f); - */ - if (this->frameTable[f].type != 'B') - { - this->lastRefPtr = 1 - this->lastRefPtr; - this->lastRef[this->lastRefPtr] = f; - } - } - return sent; - } -} - -int -Video_Global::CmdRead (char *buf, int psize) -{ - int res = wait_read_bytes (this->serviceSocket, - buf, - psize); - if (res == 0) return (1); - if (res == -1) { - fprintf (stderr, "VS error on read this->cmdSocket, size %d", psize); - perror (""); - return (-1); - } - return 0; -} - -int -Video_Global::CmdWrite (char *buf, int size) -{ - int res = wait_write_bytes (this->serviceSocket, buf, size); - if (res == -1) { - if (errno != EPIPE) perror ("VS writes to this->serviceSocket"); - return (-1); - } - return 0; -} - -int -Video_Global::PLAYliveVideo (PLAYpara * para) -{ - int doscale; - int count; - int first_frame; - int frame = para->nextFrame; - int nfds = (this->serviceSocket > this->videoSocket ? this->serviceSocket : this->videoSocket) + 1; - struct fd_set read_mask; - struct timeval tval = {0, 0}; - double ratio; - int result; - - this->currentUPF = (int) (1000000.0 / this->fps); /* ignore para.usecPerFrame */ - if (this->frameRateLimit < this->fps) { - doscale = 1; - ratio = min (this->frameRateLimit, this->fps) / this->fps; - first_frame = frame; - count = 0; - /* - fprintf (stderr, "doscale %d, this->frameRateLimit %5.2f, this->fps %5.2f, ratio %5.2f\n", - doscale, this->frameRateLimit, this->fps, ratio); - */ - } - else doscale = 0; - StartPlayLiveVideo (); - - for (;;) { - - if (doscale) { - for (;;) { - if ((int) ((frame - first_frame) * ratio + 0.5) < count) frame ++; - else break; - } - count ++; - } - SendPicture (&frame); - frame ++; - - FD_ZERO (&read_mask); - FD_SET (this->serviceSocket, &read_mask); - FD_SET (this->videoSocket, &read_mask); - - // @@ Is this code actually used anymore, i.e., do we need to - // ACE-ify it? - -#ifdef _HPUX_SOURCE - if (select (nfds, (int *)&read_mask, NULL, NULL, &tval) == -1) -#else - if (select (nfds, &read_mask, NULL, NULL, &tval) == -1) -#endif - { - if (errno == EINTR) - continue; - perror ("Error - VS select between service and video sockets"); - StopPlayLiveVideo (); - exit (1); - - } - if (FD_ISSET (this->serviceSocket, &read_mask)) /* stop */ - { - u_char tmp; - result = CmdRead ((char *)&tmp, 1); - if (result != 0) - return result; - if (tmp == CmdCLOSE) { - StopPlayLiveVideo (); - exit (0); - } - else if (tmp == CmdSTOP) { - this->cmd = tmp; - /* - fprintf (stderr, "VS: this->CmdSTOP. . .\n"); - */ - result = CmdRead ((char *)&this->cmdsn, sizeof (int)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - this->cmdsn = ntohl (this->cmdsn); -#endif - StopPlayLiveVideo (); - break; - } - else if (tmp == CmdSPEED) - { - SPEEDpara speed_para; - /* - fprintf (stderr, "VS: this->CmdSPEED. . .\n"); - */ - result = CmdRead ((char *)&speed_para, sizeof (speed_para)); - if (result != 0) - return result; - /* ignore this thing for live video */ - } - else - { - fprintf (stderr, "VS error (live): this->cmd=%d while expect STOP/SPEED.\n", tmp); - this->normalExit = 0; - StopPlayLiveVideo (); - exit (1); - } - } - if (FD_ISSET (this->videoSocket, &read_mask)) /* feedback, only for frame rate - adjustment */ - { - VideoFeedBackPara fb_para; - if (FBread ((char *)&fb_para, sizeof (fb_para)) == -1 || - ntohl (fb_para.cmdsn) != this->cmdsn) { - /* - SFprintf (stderr, "VS warning: a FB this->packet discarded.\n"); - */ - return 0; - } -#ifdef NeedByteOrderConversion - fb_para.this->frameRateLimit1000 = ntohl (fb_para.this->frameRateLimit1000); -#endif - this->frameRateLimit = fb_para.frameRateLimit1000 / 1000.0; - if (this->frameRateLimit < this->fps) { - doscale = 1; - ratio = min (this->frameRateLimit, this->fps) / this->fps; - first_frame = frame; - count = 0; - /* - fprintf (stderr, "doscale %d, this->frameRateLimit %5.2f, this->fps %5.2f, ratio %5.2f\n", - doscale, this->frameRateLimit, this->fps, ratio); - */ - } - else doscale = 0; - } - } - return 0; -} - -void -Video_Global::ComputeFirstSendPattern (float limit) -{ - char * buf = this->firstSendPattern; - int len = this->firstPatternSize; - char * pat = (char *)ACE_OS::malloc (len); - int f; - - if (pat == NULL) { - fprintf (stderr, "VS error on allocating %d bytes for computing first SP", len); - perror (""); - exit (1); - } - for (f = 0; f < len; f ++) { - pat[f] = this->frameTable[f].type; - } - memset (buf, 0, len); - - if (limit <= 0) - limit = 1.0; - - f = (int) ((double)len * - ((double)limit / (1000000.0 / (double)this->currentUPF)) + 0.5); - /* rounded to integer, instead of truncated */ - if (f >= len) - f = len; - else if (f <= 1) - f = 1; - - ComputeSendPattern (pat, buf, len, f); - - /* - f = len - f; - fprintf (stderr, "this->Firstthis->Sendthis->Pattern (%d frames dropped): ", f); - { - int i; - for (i = 0; i < len; i ++) - fputc (buf[i] ? pat[i] : '-', stderr); - } - fputc ('\n', stderr); - */ - free (pat); -} - -int -Video_Global::FrameToGroup (int * frame) -{ - int f = * frame; - int i = 0; - while (i < this->numG && this->gopTable[i].previousFrames <= f) i++; - i --; - * frame = f - this->gopTable[i].previousFrames; - return i; -} - -int -Video_Global::SendReferences (int group, int frame) -{ - u_char orgcmd; - int i, base; - int pregroup; - int result; - - if (group < 0 || group >= this->numG) return 0; - if (frame <= 0 || frame >= this->gopTable[group].totalFrames) return 0; - - orgcmd = this->cmd; - this->cmd = CmdREF; - - if (group > 0) { - pregroup = 1; - base = this->gopTable[group].previousFrames; - for (i = 0; i <= frame; i ++) { - if (this->frameTable[i + base].type == 'P') { - pregroup = 0; - break; - } - } - } - else pregroup = 0; - - if (pregroup) { /* reference frame can be in previous group */ - pregroup = group -1; - base = this->gopTable[pregroup].previousFrames; - for (i = 0; i < this->gopTable[pregroup].totalFrames; i ++) { - if (this->frameTable[i + base].type != 'B') { - /* - SFprintf (stderr, "REF group%d, frame%d\n", pregroup, i); - */ - result = SendPacket (i == 0, pregroup, i, 0); - if (result != 0) - return result; - } - } - } - - base = this->gopTable[group].previousFrames; - for (i = 0; i < frame; i ++) { - if (this->frameTable[i + base].type != 'B') { - /* - SFprintf (stderr, "REF group%d, frame%d\n", group, i); - */ - SendPacket (i == 0, group, i, 0); - } - } - this->cmd = orgcmd; -} - -int -Video_Global::GetFeedBack () -{ - VideoFeedBackPara para; - struct itimerval val; - int timerUsec; - - if (FBread ((char *)¶, sizeof (para)) == -1 || - ntohl (para.cmdsn) != this->cmdsn) { - /* - SFprintf (stderr, "VS warning: a FB this->packet discarded.\n"); - */ - return -1; - } -#ifdef NeedByteOrderConversion - para.this->needHeader = ntohl (para.this->needHeader); - para.addUsecPerFrame = ntohl (para.addUsecPerFrame); - para.addFrames = ntohl (para.addFrames); - para.this->sendthis->PatternGops = ntohl (para.this->sendthis->PatternGops); - para.this->frameRateLimit1000 = ntohl (para.this->frameRateLimit1000); -#endif - this->frameRateLimit = para.frameRateLimit1000 / 1000.0; - this->sendPatternGops = para.sendPatternGops; - - if (!Video_Timer_Global::timerOn) return 0; - - this->needHeader = para.needHeader; - memcpy (this->sendPattern, para.sendPattern, PATTERN_SIZE); - if (para.addFrames <= 0 || Video_Timer_Global::timerAdjust < MAX_TIMER_ADJUST) - { - Video_Timer_Global::timerAdjust += para.addFrames * SPEEDUP_INV_SCALE; - Video_Timer_Global::TimerSpeed (); - } - else /* drastic compensation for big gap */ - this->addedSignals += para.addFrames; - if (para.addUsecPerFrame) { - this->addedUPF += para.addUsecPerFrame; - Video_Timer_Global::TimerSpeed (); - } - /* - SFprintf (stderr, "VS fb: addf %d, addupf %d\n", - para.addFrames, para.addUsecPerFrame); - */ - - return 0; -} - -int -Video_Global::SendPicture (int * frame) -{ - int size; - char * buf = ((char *) this->packet) + sizeof (VideoPacket); - /* - SFprintf (stderr, "VS to send picture %d.\n", *frame); - */ - - size = ReadLiveVideoPicture (frame, buf, this->packetBufSize); - - this->packet->currentUPF = ntohl (this->currentUPF); - this->packet->cmd = htonl (this->cmd); - this->packet->cmdsn = htonl (this->cmdsn); - this->packet->sh = this->packet->gop = this->packet->frame = this->packet->display = htonl (*frame); - this->packet->future = htonl ((unsigned)-1); - this->packet->past = htonl ((unsigned)-1); - - this->packet->dataBytes = htonl (size); - - return send_to_network (this->currentUPF); -} - -int -Video_Global::ReadInfoFromFile (void) -{ - int fd = -1, i; - int fnlen = strlen (this->videoFile); - - strcpy (&this->videoFile[fnlen], ".Info"); - fd = open (this->videoFile, O_RDONLY); - if (fd == -1) - { - fprintf (stderr, "Reminder: VS fails to open %s for read, ", this->videoFile); - perror ("try create one"); - goto fail_ReadInfoFromFile; - } - read_int (fd, &i); - if (i != this->fileSize) - { - fprintf (stderr, "Warning: this->fileSize in Info: %d not the same as actual %d.\n", - i, this->fileSize); - goto fail_ReadInfoFromFile; - } - - read_int (fd, &this->maxS); - read_int (fd, &this->maxG); - read_int (fd, &this->maxI); - read_int (fd, &this->maxP); - read_int (fd, &this->maxB); - read_int (fd, &this->minS); - read_int (fd, &this->minG); - read_int (fd, &this->minI); - read_int (fd, &this->minP); - read_int (fd, &this->minB); - read_int (fd, &this->numS); - read_int (fd, &this->numG); - read_int (fd, &this->numF); - read_int (fd, &this->numI); - read_int (fd, &this->numP); - read_int (fd, &this->numB); - read_int (fd, &this->averageFrameSize); - read_int (fd, &this->horizontalSize); - read_int (fd, &this->verticalSize); - read_int (fd, &this->pelAspectRatio); - read_int (fd, &this->pictureRate); - read_int (fd, &this->vbvBufferSize); - read_int (fd, &this->patternSize); - - memset (this->pattern, 0, PATTERN_SIZE); - read_bytes (fd, this->pattern, this->patternSize); -#ifdef STAT - this->framesSent = (char *)ACE_OS::malloc ((this->numF + 7)>>3); - if (this->framesSent == NULL) - { - fprintf (stderr, "Error: VS fails to alloc mem for this->framesSent for %d frames", this->numF); - perror (""); - exit (1); - } -#endif - this->systemHeader = (struct Video_Global::SystemHeader *)ACE_OS::malloc (sizeof (struct Video_Global::SystemHeader) * this->numS); - if (this->systemHeader == NULL) - { - perror ("Error: VS error on ACE_OS::malloc this->SystemHeader"); - exit (1); - } - this->gopTable = (struct Video_Global::GopTable *)ACE_OS::malloc (sizeof (struct Video_Global::GopTable) * this->numG); - if (this->gopTable == NULL) - { - perror ("Error: VS error on ACE_OS::malloc GopHeader"); - exit (1); - } - this->frameTable = (struct Video_Global::FrameTable *)ACE_OS::malloc (sizeof (Video_Global::FrameTable) * this->numF); - if (this->frameTable == NULL) - { - perror ("Error: VS error on ACE_OS::malloc this->frameTable"); - exit (1); - } - this->packetBufSize = this->maxS + this->maxG + max (this->maxI, max (this->maxP, this->maxB)); - this->packet = (VideoPacket *)ACE_OS::malloc (sizeof (VideoMessage) + sizeof (VideoPacket) + - this->packetBufSize); - if (this->packet == NULL) - { - perror ("Error: VS error on ACE_OS::malloc this->packet buffer"); - exit (1); - } - this->packet = (VideoPacket *) ((char *)this->packet + sizeof (VideoMessage)); - - for (i = 0; i < this->numS; i ++) - { - read_int (fd, (int *)&this->systemHeader[i].offset); - read_int (fd, &this->systemHeader[i].size); - } - for (i = 0; i < this->numG; i ++) - { - read_int (fd, &this->gopTable[i].systemHeader); - read_int (fd, (int *)&this->gopTable[i].offset); - read_int (fd, &this->gopTable[i].headerSize); - read_int (fd, &this->gopTable[i].size); - read_int (fd, &this->gopTable[i].totalFrames); - read_int (fd, &this->gopTable[i].previousFrames); - read_int (fd, (int *)&this->gopTable[i].firstIoffset); - } - for (i = 0; i < this->numF; i ++) - { - read_byte (fd, &this->frameTable[i].type); - read_short (fd, (short *)&this->frameTable[i].size); - } - - close (fd); - /* - fprintf (stderr, "Read Info from %s\n", this->videoFile); - */ - this->videoFile[fnlen] = 0; - return 0; -fail_ReadInfoFromFile: - if (fd >= 0) - close (fd); - this->videoFile[fnlen] = 0; - /* - fprintf (stderr, "To scan Info from %s\n", this->videoFile); - */ - return -1; -} - -void -Video_Global::WriteInfoToFile (void) -{ - int fd = -1, i; - int fnlen = strlen (this->videoFile); - - strcpy (&this->videoFile[fnlen], ".Info"); - fd = open (this->videoFile, O_WRONLY | O_CREAT, 0444); - if (fd == -1) - { - fprintf (stderr, "VS fails to open %s for write", this->videoFile); - perror (""); - goto fail_WriteInfoToFile; - } - write_int (fd, this->fileSize); - write_int (fd, this->maxS); - write_int (fd, this->maxG); - write_int (fd, this->maxI); - write_int (fd, this->maxP); - write_int (fd, this->maxB); - write_int (fd, this->minS); - write_int (fd, this->minG); - write_int (fd, this->minI); - write_int (fd, this->minP); - write_int (fd, this->minB); - write_int (fd, this->numS); - write_int (fd, this->numG); - write_int (fd, this->numF); - write_int (fd, this->numI); - write_int (fd, this->numP); - write_int (fd, this->numB); - write_int (fd, this->averageFrameSize); - write_int (fd, this->horizontalSize); - write_int (fd, this->verticalSize); - write_int (fd, this->pelAspectRatio); - write_int (fd, this->pictureRate); - write_int (fd, this->vbvBufferSize); - write_int (fd, this->patternSize); - - write_bytes (fd, this->pattern, this->patternSize); - - for (i = 0; i < this->numS; i ++) - { - write_int (fd, this->systemHeader[i].offset); - write_int (fd, this->systemHeader[i].size); - } - for (i = 0; i < this->numG; i ++) - { - write_int (fd, this->gopTable[i].systemHeader); - write_int (fd, this->gopTable[i].offset); - write_int (fd, this->gopTable[i].headerSize); - write_int (fd, this->gopTable[i].size); - write_int (fd, this->gopTable[i].totalFrames); - write_int (fd, this->gopTable[i].previousFrames); - write_int (fd, this->gopTable[i].firstIoffset); - } - for (i = 0; i < this->numF; i ++) - { - write_byte (fd, this->frameTable[i].type); - write_short (fd, this->frameTable[i].size); - } - - close (fd); - this->videoFile[fnlen] = 0; - return; -fail_WriteInfoToFile: - if (fd >= 0) - close (fd); - this->videoFile[fnlen] = 0; - return; -} - -int -Video_Global::init_MPEG1_video_file (void) -{ - u_char nb; - int state = 0; - u_long fileptr = 0; - u_long i, j, k; - int shptr, gopptr, ftptr; - int inpic = 0; - u_long picptr = 0; - int pictype = 0; - int first = 0; - int failureType = 0; - - this->fp = fopen (this->videoFile, "r"); - if (this->fp == NULL) - { - fprintf (stderr, "error on opening video file %s", this->videoFile); - perror (""); - return 2; - } - if (fseek (this->fp, 0, 2) == -1) - { - fprintf (stderr, "File %s not seekable", this->videoFile); - perror (""); - return 3; - } - this->fileSize = ftell (this->fp); - - fseek (this->fp, 0, 0); - - if (ReadInfoFromFile ()) - { - for (;;) - { - nextByte; - if (state >= 0 && nb == 0x00) - state ++; - else if (state >= 2 && nb == 0x01) - state = -1; - else if (state == -1) - { - if (!first) first ++; - else if (first == 1) first ++; - - switch (nb) - { - case 0xb7: /* seq_end_code */ - goto exit_phase1; - break; - case 0xb3: /* seq_start_code */ - if (first == 1) first = 3; - if (first != 3) - { - fprintf (stderr, "VS error: given file is not in MPEG format.\n"); - return 4; - } - this->numS ++; - break; - case 0xb8: /* gop_start_code */ - this->numG ++; - break; - case 0x00: /* picture_start_code */ - nextByte; - nextByte; - nb &= 0x38; - if (nb == 0x08) - { - this->numI ++; - if (this->numG == 2) - this->pattern[this->patternSize++] = 'I'; - } - else if (nb == 0x10) - { - this->numP ++; - if (this->numG == 2) - this->pattern[this->patternSize++] = 'P'; - } - else if (nb == 0x18) - { - this->numB ++; - if (this->numG == 2) - this->pattern[this->patternSize++] = 'B'; - } - /* - else - fprintf (stderr, "VS error: unkonw picture type %d\n", nb); - */ - break; - default: - break; - } - state = 0; - } - else - state = 0; - } - exit_phase1: - - if (first != 3) - { - fprintf (stderr, "VS error: given file \"%s\" is not of MPEG format.\n", this->videoFile); - return 4; - } - - this->pattern[this->patternSize] = 0; - memset (this->sendPattern, 1, PATTERN_SIZE); - - this->numF = this->numI + this->numP + this->numB; - this->averageFrameSize = fileptr / (unsigned)this->numF; - /* - fprintf (stderr, "Pass one finished, total bytes read: %u, average frame size %d\n", - fileptr, this->averageFrameSize); - fprintf (stderr, "this->numS-%d, this->numG-%d, this->numF-%d, this->numI-%d, this->numP-%d, this->numB-%d\n", - this->numS, this->numG, this->numI, this->numI, this->numP, this->numB); - fprintf (stderr, "this->Pattern detected: %s\n", this->pattern); - */ - if (this->numF > MAX_FRAMES) - { - fprintf (stderr, "VS error: this->Number of frames (%d) is bigger than MAX_FRAMES (%d).\n\ -you need to update the constant definition in common.h and recompile.\n", - this->numF, MAX_FRAMES); - return 5; - } - -#ifdef STAT - this->framesSent = (char *)ACE_OS::malloc ((this->numF + 7)>>3); - if (this->framesSent == NULL) - { - fprintf (stderr, "VS fails to alloc mem for this->framesSent for %d frames", this->numF); - perror (""); - return 6; - } -#endif - - this->systemHeader = (struct Video_Global::SystemHeader *)ACE_OS::malloc (sizeof (struct Video_Global::SystemHeader) * this->numS); - if (this->systemHeader == NULL) - { - perror ("VS error on ACE_OS::malloc this->SystemHeader"); - return 7; - } - this->gopTable = (struct Video_Global::GopTable *)ACE_OS::malloc (sizeof (struct Video_Global::GopTable) * this->numG); - if (this->gopTable == NULL) - { - perror ("VS error on ACE_OS::malloc GopHeader"); - return 8; - } - this->frameTable = (struct Video_Global::FrameTable *)ACE_OS::malloc (sizeof (Video_Global::FrameTable) * this->numF); - if (this->frameTable == NULL) - { - perror ("VS error on ACE_OS::malloc this->frameTable"); - return 9; - } - - rewind (this->fp); - fileptr = 0; - state = 0; - inpic = 0; - shptr = -1; - gopptr = -1; - ftptr = 0; - - for (;;) - { - nextByte; - if (state >= 0 && nb == 0x00) - state ++; - else if (state >= 2 && nb == 0x01) - state = -1; - else if (state == -1) - { - switch (nb) - { - case 0xb7: /* seq_end_code */ - if (gopptr >= 0 && this->gopTable[gopptr].size == 0) - this->gopTable[gopptr].size = fileptr - this->gopTable[gopptr].offset - 4; - computePicSize; - goto exit_phase2; - break; - case 0xb3: /* seq_start_code */ - if (gopptr >= 0 && this->gopTable[gopptr].size == 0) - this->gopTable[gopptr].size = fileptr - this->gopTable[gopptr].offset - 4; - computePicSize; - shptr ++; - this->systemHeader[shptr].offset = fileptr - 4; - this->systemHeader[shptr].size = 0; - break; - case 0xb8: /* gop_start_code */ - if (this->systemHeader[shptr].size == 0) - this->systemHeader[shptr].size =fileptr - this->systemHeader[shptr].offset - 4; - if (gopptr >= 0 && this->gopTable[gopptr].size == 0) - this->gopTable[gopptr].size = fileptr - this->gopTable[gopptr].offset - 4; - computePicSize; - gopptr ++; - this->gopTable[gopptr].systemHeader = shptr; - this->gopTable[gopptr].offset = fileptr - 4; - this->gopTable[gopptr].headerSize = 0; - this->gopTable[gopptr].size = 0; - this->gopTable[gopptr].totalFrames = 0; - this->gopTable[gopptr].previousFrames = gopptr ? - (this->gopTable[gopptr - 1].totalFrames + this->gopTable[gopptr - 1].previousFrames) : 0; - - break; - case 0x00: /* picture_start_code */ - if (this->gopTable[gopptr].headerSize == 0) - { - this->gopTable[gopptr].headerSize = fileptr - this->gopTable[gopptr].offset - 4; - this->gopTable[gopptr].firstIoffset = fileptr - 4; - } - this->gopTable[gopptr].totalFrames ++; - computePicSize; - picptr = fileptr - 4; - nextByte; - nextByte; - nb &= 0x38; - if (nb == 0x08) - { - pictype = 'I'; - inpic = 1; - } - else if (nb == 0x10) - { - pictype = 'P'; - inpic = 1; - } - else if (nb == 0x18) - { - pictype = 'B'; - inpic = 1; - } - break; - default: - - break; - } - state = 0; - } - else - state = 0; - } - - exit_phase2: - for (shptr = 0; shptrnumS; shptr++) - { - this->maxS = max (this->maxS, this->systemHeader[shptr].size); - this->minS = min (this->minS, this->systemHeader[shptr].size); - } - for (gopptr = 0; gopptrnumG; gopptr++) - { - this->maxG = max (this->maxG, this->gopTable[gopptr].headerSize); - this->minG = min (this->minG, this->gopTable[gopptr].headerSize); - } - this->packetBufSize = this->maxS + this->maxG + max (this->maxI, max (this->maxP, this->maxB)); - this->packet = (VideoPacket *)ACE_OS::malloc (sizeof (VideoMessage) + sizeof (VideoPacket) + - this->packetBufSize); - if (this->packet == NULL) - { - perror ("VS error on ACE_OS::malloc this->packet buffer"); - return 10; - } - this->packet = (VideoPacket *) ((char *)this->packet + sizeof (VideoMessage)); - /* - fprintf (stderr, "Pass 2 finished.\n"); - fprintf (stderr, "this->maxS-%d, this->maxG-%d, this->maxI-%d, this->maxP-%d, this->maxB-%d.\n", this->maxS, this->maxG, this->maxI, this->maxP, this->maxB); - fprintf (stderr, "this->minS-%d, this->minG-%d, this->minI-%d, this->minP-%d, this->minB-%d.\n", this->minS, this->minG, this->minI, this->minP, this->minB); - */ - /* - { - int i; - - fprintf (stderr, "id: offset size -- system header table:\n"); - for (i=0; inumS; i++) - fprintf (stderr, "%-3d %-9u %d\n", i, this->systemHeader[i].offset, this->systemHeader[i].size); - fprintf (stderr, - "id: header offset hdsize totSize frames preframs Ioffset Isize -- GOP\n"); - for (i=0; inumG; i++) - { - fprintf (stderr, "%-4d %-8d %-8u %-8d %-8d %-8d %-8d %-8u %d\n", - i, - this->gopTable[i].this->systemHeader, - this->gopTable[i].offset, - this->gopTable[i].headerSize, - this->gopTable[i].size, - this->gopTable[i].totalFrames, - this->gopTable[i].previousFrames, - this->gopTable[i].firstIoffset, - this->frameTable[this->gopTable[i].previousFrames].size - ); - } - - fprintf (stderr, "\nframe information:"); - for (i=0; inumF; i++) - fprintf (stderr, "%c%c%-8d", (i%10 ? '\0' : '\n'), this->frameTable[i].type, this->frameTable[i].size); - fprintf (stderr, "\n"); - - } - */ - fseek (this->fp, this->systemHeader[0].offset+4, 0); - nextByte; - this->horizontalSize = ((int)nb <<4) & 0xff0; - nextByte; - this->horizontalSize |= (nb >>4) & 0x0f; - this->verticalSize = ((int)nb <<8) & 0xf00; - nextByte; - this->verticalSize |= (int)nb & 0xff; - nextByte; - this->pelAspectRatio = ((int)nb >> 4) & 0x0f; - this->pictureRate = (int)nb & 0x0f; - nextByte; - nextByte; - nextByte; - this->vbvBufferSize = ((int)nb << 5) & 0x3e0; - nextByte; - this->vbvBufferSize |= ((int)nb >>3) & 0x1f; - /* - fprintf (stderr, "SysHeader info: hsize-%d, vsize-%d, pelAspect-%d, rate-%d, vbv-%d.\n", - this->horizontalSize, this->verticalSize, this->pelAspectRatio, this->pictureRate, this->vbvBufferSize); - */ - WriteInfoToFile (); - } -#if 0 - { - int i, j = 20; - - for (i = this->numG - 1;; i --) { - if (this->gopTable[i].offset < 4235260) { - fprintf (stderr, "group %d: offset %ld\n", i, this->gopTable[i].offset); - if (j -- == 0) break; - } - } - /* - for (i = 0; i < this->numG; i ++) { - if (this->gopTable[i].previousFrames > 1800) { - fprintf (stderr, "group %d: offset %ld pre-frames %d\n", - i, this->gopTable[i].offset, this->gopTable[i].previousFrames); - break; - } - } - */ - } -#endif - { - this->firstPatternSize = this->gopTable[0].totalFrames; - this->firstSendPattern = (char *)ACE_OS::malloc (this->firstPatternSize); - if (this->firstSendPattern == NULL) - { - fprintf (stderr, "VS failed to allocate this->firstthis->Sendthis->Pattern for %d frames", - this->firstPatternSize); - perror (""); - return 11; - } - } - this->firstGopFrames = this->gopTable[0].totalFrames; - return 0; -} -int -Video_Global::play_send (int debug) -{ - // ACE_DEBUG ((LM_DEBUG,"play_send: sending the frame \n")); - int curGroup = Video_Timer_Global::timerGroup; - int curFrame = Video_Timer_Global::timerFrame; - int curHeader = Video_Timer_Global::timerHeader; - char * sp; - - if (this->preGroup != curGroup || - curFrame != this->preFrame) - { - int sendStatus = -1; - int frameStep = 1; - if (debug) - cerr << " curgroup = " << curGroup << endl ; - if (curGroup == 0) - { - - int i = curFrame + 1; - while (i < this->firstPatternSize && - !this->firstSendPattern[i]) - { - frameStep ++; - i++; - } - } - else /* (curGroup > 0) */ - { - int i = curFrame + 1; - sp = this->sendPattern + ((curGroup - 1) % this->sendPatternGops) * this->patternSize; - while (i < this->patternSize && !sp[i]) - { - frameStep ++; - i++; - } - } - if (curGroup == 0) - { - if (debug) - cerr << "first : " << - this->firstSendPattern[curFrame] << endl; - if (this->firstSendPattern[curFrame]) - sendStatus = 0; - else /* (!this->firstthis->Sendthis->Pattern[curFrame]) */ - { - int i = curFrame - 1; - while (i > 0 && !this->firstSendPattern[i]) - i--; - if (i > this->preFrame) - /* the frame (curGroup, i) hasn't been sent yet */ - { - sendStatus = 0; - curFrame = i; - } - else - sendStatus = -1; - if (debug) - cerr << "SendStatus = " << sendStatus << endl; - } - } - else if (sp[curFrame]) /* curGroup > 0 */ - sendStatus = 0; - else /* (!sp[curFrame]) */ - { - int i = curFrame - 1; - while (i > 0 && !sp[i]) - i--; - if (curGroup == this->preGroup && i > this->preFrame) - /* the frame (curGroup, i) hasn't been sent yet */ - { - sendStatus = 0; - curFrame = i; - } - else - sendStatus = -1; - } - if (!sendStatus) - { - // Send the current video frame, calls send_to_network which - // fragments and sends via blocking write . - sendStatus = this->SendPacket (this->preHeader != curHeader, - curGroup, curFrame, - (this->currentUPF + this->addedUPF) * frameStep); - if (sendStatus == -1) - return -1; - if (!sendStatus) - { - this->preHeader = curHeader; - this->preGroup = curGroup; - this->preFrame = curFrame; -#ifdef STAT - if (this->play_para.collectStat) - { - int f = this->gopTable[curGroup].previousFrames + curFrame; - this->framesSent[f>>3] |= (1 << (f % 8)); - } -#endif - } - } - } - return 0; -} - -int -Video_Global::fast_play_send (void) -{ - if (this->fast_preGroup != Video_Timer_Global::timerGroup) - { - int result; - result = this->SendPacket (this->fast_preHeader != Video_Timer_Global::timerHeader, Video_Timer_Global::timerGroup, 0, - this->fast_para.usecPerFrame * this->patternSize >> 2); - if (result == -1) - return -1; - this->fast_preHeader = Video_Timer_Global::timerHeader; - this->fast_preGroup = Video_Timer_Global::timerGroup; - } - return 0; -} - -int -Video_Global::position (void) -{ - int result; - POSITIONpara pos_para; - /* - fprintf (stderr, "POSITION . . .\n"); - */ - result = CmdRead ((char *)&pos_para, sizeof (pos_para)); - if (result != 0) - return result; - - if (this->live_source) return 0; - -#ifdef NeedByteOrderConversion - pos_para.nextGroup = ntohl (pos_para.nextGroup); - pos_para.sn = ntohl (pos_para.sn); -#endif - - CheckGroupRange (pos_para.nextGroup); - this->cmdsn = pos_para.sn; - result = SendPacket (this->numS>1 || pos_para.nextGroup == 0, pos_para.nextGroup, 0, 0); - return result; -} - -int -Video_Global::step_video () -{ - int group; - STEPpara step_para; - int tag = 0; - int result; - - result = CmdRead ((char *)&step_para, sizeof (step_para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - step_para.sn = ntohl (step_para.sn); - step_para.this->nextFrame = ntohl (step_para.this->nextFrame); -#endif - - this->cmdsn = step_para.sn; - - if (!this->live_source) { - if (step_para.nextFrame >= this->numF) /* send SEQ_END */ - { - tag = 1; - step_para.nextFrame --; - } - /* - fprintf (stderr, "STEP . . .frame-%d\n", step_para.this->nextFrame); - */ - CheckFrameRange (step_para.nextFrame); - group = FrameToGroup (&step_para.nextFrame); - if (this->precmd != CmdSTEP && !tag ) { - result = SendReferences (group, step_para.nextFrame); - if (result < 0 ) - return result; - } - } - if (this->live_source) StartPlayLiveVideo (); - - if (this->live_source) { - SendPicture (&step_para.nextFrame); - } - else if (this->video_format == VIDEO_MPEG1) { - SendPacket (this->numS>1, group, tag ? this->numF : step_para.nextFrame, 0); - } - else { - fprintf (stderr, "VS: wierd1\n"); - } - - if (this->live_source) StopPlayLiveVideo (); - return 0; -} - -int -Video_Global::fast_forward (void) -{ - // return this->init_fast_play () - return 0; -} - -int -Video_Global::fast_backward (void) -{ -// return this->init_fast_play (); - return 0; -} - -int -Video_Global::stat_stream (void) -{ - int i, j = 0; - for (i = 0; i < this->numF; i++) - { - short size = htons (this->frameTable[i].size); - char type = this->frameTable[i].type; - if (i == this->gopTable[j].previousFrames) - { - type = tolower (type); - j ++; - } - CmdWrite ((char *)&type, 1); - CmdWrite ((char *)&size, 2); - } - return 0; -} - -int -Video_Global::stat_sent (void) -{ -#ifdef STAT - CmdWrite ((char *)this->framesSent, (this->numF + 7) / 8); -#else - int i; - char zeroByte = 0; - for (i = 0; i < (this->numF + 7) / 8; i++) - CmdWrite ((char *)&zeroByte, 1); -#endif - return 0; -} - -int -Video_Global::init_play (Video_Control::PLAYpara para, - CORBA::Long_out vts) -{ - // ~~ why do we need the play_para in Video_Global , why can't just use - // the para that's passed. - int result; - - ACE_DEBUG ((LM_DEBUG, - " (%P|%t) Video_Global::init_play ()")); - - // this gets the parameters for the play command - // result = this->CmdRead ((char *)&this->play_para, sizeof (this->play_para)); - // if (result != 0) - // return result; - - // Assign the passed play - this->play_para = para ; -#ifdef NeedByteOrderConversion - this->play_para.sn = ntohl (this->play_para.sn); - this->play_para.nextFrame = ntohl (this->play_para.nextFrame); - this->play_para.usecPerFrame = ntohl (this->play_para.usecPerFrame); - this->play_para.framesPerSecond = ntohl (this->play_para.framesPerSecond); - this->play_para.frameRateLimit1000 = ntohl (this->play_para.frameRateLimit1000); - this->play_para.collectStat = ntohl (this->play_para.collectStat); - this->play_para.sendPatternGops = ntohl (this->play_para.sendPatternGops); - this->play_para.VStimeAdvance = ntohl (this->play_para.VStimeAdvance); -#endif - - this->frameRateLimit = this->play_para.frameRateLimit1000 / 1000.0; - this->cmdsn = this->play_para.sn; - this->currentUPF = this->play_para.usecPerFrame; - this->VStimeAdvance = this->play_para.VStimeAdvance; - - vts = get_usec (); - // cerr << "vts is " << vts << endl; - // begin evil code - // { - // int vts = get_usec (); - // this->CmdWrite ((char *)&ts, sizeof (int)); - // } - // end evil code - - if (this->live_source || this->video_format != VIDEO_MPEG1) { - PLAYpara live_play_para; // xxx hack to compile the code - if (this->live_source) - this->PLAYliveVideo (&live_play_para); - return 0; - } - - fprintf (stderr, "this->VStimeAdvance from client: %d\n", this->VStimeAdvance); - - this->sendPatternGops = this->play_para.sendPatternGops; - ComputeFirstSendPattern (this->frameRateLimit); -#ifdef STAT - if (this->play_para.collectStat) - memset (this->framesSent, 0, (this->numF + 7)>>3); -#endif - CheckFrameRange (this->play_para.nextFrame); - Video_Timer_Global::timerFrame = this->play_para.nextFrame; - Video_Timer_Global::timerGroup = FrameToGroup (&Video_Timer_Global::timerFrame); - Video_Timer_Global::timerHeader = this->gopTable[Video_Timer_Global::timerGroup].systemHeader; - // memcpy (this->sendPattern, this->play_para.sendPattern, PATTERN_SIZE); - // Do a sequence copy.. - - for (int i=0; isendPattern[i] = this->play_para.sendPattern[i]; - result = SendReferences (Video_Timer_Global::timerGroup, Video_Timer_Global::timerFrame); - if (result < 0) - return result; - Video_Timer_Global::StartTimer (); - - // Sends the first frame of the video... not true anymore since the - // user can position the stream anywhere and then call play. - result = play_send (0); - return 0; -} - -CORBA::Boolean -Video_Global::init_fast_play (const Video_Control::FFpara &ff_para ) -{ - // save the parameters for future reference - this->fast_para = ff_para; - int result; - - // result = CmdRead ((char *)&this->ff_para, sizeof (this->ff_para)); - // if (result != 0) - // return result; - - if (this->live_source) return 0; - - this->VStimeAdvance = ff_para.VStimeAdvance; - /* - fprintf (stderr, "this->VStimeAdvance from client: %d\n", this->VStimeAdvance); - */ - CheckGroupRange (ff_para.nextGroup); - this->cmdsn = ff_para.sn; - Video_Timer_Global::timerGroup = ff_para.nextGroup; - Video_Timer_Global::timerFrame = 0; - Video_Timer_Global::timerHeader = this->gopTable[Video_Timer_Global::timerGroup].systemHeader; - this->currentUPF = ff_para.usecPerFrame; - Video_Timer_Global::StartTimer (); - - fast_play_send (); - return 0; -} - -int -Video_Global::init_video (void) -{ - INITvideoPara para; - int failureType = 0; - int result; - /* - fprintf (stderr, "VS about to read Para.\n"); - */ - result = CmdRead ((char *)¶, sizeof (para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl (para.sn); - para.version = ntohl (para.version); - para.nameLength = ntohl (para.nameLength); -#endif - if (para.nameLength>0) - { - result = CmdRead (this->videoFile, para.nameLength); - if (result != 0) - return result; - } - if (Mpeg_Global::session_num > Mpeg_Global::session_limit || para.version != VERSION) { - char errmsg[128]; - this->cmd = CmdFAIL; - CmdWrite ((char *)&this->cmd, 1); - if (Mpeg_Global::session_num > Mpeg_Global::session_limit) { - sprintf (errmsg, - "Too many sessions being serviced, please try again later.\n"); - } - else { - sprintf (errmsg, "Version # not match, VS %d.%02d, Client %d.%02d", - VERSION / 100, VERSION % 100, - para.version / 100, para.version % 100); - } - write_string (this->serviceSocket, errmsg); - exit (0); - } - this->cmdsn = para.sn; - /* - fprintf (stderr, "MPEG file %s got.\n", this->videoFile); - */ - this->videoFile[para.nameLength] = 0; - - if (!strncasecmp ("LiveVideo", this->videoFile, 9)) { - if (OpenLiveVideo (&this->video_format, &this->horizontalSize, - &this->verticalSize, &this->averageFrameSize, - &this->fps, &this->pelAspectRatio) == -1) { - failureType = 100; - goto failure; - } - if (this->video_format == VIDEO_MPEG2) { - failureType = 101; - goto failure; - } - this->live_source = 1; - - this->fileSize =0x7fffffff; - this->maxS = this->maxG = this->maxI = this->maxP = this->maxB = this->minS = this->minG = this->minI = this->minP = this->minB = 1; - this->numS = this->numG = this->numF = this->numI = 0x7fffffff; - this->numP = this->numB = 0; - this->vbvBufferSize = 1; - this->firstGopFrames = 1; - this->patternSize = 1; - this->pattern[0] = 'I'; - this->pattern[1] = 0; - this->packetBufSize = this->verticalSize * this->horizontalSize * 3; - this->packet = (VideoPacket *)ACE_OS::malloc (sizeof (VideoMessage) + sizeof (VideoPacket) + - this->packetBufSize); - if (this->packet == NULL) - { - perror ("Error: VS error on ACE_OS::malloc this->packet buffer"); - exit (1); - } - this->packet = (VideoPacket *) ((char *)this->packet + sizeof (VideoMessage)); - - } - else { - static double pictureRateTable[] = {23.976, 24, 25, 29.97, 30, 50, 59.94, 60}; - - this->video_format = VIDEO_MPEG1; - failureType = init_MPEG1_video_file (); - if (failureType) goto failure; - this->fps = pictureRateTable[this->pictureRate - 1]; - } - - { - INITvideoReply reply; - - reply.totalHeaders = htonl (this->numS); - reply.totalGroups = htonl (this->numG); - reply.totalFrames = htonl (this->numF); - reply.sizeIFrame = htonl (this->maxI); - reply.sizePFrame = htonl (this->maxP); - reply.sizeBFrame = htonl (this->maxB); - reply.sizeSystemHeader = htonl (this->maxS); - reply.sizeGop = htonl (this->maxG); - reply.averageFrameSize = htonl (this->averageFrameSize); - reply.verticalSize = htonl (this->verticalSize); - reply.horizontalSize = htonl (this->horizontalSize); - reply.pelAspectRatio = htonl (this->pelAspectRatio); - reply.pictureRate1000 = htonl ((int) (this->fps * 1000)); - reply.vbvBufferSize = htonl (this->vbvBufferSize); - reply.firstGopFrames = htonl (this->firstGopFrames); - reply.patternSize = htonl (this->patternSize); - strncpy (reply.pattern, this->pattern, PATTERN_SIZE); - - reply.live = htonl (this->live_source); - reply.format = htonl (this->video_format); - - CmdWrite ((char *)&this->cmd, 1); - - CmdWrite ((char *)&reply, sizeof (reply)); - - /* write the first SH, GOP and IFrame to this->serviceSocket (TCP), - using code for SendPacket () */ - { - int tmpSocket = this->videoSocket; - - if (this->live_source) StartPlayLiveVideo (); - - this->videoSocket = this->serviceSocket; - - if (this->live_source) { - int frame = 0; - SendPicture (&frame); - } - else if (this->video_format == VIDEO_MPEG1) { - SendPacket (1, 0, 0, 0); - } - else { - fprintf (stderr, "VS: this->video_format %d not supported.\n", - this->video_format); - } - this->videoSocket = tmpSocket; - - if (this->live_source) StopPlayLiveVideo (); - } - - return 0; - - } -failure: - { - char * msg; - char errmsg[64]; - this->cmd = CmdFAIL; - sprintf (errmsg, "VS failed to alloc internal buf (type %d)", failureType); - CmdWrite ((char *)&this->cmd, 1); - msg = failureType == 1 ? "not a complete MPEG stream" : - failureType == 2 ? "can't open MPEG file" : - failureType == 3 ? "MPEG file is not seekable" : - failureType == 4 ? "not an MPEG stream" : - failureType == 5 ? - "too many frames in MPEG file, need change MAX_FRAMES and recompile VS" : - failureType == 100 ? "failed to connect to live video source" : - failureType == 101 ? "live MPEG2 not supported" : - errmsg; - write_string (this->serviceSocket, msg); - exit (0); - } -} - -//-------------------------------------------------------- -// Video_Timer_Global methods -void -Video_Timer_Global::StartTimer (void) -{ - VIDEO_SINGLETON::instance ()->addedUPF = 0; - VIDEO_SINGLETON::instance ()->addedSignals = 0; - timerAdjust = (VIDEO_SINGLETON::instance ()->VStimeAdvance * SPEEDUP_INV_SCALE) / VIDEO_SINGLETON::instance ()->currentUPF; - /* - SFprintf (stderr, "VS StartTimer (): fast-start frames %d\n", - timerAdjust / SPEEDUP_INV_SCALE); - */ - TimerSpeed (); - // setsignal (SIGALRM, timerHandler); - timerOn = 1; - preTimerVal = get_usec (); - /* - fprintf (stderr, "VS: timer started at %d upf.\n", VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF); - */ -} - -void -Video_Timer_Global::StopTimer (void) -{ - struct itimerval val; - // ## I have to incorporate this logic into the changed code - // setsignal (SIGALRM, SIG_IGN); - val.it_interval.tv_sec = val.it_value.tv_sec = 0; - val.it_interval.tv_usec = val.it_value.tv_usec = 0; - setitimer (ITIMER_REAL, &val, NULL); - timerOn = 0; - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Timer_Global::StopTimer: timer stopped\n")); -} - -void -Video_Timer_Global::TimerSpeed (void) -{ - struct itimerval val; - int usec = VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF; - if (Mpeg_Global::drift_ppm) { - /* - int drift = (double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0; - SFprintf (stderr, "Mpeg_Global::drift_ppm %d, usec %d, drift %d, new usec %d\n", - Mpeg_Global::drift_ppm, usec, drift, usec - drift); - */ - usec -= (int) ((double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0); - } - if (timerAdjust > 1) - usec = (int) (((double)usec * (double) (SPEEDUP_INV_SCALE - 1)) / - (double)SPEEDUP_INV_SCALE); - val.it_interval.tv_sec = val.it_value.tv_sec = usec / 1000000; - val.it_interval.tv_usec = val.it_value.tv_usec = usec % 1000000; - setitimer (ITIMER_REAL, &val, NULL); - /* - SFprintf (stderr, - "VS TimerSpeed () at %s speed, timerAdjust %d VIDEO_SINGLETON::instance ()->addedSignals %d.\n", - (timerAdjust > 1) ? "higher" : "normal", timerAdjust, VIDEO_SINGLETON::instance ()->addedSignals); - */ - -} - -void -Video_Timer_Global::TimerProcessing (void) -{ - /* - fprintf (stderr, "VS: timerHandler...\n"); - */ - if (!timerOn) { - return; - } - if (timerAdjust < 0) - { - timerAdjust += SPEEDUP_INV_SCALE; - return; - } - if (timerAdjust >0) - { - if ((--timerAdjust) == 0) - TimerSpeed (); - } - if (VIDEO_SINGLETON::instance ()->cmd == CmdPLAY) - { - if (timerGroup == VIDEO_SINGLETON::instance ()->numG - 1 && timerFrame >= VIDEO_SINGLETON::instance ()->gopTable[timerGroup].totalFrames - 1) - { - timerFrame ++; /* force sending of END_SEQ when PLAY VIDEO_SINGLETON::instance ()->cmd */ - StopTimer (); - return; - } - else - { - timerFrame ++; - if (timerFrame >= VIDEO_SINGLETON::instance ()->gopTable[timerGroup].totalFrames) - { - timerGroup ++; - timerFrame = 0; - timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader; - } - } - } - else { - if (VIDEO_SINGLETON::instance ()->cmd == CmdFF) { - if (timerGroup == VIDEO_SINGLETON::instance ()->numG - 1) { - StopTimer (); - return; - } - timerGroup ++; - timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader; - } - else { - if (timerGroup == 0) { - StopTimer (); - return; - } - timerGroup --; - timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader; - } - } - -} - -void -Video_Timer_Global::timerHandler (int sig) -{ - // ACE_DEBUG ((LM_DEBUG, - // "Video_Timer_Global::timerHandler\n")); - - int val2, val3; - int usec = VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF; - - if (Mpeg_Global::drift_ppm) { - usec -= (int) ((double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0); - } - - if (timerAdjust > 1) - usec = (int) (((double)usec * (double) (SPEEDUP_INV_SCALE - 1)) / - (double)SPEEDUP_INV_SCALE); - val3 = get_duration (preTimerVal, (val2 = get_usec ())); - /* - if (val3 >= usec<< 1)) - fprintf (stderr, "Slower: %d out of VIDEO_SINGLETON::instance ()->currentUPF %d.\n", - val3, usec); - else - fprintf (stderr, "+\n"); - */ - preTimerVal = val2; - if (val3 < 0 || val3 > 100000000) - val3 = usec; - val2 = (val3 + (usec>>1)) / usec; - if (val2 < 0) val2 = 0; - if (val2) { - TimerProcessing (); - val2 --; - } - VIDEO_SINGLETON::instance ()->addedSignals += val2; - - if (VIDEO_SINGLETON::instance ()->addedSignals) { - val2 = timerAdjust; - if (timerAdjust < MAX_TIMER_ADJUST) { - timerAdjust += VIDEO_SINGLETON::instance ()->addedSignals * SPEEDUP_INV_SCALE; - if (val2 < SPEEDUP_INV_SCALE) { - TimerSpeed (); - } - } - else { - /* - fprintf (stderr, "VS timerAdjust %d, VIDEO_SINGLETON::instance ()->addedSignals %d, timerFrame %d\n", - timerAdjust, VIDEO_SINGLETON::instance ()->addedSignals, timerFrame); - */ - for (val3 = 0; val3 < VIDEO_SINGLETON::instance ()->addedSignals; val3 ++) - TimerProcessing (); - } - VIDEO_SINGLETON::instance ()->addedSignals = 0; - } -} - -// send the first packet, given by packet pointed by -// 'this->packet' to the network. -int -Video_Global::send_to_network (int timeToUse) -{ - int count = 0; - VideoMessage * msghd = (VideoMessage *) (((char *) this->packet) - sizeof (VideoMessage)); - int sent = 0; - int packetSize = ntohl (this->packet->dataBytes); - - msghd->packetsn = htonl (this->packetsn ++); - msghd->packetSize = htonl (packetSize + sizeof (* this->packet)); - - // fprintf (stderr, "VS to send pkt %d of size %d.\n", - // ntohl (msghd->packetsn), ntohl (msghd->packetSize)); - - - { - VideoMessage * msg = NULL; - int size = packetSize + sizeof (* this->packet); /* msghd->this->packetSize */ - int offset = 0; - int targetTime; - - if (size > this->msgsize) - { - if (!timeToUse) - { - timeToUse = (this->msgsize + sizeof (*msg) + 28) * 2; - /* - set the max network as 500KB. - 28 - UDP header size - */ - /* - fprintf (stderr, "computed timeToUse %d. ", timeToUse); - */ - } - else - { - timeToUse = (timeToUse * 7) >> 3; - /* - fprintf (stderr, "preset timeToUse %d.", timeToUse); - */ - timeToUse /= (size + this->msgsize - 1) / this->msgsize; - timeToUse = min (timeToUse, (this->msgsize + sizeof (*msg) + 28) * 100); - /* limit min network bandwidth = 10K */ - } - - } - while (size > 0) - { - int segsize, sentsize; - int resent = 0; - - if (msg == NULL) { /* first message for current this->packet */ - count = 0; - msg = msghd; - targetTime = get_usec (); - } - else { -#if 0 - /* the select () is not precise enough for being used here*/ - int sleepTime; - targetTime += timeToUse; - sleepTime = get_duration (get_usec (), targetTime); - if (sleepTime >= 5000) { /* resolution of timer is 10,000 usec */ - usleep (sleepTime); /* not first message, wait for a while */ - } -#endif - /* - count ++; - if (! (count % 10)) usleep (10000); - */ - msg = (VideoMessage *) ((char *)msg + this->msgsize); - memcpy ((char *)msg, (char *)msghd, sizeof (* msg)); - } - msg->msgsn = htonl (this->msgsn++); - msg->msgOffset = htonl (offset); - msg->msgSize = htonl (min (size, this->msgsize)); - - segsize = min (size, this->msgsize)+sizeof (*msg); - if (this->conn_tag != 0) { /* this->packet stream */ - // cerr << "sending " << segsize << " on fd = " << this->videoSocket << endl; - while ((sentsize = write (this->videoSocket, (char *)msg, segsize)) == -1) { - if (errno == EINTR) - continue; - if (errno == ENOBUFS) { - if (resent) { - perror ("Warning, pkt discarded because"); - sent = -1; - break; - } - else { - resent = 1; - perror ("VS to sleep 5ms"); - usleep (5000); - continue; - } - } - if (errno != EPIPE) { - fprintf (stderr, "VS error on send this->packet %d of size %d ", - this->msgsn-1, min (size, this->msgsize)+sizeof (*msg)); - perror (""); - } - exit (errno != EPIPE); - } - } - else { - sentsize = wait_write_bytes (this->videoSocket, (char *)msg, segsize); - if (sentsize == -1) { - if (errno != EPIPE) { - fprintf (stderr, "VS error on send this->packet %d of size %d ", - this->msgsn-1, min (size, this->msgsize)+sizeof (*msg)); - perror (""); - } - exit (errno != EPIPE); - } - } - if (sentsize < segsize) { - SFprintf (stderr, "VS warning: message size %dB, sent only %dB\n", - segsize, sentsize); - } - if (sent == -1) - break; - /* - fprintf (stderr, "VS: message %d of size %d sent.\n", - this->msgsn-1, min (size, this->msgsize)+sizeof (*msg)); - */ - size -= this->msgsize; - offset += this->msgsize; - } - } - /* - fprintf (stderr, "sent = %d\n", sent); - */ - if (!sent) this->pkts_sent ++; - return sent; -} - - -Audio_Global::Audio_Global (void) - :state (AUDIO_WAITING), - addSamples (0), - nextTime (0), - upp (0), - delta_sps (0), - bytes_sent (0), - start_time (0), - conn_tag (0), - serviceSocket (-1), - audioSocket (-1), - fd (0), - totalSamples (0), - fileSize (0), - cmd (0), - live_source (0), - databuf_size (0), - cmdsn (0), - nextsample (0), - sps (0), - spslimit (0), - spp (0), - pktbuf (0), - fbpara (0) -{ -} - -int -Audio_Global::CmdRead(char *buf, int psize) -{ - int res = wait_read_bytes(serviceSocket, buf, psize); - if (res == 0) return (1); - if (res == -1) { - fprintf(stderr, "AS error on read cmdSocket, size %d", psize); - ACE_OS::perror (""); - return (-1); - } - return 0; -} - -void -Audio_Global::CmdWrite(char *buf, int size) -{ - int res = wait_write_bytes(serviceSocket, buf, size); - if (res == -1) { - if (errno != EPIPE)ACE_OS::perror ("AS writes to serviceSocket"); - ACE_OS::exit (errno != EPIPE); - } -} - -int -Audio_Global::INITaudio(void) -{ - int result; - int failureType; /* 0 - can't open file, 1 - can't open live source */ - INITaudioPara para; - - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.version = ntohl(para.version); - para.nameLength = ntohl(para.nameLength); - para.para.encodeType = ntohl(para.para.encodeType); - para.para.channels = ntohl(para.para.channels); - para.para.samplesPerSecond = ntohl(para.para.samplesPerSecond); - para.para.bytesPerSample = ntohl(para.para.bytesPerSample); -#endif - if (para.nameLength>0) - result = CmdRead(audioFile, para.nameLength); - if (result != 0) - return result; - if (Mpeg_Global::session_num > Mpeg_Global::session_limit || para.version != VERSION) { - char errmsg[128]; - cmd = CmdFAIL; - CmdWrite((char *)&cmd, 1); - if (Mpeg_Global::session_num > Mpeg_Global::session_limit) { - sprintf(errmsg, - "Too many sessions being serviced, please try again later.\n"); - } - else { - sprintf(errmsg, "Version # not match, AS %d.%02d, Client %d.%02d", - VERSION / 100, VERSION % 100, - para.version / 100, para.version % 100); - } - write_string(serviceSocket, errmsg); - return(1); - } - ACE_OS::memcpy (&audioPara, ¶.para, sizeof(audioPara)); - /* - fprintf(stderr, "Client Audio para: encode %d, ch %d, sps %d, bps %d.\n", - para.para.encodeType, para.para.channels, - para.para.samplesPerSecond, para.para.bytesPerSample); - */ - audioFile[para.nameLength] = 0; - { - int len =ACE_OS::strlen (audioFile); - if (strncasecmp("LiveAudio", audioFile, 9) && - strcasecmp(".au", audioFile+len-3)) { - char errmsg[128]; - cmd = CmdFAIL; - CmdWrite((char *)&cmd, 1); - sprintf(errmsg, "%s without suffix .au", audioFile); - write_string(serviceSocket, errmsg); - return(1); - } - } - /* - fprintf(stderr, "Audio file %s got.\n", audioFile); - */ - - if (!strncasecmp("LiveAudio", audioFile, 9)) { - fd = OpenLiveAudio(&(para.para)); - if (fd == -1) { - failureType = 1; - goto failure; - } - fileSize =0x7fffffff; - totalSamples = fileSize / audioPara.bytesPerSample; - live_source = 1; - } - else { - LeaveLiveAudio(); - fd = open(audioFile, O_RDONLY); - if (fd == -1) - { - fprintf(stderr, "AS error on opening audio file %s", audioFile); - ACE_OS::perror (""); - failureType = 0; - goto failure; - } - - /* Try to get audioFile format audioPara here */ - - /* figure out totalsamples */ - fileSize = lseek(fd, 0L, SEEK_END); - lseek(fd, 0L, SEEK_SET); - totalSamples = fileSize / audioPara.bytesPerSample; - /* - fprintf(stderr, "Total Samples=%d in audio file %ss.\n", totalSamples, audioFile); - */ - } - { - INITaudioReply reply; - - reply.para.encodeType = htonl(audioPara.encodeType); - reply.para.channels = htonl(audioPara.channels); - reply.para.samplesPerSecond = htonl(audioPara.samplesPerSecond); - reply.para.bytesPerSample = htonl(audioPara.bytesPerSample); - reply.totalSamples = htonl(totalSamples); - - reply.live = htonl(live_source); - reply.format = htonl(AUDIO_RAW); - - CmdWrite((char *)&cmd, 1); - CmdWrite((char *)&reply, sizeof(reply)); - } - return 0; - - failure: - { - /* - fprintf(stderr, "AS error: failed initializing audio file.\n"); - */ - cmd = CmdFAIL; - CmdWrite((char *)&cmd, 1); - write_string(serviceSocket, - failureType == 0 ? "Failed to open audio file for read." : - "Failed to connect to live audio source."); - return(1); - } -} - -/* send a packet of audio samples to audioSocket - returns: 0 - no more data from audio file: EOF reached; - 1 - More data is available from the audio file */ -int -Audio_Global::send_packet (int firstSample, int samples) -{ - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) send_packet called\n")); - long offset = firstSample * audioPara.bytesPerSample; - int size = samples * audioPara.bytesPerSample; - char * buf = (char *)pktbuf + sizeof(*pktbuf); - int len; - int resent = 0; - int segsize, sentsize; - - if (live_source) { - len = ReadLiveAudioSamples(buf, samples); - len *= audioPara.bytesPerSample; - } - else { - lseek(fd, offset, SEEK_SET); - while ((len = ACE_OS::read (fd, buf, size)) == -1) { - if (errno == EINTR) - continue; /* interrupted */ - ACE_OS::perror ("AS error on read audio file"); - return(-1); - } - if (len < audioPara.bytesPerSample) { - return 0; - } - } - - samples = len / audioPara.bytesPerSample; - len = samples * audioPara.bytesPerSample; - bytes_sent += len; - pktbuf->firstSample = htonl(firstSample); - pktbuf->samples = htonl(samples); - pktbuf->actualSamples = htonl(samples); - pktbuf->dataBytes = htonl(len); - if (spslimit < sps) { /* interpolation needed */ - SFprintf(stderr, "AS audio sample interpolation not available yet.\n"); - } - segsize = sizeof(*pktbuf) + len; - if (conn_tag != 0) { - while ((sentsize = ACE_OS::write (audioSocket, (char *)pktbuf, segsize)) == -1) { - if (errno == EINTR) /* interrupted */ - continue; - if (errno == ENOBUFS) { - if (resent) { - ACE_OS::perror ("AS Warning, pkt discarded because"); - break; - } - else { - resent = 1; - usleep(5000); - continue; - } - } - if (errno != EPIPE) { - fprintf(stderr, "AS error on send audio packet %d(%d):", - firstSample, samples); - perror(""); - } - ACE_OS::exit ((errno != EPIPE)); - } - } - else { - sentsize = wait_write_bytes(audioSocket, (char *)pktbuf, segsize); - if (sentsize == -1) { - if (errno != EPIPE) { - fprintf(stderr, "AS error on send audio packet %d(%d):", - firstSample, samples); - perror(""); - } - ACE_OS::exit ((errno != EPIPE)); - } - } - if (sentsize < segsize) { - SFprintf(stderr, "AS warning: message size %dB, sent only %dB\n", - segsize, sentsize); - } - /* - SFprintf(stderr, "AS sent audio packet %d(%d).\n", - firstSample, samples); - */ - return (len < size ? 0 : 1); -} - -/* send a packet of audio samples to audioSocket - returns: 0 - no more data from audio file: EOF reached; - 1 - More data is available from the audio file */ -int -Audio_Global::SendPacket (void) -{ - int moredata; - pktbuf->cmdsn = htonl(cmdsn); - pktbuf->resend = htonl(0); - pktbuf->samplesPerSecond = htonl(sps); - moredata = send_packet(nextsample, spp); - if (moredata) - { - nextsample += spp; - } - return moredata; -} - -void -Audio_Global::ResendPacket (int firstsample, int samples) -{ - pktbuf->cmdsn = htonl(cmdsn); - pktbuf->resend = htonl(1); - pktbuf->samplesPerSecond = htonl(sps); - while (samples > 0) { - int size = samples < spp ? samples : spp; - send_packet(firstsample, size); - firstsample += size; - samples -= size; - if (samples > 0) { - usleep(10000); - } - } -} - -#if 0 -int -Audio_Global::PLAYaudio(void) -{ - int hasdata = 1; - int addSamples; - int packets = 0; - unsigned nextTime; - int upp; /* micro-seconds per packet */ - int delta_sps = 0; /* compensation for sps from feedback msgs */ - int nfds = (serviceSocket > audioSocket ? serviceSocket : audioSocket) + 1; - int result; - /* - fprintf(stderr, "PLAY . . .\n"); - */ - { - PLAYaudioPara para; - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.nextSample = ntohl(para.nextSample); - para.samplesPerSecond = ntohl(para.samplesPerSecond); - para.samplesPerPacket = ntohl(para.samplesPerPacket); - para.ABsamples = ntohl(para.ABsamples); - para.spslimit = ntohl(para.spslimit); -#endif - nextsample = para.nextSample; - cmdsn = para.sn; - sps = para.samplesPerSecond; - spslimit = para.spslimit; - spp = para.samplesPerPacket; - addSamples = para.ABsamples / 2; - if (spp * audioPara.bytesPerSample > databuf_size) { - spp = databuf_size / audioPara.bytesPerSample; - } - /* - SFprintf(stderr, "AS got CmdPLAY: sps %d\n", sps); - */ - } - /* - fprintf(stderr, "AS: nextSampe=%d for PLAY.\n", para.nextSample); - */ - - upp = (int)(1000000.0 / ((double)sps / (double)spp)); - nextTime = get_usec(); - - CmdWrite((char *)&nextTime, sizeof(int)); - - if (live_source) { - StartPlayLiveAudio(); - } - - for (;;) - { - struct fd_set read_mask, write_mask; - struct timeval tval; - unsigned curTime = get_usec(); - - if (hasdata) { - if (addSamples < - spp) { /* slow down by not sending packets */ - nextTime += upp; - addSamples += spp; - } - else { - int need_sleep = 0; - while (nextTime <= curTime && hasdata) { - if (need_sleep) usleep(5000); - hasdata = SendPacket(); - need_sleep = 1; - packets ++; - nextTime += upp; - if (addSamples > 0 && packets % SPEEDUP_SCALE == 0) { - addSamples -= spp; - usleep(5000); - hasdata = SendPacket(); - packets ++; - } - } - } - } - curTime = nextTime - curTime; - if (curTime > 5000000) curTime = 5000000; /* limit on 5 second weit time - in case error happens */ - tval.tv_sec = curTime / 1000000; - tval.tv_usec = curTime % 1000000; - FD_ZERO(&read_mask); - FD_SET(serviceSocket, &read_mask); - FD_SET(audioSocket, &read_mask); -#ifdef _HPUX_SOURCE - if (select(nfds, (int *)&read_mask, NULL, NULL, hasdata ? &tval : NULL) == -1) -#else - if (select(nfds, &read_mask, NULL, NULL, hasdata ? &tval : NULL) == -1) -#endif - { - if (errno == EINTR) - continue; - ACE_OS::perror ("AS error on select reading or writing"); - return(-1); - } - if (FD_ISSET(serviceSocket, &read_mask)){ /* STOP, SPEED, or CLOSE*/ - unsigned char tmp; - result = CmdRead((char *)&tmp, 1); - if (result != 0) - return result; - switch (tmp) - { - case CmdSPEED: - { - SPEEDaudioPara para; - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.samplesPerSecond = ntohl(para.samplesPerSecond); - para.samplesPerPacket = ntohl(para.samplesPerPacket); - para.spslimit = ntohl(para.spslimit); -#endif - sps = para.samplesPerSecond; - spslimit = para.spslimit; - spp = para.samplesPerPacket; - if (spp * audioPara.bytesPerSample > databuf_size) { - spp = databuf_size / audioPara.bytesPerSample; - } - delta_sps = 0; /* reset compensation value */ - upp = (int)(1000000.0 / ((double)sps / (double)spp)); - /* - SFprintf(stderr, "AS got CmdSPEED: sps %d\n", sps); - */ - } - break; - case CmdSTOP: - { - int val; - cmd = tmp; - /* - fprintf(stderr, "AS: CmdSTOP. . .\n"); - */ - result = CmdRead((char *)&val, sizeof(int)); - if (result != 0) - return result; - /* - CmdWrite(AUDIO_STOP_PATTERN,ACE_OS::strlen (AUDIO_STOP_PATTERN)); - */ - if (live_source) { - StopPlayLiveAudio(); - } - return 0; /* return from PLAYaudio() */ - } - case CmdCLOSE: - if (live_source) { - StopPlayLiveAudio(); - } - return(1); /* The whole AS session terminates */ - default: - if (live_source) { - StopPlayLiveAudio(); - } - fprintf(stderr, "AS error: cmd=%d while expects STOP/SPEED/CLOSE.\n", tmp); - return(-1); - } - } - - if (FD_ISSET(audioSocket, &read_mask)){ /* Feedback packet */ - int bytes, len; - for (;;) { - if (conn_tag >= 0) { - len = wait_read_bytes(audioSocket, (char *)fbpara, sizeof(*fbpara)); - if (len == 0) return(1); /* connection broken */ - else if (len < 0) { /* unexpected error */ - ACE_OS::perror ("AS read1 FB"); - return(-1); - } - } - else { /* discard mode packet stream, read the whole packet */ - len = ACE_OS::read (audioSocket, (char *)fbpara, FBBUF_SIZE); - } - if (len == -1) { - if (errno == EINTR) continue; /* interrupt */ - else { - if (errno != EPIPE && errno != ECONNRESET)ACE_OS::perror ("AS failed to ACE_OS::read () fbmsg header"); - break; - } - } - break; - } - if (len < sizeof(*fbpara)) { - if (len > 0) fprintf(stderr, - "AS warn ACE_OS::read () len %dB < sizeof(*fbpara) %dB\n", - len, sizeof(*fbpara)); - continue; - } -#ifdef NeedByteOrderConversion - fbpara->type = ntohl(fbpara->type); -#endif - bytes = (fbpara->type > 0) ? - sizeof(APdescriptor) * (fbpara->type - 1) : - 0; - if (bytes > 0) { - if (conn_tag >= 0) { /* not discard mode packet stream, - read the rest of packet */ - len = wait_read_bytes(audioSocket, - ((char *)fbpara) + sizeof(*fbpara), - bytes); - if (len == 0) return(1); /* connection broken */ - else if (len < 0) { /* unexpected error */ - ACE_OS::perror ("AS read2 FB"); - return(-1); - } - len += sizeof(*fbpara); - } - } - bytes += sizeof(*fbpara); - if (len < bytes) { - if (len > 0) fprintf(stderr, - "AS only read partial FBpacket, %dB out of %dB.\n", - len, bytes); - continue; - } - if (live_source) { /* ignore all feedback messags for live source */ - continue; - } - -#ifdef NeedByteOrderConversion - fbpara->cmdsn = ntohl(fbpara->cmdsn); -#endif - if (len != sizeof(*fbpara) + - (fbpara->type ? (fbpara->type -1) * sizeof(APdescriptor) : 0)) { - /* unknown message, discard */ - SFprintf(stderr, "AS Unkown fb msg: len = %d, type = %d\n", - len, fbpara->type); - continue; - } - if (fbpara->cmdsn != cmdsn) { /* discard the outdated message */ - continue; - } -#ifdef NeedByteOrderConversion - { - int i, * ptr = (int *)fbpara + 2; - for (i = 0; i < (len >> 2) - 2; i++) *ptr = ntohl(*ptr); - } -#endif - if (fbpara->type == 0) { /* feedback message */ - /* - SFprintf(stderr, "AS got fbmsg: addsamples %d, addsps %d\n", - fbpara->data.fb.addSamples, fbpara->data.fb.addsps); - */ - addSamples += fbpara->data.fb.addSamples; - if (fbpara->data.fb.addsps) { - delta_sps += fbpara->data.fb.addsps; - upp = (int)(1000000.0 / ((double)(sps + delta_sps) / (double)spp)); - } - } - else { /* resend requests */ - APdescriptor * req = &(fbpara->data.ap); - int i; - /* - SFprintf(stderr, "AS got %d resend reqs\n", fbpara->type); - */ - for (i = 0; i < fbpara->type; i ++) { - ResendPacket(req->firstSample, req->samples); - req ++; - } - } - } - } -} -#endif - -// our version of play audio. -int -Audio_Global::play_audio(void) -{ - int result; - - ACE_DEBUG ((LM_DEBUG,"(%P|%t) play_audio () called \n")); - - { - PLAYaudioPara para; - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.nextSample = ntohl(para.nextSample); - para.samplesPerSecond = ntohl(para.samplesPerSecond); - para.samplesPerPacket = ntohl(para.samplesPerPacket); - para.ABsamples = ntohl(para.ABsamples); - para.spslimit = ntohl(para.spslimit); -#endif - nextsample = para.nextSample; - cmdsn = para.sn; - sps = para.samplesPerSecond; - spslimit = para.spslimit; - spp = para.samplesPerPacket; - addSamples = para.ABsamples / 2; - if (spp * audioPara.bytesPerSample > databuf_size) { - spp = databuf_size / audioPara.bytesPerSample; - } - /* - SFprintf(stderr, "AS got CmdPLAY: sps %d\n", sps); - */ - } - /* - fprintf(stderr, "AS: nextSampe=%d for PLAY.\n", para.nextSample); - */ - - upp = (int)(1000000.0 / ((double)sps / (double)spp)); - nextTime = get_usec(); - - CmdWrite((char *)&nextTime, sizeof(int)); - if (live_source) { - StartPlayLiveAudio(); - } - this->send_audio (); -} - -int -Audio_Global::send_audio (void) -{ - unsigned curTime = get_usec(); - - if (hasdata) { - if (addSamples < - spp) { /* slow down by not sending packets */ - /* ACE_DEBUG ((LM_DEBUG,"(%P|%t) slow down by not sending\n")); */ - nextTime += upp; - addSamples += spp; - } - else { - /* ACE_DEBUG ((LM_DEBUG,"(%P|%t) sending." - "nexttime = %d, curTime = %d, hasdata = %d\n", - nextTime, curTime, hasdata)); */ - int need_sleep = 0; - while ( (nextTime <= curTime) && (hasdata)) { - if (need_sleep) usleep(5000); - hasdata = SendPacket(); - need_sleep = 1; - packets ++; - nextTime += upp; - if (addSamples > 0 && packets % SPEEDUP_SCALE == 0) { - addSamples -= spp; - usleep(5000); - hasdata = SendPacket(); - packets ++; - } - } - } - } - curTime = nextTime - curTime; - if (curTime > 5000000) curTime = 5000000; /* limit on 5 second weit time - in case error happens */ - tval.tv_sec = curTime / 1000000; - tval.tv_usec = curTime % 1000000; - - if (hasdata) - { - // schedule a sigalrm to simulate select timeout. - ACE_Time_Value tv (tval); - ACE_OS::ualarm (tv,0); - } - return 0; -} - - -void -Audio_Global::on_exit_routine(void) -{ - struct sockaddr_in peeraddr_in; - int size = sizeof(peeraddr_in); - - /* - fprintf(stderr, "An AS session terminated\n"); - */ - if (getpeername(serviceSocket, - (struct sockaddr *)&peeraddr_in, &size) == 0 && - peeraddr_in.sin_family == AF_INET) { - if (strncmp(inet_ntoa(peeraddr_in.sin_addr), "129.95.50", 9)) { - struct hostent *hp; - time_t val =ACE_OS::time (NULL); - char * buf = ACE_OS::ctime (&start_time); - - hp = gethostbyaddr((char *)&(peeraddr_in.sin_addr), 4, AF_INET); - buf[strlen(buf)-1] = 0; - printf("%s: %s %3dm%02ds %dB %s\n", - buf, - hp == NULL ? inet_ntoa(peeraddr_in.sin_addr) : hp->h_name, - (val - start_time) / 60, (val - start_time) % 60, - bytes_sent, audioFile); - } - } - ComCloseConn(serviceSocket); - ComCloseConn(audioSocket); -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h deleted file mode 100644 index c7740c4ccda..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h +++ /dev/null @@ -1,399 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#ifndef MPEG_GLOBAL_H -#define MPEG_GLOBAL_H - -#include "ace/SOCK_CODgram.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Global symbols, these need to become enums eventually. - -#define SESSION_NUM 4 -#define CONN_INET 1 -#define CONN_UNIX 2 -#define CONN_ATM 3 - -#define SERVER_FDTABLE_SIZE 50 -#define CLIENT_FDTABLE_SIZE 10 - -#define STATE_PENDING 1 -#define STATE_CONTROL 2 -#define STATE_DATA 3 -#define STATE_SINGLE 4 - -#define min(a, b) ((a) > (b) ? (b) : (a)) -#define max(a, b) ((a) > (b) ? (a) : (b)) - -/* Start codes. */ - -#define READ_BLOCK_SIZE 512 -#define MAX_TIMER_ADJUST (100 * SPEEDUP_INV_SCALE) - -#define SEQ_END_CODE 0x000001b7 -#define SEQ_START_CODE 0x000001b3 -#define GOP_START_CODE 0x000001b8 -#define PICTURE_START_CODE 0x00000100 -#define SLICE_MIN_START_CODE 0x00000101 -#define SLICE_MAX_START_CODE 0x000001af -#define EXT_START_CODE 0x000001b5 -#define USER_START_CODE 0x000001b2 - -// Global definitions -#define nextByte {int val; fileptr ++; \ - if ((val = getc(VIDEO_SINGLETON::instance ()->fp)) == EOF) \ - {\ - perror("Crossed EOF or error while scanning"); \ - return 1; \ - } nb = val;} - -#define computePicSize \ - if (inpic) \ - { \ - if (pictype == 'I') \ - { \ - VIDEO_SINGLETON::instance ()->maxI = max(VIDEO_SINGLETON::instance ()->maxI, (int)(fileptr - picptr - 4)); \ - VIDEO_SINGLETON::instance ()->minI = min(VIDEO_SINGLETON::instance ()->minI, (int)(fileptr - picptr - 4)); \ - } \ - else if (pictype == 'P') \ - { \ - VIDEO_SINGLETON::instance ()->maxP = max(VIDEO_SINGLETON::instance ()->maxP, (int)(fileptr - picptr - 4)); \ - VIDEO_SINGLETON::instance ()->minP = min(VIDEO_SINGLETON::instance ()->minP, (int)(fileptr - picptr - 4)); \ - } \ - else \ - { \ - VIDEO_SINGLETON::instance ()->maxB = max(VIDEO_SINGLETON::instance ()->maxB, (int)(fileptr - picptr - 4)); \ - VIDEO_SINGLETON::instance ()->minB = min(VIDEO_SINGLETON::instance ()->minB, (int)(fileptr - picptr - 4)); \ - } \ - VIDEO_SINGLETON::instance ()->frameTable[ftptr].type = pictype; \ - VIDEO_SINGLETON::instance ()->frameTable[ftptr++].size = (int)(fileptr - picptr - 4); \ - inpic = 0; \ - } - - -#define FileRead(position, buf, size) \ - { \ - if (fseek(VIDEO_SINGLETON::instance ()->fp, (position), 0) == -1) \ - { \ - perror("VS error on fseek VideoFile"); \ - return (-1); \ - } \ - while (fread((buf), (size), 1, VIDEO_SINGLETON::instance ()->fp) == 0) \ - { if (errno == EINTR) { errno = 0; continue;}\ - perror("VS error on fread VideoFile"); \ - return (-1); \ - } \ - } - -#define CheckFrameRange(pnextFrame) \ -{ if ((pnextFrame) < 0 || (pnextFrame) >= VIDEO_SINGLETON::instance ()->numF) \ - { fprintf(stderr, "VS: %d.VIDEO_SINGLETON::instance ()->nextFrame(%d) out of range (%d).\n", VIDEO_SINGLETON::instance ()->cmd, (pnextFrame), VIDEO_SINGLETON::instance ()->numF); \ - return 0; } } - -#define CheckGroupRange(pnextGroup) \ -{ if ((pnextGroup) < 0 || (pnextGroup) >= VIDEO_SINGLETON::instance ()->numG) \ - { fprintf(stderr, "VS: %d.VIDEO_SINGLETON::instance ()->nextGroup(%d) out of range (%d).\n", VIDEO_SINGLETON::instance ()->cmd, (pnextGroup), VIDEO_SINGLETON::instance ()->numG); \ - return 0; } } - -#include "ace/Singleton.h" -#include "include/common.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/com.h" -#include "mpeg_shared/sendpt.h" -#include "mpeg_server/server_proto.h" -#include "mpeg_server/Video_Server.h" -#include "mpeg_shared/Video_ControlS.h" -#include "mpeg_shared/Audio_ControlS.h" - -class Mpeg_Global -{ -public: - static int parentpid; - - static int listenSocketIn; - static int listenSocketUn; - - static struct linger linger; - - static int live_audio; - static int live_video; /* 0 - no, 1 - to open, 2 - opened */ - - static int drift_ppm; /* clock drift in ppm */ - - static int session_limit; - static int session_num; - static int rttag; -}; - -class Video_Global -{ -public: - Video_Global (); - - ACE_SOCK_CODgram dgram; - // the UDP data socket - - char *data_host; - // name of the host to bind to. - int live_source; - int video_format; - - int pkts_sent; - time_t start_time; - - int conn_tag; - - int normalExit; - - int serviceSocket; - int videoSocket; - - char videoFile[PATH_SIZE]; - FILE *fp; - int needHeader; - int lastRef[2]; - int lastRefPtr; - int currentUPF; - int addedUPF; - int addedSignals; - int VStimeAdvance; - double fps; /* current frames-per-second: playback speed */ - double frameRateLimit; - - VideoPacket * packet; - int packetBufSize; - int msgsn; - int packetsn; - int msgsize; - - unsigned char precmd; - unsigned char cmd; - int cmdsn; - int nextFrame; - int nextGroup; - int firstPatternSize; - char *firstSendPattern; - int sendPatternGops; - char sendPattern [PATTERN_SIZE]; - -#ifdef STAT - char * framesSent; -#endif - - int fileSize; - int maxS; - int maxG; - int maxI; - int maxP; - int maxB; - int minS; - int minG; - int minI; - int minP; - int minB; - int numS; - int numG; - int numF; - int numI; - int numP; - int numB; - int averageFrameSize; - int horizontalSize; - int verticalSize; - int pelAspectRatio; - int pictureRate; - int vbvBufferSize; - int firstGopFrames; - int patternSize; - char pattern [PATTERN_SIZE]; - - struct SystemHeader - { - long offset; - int size; - } * systemHeader; - - struct GopTable - { - int systemHeader; - long offset; - int headerSize; - int size; - int totalFrames; - int previousFrames; - long firstIoffset; - } * gopTable; - - struct FrameTable - { - char type; - unsigned short size; - } * frameTable; - - int preGroup; - int preHeader; - int preFrame; - - // fast video play locals - Video_Control::FFpara fast_para; - Video_Control::PLAYpara play_para; - int fast_preGroup; - int fast_preHeader; - - // globals functions - int CmdRead (char *buf, int psize); - int CmdWrite (char *buf, int size); - int SendPacket (int shtag, - int gop, - int frame, - int timeToUse, - int first_time = 0); - int FBread (char *buf, int size); - int PLAYliveVideo (PLAYpara * para); - void ComputeFirstSendPattern (float limit); - int FrameToGroup (int * frame); - int SendReferences (int group, int frame); - int send_to_network (int timeToUse); - int first_packet_send_to_network (int timeToUse); - int GetFeedBack (void); - int SendPicture (int *frame); - int ReadInfoFromFile (void); - void WriteInfoToFile (void); - int init_MPEG1_video_file (void); - int play_send (int debug=0); - int fast_play_send (void); - int position (void); - int step_video (void); - int fast_forward (void); - int fast_backward (void); - int stat_stream (void); - int stat_sent (void); - int init_play (Video_Control::PLAYpara para, - CORBA::Long_out vts); - CORBA::Boolean init_fast_play (const Video_Control::FFpara ¶); - int init_video (void); -}; - -typedef ACE_Singleton VIDEO_SINGLETON; - -class Video_Timer_Global -// A class that holds the static timer variables defined in the middle -// of vs.cpp -{ -public: - static int timerHeader; - static int timerGroup; - static int timerFrame; - static int timerOn ; - static int timerAdjust ; - static int preTimerVal ; - static void StartTimer (void); - static void StopTimer(void); - static void TimerSpeed(void); - static void TimerProcessing(void); - static void timerHandler (int sig); -}; - -#define DATABUF_SIZE 500 - -#define SPEEDUP_SCALE 5 -#define MAX_RESEND_REQS 10 -#define FBBUF_SIZE (sizeof(AudioFeedBackPara) + \ - (MAX_RESEND_REQS - 1) * sizeof(APdescriptor)) - - - - class Audio_Global - { - public: - Audio_Global (void); - // Default constructor. - int CmdRead(char *buf, int psize); - void CmdWrite(char *buf, int size); - int INITaudio(void); - int send_packet(int firstSample, int samples); - int SendPacket(void); - void ResendPacket(int firstsample, int samples); - int PLAYaudio(void); - int play_audio (void); - int send_audio (void); - void on_exit_routine(void); - - public: - - char *data_host; - enum audio_state {AUDIO_WAITING = 0,AUDIO_PLAY =1}; - - audio_state state; - // The state of the audio server. - - // playaudio members - int packets; - int hasdata; - struct timeval tval; - - int addSamples; - unsigned nextTime; - int upp; /* micro-seconds per packet */ - int delta_sps ; - // The members previously in PLAY audio. - - int bytes_sent ; - time_t start_time; - - int conn_tag; - - int serviceSocket; - int audioSocket ; - - char audioFile[PATH_SIZE]; - int fd; - Audio_Control::AudioParameter audioPara; - int totalSamples; - int fileSize; - unsigned char cmd; - int live_source ; - - int databuf_size; - int cmdsn; - int nextsample; - int sps; /* audio play speed given by the client: samples per second */ - int spslimit; - int spp; /* samples per packet */ - AudioPacket * pktbuf ; - AudioFeedBackPara * fbpara ; - }; - -typedef ACE_Singleton AUDIO_GLOBAL; - - -#endif /* define MPEG_GLOBAL_H */ - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Makefile deleted file mode 100644 index 8b532bc6382..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Makefile +++ /dev/null @@ -1,1657 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -MAKEFILE = Makefile -LIBNAME = libmpeg_server -LIB = $(LIBNAME).a -SHLIB = $(LIBNAME).$(SOEXT) - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -# On non-Windows environment, we should at least define -# the export_include IDL flag. -FILES= as las lvs vs Globals Video_Server Video_Control_State Video_Control_i Audio_Server Audio_Control_State Audio_Control_i - -DEFS = $(addsuffix .h,$(FILES)) -LSRC = $(addsuffix .cpp,$(FILES)) - - -LIBS += -lTAO -lACE -lorbsvcs -MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source -CPPFLAGS += -I$(MPEG_ROOT) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets (and local hacks) -#---------------------------------------------------------------------------- - -#LDFLAGS += -L/project/doc/pkg/X11/lib/ -lXm -lXt -lXext -lSM -lICE -lX11 -L/project/doc/pkg/X11/lib -lsocket -lnsl -ldl -LDFLAGS += -lsocket -lnsl -ldl -CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs $(TSS_ORB_FLAG) -CPPFLAGS += -DSH_MEM -I/project/doc/pkg/X11/include - -clean: - -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state - -realclean: clean - -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES)) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/as.o .obj/as.so .shobj/as.o .shobj/as.so: as.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - server_proto.h Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i -.obj/las.o .obj/las.so .shobj/las.o .shobj/las.so: las.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - server_proto.h Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i -.obj/lvs.o .obj/lvs.so .shobj/lvs.o .shobj/lvs.so: lvs.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - server_proto.h Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i -.obj/vs.o .obj/vs.so .shobj/vs.o .shobj/vs.so: vs.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - server_proto.h Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i -.obj/Globals.o .obj/Globals.so .shobj/Globals.o .shobj/Globals.so: Globals.cpp Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i -.obj/Video_Server.o .obj/Video_Server.so .shobj/Video_Server.o .shobj/Video_Server.so: Video_Server.cpp Video_Server.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i -.obj/Video_Control_State.o .obj/Video_Control_State.so .shobj/Video_Control_State.o .shobj/Video_Control_State.so: Video_Control_State.cpp Video_Control_State.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - Video_Server.h -.obj/Video_Control_i.o .obj/Video_Control_i.so .shobj/Video_Control_i.o .shobj/Video_Control_i.so: Video_Control_i.cpp Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - Video_Server.h $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i -.obj/Audio_Server.o .obj/Audio_Server.so .shobj/Audio_Server.o .shobj/Audio_Server.so: Audio_Server.cpp Audio_Server.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - server_proto.h Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i \ - Audio_Control_i.h Audio_Control_State.h -.obj/Audio_Control_State.o .obj/Audio_Control_State.so .shobj/Audio_Control_State.o .shobj/Audio_Control_State.so: Audio_Control_State.cpp Audio_Control_State.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i \ - Globals.h $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - Audio_Control_i.h Audio_Server.h server_proto.h -.obj/Audio_Control_i.o .obj/Audio_Control_i.so .shobj/Audio_Control_i.o .shobj/Audio_Control_i.so: Audio_Control_i.cpp Audio_Control_State.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i \ - Globals.h $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - Audio_Control_i.h Audio_Server.h server_proto.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.cpp deleted file mode 100644 index 866f24f1122..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.cpp +++ /dev/null @@ -1,483 +0,0 @@ -// $Id$ - -#include "Video_Control_State.h" -#include "Video_Server.h" - -ACE_RCSID(mpeg_server, Video_Control_State, "$Id$") - -Video_Control_State::Video_Control_State () - : vci_ (VIDEO_CONTROL_I::instance ()) -{ -} - -Video_Control_State::Video_States -Video_Control_State::get_state (void) -{ - return this->state_; -} - -CORBA::Boolean -Video_Control_State::init_video (const Video_Control::INITvideoPara &init_para, - Video_Control::INITvideoReply_out reply) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Video_Control_State::init_video called\n")); - int failureType = 0; - // This is independent of the state and hence we implement it here - - // video file string - for (int i=0;ivideoFile[i] = init_para.videofile[i]; - - VIDEO_SINGLETON::instance ()->videoFile [init_para.videofile.length ()] = 0; - - if (Mpeg_Global::session_num > Mpeg_Global::session_limit || init_para.version != VERSION) { - return 0; - // ~~ We should be throwing exceptions here. - } - VIDEO_SINGLETON::instance ()->cmdsn = init_para.sn; - /* - fprintf (stderr, "MPEG file %s got.\n", VIDEO_SINGLETON::instance ()->videoFile); - */ - if (!strncasecmp ("LiveVideo", VIDEO_SINGLETON::instance ()->videoFile, 9)) { - if (OpenLiveVideo (&VIDEO_SINGLETON::instance ()->video_format, &VIDEO_SINGLETON::instance ()->horizontalSize, - &VIDEO_SINGLETON::instance ()->verticalSize, &VIDEO_SINGLETON::instance ()->averageFrameSize, - &VIDEO_SINGLETON::instance ()->fps, &VIDEO_SINGLETON::instance ()->pelAspectRatio) == -1) { - failureType = 100; - return 0; - } - if (VIDEO_SINGLETON::instance ()->video_format == VIDEO_MPEG2) { - failureType = 101; - return 0; - } - VIDEO_SINGLETON::instance ()->live_source = 1; - - VIDEO_SINGLETON::instance ()->fileSize =0x7fffffff; - VIDEO_SINGLETON::instance ()->maxS = VIDEO_SINGLETON::instance ()->maxG = VIDEO_SINGLETON::instance ()->maxI = VIDEO_SINGLETON::instance ()->maxP = VIDEO_SINGLETON::instance ()->maxB = VIDEO_SINGLETON::instance ()->minS = VIDEO_SINGLETON::instance ()->minG = VIDEO_SINGLETON::instance ()->minI = VIDEO_SINGLETON::instance ()->minP = VIDEO_SINGLETON::instance ()->minB = 1; - VIDEO_SINGLETON::instance ()->numS = VIDEO_SINGLETON::instance ()->numG = VIDEO_SINGLETON::instance ()->numF = VIDEO_SINGLETON::instance ()->numI = 0x7fffffff; - VIDEO_SINGLETON::instance ()->numP = VIDEO_SINGLETON::instance ()->numB = 0; - VIDEO_SINGLETON::instance ()->vbvBufferSize = 1; - VIDEO_SINGLETON::instance ()->firstGopFrames = 1; - VIDEO_SINGLETON::instance ()->patternSize = 1; - VIDEO_SINGLETON::instance ()->pattern[0] = 'I'; - VIDEO_SINGLETON::instance ()->pattern[1] = 0; - VIDEO_SINGLETON::instance ()->packetBufSize = VIDEO_SINGLETON::instance ()->verticalSize * VIDEO_SINGLETON::instance ()->horizontalSize * 3; - VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)ACE_OS::malloc (sizeof (VideoMessage) + sizeof (VideoPacket) + - VIDEO_SINGLETON::instance ()->packetBufSize); - if (VIDEO_SINGLETON::instance ()->packet == NULL) - { - perror ("Error: VS error on ACE_OS::malloc VIDEO_SINGLETON::instance ()->packet buffer"); - exit (1); - } - VIDEO_SINGLETON::instance ()->packet = (VideoPacket *) ((char *)VIDEO_SINGLETON::instance ()->packet + sizeof (VideoMessage)); - - } - else { - static double pictureRateTable[] = {23.976, 24, 25, 29.97, 30, 50, 59.94, 60}; - - VIDEO_SINGLETON::instance ()->video_format = VIDEO_MPEG1; - failureType = VIDEO_SINGLETON::instance ()->init_MPEG1_video_file (); - if (failureType) - return 0; - VIDEO_SINGLETON::instance ()->fps = pictureRateTable[VIDEO_SINGLETON::instance ()->pictureRate - 1]; - } - - // Set the Reply parameter values - ACE_NEW_RETURN (reply, - Video_Control::INITvideoReply, - 0); - - reply->totalHeaders = VIDEO_SINGLETON::instance ()->numS; - reply->totalGroups = VIDEO_SINGLETON::instance ()->numG; - reply->totalFrames = VIDEO_SINGLETON::instance ()->numF; - reply->sizeIFrame = VIDEO_SINGLETON::instance ()->maxI; - reply->sizePFrame = VIDEO_SINGLETON::instance ()->maxP; - reply->sizeBFrame = VIDEO_SINGLETON::instance ()->maxB; - reply->sizeSystemHeader = VIDEO_SINGLETON::instance ()->maxS; - reply->sizeGop = VIDEO_SINGLETON::instance ()->maxG; - reply->averageFrameSize = VIDEO_SINGLETON::instance ()->averageFrameSize; - reply->verticalSize = VIDEO_SINGLETON::instance ()->verticalSize; - reply->horizontalSize = VIDEO_SINGLETON::instance ()->horizontalSize; - reply->pelAspectRatio = VIDEO_SINGLETON::instance ()->pelAspectRatio; - reply->pictureRate1000 = (int) (VIDEO_SINGLETON::instance ()->fps * 1000); - reply->vbvBufferSize = VIDEO_SINGLETON::instance ()->vbvBufferSize; - reply->firstGopFrames = VIDEO_SINGLETON::instance ()->firstGopFrames; - - reply->pattern.length (VIDEO_SINGLETON::instance ()->patternSize); - - // copy the sequence of char.. - for ( i = 0; i < VIDEO_SINGLETON::instance ()->patternSize; i++) - reply->pattern [i] = VIDEO_SINGLETON::instance ()->pattern [i]; - - reply->live = VIDEO_SINGLETON::instance ()->live_source; - reply->format = VIDEO_SINGLETON::instance ()->video_format; - - /* write the first SH, GOP and IFrame to VIDEO_SINGLETON::instance ()->serviceSocket (TCP), - using code for SendPacket () */ - { - - // ~~ He sends the first frame thru the connected TCP socket, - // we replace it to send thru the UDP data socket instead!! - if (VIDEO_SINGLETON::instance ()->live_source) StartPlayLiveVideo (); - - if (VIDEO_SINGLETON::instance ()->live_source) { - int frame = 0; - VIDEO_SINGLETON::instance ()->SendPicture (&frame); - } - else if (VIDEO_SINGLETON::instance ()->video_format == VIDEO_MPEG1) { - VIDEO_SINGLETON::instance ()->SendPacket (1, 0, 0, 0, 1); // - // make the first_time flag = 1, so that the packet gets sent - // correctly using UDP - } - else { - fprintf (stderr, "VS: VIDEO_SINGLETON::instance ()->video_format %d not supported.\n", - VIDEO_SINGLETON::instance ()->video_format); - } - if (VIDEO_SINGLETON::instance ()->live_source) StopPlayLiveVideo (); - } - return 1; -} - - -CORBA::Boolean -Video_Control_State::stat_stream (CORBA::Char_out ch, - CORBA::Long_out size) - -{ - return 0; -} - - -void -Video_Control_State::close (void) -{ - return; -} - - -CORBA::Boolean -Video_Control_State::stat_sent (void) -{ - return 0; -} - - -CORBA::Boolean -Video_Control_State::fast_forward (const Video_Control::FFpara ¶) - -{ - return 0; -} - - -CORBA::Boolean -Video_Control_State::fast_backward (const Video_Control::FFpara ¶) - -{ - return 0; -} - - -CORBA::Boolean -Video_Control_State::step (const Video_Control::STEPpara ¶) - -{ - return 0; -} - - -CORBA::Boolean -Video_Control_State::play (const Video_Control::PLAYpara ¶, - CORBA::Long_out vts) - -{ - return 0; -} - - -CORBA::Boolean -Video_Control_State::position (const Video_Control::POSITIONpara ¶) - -{ - return 0; -} - - -CORBA::Boolean -Video_Control_State::speed (const Video_Control::SPEEDpara ¶) - -{ - return 0; -} - - -CORBA::Boolean -Video_Control_State::stop (CORBA::Long cmdsn) - -{ - return 0; -} - -// ---------------------------------------------------------------------- - -Video_Control_Waiting_State::Video_Control_Waiting_State (void) -{ - //%% - this->state_ = VIDEO_WAITING; -} - -CORBA::Boolean -Video_Control_Waiting_State::stat_stream (CORBA::Char_out ch, - CORBA::Long_out size) - -{ - return 0; -} - -void -Video_Control_Waiting_State::close (void) -{ - ACE_DEBUG ((LM_DEBUG, - "Video_Control_Waiting_State::close \n")); - VIDEO_SINGLETON::instance ()->normalExit = 1; - TAO_ORB_Core_instance ()->reactor ()->end_event_loop (); - return ; -} - - -CORBA::Boolean -Video_Control_Waiting_State::stat_sent (void) -{ - ACE_DEBUG ((LM_DEBUG, - "Video_Control_Waiting_State::stat_sent \n")); - return 0; -} - -// We are in the waiting state - and the client sent us -// the command fast-forward. -CORBA::Boolean -Video_Control_Waiting_State::fast_forward (const Video_Control::FFpara ¶) - -{ - // Many guys in legacy code depend on this variable. - VIDEO_SINGLETON::instance ()-> cmd = CmdFF; - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Control_Waiting_State::fast_forward () called\n")); - VIDEO_SINGLETON::instance ()->init_fast_play (para); - this->vci_->change_state (VIDEO_CONTROL_FAST_FORWARD_STATE::instance ()); - return 1; -} - - -// We are in the waiting state - and the client sent us -// the command fast-backward. -CORBA::Boolean -Video_Control_Waiting_State::fast_backward (const Video_Control::FFpara ¶) - -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Control_Waiting_State::fast_backward () called\n")); - // Many guys in legacy code depend on this variable. - VIDEO_SINGLETON::instance ()-> cmd = CmdFB; - VIDEO_SINGLETON::instance ()->init_fast_play (para); - this->vci_->change_state (VIDEO_CONTROL_FAST_BACKWARD_STATE::instance ()); - return 1; -} - - -CORBA::Boolean -Video_Control_Waiting_State::step (const Video_Control::STEPpara ¶) - -{ - Video_Control::STEPpara step_para = para; - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Control_Waiting_State::step () called\n")); - - int group; - int tag = 0; - int result; - - VIDEO_SINGLETON::instance ()->cmdsn = step_para.sn; - - if (!VIDEO_SINGLETON::instance ()-> live_source) { - if (step_para.nextFrame >= VIDEO_SINGLETON::instance ()->numF) /* send SEQ_END */ - { - tag = 1; - step_para.nextFrame --; - } - /* - fprintf (stderr, "STEP . . .frame-%d\n", step_para.this->nextFrame); - */ - CheckFrameRange (step_para.nextFrame); - group = VIDEO_SINGLETON::instance ()->FrameToGroup (&step_para.nextFrame); - if (VIDEO_SINGLETON::instance ()-> precmd != CmdSTEP && !tag ) { - result = VIDEO_SINGLETON::instance ()->SendReferences (group, step_para.nextFrame); - if (result < 0 ) - return 0; - } - } - if (VIDEO_SINGLETON::instance ()->live_source) - StartPlayLiveVideo (); - - if (VIDEO_SINGLETON::instance ()->live_source) { - VIDEO_SINGLETON::instance ()->SendPicture (&step_para.nextFrame); - } - else if (VIDEO_SINGLETON::instance ()->video_format == VIDEO_MPEG1) { - VIDEO_SINGLETON::instance ()->SendPacket (VIDEO_SINGLETON::instance ()->numS>1, group, tag ? VIDEO_SINGLETON::instance ()->numF : step_para.nextFrame, 0); - } - else { - fprintf (stderr, "VS: wierd1\n"); - } - - if (VIDEO_SINGLETON::instance ()->live_source) StopPlayLiveVideo (); - return 1; -} - - -CORBA::Boolean -Video_Control_Waiting_State::play (const Video_Control::PLAYpara ¶, - CORBA::Long_out vts) - -{ - // Many guys in legacy code depend on this variable. - VIDEO_SINGLETON::instance ()-> cmd = CmdPLAY; - //ACE_DEBUG ((LM_DEBUG, - // "(%P|%t)Video_Control_Waiting_State::play () called \n")); - VIDEO_SINGLETON::instance ()->init_play (para, - vts); - // cerr << "vts is " << vts << endl; - this->vci_->change_state (VIDEO_CONTROL_PLAY_STATE::instance ()); - return 1; -} - - -CORBA::Boolean -Video_Control_Waiting_State::position (const Video_Control::POSITIONpara &pos_para) - -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Control_Waiting_State::position () called \n")); - - if (VIDEO_SINGLETON::instance ()->live_source) - return 1; - - CheckGroupRange (pos_para.nextGroup); - VIDEO_SINGLETON::instance ()-> cmd = CmdPOSITION; - VIDEO_SINGLETON::instance ()-> cmdsn = pos_para.sn; - - int result = VIDEO_SINGLETON::instance ()->SendPacket - (VIDEO_SINGLETON::instance () ->numS > 1 - || pos_para.nextGroup == 0, - pos_para.nextGroup, 0, 0); - - return 1; -} - - -CORBA::Boolean -Video_Control_Waiting_State::speed (const Video_Control::SPEEDpara ¶) - -{ - return 0; -} - - -CORBA::Boolean -Video_Control_Waiting_State::stop (CORBA::Long cmdsn) - -{ - ACE_DEBUG ((LM_DEBUG, - "Video_Control_Waiting_State::stop ()\n")); - VIDEO_SINGLETON::instance ()->cmd = CmdSTOP; - VIDEO_SINGLETON::instance ()->cmdsn = cmdsn; - Video_Timer_Global::StopTimer(); - this->vci_->change_state (VIDEO_CONTROL_WAITING_STATE::instance ()); - return 1; -} - -// Video_Control_Play_State methods - -Video_Control_Play_State::Video_Control_Play_State (void) -{ - this->state_ = VIDEO_PLAY; -} - -CORBA::Boolean -Video_Control_Play_State::stop (CORBA::Long cmdsn) -{ - ACE_DEBUG ((LM_DEBUG, - "Video_Control_Play_State::stop ()\n")); - VIDEO_SINGLETON::instance ()->cmd = CmdSTOP; - VIDEO_SINGLETON::instance ()->cmdsn = cmdsn; - Video_Timer_Global::StopTimer(); - this->vci_->change_state (VIDEO_CONTROL_WAITING_STATE::instance ()); - return 1; -} - - -CORBA::Boolean -Video_Control_Play_State::speed (const Video_Control::SPEEDpara ¶) -{ - ACE_DEBUG ((LM_DEBUG, - "Video_Control_Play_State::speed ()\n")); - VIDEO_SINGLETON::instance ()->frameRateLimit = para.frameRateLimit1000 / 1000.0; - VIDEO_SINGLETON::instance ()->sendPatternGops = para.sendPatternGops; - VIDEO_SINGLETON::instance ()->currentUPF = para.usecPerFrame; - VIDEO_SINGLETON::instance ()->addedUPF = 0; - - for (int i=0; isendPattern [i] = para.sendPattern [i]; - // ACE_OS::memcpy (VIDEO_SINGLETON::instance ()->sendPattern, para.sendPattern, PATTERN_SIZE); - - Video_Timer_Global::TimerSpeed (); - VIDEO_SINGLETON::instance ()->play_send (); - return 1; -} - - -Video_Control_Fast_Forward_State::Video_Control_Fast_Forward_State (void) -{ - this->state_ = VIDEO_FAST_FORWARD; -} - -CORBA::Boolean -Video_Control_Fast_Forward_State::stop (CORBA::Long cmdsn) -{ - ACE_DEBUG ((LM_DEBUG, - "Video_Control_Fast_Forward_State::stop ()\n")); - VIDEO_SINGLETON::instance ()->cmd = CmdSTOP; - VIDEO_SINGLETON::instance ()->cmdsn = cmdsn; - Video_Timer_Global::StopTimer(); - this->vci_->change_state (VIDEO_CONTROL_WAITING_STATE::instance ()); - return 1; -} - -void -Video_Control_Fast_Forward_State::close (void) -{ - return; -} - -// ---------------------------------------------------------------------- - -Video_Control_Fast_Backward_State::Video_Control_Fast_Backward_State (void) -{ - this->state_ = VIDEO_FAST_BACKWARD; -} - -CORBA::Boolean -Video_Control_Fast_Backward_State::stop (CORBA::Long cmdsn) -{ - ACE_DEBUG ((LM_DEBUG, - "Video_Control_Fast_Backward_State::stop ()\n")); - VIDEO_SINGLETON::instance ()->cmd = CmdSTOP; - VIDEO_SINGLETON::instance ()->cmdsn = cmdsn; - Video_Timer_Global::StopTimer(); - this->vci_->change_state (VIDEO_CONTROL_WAITING_STATE::instance ()); - return 1; -} - -void -Video_Control_Fast_Backward_State::close (void) -{ - return; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h deleted file mode 100644 index 9363a48ea0d..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h +++ /dev/null @@ -1,189 +0,0 @@ -/* -*- C++ -*- */ - -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#ifndef MPEG_VIDEO_CONTROL_STATE_H -#define MPEG_VIDEO_CONTROL_STATE_H - -#include "ace/Singleton.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "mpeg_shared/Video_ControlS.h" -#include "mpeg_server/Video_Control_i.h" - -class Video_Control_i; - -class Video_Control_State -{ - // = TITLE - // Defines an abstract class that is used to implement the state - // pattern for the video control. - // - // = DESCRIPTION - // The various states of the video control are defined by the - // Video_States enum. They can be implemented by subclassing from - // this class and overriding the handle_input method. -public: - Video_Control_State (void); - // constructor - - enum Video_States - { - VIDEO_WAITING, - VIDEO_PLAY = 1, - VIDEO_FAST_FORWARD = 2, - VIDEO_FAST_BACKWARD = 3 - }; - - Video_States get_state (void); - // returns the current state - - void set_state (Video_States state); - // sets the state - - virtual CORBA::Boolean init_video (const Video_Control::INITvideoPara ¶, - Video_Control::INITvideoReply_out reply) ; - - virtual CORBA::Boolean stat_stream (CORBA::Char_out ch, - CORBA::Long_out size); - - virtual void close (void); - - virtual CORBA::Boolean stat_sent (void); - - virtual CORBA::Boolean fast_forward (const Video_Control::FFpara ¶) ; - - virtual CORBA::Boolean fast_backward (const Video_Control::FFpara ¶) ; - - virtual CORBA::Boolean step (const Video_Control::STEPpara ¶) ; - - virtual CORBA::Boolean play (const Video_Control::PLAYpara ¶, - CORBA::Long_out vts) ; - - virtual CORBA::Boolean position (const Video_Control::POSITIONpara ¶) ; - - virtual CORBA::Boolean speed (const Video_Control::SPEEDpara ¶) ; - - virtual CORBA::Boolean stop (CORBA::Long cmdsn) ; - -protected: - Video_States state_; - // State of this object - - Video_Control_i *vci_; - -}; - -class Video_Control_Waiting_State : public virtual Video_Control_State -{ - // = TITLE - // Defines a class that implements the waiting state of the video - // control state pattern. -public: - Video_Control_Waiting_State (void); - // Default constructor, sets the state to WAITING - - virtual CORBA::Boolean stat_stream (CORBA::Char_out ch, - CORBA::Long_out size); - - virtual void close (void); - - virtual CORBA::Boolean stat_sent (void); - - virtual CORBA::Boolean fast_forward (const Video_Control::FFpara ¶); - - virtual CORBA::Boolean fast_backward (const Video_Control::FFpara ¶); - - virtual CORBA::Boolean step (const Video_Control::STEPpara ¶); - - - virtual CORBA::Boolean play (const Video_Control::PLAYpara ¶, - CORBA::Long_out vts); - - virtual CORBA::Boolean position (const Video_Control::POSITIONpara ¶); - - virtual CORBA::Boolean speed (const Video_Control::SPEEDpara ¶); - - virtual CORBA::Boolean stop (CORBA::Long cmdsn); -}; - -class Video_Control_Play_State : public virtual Video_Control_State -{ - // = TITLE - // Defines a class that implements the playing state of the video - // control state pattern. -public: - Video_Control_Play_State (void); - // Default constructor, sets the state to VIDEO_PLAY - - virtual CORBA::Boolean stop (CORBA::Long cmdsn); - - virtual CORBA::Boolean speed (const Video_Control::SPEEDpara ¶); -}; - -class Video_Control_Fast_Forward_State : public virtual Video_Control_State -{ - // = TITLE - // Defines a class that implements the fast_forward state of the video - // control state pattern. -public: - Video_Control_Fast_Forward_State (void); - // Default constructor, sets the state to VIDEO_FAST_FORWARD - - void close (void); - - CORBA::Boolean stop (CORBA::Long cmdsn); -}; - -class Video_Control_Fast_Backward_State : public virtual Video_Control_State -{ - // = TITLE - // Defines a class that implements the fast_backward state of the video - // control state pattern. -public: - Video_Control_Fast_Backward_State (void); - // Default constructor, sets the state to VIDEO_FAST_BACKWARD - - void close (void); - - CORBA::Boolean stop (CORBA::Long cmdsn); -}; - -typedef ACE_Singleton - VIDEO_CONTROL_WAITING_STATE; -typedef ACE_Singleton - VIDEO_CONTROL_PLAY_STATE; -typedef ACE_Singleton - VIDEO_CONTROL_FAST_FORWARD_STATE; -typedef ACE_Singleton - VIDEO_CONTROL_FAST_BACKWARD_STATE; - -#endif /* MPEG_VIDEO_SERVER_STATE_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.cpp deleted file mode 100644 index 5db371090c1..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.cpp +++ /dev/null @@ -1,272 +0,0 @@ -// $Id$ - -#include "Video_Control_i.h" -#include "mpeg_server/Video_Server.h" - -ACE_RCSID(mpeg_server, Video_Control_i, "$Id$") - -Video_Control_i::Video_Control_i () - : reactor_ (TAO_ORB_Core_instance ()->reactor ()), - state_ (0), - data_handler_ (0), - sig_handler_ (0) -{ -} - -int -Video_Control_i::create_handlers (void) -{ - ACE_NEW_RETURN (this->data_handler_, - Video_Data_Handler, - -1); - - ACE_NEW_RETURN (this->sig_handler_, - Video_Sig_Handler, - -1); - return 0; -} -CORBA::Boolean -Video_Control_i::init_video (const Video_Control::INITvideoPara ¶, - Video_Control::INITvideoReply_out reply, - CORBA::Environment& env) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Control_i::init_video () called\n")); - - CORBA::Boolean result = this->state_->init_video (para, - reply); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Video_Control_State::init_video returned %d\n", result)); - return result; - -} - - -CORBA::Boolean -Video_Control_i::stat_stream (CORBA::Char_out ch, - CORBA::Long_out size, - CORBA::Environment& env) -{ - return 0; -} - - -void -Video_Control_i::close (CORBA::Environment& env) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Control_i::close:" - "shutting down the ORB\n")); - - TAO_ORB_Core_instance ()-> orb ()-> shutdown (); - return; -} - - -CORBA::Boolean -Video_Control_i::stat_sent (CORBA::Environment& env) -{ - return 0; -} - - -CORBA::Boolean -Video_Control_i::fast_forward (const Video_Control::FFpara ¶, - CORBA::Environment& env) -{ - return this->state_->fast_forward (para); -} - - -CORBA::Boolean -Video_Control_i::fast_backward (const Video_Control::FFpara ¶, - CORBA::Environment& env) -{ - return this->state_->fast_backward (para); -} - - -CORBA::Boolean -Video_Control_i::step (const Video_Control::STEPpara ¶, - CORBA::Environment& env) -{ - return this->state_->step (para); -} - - -// this gets called by the client, when it wants -// to start playback -CORBA::Boolean -Video_Control_i::play (const Video_Control::PLAYpara ¶, - CORBA::Long_out vts, - CORBA::Environment& env) -{ - return this->state_->play (para, - vts); -} - - -CORBA::Boolean -Video_Control_i::position (const Video_Control::POSITIONpara ¶, - CORBA::Environment& env) -{ - return this->state_->position (para); -} - - -CORBA::Boolean -Video_Control_i::speed (const Video_Control::SPEEDpara ¶, - CORBA::Environment& env) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Control_i::speed () called\n")); - return this->state_->speed (para); -} - - -CORBA::Boolean -Video_Control_i::stop (CORBA::Long cmdsn, - CORBA::Environment& env) -{ - return this->state_->stop (cmdsn); -} - -CORBA::Boolean -Video_Control_i::set_peer (char * &peer, - CORBA::Environment &_tao_environment) -{ - ACE_INET_Addr client_data_addr (peer); - // Data (UDP) Address of the client. - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) set_peer called: %s,%s,%d\n", - peer, - client_data_addr.get_host_addr (), - client_data_addr.get_port_number ())); - - char temp_addr [BUFSIZ]; - if (VIDEO_SINGLETON::instance ()->data_host != 0) - ACE_OS::sprintf (temp_addr,"%s:%d",VIDEO_SINGLETON::instance ()->data_host,0); - else - ACE_OS::sprintf (temp_addr,":%d",0); - - if (VIDEO_SINGLETON::instance ()->dgram.open (client_data_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) UDP open failed: %p\n"), - 0); - - // set the socket buffer sizes to 64k. - int sndbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; - int rcvbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; - - if (VIDEO_SINGLETON::instance ()->dgram.set_option (SOL_SOCKET, - SO_SNDBUF, - (void *) &sndbufsize, - sizeof (sndbufsize)) == -1 - && errno != ENOTSUP) - return 0; - else if (VIDEO_SINGLETON::instance ()->dgram.set_option (SOL_SOCKET, - SO_RCVBUF, - (void *) &rcvbufsize, - sizeof (rcvbufsize)) == -1 - && errno != ENOTSUP) - return 0; - - - ACE_INET_Addr server_data_addr; - // Data (UDP) Address of this server. - - if (VIDEO_SINGLETON::instance ()-> dgram.get_local_addr - (server_data_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) UDP get_local_addr failed: %p\n"), - 0); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Server: My UDP port number is %d\n", - server_data_addr.get_port_number ())); - - if (this->register_handlers () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Video_Control_i::set_peer: register_handlers failed\n"), - 0); - - VIDEO_SINGLETON::instance ()->videoSocket = VIDEO_SINGLETON::instance ()->dgram.get_handle (); - - ACE_DEBUG ((LM_DEBUG,"(%P|%t) set_peer: server port = %d\n",server_data_addr.get_port_number ())); - ACE_NEW_RETURN (peer, - char [BUFSIZ], - 0); - // hack to set the ip address correctly. - server_data_addr.set (server_data_addr.get_port_number (), - server_data_addr.get_host_name ()); - server_data_addr.addr_to_string (peer, - BUFSIZ); - - return 1; -} - -int -Video_Control_i::register_handlers (void) -{ - int result; - - - // create the handlers - - if (this->create_handlers () == -1) - return -1; - - this->change_state (VIDEO_CONTROL_WAITING_STATE::instance ()); - // sets the state to waiting. - - // Register the event handlers with the Reactor - // first the data handler, i.e. UDP - result = this->reactor_->register_handler (this->data_handler_, - ACE_Event_Handler::READ_MASK); - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) register_handler for data_handler failed\n"), - -1); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) registered fd for data handler = (%d)\n", - this->data_handler_->get_handle ())); - - // finally, the signal handler, for periodic transmission - // of packets - result = this->sig_handler_->register_handler (); - - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) register_handler for sig_handler" - "failed!\n"), - -1); - - return 0; -} - -// Changes the state of the video control handler from the current -// state to the state represented by the argument. -void -Video_Control_i::change_state (Video_Control_State *state) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Control_i::Changing to state %d\n", - state->get_state ())); - this->state_ = state; -} - -// Returns the current state object . -Video_Control_State * -Video_Control_i::get_state (void) -{ - return this->state_; -} - - -Video_Control_i::~Video_Control_i () -{ - delete this->data_handler_; - delete this->sig_handler_; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h deleted file mode 100644 index 55b782a0e97..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#ifndef AV_VIDEO_CONTROL_H -#define AV_VIDEO_CONTROL_H - -#include "mpeg_shared/Video_ControlS.h" -#include "Video_Server.h" - -class Video_Data_Handler; -class Video_Sig_Handler; -class Video_Control_State; - -class Video_Control_i - : public virtual POA_Video_Control -{ -public: - Video_Control_i (); - // constructor - - int create_handlers (void); - // creates the data and signal handlers - - virtual CORBA::Boolean init_video (const Video_Control::INITvideoPara ¶, - Video_Control::INITvideoReply_out reply, - CORBA::Environment &_tao_environment); - - virtual CORBA::Boolean stat_stream (CORBA::Char_out ch, - CORBA::Long_out size, - CORBA::Environment &_tao_environment); - - virtual void close (CORBA::Environment &_tao_environment); - - virtual CORBA::Boolean stat_sent (CORBA::Environment &_tao_environment); - - virtual CORBA::Boolean fast_forward (const Video_Control::FFpara ¶, - CORBA::Environment &_tao_environment - ); - - virtual CORBA::Boolean fast_backward (const Video_Control::FFpara ¶, - CORBA::Environment &_tao_environment); - - virtual CORBA::Boolean step (const Video_Control::STEPpara ¶, - CORBA::Environment &_tao_environment); - - virtual CORBA::Boolean play (const Video_Control::PLAYpara ¶, - CORBA::Long_out vts, - CORBA::Environment &_tao_environment); - - virtual CORBA::Boolean position (const Video_Control::POSITIONpara ¶, - CORBA::Environment &_tao_environment); - - virtual CORBA::Boolean speed (const Video_Control::SPEEDpara ¶, - CORBA::Environment &_tao_environment); - - virtual CORBA::Boolean stop (CORBA::Long cmdsn, - CORBA::Environment &_tao_environment); - - virtual CORBA::Boolean set_peer (char * &peer, - CORBA::Environment &_tao_environment); - // called by the client to inform us about it's ip and - // udp address. - - void change_state (Video_Control_State *state); - // Used to change the state - - Video_Control_State *get_state (void); - // Accessor for the state_ - - virtual ~Video_Control_i (void); - // Destructor - -protected: - int register_handlers (void); - // called by set_peer to install the data_handler and - // the sig_handler - - ACE_Reactor *reactor_; - // The Reactor - - Video_Control_State *state_; - // State pattern - pointer to abstract State object - - Video_Data_Handler *data_handler_; - // Data Socket Event Handler - - Video_Sig_Handler *sig_handler_; - // signal handler for SIGALRM to periodically send the video frames - // to the client - -}; - -// Video_Control_i instance singleton. -// %% -typedef ACE_Singleton VIDEO_CONTROL_I; - -#endif /* if !defined (AV_VIDEO_CONTROL_H) */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp deleted file mode 100644 index e86b17db162..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#include "Video_Server.h" -#include "orbsvcs/CosNamingC.h" - -ACE_RCSID(mpeg_server, Video_Server, "$Id$") - -// Video_Sig_Handler methods -// handles the timeout SIGALRM signal -Video_Sig_Handler::Video_Sig_Handler () - : vci_ (VIDEO_CONTROL_I::instance ()) -{ -} - -int -Video_Sig_Handler::register_handler (void) -{ - // Assign the Sig_Handler a dummy I/O descriptor. Note that even - // though we open this file "Write Only" we still need to use the - // ACE_Event_Handler::NULL_MASK when registering this with the - // ACE_Reactor (see below). - this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY); - ACE_ASSERT (this->handle_ != -1); - - // Register signal handler object. Note that NULL_MASK is used to - // keep the ACE_Reactor from calling us back on the "/dev/null" - // descriptor. - if (TAO_ORB_Core_instance ()->reactor ()->register_handler - (this, ACE_Event_Handler::NULL_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - - // Create a sigset_t corresponding to the signals we want to catch. - ACE_Sig_Set sig_set; - - // sig_set.sig_add (SIGINT); - // sig_set.sig_add (SIGQUIT); - sig_set.sig_add (SIGALRM); - - // Register the signal handler object to catch the signals. - if (TAO_ORB_Core_instance ()->reactor ()->register_handler (sig_set, - this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - return 0; -} -// Called by the ACE_Reactor to extract the fd. - -ACE_HANDLE -Video_Sig_Handler::get_handle (void) const -{ - return this->handle_; -} - -int -Video_Sig_Handler::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n")); - return 0; -} - -int -Video_Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n")); - return 0; -} - -// This method handles all the signals that are being caught by this -// object. In our simple example, we are simply catching SIGALRM, -// SIGINT, and SIGQUIT. Anything else is logged and ignored. -// -// There are several advantages to using this approach. First, -// the behavior triggered by the signal is handled in the main event -// loop, rather than in the signal handler. Second, the ACE_Reactor's -// signal handling mechanism eliminates the need to use global signal -// handler functions and data. - -int -Video_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) -{ - // ACE_DEBUG ((LM_DEBUG, "(%t) received signal %S\n", signum)); - - switch (signum) - { - case SIGALRM: - // Handle the timeout - Video_Timer_Global::timerHandler (SIGALRM); - // send the frame - // cerr << "current state = " << this->vci_->get_state ()->get_state (); - switch (this->vci_->get_state ()->get_state ()) - { - case Video_Control_State::VIDEO_PLAY: - VIDEO_SINGLETON::instance ()->play_send (); - break; - case Video_Control_State::VIDEO_FAST_FORWARD: - // this handles the forward play case! - VIDEO_SINGLETON::instance ()->fast_play_send (); - break; - case Video_Control_State::VIDEO_FAST_BACKWARD: - // this handles the backward play case! - VIDEO_SINGLETON::instance ()->fast_play_send (); - break; - default: - break; - } - break; - default: - ACE_DEBUG ((LM_DEBUG, - "(%t) %S: not handled, returning to program\n", - signum)); - break; - } - // ACE_DEBUG ((LM_DEBUG,"returning from handle_signal")); - return 0; -} - -// Video_Data_Handler methods - -Video_Data_Handler::Video_Data_Handler () - : vci_ (VIDEO_CONTROL_I::instance ()) -{ -} - -ACE_HANDLE -Video_Data_Handler::get_handle (void) const -{ - return VIDEO_SINGLETON::instance ()->dgram.get_handle (); -} - -int -Video_Data_Handler::handle_input (ACE_HANDLE handle) -{ - // fprintf (stderr,"Video_Data_Handler::handle_input ()\n"); - - switch (this->vci_->get_state ()->get_state ()) - { - case Video_Control_State::VIDEO_PLAY: - VIDEO_SINGLETON::instance ()->GetFeedBack (); - // if (VIDEO_SINGLETON::instance ()->GetFeedBack () == -1) -// { -// ACE_DEBUG ((LM_DEBUG, "(%P|%t) Error reading feedback. Ending the reactor event loop\n")); -// TAO_ORB_Core_instance ()-> orb ()->shutdown (); -// return -1; -// } - if (VIDEO_SINGLETON::instance ()->play_send () == -1) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Error sending packets. Ending the reactor event loop\n")); - // TAO_ORB_Core_instance ()-> orb ()->shutdown (); - // return -1; - } - // simulating the for loop in playvideo () in vs.cpp - break; - case Video_Control_State::VIDEO_FAST_FORWARD: - case Video_Control_State::VIDEO_FAST_BACKWARD: - VIDEO_SINGLETON::instance ()->GetFeedBack (); - if (VIDEO_SINGLETON::instance ()->fast_play_send () == -1) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Error sending packets. Ending the reactor event loop\n")); - // TAO_ORB_Core_instance ()-> orb ()->shutdown (); - // return -1; - } - // simulating the for loop in fast_play - break; - } - return 0; -} - -// Video_Control_Handler methods - -// Video_Server_StreamEndPoint methods. - -int -Video_Server_StreamEndPoint::handle_open (void) -{ - return 0; -} - -int -Video_Server_StreamEndPoint::handle_close (void) -{ - // called when streamendpoint is being destructed - return 0; -} - -int -Video_Server_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return 0; -} - -int -Video_Server_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return 0; -} - -int -Video_Server_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return 0; -} - -CORBA::Boolean -Video_Server_StreamEndPoint::handle_connection_requested (AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Video_Server_StreamEndPoint::handle_connection_requested:() %s \n", - // the_spec[0])); - - char *server_string; - - server_string = CORBA::string_dup ((const char *) the_spec [0]); - CORBA::Boolean result; - result = VIDEO_CONTROL_I::instance ()->set_peer (server_string,env); - // Get media control from my vdev and call set_peer on that. - - the_spec.length (1); - the_spec [0]=server_string; - - return result; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h deleted file mode 100644 index 29ba6ea2d7a..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h +++ /dev/null @@ -1,152 +0,0 @@ -/* -*- C++ -*- */ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#ifndef MPEG_VIDEO_SERVER_H -#define MPEG_VIDEO_SERVER_H - -#include "ace/Reactor.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Event_Handler.h" - -#include "tao/TAO.h" -#include "include/common.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/com.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/sendpt.h" -#include "mpeg_shared/Video_ControlS.h" -#include "mpeg_server/server_proto.h" -#include "mpeg_server/Video_Control_State.h" -#include "mpeg_server/Globals.h" -#include "mpeg_server/Video_Control_i.h" -#include "orbsvcs/AV/AVStreams_i.h" - -class Video_Control_i; - -class Video_Sig_Handler - : public virtual ACE_Event_Handler -{ - // = TITLE - // Defines a video signal handler class which registers itself with the - // default ACE_Reactor::instance () . Handles the - // SIGALRM signal. - // - // = DESCRIPTION - // This class contains a pointer to a Video_Control_Handler - // instance and decides the signal action depending on its state. - // An object of this class is used to periodically send the video - // frames to the client using the Video_Timer_Global class. -public: - Video_Sig_Handler (); - - virtual ACE_HANDLE get_handle (void) const; - - int register_handler (void); - // this will register this sig_handler - // with the reactor for SIGALRM - - virtual int shutdown (ACE_HANDLE, - ACE_Reactor_Mask); - - virtual int handle_input (ACE_HANDLE); - - virtual int handle_signal (ACE_HANDLE signum, - siginfo_t * = 0, - ucontext_t* = 0); -private: - ACE_HANDLE handle_; - // my handle - - Video_Control_i *vci_; - // Pointer to the Video_Control_i for accessing - // the current state of the server. -}; - -class Video_Data_Handler : public virtual ACE_Event_Handler -{ - - // = TITLE - // Defines a event handler for video data using a datagram i.e UDP - // socket. - // - // = DESCRIPTION - // This takes a pointer to a Video_Control_Handler instance and - // reacts differently to the events based on the - // video_control_handler's state. -public: - Video_Data_Handler (); - // Constructor - - virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); - // Called when data shows up. - - virtual ACE_HANDLE get_handle (void) const; - // Get the handle used by this event handler - -private: - Video_Control_i *vci_; - -}; - -// The stream endpoint -class Video_Server_StreamEndPoint : - public virtual TAO_Server_StreamEndPoint -{ -public: - virtual int handle_open (void) ; - // called when streamendpoint is instantiated - - virtual int handle_close (void) ; - // called when streamendpoint is being destructed - - virtual int handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - // Application needs to define this - - virtual int handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - // Application needs to define this - - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - // Application needs to define this - - virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - -private: - ACE_SOCK_CODgram dgram_; - -}; - -#endif /* MPEG_VIDEO_SERVER_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/as.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/as.cpp deleted file mode 100644 index d631fbfda6a..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/as.cpp +++ /dev/null @@ -1,708 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "include/common.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/com.h" -#include "server_proto.h" - -ACE_RCSID(mpeg_server, as, "$Id$") - -//extern int Mpeg_Global::session_limit, Mpeg_Global::session_num; - -static bytes_sent = 0; -static time_t start_time; - -static int conn_tag; - -static int serviceSocket; -static int audioSocket = -1; - -static char audioFile[PATH_SIZE]; -static int fd; -static AudioParameter audioPara; -static int totalSamples; -static int fileSize; -static unsigned char cmd; -static live_source = 0; - -static int CmdRead(char *buf, int psize) -{ - int res = wait_read_bytes(serviceSocket, buf, psize); - if (res == 0) return (1); - if (res == -1) { - fprintf(stderr, "AS error on read cmdSocket, size %d", psize); - ACE_OS::perror (""); - return (-1); - } - return 0; -} - -static void CmdWrite(char *buf, int size) -{ - int res = wait_write_bytes(serviceSocket, buf, size); - if (res == -1) { - if (errno != EPIPE)ACE_OS::perror ("AS writes to serviceSocket"); - ACE_OS::exit (errno != EPIPE); - } -} - -static int INITaudio(void) -{ - int result; - int failureType; /* 0 - can't open file, 1 - can't open live source */ - INITaudioPara para; - - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.version = ntohl(para.version); - para.nameLength = ntohl(para.nameLength); - para.para.encodeType = ntohl(para.para.encodeType); - para.para.channels = ntohl(para.para.channels); - para.para.samplesPerSecond = ntohl(para.para.samplesPerSecond); - para.para.bytesPerSample = ntohl(para.para.bytesPerSample); -#endif - if (para.nameLength>0) - result = CmdRead(audioFile, para.nameLength); - if (result != 0) - return result; - if (Mpeg_Global::session_num > Mpeg_Global::session_limit || para.version != VERSION) { - char errmsg[128]; - cmd = CmdFAIL; - CmdWrite((char *)&cmd, 1); - if (Mpeg_Global::session_num > Mpeg_Global::session_limit) { - sprintf(errmsg, - "Too many sessions being serviced, please try again later.\n"); - } - else { - sprintf(errmsg, "Version # not match, AS %d.%02d, Client %d.%02d", - VERSION / 100, VERSION % 100, - para.version / 100, para.version % 100); - } - write_string(serviceSocket, errmsg); - return(1); - } - ACE_OS::memcpy (&audioPara, ¶.para, sizeof(audioPara)); - /* - fprintf(stderr, "Client Audio para: encode %d, ch %d, sps %d, bps %d.\n", - para.para.encodeType, para.para.channels, - para.para.samplesPerSecond, para.para.bytesPerSample); - */ - audioFile[para.nameLength] = 0; - { - int len =ACE_OS::strlen (audioFile); - if (strncasecmp("LiveAudio", audioFile, 9) && - strcasecmp(".au", audioFile+len-3)) { - char errmsg[128]; - cmd = CmdFAIL; - CmdWrite((char *)&cmd, 1); - sprintf(errmsg, "%s without suffix .au", audioFile); - write_string(serviceSocket, errmsg); - return(1); - } - } - /* - fprintf(stderr, "Audio file %s got.\n", audioFile); - */ - - if (!strncasecmp("LiveAudio", audioFile, 9)) { - fd = OpenLiveAudio(&(para.para)); - if (fd == -1) { - failureType = 1; - goto failure; - } - fileSize =0x7fffffff; - totalSamples = fileSize / audioPara.bytesPerSample; - live_source = 1; - } - else { - LeaveLiveAudio(); - fd = open(audioFile, O_RDONLY); - if (fd == -1) - { - fprintf(stderr, "AS error on opening audio file %s", audioFile); - ACE_OS::perror (""); - failureType = 0; - goto failure; - } - - /* Try to get audioFile format audioPara here */ - - /* figure out totalsamples */ - fileSize = lseek(fd, 0L, SEEK_END); - lseek(fd, 0L, SEEK_SET); - totalSamples = fileSize / audioPara.bytesPerSample; - /* - fprintf(stderr, "Total Samples=%d in audio file %ss.\n", totalSamples, audioFile); - */ - } - { - INITaudioReply reply; - - reply.para.encodeType = htonl(audioPara.encodeType); - reply.para.channels = htonl(audioPara.channels); - reply.para.samplesPerSecond = htonl(audioPara.samplesPerSecond); - reply.para.bytesPerSample = htonl(audioPara.bytesPerSample); - reply.totalSamples = htonl(totalSamples); - - reply.live = htonl(live_source); - reply.format = htonl(AUDIO_RAW); - - CmdWrite((char *)&cmd, 1); - CmdWrite((char *)&reply, sizeof(reply)); - } - return 0; - - failure: - { - /* - fprintf(stderr, "AS error: failed initializing audio file.\n"); - */ - cmd = CmdFAIL; - CmdWrite((char *)&cmd, 1); - write_string(serviceSocket, - failureType == 0 ? "Failed to open audio file for read." : - "Failed to connect to live audio source."); - return(1); - } -} - -#define DATABUF_SIZE 500 - -static int databuf_size; -static int cmdsn; -static int nextsample; -static int sps; /* audio play speed given by the client: samples per second */ -static int spslimit; -static int spp; /* samples per packet */ -static AudioPacket * pktbuf = NULL; - -/* send a packet of audio samples to audioSocket - returns: 0 - no more data from audio file: EOF reached; - 1 - More data is available from the audio file */ -static int send_packet(int firstSample, int samples) -{ - long offset = firstSample * audioPara.bytesPerSample; - int size = samples * audioPara.bytesPerSample; - char * buf = (char *)pktbuf + sizeof(*pktbuf); - int len; - int resent = 0; - int segsize, sentsize; - - if (live_source) { - len = ReadLiveAudioSamples(buf, samples); - len *= audioPara.bytesPerSample; - } - else { - lseek(fd, offset, SEEK_SET); - while ((len = ACE_OS::read (fd, buf, size)) == -1) { - if (errno == EINTR) - continue; /* interrupted */ - ACE_OS::perror ("AS error on read audio file"); - return(-1); - } - if (len < audioPara.bytesPerSample) { - return 0; - } - } - - samples = len / audioPara.bytesPerSample; - len = samples * audioPara.bytesPerSample; - bytes_sent += len; - pktbuf->firstSample = htonl(firstSample); - pktbuf->samples = htonl(samples); - pktbuf->actualSamples = htonl(samples); - pktbuf->dataBytes = htonl(len); - if (spslimit < sps) { /* interpolation needed */ - SFprintf(stderr, "AS audio sample interpolation not available yet.\n"); - } - segsize = sizeof(*pktbuf) + len; - if (conn_tag != 0) { - while ((sentsize = ACE_OS::write (audioSocket, (char *)pktbuf, segsize)) == -1) { - if (errno == EINTR) /* interrupted */ - continue; - if (errno == ENOBUFS) { - if (resent) { - ACE_OS::perror ("AS Warning, pkt discarded because"); - break; - } - else { - resent = 1; - usleep(5000); - continue; - } - } - if (errno != EPIPE) { - fprintf(stderr, "AS error on send audio packet %d(%d):", - firstSample, samples); - perror(""); - } - ACE_OS::exit ((errno != EPIPE)); - } - } - else { - sentsize = wait_write_bytes(audioSocket, (char *)pktbuf, segsize); - if (sentsize == -1) { - if (errno != EPIPE) { - fprintf(stderr, "AS error on send audio packet %d(%d):", - firstSample, samples); - perror(""); - } - ACE_OS::exit ((errno != EPIPE)); - } - } - if (sentsize < segsize) { - SFprintf(stderr, "AS warning: message size %dB, sent only %dB\n", - segsize, sentsize); - } - /* - SFprintf(stderr, "AS sent audio packet %d(%d).\n", - firstSample, samples); - */ - return (len < size ? 0 : 1); -} - -/* send a packet of audio samples to audioSocket - returns: 0 - no more data from audio file: EOF reached; - 1 - More data is available from the audio file */ -static int SendPacket(void) -{ - int moredata; - pktbuf->cmdsn = htonl(cmdsn); - pktbuf->resend = htonl(0); - pktbuf->samplesPerSecond = htonl(sps); - moredata = send_packet(nextsample, spp); - if (moredata) { - nextsample += spp; - } - return moredata; -} - -static void ResendPacket(int firstsample, int samples) -{ - pktbuf->cmdsn = htonl(cmdsn); - pktbuf->resend = htonl(1); - pktbuf->samplesPerSecond = htonl(sps); - while (samples > 0) { - int size = samples < spp ? samples : spp; - send_packet(firstsample, size); - firstsample += size; - samples -= size; - if (samples > 0) { - usleep(10000); - } - } -} - -#define SPEEDUP_SCALE 5 -#define MAX_RESEND_REQS 10 -#define FBBUF_SIZE (sizeof(AudioFeedBackPara) + \ - (MAX_RESEND_REQS - 1) * sizeof(APdescriptor)) - -static AudioFeedBackPara * fbpara = NULL; - -static int PLAYaudio(void) -{ - int hasdata = 1; - int addSamples; - int packets = 0; - unsigned nextTime; - int upp; /* micro-seconds per packet */ - int delta_sps = 0; /* compensation for sps from feedback msgs */ - int nfds = (serviceSocket > audioSocket ? serviceSocket : audioSocket) + 1; - int result; - /* - fprintf(stderr, "PLAY . . .\n"); - */ - { - PLAYaudioPara para; - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.nextSample = ntohl(para.nextSample); - para.samplesPerSecond = ntohl(para.samplesPerSecond); - para.samplesPerPacket = ntohl(para.samplesPerPacket); - para.ABsamples = ntohl(para.ABsamples); - para.spslimit = ntohl(para.spslimit); -#endif - nextsample = para.nextSample; - cmdsn = para.sn; - sps = para.samplesPerSecond; - spslimit = para.spslimit; - spp = para.samplesPerPacket; - addSamples = para.ABsamples / 2; - if (spp * audioPara.bytesPerSample > databuf_size) { - spp = databuf_size / audioPara.bytesPerSample; - } - /* - SFprintf(stderr, "AS got CmdPLAY: sps %d\n", sps); - */ - } - /* - fprintf(stderr, "AS: nextSampe=%d for PLAY.\n", para.nextSample); - */ - - upp = (int)(1000000.0 / ((double)sps / (double)spp)); - nextTime = get_usec(); - - CmdWrite((char *)&nextTime, sizeof(int)); - - if (live_source) { - StartPlayLiveAudio(); - } - - for (;;) - { - struct fd_set read_mask, write_mask; - struct timeval tval; - unsigned curTime = get_usec(); - - if (hasdata) { - if (addSamples < - spp) { /* slow down by not sending packets */ - nextTime += upp; - addSamples += spp; - } - else { - int need_sleep = 0; - while (nextTime <= curTime && hasdata) { - if (need_sleep) usleep(5000); - hasdata = SendPacket(); - need_sleep = 1; - packets ++; - nextTime += upp; - if (addSamples > 0 && packets % SPEEDUP_SCALE == 0) { - addSamples -= spp; - usleep(5000); - hasdata = SendPacket(); - packets ++; - } - } - } - } - curTime = nextTime - curTime; - if (curTime > 5000000) curTime = 5000000; /* limit on 5 second weit time - in case error happens */ - tval.tv_sec = curTime / 1000000; - tval.tv_usec = curTime % 1000000; - FD_ZERO(&read_mask); - FD_SET(serviceSocket, &read_mask); - FD_SET(audioSocket, &read_mask); -#ifdef _HPUX_SOURCE - if (select(nfds, (int *)&read_mask, NULL, NULL, hasdata ? &tval : NULL) == -1) -#else - if (select(nfds, &read_mask, NULL, NULL, hasdata ? &tval : NULL) == -1) -#endif - { - if (errno == EINTR) - continue; - ACE_OS::perror ("AS error on select reading or writing"); - return(-1); - } - if (FD_ISSET(serviceSocket, &read_mask)){ /* STOP, SPEED, or CLOSE*/ - unsigned char tmp; - result = CmdRead((char *)&tmp, 1); - if (result != 0) - return result; - switch (tmp) - { - case CmdSPEED: - { - SPEEDaudioPara para; - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.samplesPerSecond = ntohl(para.samplesPerSecond); - para.samplesPerPacket = ntohl(para.samplesPerPacket); - para.spslimit = ntohl(para.spslimit); -#endif - sps = para.samplesPerSecond; - spslimit = para.spslimit; - spp = para.samplesPerPacket; - if (spp * audioPara.bytesPerSample > databuf_size) { - spp = databuf_size / audioPara.bytesPerSample; - } - delta_sps = 0; /* reset compensation value */ - upp = (int)(1000000.0 / ((double)sps / (double)spp)); - /* - SFprintf(stderr, "AS got CmdSPEED: sps %d\n", sps); - */ - } - break; - case CmdSTOP: - { - int val; - cmd = tmp; - /* - fprintf(stderr, "AS: CmdSTOP. . .\n"); - */ - result = CmdRead((char *)&val, sizeof(int)); - if (result != 0) - return result; - /* - CmdWrite(AUDIO_STOP_PATTERN,ACE_OS::strlen (AUDIO_STOP_PATTERN)); - */ - if (live_source) { - StopPlayLiveAudio(); - } - return 0; /* return from PLAYaudio() */ - } - case CmdCLOSE: - if (live_source) { - StopPlayLiveAudio(); - } - return(1); /* The whole AS session terminates */ - default: - if (live_source) { - StopPlayLiveAudio(); - } - fprintf(stderr, "AS error: cmd=%d while expects STOP/SPEED/CLOSE.\n", tmp); - return(-1); - } - } - - if (FD_ISSET(audioSocket, &read_mask)){ /* Feedback packet */ - int bytes, len; - for (;;) { - if (conn_tag >= 0) { - len = wait_read_bytes(audioSocket, (char *)fbpara, sizeof(*fbpara)); - if (len == 0) return(1); /* connection broken */ - else if (len < 0) { /* unexpected error */ - ACE_OS::perror ("AS read1 FB"); - return(-1); - } - } - else { /* discard mode packet stream, read the whole packet */ - len = ACE_OS::read (audioSocket, (char *)fbpara, FBBUF_SIZE); - } - if (len == -1) { - if (errno == EINTR) continue; /* interrupt */ - else { - if (errno != EPIPE && errno != ECONNRESET)ACE_OS::perror ("AS failed to ACE_OS::read () fbmsg header"); - break; - } - } - break; - } - if (len < sizeof(*fbpara)) { - if (len > 0) fprintf(stderr, - "AS warn ACE_OS::read () len %dB < sizeof(*fbpara) %dB\n", - len, sizeof(*fbpara)); - continue; - } -#ifdef NeedByteOrderConversion - fbpara->type = ntohl(fbpara->type); -#endif - bytes = (fbpara->type > 0) ? - sizeof(APdescriptor) * (fbpara->type - 1) : - 0; - if (bytes > 0) { - if (conn_tag >= 0) { /* not discard mode packet stream, - read the rest of packet */ - len = wait_read_bytes(audioSocket, - ((char *)fbpara) + sizeof(*fbpara), - bytes); - if (len == 0) return(1); /* connection broken */ - else if (len < 0) { /* unexpected error */ - ACE_OS::perror ("AS read2 FB"); - return(-1); - } - len += sizeof(*fbpara); - } - } - bytes += sizeof(*fbpara); - if (len < bytes) { - if (len > 0) fprintf(stderr, - "AS only read partial FBpacket, %dB out of %dB.\n", - len, bytes); - continue; - } - if (live_source) { /* ignore all feedback messags for live source */ - continue; - } - -#ifdef NeedByteOrderConversion - fbpara->cmdsn = ntohl(fbpara->cmdsn); -#endif - if (len != sizeof(*fbpara) + - (fbpara->type ? (fbpara->type -1) * sizeof(APdescriptor) : 0)) { - /* unknown message, discard */ - SFprintf(stderr, "AS Unkown fb msg: len = %d, type = %d\n", - len, fbpara->type); - continue; - } - if (fbpara->cmdsn != cmdsn) { /* discard the outdated message */ - continue; - } -#ifdef NeedByteOrderConversion - { - int i, * ptr = (int *)fbpara + 2; - for (i = 0; i < (len >> 2) - 2; i++) *ptr = ntohl(*ptr); - } -#endif - if (fbpara->type == 0) { /* feedback message */ - /* - SFprintf(stderr, "AS got fbmsg: addsamples %d, addsps %d\n", - fbpara->data.fb.addSamples, fbpara->data.fb.addsps); - */ - addSamples += fbpara->data.fb.addSamples; - if (fbpara->data.fb.addsps) { - delta_sps += fbpara->data.fb.addsps; - upp = (int)(1000000.0 / ((double)(sps + delta_sps) / (double)spp)); - } - } - else { /* resend requests */ - APdescriptor * req = &(fbpara->data.ap); - int i; - /* - SFprintf(stderr, "AS got %d resend reqs\n", fbpara->type); - */ - for (i = 0; i < fbpara->type; i ++) { - ResendPacket(req->firstSample, req->samples); - req ++; - } - } - } - } -} - -static void on_exit_routine(void) -{ - struct sockaddr_in peeraddr_in; - int size = sizeof(peeraddr_in); - - /* - fprintf(stderr, "An AS session terminated\n"); - */ - if (getpeername(serviceSocket, - (struct sockaddr *)&peeraddr_in, &size) == 0 && - peeraddr_in.sin_family == AF_INET) { - if (strncmp(inet_ntoa(peeraddr_in.sin_addr), "129.95.50", 9)) { - struct hostent *hp; - time_t val =ACE_OS::time (NULL); - char * buf = ACE_OS::ctime (&start_time); - - hp = gethostbyaddr((char *)&(peeraddr_in.sin_addr), 4, AF_INET); - buf[strlen(buf)-1] = 0; - printf("%s: %s %3dm%02ds %dB %s\n", - buf, - hp == NULL ? inet_ntoa(peeraddr_in.sin_addr) : hp->h_name, - (val - start_time) / 60, (val - start_time) % 60, - bytes_sent, audioFile); - } - } - ComCloseConn(serviceSocket); - ComCloseConn(audioSocket); -} - -int AudioServer(int ctr_fd, int data_fd, int rttag, int max_pkt_size) -{ - int result; - - serviceSocket = ctr_fd; - audioSocket = data_fd; - conn_tag = max_pkt_size; - - if (max_pkt_size < 0) max_pkt_size = -max_pkt_size; - else if (max_pkt_size == 0) max_pkt_size = 1024 * 1024; - - start_time =ACE_OS::time (NULL); - - atexit(on_exit_routine); - - result = INITaudio(); - - if (result != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) AudioServer: "), - result); - - fbpara = (AudioFeedBackPara *)ACE_OS::malloc(FBBUF_SIZE); - if (fbpara == NULL) { - ACE_OS::perror ("AS failed to allocate mem for fbpara"); - return (-1); - } - - databuf_size = max_pkt_size - sizeof(*pktbuf); - if (databuf_size > DATABUF_SIZE) databuf_size = DATABUF_SIZE; - - pktbuf = (AudioPacket *)ACE_OS::malloc(sizeof(*pktbuf) + databuf_size); - if (pktbuf == NULL) { - ACE_OS::perror ("AS failed to allocate mem for pktbuf"); - return(-1); - } - - for (;;) - { - /* - fprintf(stderr, "AS: waiting for a new command...\n"); - */ - result = CmdRead((char *)&cmd, 1); - if (result != 0) - return result; - switch (cmd) - { - case CmdPLAY: - result = PLAYaudio(); - if (result != 0) - return result; - break; - case CmdCLOSE: - /* - fprintf(stderr, "a session closed.\n"); - */ - return(0); - break; - default: - fprintf(stderr, "audio channel command %d not recoganizeable\n", cmd); - break; - } - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/las.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/las.cpp deleted file mode 100644 index 4a707e68cbf..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/las.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#if 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "include/common.h" -#include "server_proto.h" - -ACE_RCSID(mpeg_server, las, "$Id$") - -#ifdef LIVE_AUDIO - -#include -#include - -static AFAudioConn *aud; -static AC ac; -static AFSetACAttributes attributes; -static int bps; -static int nextSample; -static audioActive = 0; - -/* - * Find a suitable default device - * Returns -1 if no suitable device can be found. - */ -static int FindDefaultDevice(AFAudioConn *aud) -{ - AFDeviceDescriptor *audioDevice; - int i; - for(i=0; iinputsFromPhone == 0 && audioDevice->outputsToPhone == 0) - return i; - } - return -1; -} -#endif - - -int OpenLiveAudio(AudioParameter * ap) -{ -#ifndef LIVE_AUDIO - return -1; -#else - int device; - int gain; - unsigned int channels; - int endianflag = 0; - - if (!audioActive) return -1; - - device = -1; - attributes.rec_gain = 0; - attributes.type = UNKNOWN_ENCODETYPE; - - if ( (aud = AFOpenAudioConn(NULL)) == NULL) - { - fprintf(stderr, "SA error: fails to open default AF connection.\n"); - return -1; - } - - /* set up audio context, find sample size and sample rate - At this time, we only support default setings */ - device = FindDefaultDevice(aud); - attributes.type = aud->devices[device].playBufType; - ac = AFCreateAC(aud, device, - ACRecordGain | ACEncodingType | endianflag, - &attributes); - if (ac == NULL) - { - ACE_OS::perror ("AS error: failed to create ac"); - AFCloseAudioConn(aud); - return -1; - } - if (attributes.type == ap->encodeType) { - bps = ap->bytesPerSample; - return 0; - } - else { - fprintf(stderr, "AS error: encodeType %d, client encodeType %d\n", - attributes.type, ap->encodeType); - return -1; - } -#endif -} - -void StartPlayLiveAudio(void) -{ -#ifndef LIVE_AUDIO - return; -#else - nextSample = AFGetTime(ac); - SFprintf(stderr, "LAS nextSample %d\n", nextSample); - return; -#endif -} - -void StopPlayLiveAudio(void) -{ -#ifndef LIVE_AUDIO - return; -#else - return; -#endif -} - -int ReadLiveAudioSamples(char * buf, int samples) -{ -#ifndef LIVE_AUDIO - return 0; -#else - /* - SFprintf(stderr, "LAS to read %d bytes\n", samples * bps); - */ - AFRecordSamples(ac, nextSample, samples * bps, (unsigned char *)buf, ABlock); - nextSample += samples; - /* - SFprintf(stderr, "LAS read live %d samples\n", samples); - */ - return samples; -#endif -} - -#endif - -#if 0 - -/* Following is a version using /dev/audio directly, since /dev/audio can't be - shared by different sessions, at most one session can be served. */ - -#include -#include -/* -#include -#include -*/ -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -ACE_RCSID(mpeg_server, las, "$Id$") - -static int sunfd1; -static int bps; -static int nextSample; - - -int OpenLiveAudio(AudioParameter * ap) -{ - if (!audioActive) return -1; - - if ((sunfd1 = open("/dev/audio", O_RDONLY, 0)) < 0) { - fprintf(stderr, "dda can't open /dev/audio, errno message \" %d \"\n", - errno); - return -1; - } - bps = ap->bytesPerSample; - ioctl(sunfd1, I_FLUSH, FLUSHR); - return 0; -} - -void StartPlayLiveAudio(void) -{ - ioctl(sunfd1, I_FLUSH, FLUSHR); -} - -void StopPlayLiveAudio(void) -{ -} - -int ReadLiveAudioSamples(char * buf, int samples) -{ - int bytes = samples * bps; - int len = ACE_OS::read (sunfd1, buf, bytes); - if (len != bytes) { - fprintf(stderr, "ReadLive: need %d samples (%dB), read %dB\n", - samples, bytes, len); - return len / bps; - } - return samples; -} - -#endif - -int InitLiveAudio(int argc, char ** argv) -{ -#ifndef LIVE_AUDIO - return -1; -#else - - audioActive = 1; - - fprintf(stderr, "LAS initialized.\n"); - return 0; -#endif -} - -void ExitLiveAudio(void) -{ - return; -} - -void LeaveLiveAudio(void) -{ - return; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/lvs.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/lvs.cpp deleted file mode 100644 index c40d6749bc2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/lvs.cpp +++ /dev/null @@ -1,413 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "include/common.h" -#include "mpeg_shared/routine.h" -#include "server_proto.h" - -ACE_RCSID(mpeg_server, lvs, "$Id$") - -#ifdef LIVE_VIDEO -#include "lvs_shared.h" - -LvsSharedData * shared = NULL; -static int lvspid = -1; /* -1: no lvs, 0 - lvs child, >0 - vs proc */ -static int prefid = -1, first_fid, first_frame; -static int curbuf; - -#define PID_FILE "~/.vcr/lvsPid" -#define QUALITY_FILE "~/.vcr/lvsQuality" - -static int count = 0; -static unsigned session_time; - -static int curpid = 0; - -static void on_exit_routine(void) -{ - char buf[256]; - if (getpid() != curpid) return; - get_full_path(PID_FILE, buf, 256); - ACE_OS::unlink (buf); -} - -static void register_pid(void) -{ - char buf[256]; - FILE *fp; - get_full_path(PID_FILE, buf, 256); - fp = fopen(buf, "w"); - fprintf(fp, "%d -- pid of current VS process\n",ACE_OS::getpid ()); - fclose(fp); -} - -static void set_quality_level(void) -{ - char buf[256]; - FILE *fp; - int qos = -1; - get_full_path(QUALITY_FILE, buf, 256); - fp = fopen(buf, "r"); - if (fp == NULL) return; - - fscanf(fp, "%d", &qos); - fclose(fp); - if (qos >= 0 && qos <= 100) { - shared->qos_val = qos; - } -} - -static void hup_handler(int status) -{ - setsignal(SIGHUP, SIG_IGN); - if (getpid() != curpid) return; - set_quality_level(); - setsignal(SIGHUP, hup_handler); -} - -#endif - -int InitLiveVideo(int argc, char ** argv) /* -1 -- failed, 0 - succ */ -{ -#ifndef LIVE_VIDEO - return -1; -#else -/* -#define BUFSIZE 768 * 576 * 3 / 8 -#define BUFSIZE 640 * 480 * 3 / 2 -*/ -#define BUFSIZE 1024 * 1024 - - char * buf = creat_shared_mem(BUFSIZE); - int sid = creat_semaphore(); - int susid = creat_semaphore(); - - enter_cs(susid); - - shared = (LvsSharedData *)buf; - shared->sid = sid; - shared->susid = susid; - shared->initState = 0; - shared->bufDataBytes = BUFSIZE - sizeof(*shared); - shared->buf = (LvsBuffer *)((char *)shared + sizeof(*shared)); - - register_pid(); - set_quality_level(); - - /* all other fields to be initialized by LVS process */ - - while ((lvspid = ACE_OS::fork ()) == -1); - - if (lvspid == 0) { /* child process, reading from camera */ - LiveVideoProcess(argc, argv); - ACE_OS::exit (1); - } - - while (shared->initState == 0) usleep(100000); /* wait for SunVideo to init */ - - if (shared->initState == -1) { - fprintf(stderr, "LVS error: init of child process failed\n"); - ACE_OS::kill (lvspid, SIGINT); - remove_shared_mem(buf); - remove_semaphore(sid); - remove_semaphore(susid); - lvspid = -1; - return -1; - } - else { - - fprintf(stderr, "LVS initialized.\n"); - - curpid =ACE_OS::getpid (); - - atexit(on_exit_routine); - - setsignal(SIGHUP, hup_handler); - - return 0; - } -#endif -} - -void LeaveLiveVideo(void) -{ -#ifndef LIVE_VIDEO - return; -#else - if (lvspid == -1) return; - remove_shared_mem((char *)shared); - shared = NULL; -#endif -} - -void ExitLiveVideo(void) -{ -#ifndef LIVE_VIDEO - return; -#else - if (lvspid == -1) return; - ACE_OS::kill (lvspid, SIGINT); - remove_semaphore(shared->sid); - remove_semaphore(shared->susid); - remove_shared_mem((char *)shared); - lvspid = -1; - shared = NULL; -#endif -} - -int OpenLiveVideo(int * format, - int * width, int * height, - int * averageFrameSize, - double * fps, - int * pelAspectRatio /* MPEG1 encoding used here */ - ) /* -1 -- failed, 0 - succ */ -{ -#ifndef LIVE_VIDEO - return -1; -#else - if (lvspid == -1) return -1; - *format = shared->format; - *width = shared->width; - *height = shared->height; - *averageFrameSize = shared->averageFrameSize; - *fps = shared->fps; - *pelAspectRatio = shared->pelAspectRatio; - - fprintf(stderr, "LVS session %d opened.\n",ACE_OS::getpid ()); - - return 0; -#endif -} - -void StartPlayLiveVideo(void) -{ -#ifndef LIVE_VIDEO - return; -#else - if (lvspid == -1) return; - - count = 0; - session_time = get_msec(); - - enter_cs(shared->sid); - - prefid = -1; - first_fid = -1; - first_frame = -1; - - if (shared->activeSessions <= 0) shared->activeSessions = 1; - else shared->activeSessions ++; - - leave_cs(shared->sid); - - while (shared->curbuf <= shared->wait_curbuf) { - /* - fprintf(stderr, "curbuf %d, wait_curbuf %d\n", - shared->curbuf, shared->wait_curbuf); - */ - usleep(10000); - } - - fprintf(stderr, "LVS session %d started\n",ACE_OS::getpid ()); - - return; -#endif -} - -void StopPlayLiveVideo(void) -{ -#ifndef LIVE_VIDEO - return; -#else - if (lvspid == -1) return; - enter_cs(shared->sid); - shared->activeSessions --; - leave_cs(shared->sid); - - fprintf(stderr, "LVS session %d stopped, at %5.2f fps.\n",ACE_OS::getpid (), - ((double)count * 1000.0) / get_duration(session_time, get_msec())); - - return; -#endif -} - -#if 1 -int ReadLiveVideoPicture(int * frame, char * buf, int size) /* ret # bytes */ -{ -#ifndef LIVE_VIDEO - return 0; -#else - int pframe = * frame; - int ssize; - int bufptr; - - if (lvspid == -1) return 0; - - if (first_frame == -1) { /* first frame in current session */ - curbuf = shared->curbuf - 1; - bufptr = curbuf % shared->bufnum; - enter_cs(shared->sid); - } - else { - int bufnum = shared->bufnum < 3 ? shared->bufnum : 3; - do { - curbuf ++; - if (curbuf <= shared->curbuf - bufnum) { - /* - fprintf(stderr, "LVS session %d skipped %d buffers\n", - getpid(), shared->curbuf - bufnum + 1 - curbuf); - */ - curbuf = shared->curbuf - bufnum + 1; - } - bufptr = curbuf % shared->bufnum; - while (shared->buf[bufptr].fid <= prefid) { - /* - fprintf(stderr, - "LVS session %d wait: curbuf %d, shared->curbuf %d, prefid %d, shared->fid %d\n", - getpid(), curbuf, shared->curbuf, prefid, shared->buf[bufptr].fid); - */ - enter_cs(shared->sid); - shared->suscount ++; - leave_cs(shared->sid); - enter_cs(shared->susid); - } - } while (pframe > first_frame + (shared->buf[bufptr].fid - first_fid)); - - enter_cs(shared->sid); - /* - fprintf(stderr, "pframe %d, aframe %d\n", - pframe, first_frame + (shared->buf[bufptr].fid - first_fid)); - */ - } - shared->buf[bufptr].refcnt ++; - leave_cs(shared->sid); - - ssize = shared->buf[bufptr].size; - - ssize = (ssize < size ? ssize : size); - ACE_OS::memcpy (buf, shared->buf[bufptr].data, ssize); - - enter_cs(shared->sid); - - shared->buf[bufptr].refcnt --; - prefid = shared->buf[bufptr].fid; - if (first_frame == -1) { - first_fid = prefid; - first_frame = * frame; - } - else { - * frame = first_frame + (prefid - first_fid); - } - leave_cs(shared->sid); - /* - fprintf(stderr, - "LVS session %d read curbuf %d fid %d, frame %d size %d (ffid %d, fframe %d)\n", - ACE_OS::getpid (), curbuf, prefid, *frame, ssize, first_fid, first_frame); - */ - /* - fprintf(stderr, "LVS read fid %d, frame %d\n", prefid, *frame); - */ - count ++; - return ssize; -#endif -} -#endif - -#if 0 -/* following version is for testing the speed of the vcr path, excluding the - xil stuff */ - -static long start_time; - -int ReadLiveVideoPicture(int * frame, char * buf, int size) /* ret # bytes */ -{ -#ifndef LIVE_VIDEO - return 0; -#else - int pframe = * frame; - int ssize; - char * sbuf; - if (lvspid == -1) return 0; - - loop_begin: - /* - enter_cs(shared->sid); - */ - if (first_frame == -1) { - first_frame = *frame; - first_fid = shared->fid; - start_time = get_msec(); - } - else { - int f = first_frame + ((double)get_duration(start_time, get_msec()) / - ((double)1000.0 / (double)shared->fps)); - if (f < *frame) { - - leave_cs(shared->sid); - /* - fprintf(stderr, "f=%d < *frame=%d\n", f, *frame); - */ - usleep(10000); - goto loop_begin; - } - *frame = f; - } - - prefid = shared->fid; - sbuf = shared->buf[shared->curbuf].data; - ssize = shared->buf[shared->curbuf].size; - - ssize = (ssize < size ? ssize : size); - ACE_OS::memcpy (buf, sbuf, ssize); - /* - leave_cs(shared->sid); - */ - /* - fprintf(stderr, "LVS read fid %d, frame %d size %d (ffid %d, fframe %d)\n", - shared->fid, *frame, ssize, first_fid, first_frame); - */ - count ++; - return ssize; -#endif -} -#endif - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h deleted file mode 100644 index 2076b2921c5..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h +++ /dev/null @@ -1,63 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#include "Globals.h" - -/* las.c */ -int InitLiveAudio(int argc, char ** argv); /* -1 -- failed, 0 - succ */ -void LeaveLiveAudio(void); - /* each child forked not doing live audio should call this */ -void ExitLiveAudio(void); -int OpenLiveAudio(AudioParameter * ap); /* -1 -- failed, 0 - succ */ -void StartPlayLiveAudio(void); -void StopPlayLiveAudio(void); -int ReadLiveAudioSamples(char * buf, int samples); /* ret # samples */ - -/* lvs.c */ - -int InitLiveVideo(int argc, char ** argv); /* -1 -- failed, 0 - succ */ -void LeaveLiveVideo(void); - /* each child forked not doing live video should call this */ -void ExitLiveVideo(void); -int OpenLiveVideo(int * format, - int * width, int * height, - int * averageFrameSize, - double * fps, - int * pelAspactRatio /* MPEG1 encoding used here */ - ); /* -1 -- failed, 0 - succ */ -void StartPlayLiveVideo(void); -void StopPlayLiveVideo(void); -int ReadLiveVideoPicture(int * frame, char * buf, int size); /* ret # bytes */ - -/*from camera driver definitions */ - -int LiveVideoProcess(int argc, char ** argv); - -/* as.c */ -int AudioServer(int ctr_fd, int data_fd, int rttag, int max_pkt_size); - -/* vs.c */ -int VideoServer(int ctr_fd, int data_fd, int rttag, int max_pkt_size); diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp deleted file mode 100644 index 0df103037f9..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp +++ /dev/null @@ -1,2207 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "include/common.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/com.h" -#include "mpeg_shared/sendpt.h" -#include "server_proto.h" - -ACE_RCSID(mpeg_server, vs, "$Id$") - -// %% Move all these functions to the VIDEO_SINGLETON class and remove -// zombie code like VideoServer ()... -static int CmdRead(char *buf, int psize) -{ - int res = wait_read_bytes (VIDEO_SINGLETON::instance ()->serviceSocket, - buf, - psize); - if (res == 0) return(1); - if (res == -1) { - fprintf(stderr, "VS error on read VIDEO_SINGLETON::instance ()->cmdSocket, size %d", psize); - ACE_OS::perror (""); - return(-1); - } - return 0; -} - -static void CmdWrite(char *buf, int size) -{ - int res = wait_write_bytes(VIDEO_SINGLETON::instance ()->serviceSocket, buf, size); - if (res == -1) { - if (errno != EPIPE)ACE_OS::perror ("VS writes to VIDEO_SINGLETON::instance ()->serviceSocket"); - ACE_OS::exit (errno != EPIPE); - } -} - -int FBread(char * buf, int size) -{ int res; - while ((res = (VIDEO_SINGLETON::instance ()->conn_tag >= 0 ? wait_read_bytes(VIDEO_SINGLETON::instance ()->videoSocket, buf, size) : - ACE_OS::read (VIDEO_SINGLETON::instance ()->videoSocket, buf, size))) == -1) - { - if (errno == EINTR) {errno = 0; continue; } - if (errno == EPIPE || errno == ECONNRESET) ACE_OS::exit (0); - ACE_OS::perror ("VS reads Feedback VIDEO_SINGLETON::instance ()->packet"); - return -1; - } - if (res < size) { - if (res) fprintf(stderr, "VS warn: FBread() res %dB < size %dB\n", res, size); - return -1; - } - return 0; -} - - -/* send a given VIDEO_SINGLETON::instance ()->packet pointed by 'VIDEO_SINGLETON::instance ()->packet' to the network */ - -int send_to_network(int timeToUse) -{ - int count = 0; - VideoMessage * msghd = (VideoMessage *)(((char *)VIDEO_SINGLETON::instance ()->packet) - sizeof(VideoMessage)); - int sent = 0; - int packetSize = ntohl(VIDEO_SINGLETON::instance ()->packet->dataBytes); - - msghd->packetsn = htonl(VIDEO_SINGLETON::instance ()->packetsn ++); - msghd->packetSize = htonl(packetSize + sizeof(* VIDEO_SINGLETON::instance ()->packet)); - /* - fprintf(stderr, "VS to send pkt %d of size %d.\n", - ntohl(msghd->VIDEO_SINGLETON::instance ()->packetsn), ntohl(msghd->VIDEO_SINGLETON::instance ()->packetSize)); - */ - { - VideoMessage * msg = NULL; - int size = packetSize + sizeof(* VIDEO_SINGLETON::instance ()->packet); /* msghd->VIDEO_SINGLETON::instance ()->packetSize */ - int offset = 0; - int targetTime; - - if (size > VIDEO_SINGLETON::instance ()->msgsize) - { - - if (!timeToUse) - { - timeToUse = (VIDEO_SINGLETON::instance ()->msgsize + sizeof(*msg) + 28) * 2; - /* - set the max network as 500KB. - 28 - UDP header size - */ - /* - fprintf(stderr, "computed timeToUse %d. ", timeToUse); - */ - } - else - { - timeToUse = (timeToUse * 7) >> 3; - /* - fprintf(stderr, "preset timeToUse %d.", timeToUse); - */ - timeToUse /= (size + VIDEO_SINGLETON::instance ()->msgsize - 1) / VIDEO_SINGLETON::instance ()->msgsize; - timeToUse = min(timeToUse, (VIDEO_SINGLETON::instance ()->msgsize + sizeof(*msg) + 28) * 100); - /* limit min network bandwidth = 10K */ - } - - } - while (size > 0) - { - int segsize, sentsize; - int resent = 0; - - if (msg == NULL) { /* first message for current VIDEO_SINGLETON::instance ()->packet */ - count = 0; - msg = msghd; - targetTime = get_usec(); - } - else { -#if 0 - /* the select() is not precise enough for being used here*/ - int sleepTime; - targetTime += timeToUse; - sleepTime = get_duration(get_usec(), targetTime); - if (sleepTime >= 5000) { /* resolution of timer is 10,000 usec */ - usleep(sleepTime); /* not first message, wait for a while */ - } -#endif - /* - count ++; - if (!(count % 10)) usleep(10000); - */ - msg = (VideoMessage *)((char *)msg + VIDEO_SINGLETON::instance ()->msgsize); - memcpy((char *)msg, (char *)msghd, sizeof(* msg)); - } - msg->msgsn = htonl(VIDEO_SINGLETON::instance ()->msgsn++); - msg->msgOffset = htonl(offset); - msg->msgSize = htonl(min(size, VIDEO_SINGLETON::instance ()->msgsize)); - - segsize = min(size, VIDEO_SINGLETON::instance ()->msgsize)+sizeof(*msg); - if (VIDEO_SINGLETON::instance ()->conn_tag != 0) { /* VIDEO_SINGLETON::instance ()->packet stream */ - while ((sentsize = ACE_OS::write (VIDEO_SINGLETON::instance ()->videoSocket, (char *)msg, segsize)) == -1) { - if (errno == EINTR) - continue; - if (errno == ENOBUFS) { - if (resent) { - ACE_OS::perror ("Warning, pkt discarded because"); - sent = -1; - break; - } - else { - resent = 1; - ACE_OS::perror ("VS to sleep 5ms"); - usleep(5000); - continue; - } - } - if (errno != EPIPE) { - fprintf(stderr, "VS error on send VIDEO_SINGLETON::instance ()->packet %d of size %d ", - VIDEO_SINGLETON::instance ()->msgsn-1, min(size, VIDEO_SINGLETON::instance ()->msgsize)+sizeof(*msg)); - ACE_OS::perror (""); - } - ACE_OS::exit (errno != EPIPE); - } - } - else { - sentsize = wait_write_bytes(VIDEO_SINGLETON::instance ()->videoSocket, (char *)msg, segsize); - if (sentsize == -1) { - if (errno != EPIPE) { - fprintf(stderr, "VS error on send VIDEO_SINGLETON::instance ()->packet %d of size %d ", - VIDEO_SINGLETON::instance ()->msgsn-1, min(size, VIDEO_SINGLETON::instance ()->msgsize)+sizeof(*msg)); - ACE_OS::perror (""); - } - ACE_OS::exit (errno != EPIPE); - } - } - if (sentsize < segsize) { - SFprintf(stderr, "VS warning: message size %dB, sent only %dB\n", - segsize, sentsize); - } - if (sent == -1) - break; - /* - fprintf(stderr, "VS: message %d of size %d sent.\n", - VIDEO_SINGLETON::instance ()->msgsn-1, min(size, VIDEO_SINGLETON::instance ()->msgsize)+sizeof(*msg)); - */ - size -= VIDEO_SINGLETON::instance ()->msgsize; - offset += VIDEO_SINGLETON::instance ()->msgsize; - } - } - /* - fprintf(stderr, "sent = %d\n", sent); - */ - if (!sent) VIDEO_SINGLETON::instance ()->pkts_sent ++; - return sent; -} - -/* - * send a VIDEO_SINGLETON::instance ()->packet with given VIDEO_SINGLETON::instance ()->systemHeader (optional), gop (optional) and frame. - * - * sh - system header id, if -1, then no system header will be sent. - * otherwise, only when frame == 0, the given system header will be sent. - * gop - group of pictures, gop header will be sent when frame == 0 - * (first I frame ); - * frame - frame to be sent, offset internal to given gop. - */ - -/* returns: 0 - VIDEO_SINGLETON::instance ()->packet sent, -1 - VIDEO_SINGLETON::instance ()->packet not sent (failed) */ -static int SendPacket(int shtag, int gop, int frame, int timeToUse) -/* frame maybe out of range (PLAY, STEP), in this case, END_SEQ is sent - to force display of last frame in VD */ -{ - char * buf = ((char *) VIDEO_SINGLETON::instance ()->packet) + sizeof(VideoPacket); - int f = VIDEO_SINGLETON::instance ()->gopTable[gop].previousFrames + frame; - int sh = VIDEO_SINGLETON::instance ()->gopTable[gop].systemHeader; - /* - SFprintf(stderr, "VS to send VIDEO_SINGLETON::instance ()->packet gop-%d, frame-%d.\n", gop, frame); - */ - - VIDEO_SINGLETON::instance ()->packet->currentUPF = ntohl(VIDEO_SINGLETON::instance ()->currentUPF); - - if (frame >= VIDEO_SINGLETON::instance ()->gopTable[gop].totalFrames) - { - VIDEO_SINGLETON::instance ()->packet->cmd = htonl(VIDEO_SINGLETON::instance ()->cmd); - VIDEO_SINGLETON::instance ()->packet->cmdsn = htonl(VIDEO_SINGLETON::instance ()->cmdsn); - VIDEO_SINGLETON::instance ()->packet->sh = htonl(sh); - VIDEO_SINGLETON::instance ()->packet->gop = htonl(gop); - VIDEO_SINGLETON::instance ()->packet->frame = htonl(VIDEO_SINGLETON::instance ()->numF); - VIDEO_SINGLETON::instance ()->packet->display = htonl(VIDEO_SINGLETON::instance ()->numF-1); - VIDEO_SINGLETON::instance ()->packet->future = htonl((unsigned)-1); - VIDEO_SINGLETON::instance ()->packet->past = htonl((unsigned)-1); - VIDEO_SINGLETON::instance ()->packet->dataBytes = htonl(4); - *(int*)((char*)VIDEO_SINGLETON::instance ()->packet + sizeof(*VIDEO_SINGLETON::instance ()->packet)) = htonl(SEQ_END_CODE); - - return send_to_network(timeToUse); - } - - if (frame) - shtag = 0; - else if (VIDEO_SINGLETON::instance ()->needHeader) - { - shtag = 1; - VIDEO_SINGLETON::instance ()->needHeader = 0; - } - - VIDEO_SINGLETON::instance ()->packet->cmd = htonl(VIDEO_SINGLETON::instance ()->cmd); - VIDEO_SINGLETON::instance ()->packet->cmdsn = htonl(VIDEO_SINGLETON::instance ()->cmdsn); - VIDEO_SINGLETON::instance ()->packet->sh = htonl(sh); - VIDEO_SINGLETON::instance ()->packet->gop = htonl(gop); - VIDEO_SINGLETON::instance ()->packet->frame = htonl(f); - if (VIDEO_SINGLETON::instance ()->frameTable[f].type == 'B') - { - int pre1 = -1, pre2 = -1, i = f; - while (i>0) - if (VIDEO_SINGLETON::instance ()->frameTable[--i].type != 'B') - { - pre1 = i; - break; - } - while (i>0) - if (VIDEO_SINGLETON::instance ()->frameTable[--i].type != 'B') - { - pre2 = i; - break; - } - if (pre2 == -1) - { - /* - fprintf(stderr, - "frame %d-%d (%d) is a B without past ref, no to be sent.\n", - gop, frame, f); - */ - return -1; - } - if (pre1 != VIDEO_SINGLETON::instance ()->lastRef[VIDEO_SINGLETON::instance ()->lastRefPtr] || - pre2 != VIDEO_SINGLETON::instance ()->lastRef[1 - VIDEO_SINGLETON::instance ()->lastRefPtr]) - { - /* - fprintf(stderr, - "send of B frame %d gaveup for past %d/future %d ref not sent.\n", - f, pre2, pre1); - */ - return -1; - } - VIDEO_SINGLETON::instance ()->packet->display = htonl(f); - VIDEO_SINGLETON::instance ()->packet->future = htonl(pre1); - VIDEO_SINGLETON::instance ()->packet->past = htonl(pre2); - } - else - { - int next = f; - int pre = f; - - while (next < VIDEO_SINGLETON::instance ()->numF && VIDEO_SINGLETON::instance ()->frameTable[++next].type == 'B'); - while (pre > 0 && VIDEO_SINGLETON::instance ()->frameTable[--pre].type == 'B'); - if (VIDEO_SINGLETON::instance ()->frameTable[f].type == 'P' && pre != VIDEO_SINGLETON::instance ()->lastRef[VIDEO_SINGLETON::instance ()->lastRefPtr]) - { - /* - fprintf(stderr, - "send of P frame %d gaveup for past ref %d not sent.\n", - f, pre); - fprintf(stderr, "ref0=%d, ref1=%d, ptr=%d.\n", - VIDEO_SINGLETON::instance ()->lastRef[0], VIDEO_SINGLETON::instance ()->lastRef[1], VIDEO_SINGLETON::instance ()->lastRefPtr); - */ - return -1; - } - VIDEO_SINGLETON::instance ()->packet->display = htonl(next); - VIDEO_SINGLETON::instance ()->packet->future = htonl((unsigned)-1); - VIDEO_SINGLETON::instance ()->packet->past = htonl(VIDEO_SINGLETON::instance ()->frameTable[f].type == 'P' ? pre : (unsigned)-1); - } - { - char * ptr = buf; - int size = 0, offset = 0, i; - if (shtag) /* send system header */ - { - size = VIDEO_SINGLETON::instance ()->systemHeader[sh].size; - FileRead(VIDEO_SINGLETON::instance ()->systemHeader[sh].offset, ptr, size); - ptr += size; - } - if (!frame) /* send gop header */ - { - size = VIDEO_SINGLETON::instance ()->gopTable[gop].headerSize; - FileRead(VIDEO_SINGLETON::instance ()->gopTable[gop].offset, ptr, size); - ptr += size; - } - size = VIDEO_SINGLETON::instance ()->frameTable[f].size; - for (i=VIDEO_SINGLETON::instance ()->gopTable[gop].previousFrames; iframeTable[i].size; - FileRead((VIDEO_SINGLETON::instance ()->gopTable[gop].firstIoffset + offset), ptr, size); - ptr += size; - VIDEO_SINGLETON::instance ()->packet->dataBytes = htonl(ptr - buf); - } - - { - int sent = send_to_network(timeToUse); - if (!sent) - { - /* - fprintf(stderr, "%c%d\n", VIDEO_SINGLETON::instance ()->frameTable[f].type, f); - fprintf(stderr, "%c frame %d sent.\n", VIDEO_SINGLETON::instance ()->frameTable[f].type, f); - */ - if (VIDEO_SINGLETON::instance ()->frameTable[f].type != 'B') - { - VIDEO_SINGLETON::instance ()->lastRefPtr = 1 - VIDEO_SINGLETON::instance ()->lastRefPtr; - VIDEO_SINGLETON::instance ()->lastRef[VIDEO_SINGLETON::instance ()->lastRefPtr] = f; - } - } - return sent; - } -} - - -int SendReferences(int group, int frame) -{ - unsigned char orgcmd; - int i, base; - int pregroup; - int result; - - if (group < 0 || group >= VIDEO_SINGLETON::instance ()->numG) return 0; - if (frame <= 0 || frame >= VIDEO_SINGLETON::instance ()->gopTable[group].totalFrames) return 0; - - orgcmd = VIDEO_SINGLETON::instance ()->cmd; - VIDEO_SINGLETON::instance ()->cmd = CmdREF; - - if (group > 0) { - pregroup = 1; - base = VIDEO_SINGLETON::instance ()->gopTable[group].previousFrames; - for (i = 0; i <= frame; i ++) { - if (VIDEO_SINGLETON::instance ()->frameTable[i + base].type == 'P') { - pregroup = 0; - break; - } - } - } - else pregroup = 0; - - if (pregroup) { /* reference frame can be in previous group */ - pregroup = group -1; - base = VIDEO_SINGLETON::instance ()->gopTable[pregroup].previousFrames; - for (i = 0; i < VIDEO_SINGLETON::instance ()->gopTable[pregroup].totalFrames; i ++) { - if (VIDEO_SINGLETON::instance ()->frameTable[i + base].type != 'B') { - /* - SFprintf(stderr, "REF group%d, frame%d\n", pregroup, i); - */ - result = SendPacket(i == 0, pregroup, i, 0); - if (result != 0) - return result; - } - } - } - - base = VIDEO_SINGLETON::instance ()->gopTable[group].previousFrames; - for (i = 0; i < frame; i ++) { - if (VIDEO_SINGLETON::instance ()->frameTable[i + base].type != 'B') { - /* - SFprintf(stderr, "REF group%d, frame%d\n", group, i); - */ - SendPacket(i == 0, group, i, 0); - } - } - VIDEO_SINGLETON::instance ()->cmd = orgcmd; -} - -int SendPicture(int * frame) -{ - int size; - char * buf = ((char *) VIDEO_SINGLETON::instance ()->packet) + sizeof(VideoPacket); - /* - SFprintf(stderr, "VS to send picture %d.\n", *frame); - */ - - size = ReadLiveVideoPicture(frame, buf, VIDEO_SINGLETON::instance ()->packetBufSize); - - VIDEO_SINGLETON::instance ()->packet->currentUPF = ntohl(VIDEO_SINGLETON::instance ()->currentUPF); - VIDEO_SINGLETON::instance ()->packet->cmd = htonl(VIDEO_SINGLETON::instance ()->cmd); - VIDEO_SINGLETON::instance ()->packet->cmdsn = htonl(VIDEO_SINGLETON::instance ()->cmdsn); - VIDEO_SINGLETON::instance ()->packet->sh = VIDEO_SINGLETON::instance ()->packet->gop = VIDEO_SINGLETON::instance ()->packet->frame = VIDEO_SINGLETON::instance ()->packet->display = htonl(*frame); - VIDEO_SINGLETON::instance ()->packet->future = htonl((unsigned)-1); - VIDEO_SINGLETON::instance ()->packet->past = htonl((unsigned)-1); - - VIDEO_SINGLETON::instance ()->packet->dataBytes = htonl(size); - - return send_to_network(VIDEO_SINGLETON::instance ()->currentUPF); -} - -static int ReadInfoFromFile(void) -{ - int fd = -1, i; - int fnlen =ACE_OS::strlen (VIDEO_SINGLETON::instance ()->videoFile); - - strcpy(&VIDEO_SINGLETON::instance ()->videoFile[fnlen], ".Info"); - fd = open(VIDEO_SINGLETON::instance ()->videoFile, O_RDONLY); - if (fd == -1) - { - fprintf(stderr, "Reminder: VS fails to open %s for read, ", VIDEO_SINGLETON::instance ()->videoFile); - ACE_OS::perror ("try create one"); - goto fail_ReadInfoFromFile; - } - read_int(fd, &i); - if (i != VIDEO_SINGLETON::instance ()->fileSize) - { - fprintf(stderr, "Warning: VIDEO_SINGLETON::instance ()->fileSize in Info: %d not the same as actual %d.\n", - i, VIDEO_SINGLETON::instance ()->fileSize); - goto fail_ReadInfoFromFile; - } - - read_int(fd, &VIDEO_SINGLETON::instance ()->maxS); - read_int(fd, &VIDEO_SINGLETON::instance ()->maxG); - read_int(fd, &VIDEO_SINGLETON::instance ()->maxI); - read_int(fd, &VIDEO_SINGLETON::instance ()->maxP); - read_int(fd, &VIDEO_SINGLETON::instance ()->maxB); - read_int(fd, &VIDEO_SINGLETON::instance ()->minS); - read_int(fd, &VIDEO_SINGLETON::instance ()->minG); - read_int(fd, &VIDEO_SINGLETON::instance ()->minI); - read_int(fd, &VIDEO_SINGLETON::instance ()->minP); - read_int(fd, &VIDEO_SINGLETON::instance ()->minB); - read_int(fd, &VIDEO_SINGLETON::instance ()->numS); - read_int(fd, &VIDEO_SINGLETON::instance ()->numG); - read_int(fd, &VIDEO_SINGLETON::instance ()->numF); - read_int(fd, &VIDEO_SINGLETON::instance ()->numI); - read_int(fd, &VIDEO_SINGLETON::instance ()->numP); - read_int(fd, &VIDEO_SINGLETON::instance ()->numB); - read_int(fd, &VIDEO_SINGLETON::instance ()->averageFrameSize); - read_int(fd, &VIDEO_SINGLETON::instance ()->horizontalSize); - read_int(fd, &VIDEO_SINGLETON::instance ()->verticalSize); - read_int(fd, &VIDEO_SINGLETON::instance ()->pelAspectRatio); - read_int(fd, &VIDEO_SINGLETON::instance ()->pictureRate); - read_int(fd, &VIDEO_SINGLETON::instance ()->vbvBufferSize); - read_int(fd, &VIDEO_SINGLETON::instance ()->patternSize); - - memset(VIDEO_SINGLETON::instance ()->pattern, 0, PATTERN_SIZE); - read_bytes(fd, VIDEO_SINGLETON::instance ()->pattern, VIDEO_SINGLETON::instance ()->patternSize); -#ifdef STAT - VIDEO_SINGLETON::instance ()->framesSent = (char *)ACE_OS::malloc((VIDEO_SINGLETON::instance ()->numF + 7)>>3); - if (VIDEO_SINGLETON::instance ()->framesSent == NULL) - { - fprintf(stderr, "Error: VS fails to alloc mem for VIDEO_SINGLETON::instance ()->framesSent for %d frames", VIDEO_SINGLETON::instance ()->numF); - ACE_OS::perror (""); - ACE_OS::exit (1); - } -#endif - VIDEO_SINGLETON::instance ()->systemHeader = (struct Video_Global::SystemHeader *)ACE_OS::malloc(sizeof(struct Video_Global::SystemHeader) * VIDEO_SINGLETON::instance ()->numS); - if (VIDEO_SINGLETON::instance ()->systemHeader == NULL) - { - ACE_OS::perror ("Error: VS error on ACE_OS::malloc VIDEO_SINGLETON::instance ()->SystemHeader"); - ACE_OS::exit (1); - } - VIDEO_SINGLETON::instance ()->gopTable = (struct Video_Global::GopTable *)ACE_OS::malloc(sizeof(struct Video_Global::GopTable) * VIDEO_SINGLETON::instance ()->numG); - if (VIDEO_SINGLETON::instance ()->gopTable == NULL) - { - ACE_OS::perror ("Error: VS error on ACE_OS::malloc GopHeader"); - ACE_OS::exit (1); - } - VIDEO_SINGLETON::instance ()->frameTable = (struct Video_Global::FrameTable *)ACE_OS::malloc(sizeof(Video_Global::FrameTable) * VIDEO_SINGLETON::instance ()->numF); - if (VIDEO_SINGLETON::instance ()->frameTable == NULL) - { - ACE_OS::perror ("Error: VS error on ACE_OS::malloc VIDEO_SINGLETON::instance ()->frameTable"); - ACE_OS::exit (1); - } - VIDEO_SINGLETON::instance ()->packetBufSize = VIDEO_SINGLETON::instance ()->maxS + VIDEO_SINGLETON::instance ()->maxG + max(VIDEO_SINGLETON::instance ()->maxI, max(VIDEO_SINGLETON::instance ()->maxP, VIDEO_SINGLETON::instance ()->maxB)); - VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)ACE_OS::malloc(sizeof(VideoMessage) + sizeof(VideoPacket) + - VIDEO_SINGLETON::instance ()->packetBufSize); - if (VIDEO_SINGLETON::instance ()->packet == NULL) - { - ACE_OS::perror ("Error: VS error on ACE_OS::malloc VIDEO_SINGLETON::instance ()->packet buffer"); - ACE_OS::exit (1); - } - VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)((char *)VIDEO_SINGLETON::instance ()->packet + sizeof(VideoMessage)); - - for (i = 0; i < VIDEO_SINGLETON::instance ()->numS; i ++) - { - read_int(fd, (int *)&VIDEO_SINGLETON::instance ()->systemHeader[i].offset); - read_int(fd, &VIDEO_SINGLETON::instance ()->systemHeader[i].size); - } - for (i = 0; i < VIDEO_SINGLETON::instance ()->numG; i ++) - { - read_int(fd, &VIDEO_SINGLETON::instance ()->gopTable[i].systemHeader); - read_int(fd, (int *)&VIDEO_SINGLETON::instance ()->gopTable[i].offset); - read_int(fd, &VIDEO_SINGLETON::instance ()->gopTable[i].headerSize); - read_int(fd, &VIDEO_SINGLETON::instance ()->gopTable[i].size); - read_int(fd, &VIDEO_SINGLETON::instance ()->gopTable[i].totalFrames); - read_int(fd, &VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames); - read_int(fd, (int *)&VIDEO_SINGLETON::instance ()->gopTable[i].firstIoffset); - } - for (i = 0; i < VIDEO_SINGLETON::instance ()->numF; i ++) - { - read_byte(fd, &VIDEO_SINGLETON::instance ()->frameTable[i].type); - read_short(fd, (short *)&VIDEO_SINGLETON::instance ()->frameTable[i].size); - } - - ACE_OS::close (fd); - /* - fprintf(stderr, "Read Info from %s\n", VIDEO_SINGLETON::instance ()->videoFile); - */ - VIDEO_SINGLETON::instance ()->videoFile[fnlen] = 0; - return 0; - fail_ReadInfoFromFile: - if (fd >= 0) - ACE_OS::close (fd); - VIDEO_SINGLETON::instance ()->videoFile[fnlen] = 0; - /* - fprintf(stderr, "To scan Info from %s\n", VIDEO_SINGLETON::instance ()->videoFile); - */ - return -1; -} - -static void WriteInfoToFile(void) -{ - int fd = -1, i; - int fnlen =ACE_OS::strlen (VIDEO_SINGLETON::instance ()->videoFile); - - strcpy(&VIDEO_SINGLETON::instance ()->videoFile[fnlen], ".Info"); - fd = open(VIDEO_SINGLETON::instance ()->videoFile, O_WRONLY | O_CREAT, 0444); - if (fd == -1) - { - fprintf(stderr, "VS fails to open %s for write", VIDEO_SINGLETON::instance ()->videoFile); - ACE_OS::perror (""); - goto fail_WriteInfoToFile; - } - write_int(fd, VIDEO_SINGLETON::instance ()->fileSize); - write_int(fd, VIDEO_SINGLETON::instance ()->maxS); - write_int(fd, VIDEO_SINGLETON::instance ()->maxG); - write_int(fd, VIDEO_SINGLETON::instance ()->maxI); - write_int(fd, VIDEO_SINGLETON::instance ()->maxP); - write_int(fd, VIDEO_SINGLETON::instance ()->maxB); - write_int(fd, VIDEO_SINGLETON::instance ()->minS); - write_int(fd, VIDEO_SINGLETON::instance ()->minG); - write_int(fd, VIDEO_SINGLETON::instance ()->minI); - write_int(fd, VIDEO_SINGLETON::instance ()->minP); - write_int(fd, VIDEO_SINGLETON::instance ()->minB); - write_int(fd, VIDEO_SINGLETON::instance ()->numS); - write_int(fd, VIDEO_SINGLETON::instance ()->numG); - write_int(fd, VIDEO_SINGLETON::instance ()->numF); - write_int(fd, VIDEO_SINGLETON::instance ()->numI); - write_int(fd, VIDEO_SINGLETON::instance ()->numP); - write_int(fd, VIDEO_SINGLETON::instance ()->numB); - write_int(fd, VIDEO_SINGLETON::instance ()->averageFrameSize); - write_int(fd, VIDEO_SINGLETON::instance ()->horizontalSize); - write_int(fd, VIDEO_SINGLETON::instance ()->verticalSize); - write_int(fd, VIDEO_SINGLETON::instance ()->pelAspectRatio); - write_int(fd, VIDEO_SINGLETON::instance ()->pictureRate); - write_int(fd, VIDEO_SINGLETON::instance ()->vbvBufferSize); - write_int(fd, VIDEO_SINGLETON::instance ()->patternSize); - - write_bytes(fd, VIDEO_SINGLETON::instance ()->pattern, VIDEO_SINGLETON::instance ()->patternSize); - - for (i = 0; i < VIDEO_SINGLETON::instance ()->numS; i ++) - { - write_int(fd, VIDEO_SINGLETON::instance ()->systemHeader[i].offset); - write_int(fd, VIDEO_SINGLETON::instance ()->systemHeader[i].size); - } - for (i = 0; i < VIDEO_SINGLETON::instance ()->numG; i ++) - { - write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].systemHeader); - write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].offset); - write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].headerSize); - write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].size); - write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].totalFrames); - write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames); - write_int(fd, VIDEO_SINGLETON::instance ()->gopTable[i].firstIoffset); - } - for (i = 0; i < VIDEO_SINGLETON::instance ()->numF; i ++) - { - write_byte(fd, VIDEO_SINGLETON::instance ()->frameTable[i].type); - write_short(fd, VIDEO_SINGLETON::instance ()->frameTable[i].size); - } - - ACE_OS::close (fd); - VIDEO_SINGLETON::instance ()->videoFile[fnlen] = 0; - return; - fail_WriteInfoToFile: - if (fd >= 0) - ACE_OS::close (fd); - VIDEO_SINGLETON::instance ()->videoFile[fnlen] = 0; - return; -} - -/* -#define nextByte {fileptr ++; \ - if (fread(&nb, 1, 1, fp) == 0) \ - { \ - ACE_OS::perror ("VS Crossed EOF or error while scanning"); \ - return 1; \ - } } - -*/ - -#define nextByte {int val; fileptr ++; \ - if ((val = getc(VIDEO_SINGLETON::instance ()->fp)) == EOF) \ - {\ - ACE_OS::perror ("Crossed EOF or error while scanning"); \ - return 1; \ - } nb = val;} - -#define computePicSize \ - if (inpic) \ - { \ - if (pictype == 'I') \ - { \ - VIDEO_SINGLETON::instance ()->maxI = max(VIDEO_SINGLETON::instance ()->maxI, (int)(fileptr - picptr - 4)); \ - VIDEO_SINGLETON::instance ()->minI = min(VIDEO_SINGLETON::instance ()->minI, (int)(fileptr - picptr - 4)); \ - } \ - else if (pictype == 'P') \ - { \ - VIDEO_SINGLETON::instance ()->maxP = max(VIDEO_SINGLETON::instance ()->maxP, (int)(fileptr - picptr - 4)); \ - VIDEO_SINGLETON::instance ()->minP = min(VIDEO_SINGLETON::instance ()->minP, (int)(fileptr - picptr - 4)); \ - } \ - else \ - { \ - VIDEO_SINGLETON::instance ()->maxB = max(VIDEO_SINGLETON::instance ()->maxB, (int)(fileptr - picptr - 4)); \ - VIDEO_SINGLETON::instance ()->minB = min(VIDEO_SINGLETON::instance ()->minB, (int)(fileptr - picptr - 4)); \ - } \ - VIDEO_SINGLETON::instance ()->frameTable[ftptr].type = pictype; \ - VIDEO_SINGLETON::instance ()->frameTable[ftptr++].size = (int)(fileptr - picptr - 4); \ - inpic = 0; \ - } - -static int init_MPEG1_video_file(void) -{ - unsigned char nb; - int state = 0; - unsigned long fileptr = 0; - unsigned long i, j, k; - int shptr, gopptr, ftptr; - int inpic = 0; - unsigned long picptr = 0; - int pictype = 0; - int first = 0; - int failureType = 0; - - VIDEO_SINGLETON::instance ()->fp = fopen(VIDEO_SINGLETON::instance ()->videoFile, "r"); - if (VIDEO_SINGLETON::instance ()->fp == NULL) - { - fprintf(stderr, "error on opening video file %s", VIDEO_SINGLETON::instance ()->videoFile); - ACE_OS::perror (""); - return 2; - } - if (fseek(VIDEO_SINGLETON::instance ()->fp, 0, 2) == -1) - { - fprintf(stderr, "File %s not seekable", VIDEO_SINGLETON::instance ()->videoFile); - ACE_OS::perror (""); - return 3; - } - VIDEO_SINGLETON::instance ()->fileSize = ftell(VIDEO_SINGLETON::instance ()->fp); - - fseek(VIDEO_SINGLETON::instance ()->fp, 0, 0); - - if (ReadInfoFromFile()) - { - for (;;) - { - nextByte; - if (state >= 0 && nb == 0x00) - state ++; - else if (state >= 2 && nb == 0x01) - state = -1; - else if (state == -1) - { - if (!first) first ++; - else if (first == 1) first ++; - - switch (nb) - { - case 0xb7: /* seq_end_code */ - goto exit_phase1; - break; - case 0xb3: /* seq_start_code */ - if (first == 1) first = 3; - if (first != 3) - { - fprintf(stderr, "VS error: given file is not in MPEG format.\n"); - return 4; - } - VIDEO_SINGLETON::instance ()->numS ++; - break; - case 0xb8: /* gop_start_code */ - VIDEO_SINGLETON::instance ()->numG ++; - break; - case 0x00: /* picture_start_code */ - nextByte; - nextByte; - nb &= 0x38; - if (nb == 0x08) - { - VIDEO_SINGLETON::instance ()->numI ++; - if (VIDEO_SINGLETON::instance ()->numG == 2) - VIDEO_SINGLETON::instance ()->pattern[VIDEO_SINGLETON::instance ()->patternSize++] = 'I'; - } - else if (nb == 0x10) - { - VIDEO_SINGLETON::instance ()->numP ++; - if (VIDEO_SINGLETON::instance ()->numG == 2) - VIDEO_SINGLETON::instance ()->pattern[VIDEO_SINGLETON::instance ()->patternSize++] = 'P'; - } - else if (nb == 0x18) - { - VIDEO_SINGLETON::instance ()->numB ++; - if (VIDEO_SINGLETON::instance ()->numG == 2) - VIDEO_SINGLETON::instance ()->pattern[VIDEO_SINGLETON::instance ()->patternSize++] = 'B'; - } - /* - else - fprintf(stderr, "VS error: unkonw picture type %d\n", nb); - */ - break; - default: - break; - } - state = 0; - } - else - state = 0; - } - exit_phase1: - - if (first != 3) - { - fprintf(stderr, "VS error: given file \"%s\" is not of MPEG format.\n", VIDEO_SINGLETON::instance ()->videoFile); - return 4; - } - - VIDEO_SINGLETON::instance ()->pattern[VIDEO_SINGLETON::instance ()->patternSize] = 0; - memset(VIDEO_SINGLETON::instance ()->sendPattern, 1, PATTERN_SIZE); - - VIDEO_SINGLETON::instance ()->numF = VIDEO_SINGLETON::instance ()->numI + VIDEO_SINGLETON::instance ()->numP + VIDEO_SINGLETON::instance ()->numB; - VIDEO_SINGLETON::instance ()->averageFrameSize = fileptr / (unsigned)VIDEO_SINGLETON::instance ()->numF; - /* - fprintf(stderr, "Pass one finished, total bytes read: %u, average frame size %d\n", - fileptr, VIDEO_SINGLETON::instance ()->averageFrameSize); - fprintf(stderr, "VIDEO_SINGLETON::instance ()->numS-%d, VIDEO_SINGLETON::instance ()->numG-%d, VIDEO_SINGLETON::instance ()->numF-%d, VIDEO_SINGLETON::instance ()->numI-%d, VIDEO_SINGLETON::instance ()->numP-%d, VIDEO_SINGLETON::instance ()->numB-%d\n", - VIDEO_SINGLETON::instance ()->numS, VIDEO_SINGLETON::instance ()->numG, VIDEO_SINGLETON::instance ()->numI, VIDEO_SINGLETON::instance ()->numI, VIDEO_SINGLETON::instance ()->numP, VIDEO_SINGLETON::instance ()->numB); - fprintf(stderr, "VIDEO_SINGLETON::Instance ()->Pattern detected: %s\n", VIDEO_SINGLETON::instance ()->pattern); - */ - if (VIDEO_SINGLETON::instance ()->numF > MAX_FRAMES) - { - fprintf(stderr, "VS error: VIDEO_SINGLETON::instance ()->Number of frames (%d) is bigger than MAX_FRAMES (%d).\n\ - you need to update the constant definition in common.h and recompile.\n", - VIDEO_SINGLETON::instance ()->numF, MAX_FRAMES); - return 5; - } - -#ifdef STAT - VIDEO_SINGLETON::instance ()->framesSent = (char *)ACE_OS::malloc((VIDEO_SINGLETON::instance ()->numF + 7)>>3); - if (VIDEO_SINGLETON::instance ()->framesSent == NULL) - { - fprintf(stderr, "VS fails to alloc mem for VIDEO_SINGLETON::instance ()->framesSent for %d frames", VIDEO_SINGLETON::instance ()->numF); - ACE_OS::perror (""); - return 6; - } -#endif - - VIDEO_SINGLETON::instance ()->systemHeader = (struct Video_Global::SystemHeader *)ACE_OS::malloc(sizeof(struct Video_Global::SystemHeader) * VIDEO_SINGLETON::instance ()->numS); - if (VIDEO_SINGLETON::instance ()->systemHeader == NULL) - { - ACE_OS::perror ("VS error on ACE_OS::malloc VIDEO_SINGLETON::instance ()->SystemHeader"); - return 7; - } - VIDEO_SINGLETON::instance ()->gopTable = (struct Video_Global::GopTable *)ACE_OS::malloc(sizeof(struct Video_Global::GopTable) * VIDEO_SINGLETON::instance ()->numG); - if (VIDEO_SINGLETON::instance ()->gopTable == NULL) - { - ACE_OS::perror ("VS error on ACE_OS::malloc GopHeader"); - return 8; - } - VIDEO_SINGLETON::instance ()->frameTable = (struct Video_Global::FrameTable *)ACE_OS::malloc(sizeof(Video_Global::FrameTable) * VIDEO_SINGLETON::instance ()->numF); - if (VIDEO_SINGLETON::instance ()->frameTable == NULL) - { - ACE_OS::perror ("VS error on ACE_OS::malloc VIDEO_SINGLETON::instance ()->frameTable"); - return 9; - } - - rewind(VIDEO_SINGLETON::instance ()->fp); - fileptr = 0; - state = 0; - inpic = 0; - shptr = -1; - gopptr = -1; - ftptr = 0; - - for (;;) - { - nextByte; - if (state >= 0 && nb == 0x00) - state ++; - else if (state >= 2 && nb == 0x01) - state = -1; - else if (state == -1) - { - switch (nb) - { - case 0xb7: /* seq_end_code */ - if (gopptr >= 0 && VIDEO_SINGLETON::instance ()->gopTable[gopptr].size == 0) - VIDEO_SINGLETON::instance ()->gopTable[gopptr].size = fileptr - VIDEO_SINGLETON::instance ()->gopTable[gopptr].offset - 4; - computePicSize; - goto exit_phase2; - break; - case 0xb3: /* seq_start_code */ - if (gopptr >= 0 && VIDEO_SINGLETON::instance ()->gopTable[gopptr].size == 0) - VIDEO_SINGLETON::instance ()->gopTable[gopptr].size = fileptr - VIDEO_SINGLETON::instance ()->gopTable[gopptr].offset - 4; - computePicSize; - shptr ++; - VIDEO_SINGLETON::instance ()->systemHeader[shptr].offset = fileptr - 4; - VIDEO_SINGLETON::instance ()->systemHeader[shptr].size = 0; - break; - case 0xb8: /* gop_start_code */ - if (VIDEO_SINGLETON::instance ()->systemHeader[shptr].size == 0) - VIDEO_SINGLETON::instance ()->systemHeader[shptr].size =fileptr - VIDEO_SINGLETON::instance ()->systemHeader[shptr].offset - 4; - if (gopptr >= 0 && VIDEO_SINGLETON::instance ()->gopTable[gopptr].size == 0) - VIDEO_SINGLETON::instance ()->gopTable[gopptr].size = fileptr - VIDEO_SINGLETON::instance ()->gopTable[gopptr].offset - 4; - computePicSize; - gopptr ++; - VIDEO_SINGLETON::instance ()->gopTable[gopptr].systemHeader = shptr; - VIDEO_SINGLETON::instance ()->gopTable[gopptr].offset = fileptr - 4; - VIDEO_SINGLETON::instance ()->gopTable[gopptr].headerSize = 0; - VIDEO_SINGLETON::instance ()->gopTable[gopptr].size = 0; - VIDEO_SINGLETON::instance ()->gopTable[gopptr].totalFrames = 0; - VIDEO_SINGLETON::instance ()->gopTable[gopptr].previousFrames = gopptr ? - (VIDEO_SINGLETON::instance ()->gopTable[gopptr - 1].totalFrames + VIDEO_SINGLETON::instance ()->gopTable[gopptr - 1].previousFrames) : 0; - - break; - case 0x00: /* picture_start_code */ - if (VIDEO_SINGLETON::instance ()->gopTable[gopptr].headerSize == 0) - { - VIDEO_SINGLETON::instance ()->gopTable[gopptr].headerSize = fileptr - VIDEO_SINGLETON::instance ()->gopTable[gopptr].offset - 4; - VIDEO_SINGLETON::instance ()->gopTable[gopptr].firstIoffset = fileptr - 4; - } - VIDEO_SINGLETON::instance ()->gopTable[gopptr].totalFrames ++; - computePicSize; - picptr = fileptr - 4; - nextByte; - nextByte; - nb &= 0x38; - if (nb == 0x08) - { - pictype = 'I'; - inpic = 1; - } - else if (nb == 0x10) - { - pictype = 'P'; - inpic = 1; - } - else if (nb == 0x18) - { - pictype = 'B'; - inpic = 1; - } - break; - default: - - break; - } - state = 0; - } - else - state = 0; - } - - exit_phase2: - for (shptr = 0; shptrnumS; shptr++) - { - VIDEO_SINGLETON::instance ()->maxS = max(VIDEO_SINGLETON::instance ()->maxS, VIDEO_SINGLETON::instance ()->systemHeader[shptr].size); - VIDEO_SINGLETON::instance ()->minS = min(VIDEO_SINGLETON::instance ()->minS, VIDEO_SINGLETON::instance ()->systemHeader[shptr].size); - } - for (gopptr = 0; gopptrnumG; gopptr++) - { - VIDEO_SINGLETON::instance ()->maxG = max(VIDEO_SINGLETON::instance ()->maxG, VIDEO_SINGLETON::instance ()->gopTable[gopptr].headerSize); - VIDEO_SINGLETON::instance ()->minG = min(VIDEO_SINGLETON::instance ()->minG, VIDEO_SINGLETON::instance ()->gopTable[gopptr].headerSize); - } - VIDEO_SINGLETON::instance ()->packetBufSize = VIDEO_SINGLETON::instance ()->maxS + VIDEO_SINGLETON::instance ()->maxG + max(VIDEO_SINGLETON::instance ()->maxI, max(VIDEO_SINGLETON::instance ()->maxP, VIDEO_SINGLETON::instance ()->maxB)); - VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)ACE_OS::malloc(sizeof(VideoMessage) + sizeof(VideoPacket) + - VIDEO_SINGLETON::instance ()->packetBufSize); - if (VIDEO_SINGLETON::instance ()->packet == NULL) - { - ACE_OS::perror ("VS error on ACE_OS::malloc VIDEO_SINGLETON::instance ()->packet buffer"); - return 10; - } - VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)((char *)VIDEO_SINGLETON::instance ()->packet + sizeof(VideoMessage)); - /* - fprintf(stderr, "Pass 2 finished.\n"); - fprintf(stderr, "VIDEO_SINGLETON::instance ()->maxS-%d, VIDEO_SINGLETON::instance ()->maxG-%d, VIDEO_SINGLETON::instance ()->maxI-%d, VIDEO_SINGLETON::instance ()->maxP-%d, VIDEO_SINGLETON::instance ()->maxB-%d.\n", VIDEO_SINGLETON::instance ()->maxS, VIDEO_SINGLETON::instance ()->maxG, VIDEO_SINGLETON::instance ()->maxI, VIDEO_SINGLETON::instance ()->maxP, VIDEO_SINGLETON::instance ()->maxB); - fprintf(stderr, "VIDEO_SINGLETON::instance ()->minS-%d, VIDEO_SINGLETON::instance ()->minG-%d, VIDEO_SINGLETON::instance ()->minI-%d, VIDEO_SINGLETON::instance ()->minP-%d, VIDEO_SINGLETON::instance ()->minB-%d.\n", VIDEO_SINGLETON::instance ()->minS, VIDEO_SINGLETON::instance ()->minG, VIDEO_SINGLETON::instance ()->minI, VIDEO_SINGLETON::instance ()->minP, VIDEO_SINGLETON::instance ()->minB); - */ - /* - { - int i; - - fprintf(stderr, "id: offset size -- system header table:\n"); - for (i=0; inumS; i++) - fprintf(stderr, "%-3d %-9u %d\n", i, VIDEO_SINGLETON::instance ()->systemHeader[i].offset, VIDEO_SINGLETON::instance ()->systemHeader[i].size); - fprintf(stderr, - "id: header offset hdsize totSize frames preframs Ioffset Isize -- GOP\n"); - for (i=0; inumG; i++) - { - fprintf(stderr, "%-4d %-8d %-8u %-8d %-8d %-8d %-8d %-8u %d\n", - i, - VIDEO_SINGLETON::instance ()->gopTable[i].VIDEO_SINGLETON::instance ()->systemHeader, - VIDEO_SINGLETON::instance ()->gopTable[i].offset, - VIDEO_SINGLETON::instance ()->gopTable[i].headerSize, - VIDEO_SINGLETON::instance ()->gopTable[i].size, - VIDEO_SINGLETON::instance ()->gopTable[i].totalFrames, - VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames, - VIDEO_SINGLETON::instance ()->gopTable[i].firstIoffset, - VIDEO_SINGLETON::instance ()->frameTable[VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames].size - ); - } - - fprintf(stderr, "\nframe information:"); - for (i=0; inumF; i++) - fprintf(stderr, "%c%c%-8d", (i%10 ? '\0' : '\n'), VIDEO_SINGLETON::instance ()->frameTable[i].type, VIDEO_SINGLETON::instance ()->frameTable[i].size); - fprintf(stderr, "\n"); - - } - */ - fseek(VIDEO_SINGLETON::instance ()->fp, VIDEO_SINGLETON::instance ()->systemHeader[0].offset+4, 0); - nextByte; - VIDEO_SINGLETON::instance ()->horizontalSize = ((int)nb <<4) & 0xff0; - nextByte; - VIDEO_SINGLETON::instance ()->horizontalSize |= (nb >>4) & 0x0f; - VIDEO_SINGLETON::instance ()->verticalSize = ((int)nb <<8) & 0xf00; - nextByte; - VIDEO_SINGLETON::instance ()->verticalSize |= (int)nb & 0xff; - nextByte; - VIDEO_SINGLETON::instance ()->pelAspectRatio = ((int)nb >> 4) & 0x0f; - VIDEO_SINGLETON::instance ()->pictureRate = (int)nb & 0x0f; - nextByte; - nextByte; - nextByte; - VIDEO_SINGLETON::instance ()->vbvBufferSize = ((int)nb << 5) & 0x3e0; - nextByte; - VIDEO_SINGLETON::instance ()->vbvBufferSize |= ((int)nb >>3) & 0x1f; - /* - fprintf(stderr, "SysHeader info: hsize-%d, vsize-%d, pelAspect-%d, rate-%d, vbv-%d.\n", - VIDEO_SINGLETON::instance ()->horizontalSize, VIDEO_SINGLETON::instance ()->verticalSize, VIDEO_SINGLETON::instance ()->pelAspectRatio, VIDEO_SINGLETON::instance ()->pictureRate, VIDEO_SINGLETON::instance ()->vbvBufferSize); - */ - WriteInfoToFile(); - } -#if 0 - { - int i, j = 20; - - for (i = VIDEO_SINGLETON::instance ()->numG - 1;; i --) { - if (VIDEO_SINGLETON::instance ()->gopTable[i].offset < 4235260) { - fprintf(stderr, "group %d: offset %ld\n", i, VIDEO_SINGLETON::instance ()->gopTable[i].offset); - if (j -- == 0) break; - } - } - /* - for (i = 0; i < VIDEO_SINGLETON::instance ()->numG; i ++) { - if (VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames > 1800) { - fprintf(stderr, "group %d: offset %ld pre-frames %d\n", - i, VIDEO_SINGLETON::instance ()->gopTable[i].offset, VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames); - break; - } - } - */ - } -#endif - { - VIDEO_SINGLETON::instance ()->firstPatternSize = VIDEO_SINGLETON::instance ()->gopTable[0].totalFrames; - VIDEO_SINGLETON::instance ()->firstSendPattern = (char *)ACE_OS::malloc(VIDEO_SINGLETON::instance ()->firstPatternSize); - if (VIDEO_SINGLETON::instance ()->firstSendPattern == NULL) - { - fprintf(stderr, "VS failed to allocate VIDEO_SINGLETON::instance ()->firstVIDEO_SINGLETON::instance ()->SendVIDEO_SINGLETON::Instance ()->Pattern for %d frames", - VIDEO_SINGLETON::instance ()->firstPatternSize); - ACE_OS::perror (""); - return 11; - } - } - VIDEO_SINGLETON::instance ()->firstGopFrames = VIDEO_SINGLETON::instance ()->gopTable[0].totalFrames; - return 0; -} - - int INITvideo(void) -{ - INITvideoPara para; - int failureType = 0; - int result; - /* - fprintf(stderr, "VS about to read Para.\n"); - */ - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.version = ntohl(para.version); - para.nameLength = ntohl(para.nameLength); -#endif - if (para.nameLength>0) - { - result = CmdRead(VIDEO_SINGLETON::instance ()->videoFile, para.nameLength); - if (result != 0) - return result; - } - if (Mpeg_Global::session_num > Mpeg_Global::session_limit || para.version != VERSION) { - char errmsg[128]; - VIDEO_SINGLETON::instance ()->cmd = CmdFAIL; - CmdWrite((char *)&VIDEO_SINGLETON::instance ()->cmd, 1); - if (Mpeg_Global::session_num > Mpeg_Global::session_limit) { - sprintf(errmsg, - "Too many sessions being serviced, please try again later.\n"); - } - else { - sprintf(errmsg, "Version # not match, VS %d.%02d, Client %d.%02d", - VERSION / 100, VERSION % 100, - para.version / 100, para.version % 100); - } - write_string(VIDEO_SINGLETON::instance ()->serviceSocket, errmsg); - ACE_OS::exit (0); - } - VIDEO_SINGLETON::instance ()->cmdsn = para.sn; - /* - fprintf(stderr, "MPEG file %s got.\n", VIDEO_SINGLETON::instance ()->videoFile); - */ - VIDEO_SINGLETON::instance ()->videoFile[para.nameLength] = 0; - - if (!strncasecmp("LiveVideo", VIDEO_SINGLETON::instance ()->videoFile, 9)) { - if (OpenLiveVideo(&VIDEO_SINGLETON::instance ()->video_format, &VIDEO_SINGLETON::instance ()->horizontalSize, - &VIDEO_SINGLETON::instance ()->verticalSize, &VIDEO_SINGLETON::instance ()->averageFrameSize, - &VIDEO_SINGLETON::instance ()->fps, &VIDEO_SINGLETON::instance ()->pelAspectRatio) == -1) { - failureType = 100; - goto failure; - } - if (VIDEO_SINGLETON::instance ()->video_format == VIDEO_MPEG2) { - failureType = 101; - goto failure; - } - VIDEO_SINGLETON::instance ()->live_source = 1; - - VIDEO_SINGLETON::instance ()->fileSize =0x7fffffff; - VIDEO_SINGLETON::instance ()->maxS = VIDEO_SINGLETON::instance ()->maxG = VIDEO_SINGLETON::instance ()->maxI = VIDEO_SINGLETON::instance ()->maxP = VIDEO_SINGLETON::instance ()->maxB = VIDEO_SINGLETON::instance ()->minS = VIDEO_SINGLETON::instance ()->minG = VIDEO_SINGLETON::instance ()->minI = VIDEO_SINGLETON::instance ()->minP = VIDEO_SINGLETON::instance ()->minB = 1; - VIDEO_SINGLETON::instance ()->numS = VIDEO_SINGLETON::instance ()->numG = VIDEO_SINGLETON::instance ()->numF = VIDEO_SINGLETON::instance ()->numI = 0x7fffffff; - VIDEO_SINGLETON::instance ()->numP = VIDEO_SINGLETON::instance ()->numB = 0; - VIDEO_SINGLETON::instance ()->vbvBufferSize = 1; - VIDEO_SINGLETON::instance ()->firstGopFrames = 1; - VIDEO_SINGLETON::instance ()->patternSize = 1; - VIDEO_SINGLETON::instance ()->pattern[0] = 'I'; - VIDEO_SINGLETON::instance ()->pattern[1] = 0; - VIDEO_SINGLETON::instance ()->packetBufSize = VIDEO_SINGLETON::instance ()->verticalSize * VIDEO_SINGLETON::instance ()->horizontalSize * 3; - VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)ACE_OS::malloc(sizeof(VideoMessage) + sizeof(VideoPacket) + - VIDEO_SINGLETON::instance ()->packetBufSize); - if (VIDEO_SINGLETON::instance ()->packet == NULL) - { - ACE_OS::perror ("Error: VS error on ACE_OS::malloc VIDEO_SINGLETON::instance ()->packet buffer"); - ACE_OS::exit (1); - } - VIDEO_SINGLETON::instance ()->packet = (VideoPacket *)((char *)VIDEO_SINGLETON::instance ()->packet + sizeof(VideoMessage)); - - } - else { - static double pictureRateTable[] = {23.976, 24, 25, 29.97, 30, 50, 59.94, 60}; - - VIDEO_SINGLETON::instance ()->video_format = VIDEO_MPEG1; - failureType = init_MPEG1_video_file(); - if (failureType) goto failure; - VIDEO_SINGLETON::instance ()->fps = pictureRateTable[VIDEO_SINGLETON::instance ()->pictureRate - 1]; - } - - { - INITvideoReply reply; - - reply.totalHeaders = htonl(VIDEO_SINGLETON::instance ()->numS); - reply.totalGroups = htonl(VIDEO_SINGLETON::instance ()->numG); - reply.totalFrames = htonl(VIDEO_SINGLETON::instance ()->numF); - reply.sizeIFrame = htonl(VIDEO_SINGLETON::instance ()->maxI); - reply.sizePFrame = htonl(VIDEO_SINGLETON::instance ()->maxP); - reply.sizeBFrame = htonl(VIDEO_SINGLETON::instance ()->maxB); - reply.sizeSystemHeader = htonl(VIDEO_SINGLETON::instance ()->maxS); - reply.sizeGop = htonl(VIDEO_SINGLETON::instance ()->maxG); - reply.averageFrameSize = htonl(VIDEO_SINGLETON::instance ()->averageFrameSize); - reply.verticalSize = htonl(VIDEO_SINGLETON::instance ()->verticalSize); - reply.horizontalSize = htonl(VIDEO_SINGLETON::instance ()->horizontalSize); - reply.pelAspectRatio = htonl(VIDEO_SINGLETON::instance ()->pelAspectRatio); - reply.pictureRate1000 = htonl((int)(VIDEO_SINGLETON::instance ()->fps * 1000)); - reply.vbvBufferSize = htonl(VIDEO_SINGLETON::instance ()->vbvBufferSize); - reply.firstGopFrames = htonl(VIDEO_SINGLETON::instance ()->firstGopFrames); - reply.patternSize = htonl(VIDEO_SINGLETON::instance ()->patternSize); - strncpy(reply.pattern, VIDEO_SINGLETON::instance ()->pattern, PATTERN_SIZE); - - reply.live = htonl(VIDEO_SINGLETON::instance ()->live_source); - reply.format = htonl(VIDEO_SINGLETON::instance ()->video_format); - - CmdWrite((char *)&VIDEO_SINGLETON::instance ()->cmd, 1); - - CmdWrite((char *)&reply, sizeof(reply)); - - /* write the first SH, GOP and IFrame to VIDEO_SINGLETON::instance ()->serviceSocket (TCP), - using code for SendPacket() */ - { - int tmpSocket = VIDEO_SINGLETON::instance ()->videoSocket; - - if (VIDEO_SINGLETON::instance ()->live_source) StartPlayLiveVideo(); - - VIDEO_SINGLETON::instance ()->videoSocket = VIDEO_SINGLETON::instance ()->serviceSocket; - - if (VIDEO_SINGLETON::instance ()->live_source) { - int frame = 0; - SendPicture(&frame); - } - else if (VIDEO_SINGLETON::instance ()->video_format == VIDEO_MPEG1) { - SendPacket(1, 0, 0, 0); - } - else { - fprintf(stderr, "VS: VIDEO_SINGLETON::instance ()->video_format %d not supported.\n", - VIDEO_SINGLETON::instance ()->video_format); - } - VIDEO_SINGLETON::instance ()->videoSocket = tmpSocket; - - if (VIDEO_SINGLETON::instance ()->live_source) StopPlayLiveVideo(); - } - - return 0; - - } - failure: - { - char * msg; - char errmsg[64]; - VIDEO_SINGLETON::instance ()->cmd = CmdFAIL; - sprintf(errmsg, "VS failed to alloc internal buf (type %d)", failureType); - CmdWrite((char *)&VIDEO_SINGLETON::instance ()->cmd, 1); - msg = failureType == 1 ? "not a complete MPEG stream" : - failureType == 2 ? "can't open MPEG file" : - failureType == 3 ? "MPEG file is not seekable" : - failureType == 4 ? "not an MPEG stream" : - failureType == 5 ? - "too many frames in MPEG file, need change MAX_FRAMES and recompile VS" : - failureType == 100 ? "failed to connect to live video source" : - failureType == 101 ? "live MPEG2 not supported" : - errmsg; - write_string(VIDEO_SINGLETON::instance ()->serviceSocket, msg); - ACE_OS::exit (0); - } -} - -#define CheckGroupRange(pnextGroup) \ -{ if ((pnextGroup) < 0 || (pnextGroup) >= VIDEO_SINGLETON::instance ()->numG) \ - { fprintf(stderr, "VS: %d.VIDEO_SINGLETON::instance ()->nextGroup(%d) out of range (%d).\n", VIDEO_SINGLETON::instance ()->cmd, (pnextGroup), VIDEO_SINGLETON::instance ()->numG); \ - return 0; } } - -#define CheckFrameRange(pnextFrame) \ -{ if ((pnextFrame) < 0 || (pnextFrame) >= VIDEO_SINGLETON::instance ()->numF) \ - { fprintf(stderr, "VS: %d.VIDEO_SINGLETON::instance ()->nextFrame(%d) out of range (%d).\n", VIDEO_SINGLETON::instance ()->cmd, (pnextFrame), VIDEO_SINGLETON::instance ()->numF); \ - return 0; } } - -int FrameToGroup(int * frame) -{ - int f = * frame; - int i = 0; - while (i < VIDEO_SINGLETON::instance ()->numG && VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames <= f) i++; - i --; - * frame = f - VIDEO_SINGLETON::instance ()->gopTable[i].previousFrames; - return i; -} - -static int POSITIONvideo() -{ - int result; - POSITIONpara para; - /* - fprintf(stderr, "POSITION . . .\n"); - */ - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; - - if (VIDEO_SINGLETON::instance ()->live_source) return 0; - -#ifdef NeedByteOrderConversion - para.VIDEO_SINGLETON::instance ()->nextGroup = ntohl(para.VIDEO_SINGLETON::instance ()->nextGroup); - para.sn = ntohl(para.sn); -#endif - - CheckGroupRange(para.nextGroup); - VIDEO_SINGLETON::instance ()->cmdsn = para.sn; - result = SendPacket(VIDEO_SINGLETON::instance ()->numS>1 || para.nextGroup == 0, para.nextGroup, 0, 0); - return result; -} - -static int STEPvideo() -{ - int group; - STEPpara para; - int tag = 0; - int result; - - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.VIDEO_SINGLETON::instance ()->nextFrame = ntohl(para.VIDEO_SINGLETON::instance ()->nextFrame); -#endif - - VIDEO_SINGLETON::instance ()->cmdsn = para.sn; - - if (!VIDEO_SINGLETON::instance ()->live_source) { - if (para.nextFrame >= VIDEO_SINGLETON::instance ()->numF) /* send SEQ_END */ - { - tag = 1; - para.nextFrame --; - } - /* - fprintf(stderr, "STEP . . .frame-%d\n", para.VIDEO_SINGLETON::instance ()->nextFrame); - */ - CheckFrameRange(para.nextFrame); - group = FrameToGroup(¶.nextFrame); - if (VIDEO_SINGLETON::instance ()->precmd != CmdSTEP && !tag ) { - result = SendReferences(group, para.nextFrame); - if (result < 0 ) - return result; - } - } - if (VIDEO_SINGLETON::instance ()->live_source) StartPlayLiveVideo(); - - if (VIDEO_SINGLETON::instance ()->live_source) { - SendPicture(¶.nextFrame); - } - else if (VIDEO_SINGLETON::instance ()->video_format == VIDEO_MPEG1) { - SendPacket(VIDEO_SINGLETON::instance ()->numS>1, group, tag ? VIDEO_SINGLETON::instance ()->numF : para.nextFrame, 0); - } - else { - fprintf(stderr, "VS: wierd1\n"); - } - - if (VIDEO_SINGLETON::instance ()->live_source) StopPlayLiveVideo(); - return 0; -} - -static int timerHeader, timerGroup, timerFrame; -static int timerOn = 0; -static int timerAdjust = 0; -static int preTimerVal = 0; -static void StopTimer(void); -static void TimerSpeed(void); -static void TimerProcessing(void); - -static void timerHandler(int sig) -{ - int val2, val3; - int usec = VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF; - - if (Mpeg_Global::drift_ppm) { - usec -= (int)((double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0); - } - - if (timerAdjust > 1) - usec = (int)(((double)usec * (double)(SPEEDUP_INV_SCALE - 1)) / - (double)SPEEDUP_INV_SCALE); - val3 = get_duration(preTimerVal, (val2 = get_usec())); - /* - if (val3 >= usec<< 1)) - fprintf(stderr, "Slower: %d out of VIDEO_SINGLETON::instance ()->currentUPF %d.\n", - val3, usec); - else - fprintf(stderr, "+\n"); - */ - preTimerVal = val2; - if (val3 < 0 || val3 > 100000000) - val3 = usec; - val2 = (val3 + (usec>>1)) / usec; - if (val2 < 0) val2 = 0; - if (val2) { - TimerProcessing(); - val2 --; - } - VIDEO_SINGLETON::instance ()->addedSignals += val2; - - if (VIDEO_SINGLETON::instance ()->addedSignals) { - val2 = timerAdjust; - if (timerAdjust < MAX_TIMER_ADJUST) { - timerAdjust += VIDEO_SINGLETON::instance ()->addedSignals * SPEEDUP_INV_SCALE; - if (val2 < SPEEDUP_INV_SCALE) { - TimerSpeed(); - } - } - else { - /* - fprintf(stderr, "VS timerAdjust %d, VIDEO_SINGLETON::instance ()->addedSignals %d, timerFrame %d\n", - timerAdjust, VIDEO_SINGLETON::instance ()->addedSignals, timerFrame); - */ - for (val3 = 0; val3 < VIDEO_SINGLETON::instance ()->addedSignals; val3 ++) - TimerProcessing(); - } - VIDEO_SINGLETON::instance ()->addedSignals = 0; - } -} - -static void TimerProcessing(void) -{ -/* - fprintf(stderr, "VS: timerHandler...\n"); -*/ - if (!timerOn) { - return; - } - if (timerAdjust < 0) - { - timerAdjust += SPEEDUP_INV_SCALE; - return; - } - if (timerAdjust >0) - { - if ((--timerAdjust) == 0) - TimerSpeed(); - } - if (VIDEO_SINGLETON::instance ()->cmd == CmdPLAY) - { - if (timerGroup == VIDEO_SINGLETON::instance ()->numG - 1 && timerFrame >= VIDEO_SINGLETON::instance ()->gopTable[timerGroup].totalFrames - 1) - { - timerFrame ++; /* force sending of END_SEQ when PLAY VIDEO_SINGLETON::instance ()->cmd */ - StopTimer(); - return; - } - else - { - timerFrame ++; - if (timerFrame >= VIDEO_SINGLETON::instance ()->gopTable[timerGroup].totalFrames) - { - timerGroup ++; - timerFrame = 0; - timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader; - } - } - } - else { - if (VIDEO_SINGLETON::instance ()->cmd == CmdFF) { - if (timerGroup == VIDEO_SINGLETON::instance ()->numG - 1) { - StopTimer(); - return; - } - timerGroup ++; - timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader; - } - else { - if (timerGroup == 0) { - StopTimer(); - return; - } - timerGroup --; - timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader; - } - } -} - -static void StartTimer(void) -{ - VIDEO_SINGLETON::instance ()->addedUPF = 0; - VIDEO_SINGLETON::instance ()->addedSignals = 0; - timerAdjust = (VIDEO_SINGLETON::instance ()->VStimeAdvance * SPEEDUP_INV_SCALE) / VIDEO_SINGLETON::instance ()->currentUPF; - /* - SFprintf(stderr, "VS StartTimer(): fast-start frames %d\n", - timerAdjust / SPEEDUP_INV_SCALE); - */ - TimerSpeed(); - setsignal(SIGALRM, timerHandler); - timerOn = 1; - preTimerVal = get_usec(); - /* - fprintf(stderr, "VS: timer started at %d upf.\n", VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF); - */ -} - -static void TimerSpeed(void) -{ - struct itimerval val; - int usec = VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF; - if (Mpeg_Global::drift_ppm) { - /* - int drift = (double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0; - SFprintf(stderr, "Mpeg_Global::drift_ppm %d, usec %d, drift %d, new usec %d\n", - Mpeg_Global::drift_ppm, usec, drift, usec - drift); - */ - usec -= (int)((double)usec * (double)Mpeg_Global::drift_ppm / 1000000.0); - } - if (timerAdjust > 1) - usec = (int)(((double)usec * (double)(SPEEDUP_INV_SCALE - 1)) / - (double)SPEEDUP_INV_SCALE); - val.it_interval.tv_sec = val.it_value.tv_sec = usec / 1000000; - val.it_interval.tv_usec = val.it_value.tv_usec = usec % 1000000; - setitimer(ITIMER_REAL, &val, NULL); - /* - SFprintf(stderr, - "VS TimerSpeed() at %s speed, timerAdjust %d VIDEO_SINGLETON::instance ()->addedSignals %d.\n", - (timerAdjust > 1) ? "higher" : "normal", timerAdjust, VIDEO_SINGLETON::instance ()->addedSignals); - */ -} - -static void StopTimer() -{ - struct itimerval val; - setsignal(SIGALRM, SIG_IGN); - val.it_interval.tv_sec = val.it_value.tv_sec = 0; - val.it_interval.tv_usec = val.it_value.tv_usec = 0; - setitimer(ITIMER_REAL, &val, NULL); - timerOn = 0; - /* - fprintf(stderr, "VS: timer stopped.\n"); - */ -} - -void GetFeedBack() -{ - VideoFeedBackPara para; - struct itimerval val; - int timerUsec; - - if (FBread((char *)¶, sizeof(para)) == -1 || - ntohl(para.cmdsn) != VIDEO_SINGLETON::instance ()->cmdsn) { - /* - SFprintf(stderr, "VS warning: a FB VIDEO_SINGLETON::instance ()->packet discarded.\n"); - */ - return; - } -#ifdef NeedByteOrderConversion - para.VIDEO_SINGLETON::instance ()->needHeader = ntohl(para.VIDEO_SINGLETON::instance ()->needHeader); - para.addUsecPerFrame = ntohl(para.addUsecPerFrame); - para.addFrames = ntohl(para.addFrames); - para.VIDEO_SINGLETON::instance ()->sendVIDEO_SINGLETON::Instance ()->PatternGops = ntohl(para.VIDEO_SINGLETON::instance ()->sendVIDEO_SINGLETON::Instance ()->PatternGops); - para.VIDEO_SINGLETON::instance ()->frameRateLimit1000 = ntohl(para.VIDEO_SINGLETON::instance ()->frameRateLimit1000); -#endif - VIDEO_SINGLETON::instance ()->frameRateLimit = para.frameRateLimit1000 / 1000.0; - VIDEO_SINGLETON::instance ()->sendPatternGops = para.sendPatternGops; - - if (!timerOn) return; - - VIDEO_SINGLETON::instance ()->needHeader = para.needHeader; - ACE_OS::memcpy (VIDEO_SINGLETON::instance ()->sendPattern, para.sendPattern, PATTERN_SIZE); - if (para.addFrames <= 0 || timerAdjust < MAX_TIMER_ADJUST) - { - timerAdjust += para.addFrames * SPEEDUP_INV_SCALE; - TimerSpeed(); - } - else /* drastic compensation for big gap */ - VIDEO_SINGLETON::instance ()->addedSignals += para.addFrames; - if (para.addUsecPerFrame) { - VIDEO_SINGLETON::instance ()->addedUPF += para.addUsecPerFrame; - TimerSpeed(); - } - /* - SFprintf(stderr, "VS fb: addf %d, addupf %d\n", - para.addFrames, para.addUsecPerFrame); - */ -} - -static int FastVideoPlay(void) -{ - int result; - FFpara para; - int preGroup = -1; - int preHeader = -1; - int nfds = (VIDEO_SINGLETON::instance ()->serviceSocket > VIDEO_SINGLETON::instance ()->videoSocket ? VIDEO_SINGLETON::instance ()->serviceSocket : VIDEO_SINGLETON::instance ()->videoSocket) + 1; - - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.VIDEO_SINGLETON::instance ()->nextGroup = ntohl(para.VIDEO_SINGLETON::instance ()->nextGroup); - para.usecPerFrame = ntohl(para.usecPerFrame); - para.framesPerSecond = ntohl(para.framesPerSecond); - para.VIDEO_SINGLETON::instance ()->VStimeAdvance = ntohl(para.VIDEO_SINGLETON::instance ()->VStimeAdvance); -#endif - - if (VIDEO_SINGLETON::instance ()->live_source) return 0; - - VIDEO_SINGLETON::instance ()->VStimeAdvance = para.VStimeAdvance; - /* - fprintf(stderr, "VIDEO_SINGLETON::instance ()->VStimeAdvance from client: %d\n", VIDEO_SINGLETON::instance ()->VStimeAdvance); - */ - CheckGroupRange(para.nextGroup); - VIDEO_SINGLETON::instance ()->cmdsn = para.sn; - timerGroup = para.nextGroup; - timerFrame = 0; - timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader; - VIDEO_SINGLETON::instance ()->currentUPF = para.usecPerFrame; - StartTimer(); - - for (;;) - { - struct fd_set read_mask; -/* - fprintf(stderr, "VS: FF/FB - a loop begines. . .\n"); -*/ - if (preGroup != timerGroup) - { - SendPacket(preHeader != timerHeader, timerGroup, 0, - para.usecPerFrame * VIDEO_SINGLETON::instance ()->patternSize >> 2); - preHeader = timerHeader; - preGroup = timerGroup; - } - - FD_ZERO(&read_mask); - FD_SET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask); - FD_SET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask); -#ifdef _HPUX_SOURCE - if (select(nfds, (int *)&read_mask, NULL, NULL, NULL) == -1) -#else - if (select(nfds, &read_mask, NULL, NULL, NULL) == -1) -#endif - { - if (errno == EINTR) - { - ACE_DEBUG ((LM_DEBUG, - "PLAYVIDEO:select EINTR signal \n")); - continue; - } - ACE_OS::perror ("Error - VS select between service and video sockets"); - ACE_OS::exit (1); - - } - if (FD_ISSET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask)) /* stop */ - { - result = CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmd, 1); - if (result != 0) - return result; - if (VIDEO_SINGLETON::instance ()->cmd == CmdCLOSE) { - exit(0); - } - else if (VIDEO_SINGLETON::instance ()->cmd != CmdSTOP) { - fprintf(stderr, "VS error: VIDEO_SINGLETON::instance ()->cmd=%d while STOP is expected.\n", VIDEO_SINGLETON::instance ()->cmd); - VIDEO_SINGLETON::instance ()->normalExit = 0; - exit(1); - } - result = CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmdsn, sizeof(int)); - if (result != 0 ) - return result; -#ifdef NeedByteOrderConversion - VIDEO_SINGLETON::instance ()->cmdsn = ntohl(VIDEO_SINGLETON::instance ()->cmdsn); -#endif - StopTimer(); - break; - } - if (FD_ISSET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask)) /* feedback, speed adjustment */ - { - ACE_DEBUG((LM_DEBUG, - "FastVideo Play:Data socket selected")); - GetFeedBack(); - } - ACE_DEBUG((LM_DEBUG, - "none of the sockets selected \n")); - } - return 0; -} - -static void FFvideo() -{ - /* - fprintf(stderr, "FF . . .\n"); - */ - FastVideoPlay(); -} - -static void FBvideo() -{ - /* - fprintf(stderr, "FB . . . \n"); - */ - FastVideoPlay(); -} - -void ComputeFirstSendPattern(float limit) -{ - char * buf = VIDEO_SINGLETON::instance ()->firstSendPattern; - int len = VIDEO_SINGLETON::instance ()->firstPatternSize; - char * pat = (char *)ACE_OS::malloc(len); - int f; - - if (pat == NULL) { - fprintf(stderr, "VS error on allocating %d bytes for computing first SP", len); - ACE_OS::perror (""); - ACE_OS::exit (1); - } - for (f = 0; f < len; f ++) { - pat[f] = VIDEO_SINGLETON::instance ()->frameTable[f].type; - } - memset(buf, 0, len); - - if (limit <= 0) - limit = 1.0; - - f = (int)((double)len * - ((double)limit / (1000000.0 / (double)VIDEO_SINGLETON::instance ()->currentUPF)) + 0.5); - /* rounded to integer, instead of truncated */ - if (f >= len) - f = len; - else if (f <= 1) - f = 1; - - ComputeSendPattern(pat, buf, len, f); - - /* - f = len - f; - fprintf(stderr, "VIDEO_SINGLETON::instance ()->FirstVIDEO_SINGLETON::instance ()->SendVIDEO_SINGLETON::Instance ()->Pattern (%d frames dropped): ", f); - { - int i; - for (i = 0; i < len; i ++) - fputc(buf[i] ? pat[i] : '-', stderr); - } - fputc('\n', stderr); - */ - ACE_OS::free (pat); -} - - int PLAYliveVideo(PLAYpara * para) -{ - int doscale; - int count; - int first_frame; - int frame = para->nextFrame; - int nfds = (VIDEO_SINGLETON::instance ()->serviceSocket > VIDEO_SINGLETON::instance ()->videoSocket ? VIDEO_SINGLETON::instance ()->serviceSocket : VIDEO_SINGLETON::instance ()->videoSocket) + 1; - struct fd_set read_mask; - struct timeval tval = {0, 0}; - double ratio; - int result; - - VIDEO_SINGLETON::instance ()->currentUPF = (int)(1000000.0 / VIDEO_SINGLETON::instance ()->fps); /* ignore para.usecPerFrame */ - if (VIDEO_SINGLETON::instance ()->frameRateLimit < VIDEO_SINGLETON::instance ()->fps) { - doscale = 1; - ratio = min(VIDEO_SINGLETON::instance ()->frameRateLimit, VIDEO_SINGLETON::instance ()->fps) / VIDEO_SINGLETON::instance ()->fps; - first_frame = frame; - count = 0; - /* - fprintf(stderr, "doscale %d, VIDEO_SINGLETON::instance ()->frameRateLimit %5.2f, VIDEO_SINGLETON::instance ()->fps %5.2f, ratio %5.2f\n", - doscale, VIDEO_SINGLETON::instance ()->frameRateLimit, VIDEO_SINGLETON::instance ()->fps, ratio); - */ - } - else doscale = 0; - StartPlayLiveVideo(); - - for (;;) { - - if (doscale) { - for (;;) { - if ((int)((frame - first_frame) * ratio + 0.5) < count) frame ++; - else break; - } - count ++; - } - SendPicture(&frame); - frame ++; - - FD_ZERO(&read_mask); - FD_SET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask); - FD_SET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask); -#ifdef _HPUX_SOURCE - if (select(nfds, (int *)&read_mask, NULL, NULL, &tval) == -1) -#else - if (select(nfds, &read_mask, NULL, NULL, &tval) == -1) -#endif - { - if (errno == EINTR) - continue; - ACE_OS::perror ("Error - VS select between service and video sockets"); - StopPlayLiveVideo(); - ACE_OS::exit (1); - - } - if (FD_ISSET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask)) /* stop */ - { - unsigned char tmp; - result = CmdRead((char *)&tmp, 1); - if (result != 0) - return result; - if (tmp == CmdCLOSE) { - StopPlayLiveVideo(); - exit(0); - } - else if (tmp == CmdSTOP) { - VIDEO_SINGLETON::instance ()->cmd = tmp; - /* - fprintf(stderr, "VS: VIDEO_SINGLETON::Instance ()->CmdSTOP. . .\n"); - */ - result = CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmdsn, sizeof(int)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - VIDEO_SINGLETON::instance ()->cmdsn = ntohl(VIDEO_SINGLETON::instance ()->cmdsn); -#endif - StopPlayLiveVideo(); - break; - } - else if (tmp == CmdSPEED) - { - SPEEDpara para; - /* - fprintf(stderr, "VS: VIDEO_SINGLETON::Instance ()->CmdSPEED. . .\n"); - */ - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; - /* ignore this thing for live video */ - } - else - { - fprintf(stderr, "VS error(live): VIDEO_SINGLETON::instance ()->cmd=%d while expect STOP/SPEED.\n", tmp); - VIDEO_SINGLETON::instance ()->normalExit = 0; - StopPlayLiveVideo(); - exit(1); - } - } - if (FD_ISSET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask)) /* feedback, only for frame rate - adjustment */ - { - VideoFeedBackPara para; - if (FBread((char *)¶, sizeof(para)) == -1 || - ntohl(para.cmdsn) != VIDEO_SINGLETON::instance ()->cmdsn) { - /* - SFprintf(stderr, "VS warning: a FB VIDEO_SINGLETON::instance ()->packet discarded.\n"); - */ - return 0; - } -#ifdef NeedByteOrderConversion - para.VIDEO_SINGLETON::instance ()->frameRateLimit1000 = ntohl(para.VIDEO_SINGLETON::instance ()->frameRateLimit1000); -#endif - VIDEO_SINGLETON::instance ()->frameRateLimit = para.frameRateLimit1000 / 1000.0; - if (VIDEO_SINGLETON::instance ()->frameRateLimit < VIDEO_SINGLETON::instance ()->fps) { - doscale = 1; - ratio = min(VIDEO_SINGLETON::instance ()->frameRateLimit, VIDEO_SINGLETON::instance ()->fps) / VIDEO_SINGLETON::instance ()->fps; - first_frame = frame; - count = 0; - /* - fprintf(stderr, "doscale %d, VIDEO_SINGLETON::instance ()->frameRateLimit %5.2f, VIDEO_SINGLETON::instance ()->fps %5.2f, ratio %5.2f\n", - doscale, VIDEO_SINGLETON::instance ()->frameRateLimit, VIDEO_SINGLETON::instance ()->fps, ratio); - */ - } - else doscale = 0; - } - } - return 0; -} - -static int PLAYvideo() -{ - PLAYpara para; - int preGroup = -1; - int preHeader = -1; - int preFrame = -1; - int result; - - fprintf(stderr, "PLAY . . .\n"); - - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.VIDEO_SINGLETON::instance ()->nextFrame = ntohl(para.VIDEO_SINGLETON::instance ()->nextFrame); - para.usecPerFrame = ntohl(para.usecPerFrame); - para.framesPerSecond = ntohl(para.framesPerSecond); - para.VIDEO_SINGLETON::instance ()->frameRateLimit1000 = ntohl(para.VIDEO_SINGLETON::instance ()->frameRateLimit1000); - para.collectStat = ntohl(para.collectStat); - para.VIDEO_SINGLETON::instance ()->sendVIDEO_SINGLETON::Instance ()->PatternGops = ntohl(para.VIDEO_SINGLETON::instance ()->sendVIDEO_SINGLETON::Instance ()->PatternGops); - para.VIDEO_SINGLETON::instance ()->VStimeAdvance = ntohl(para.VIDEO_SINGLETON::instance ()->VStimeAdvance); -#endif - - VIDEO_SINGLETON::instance ()->frameRateLimit = para.frameRateLimit1000 / 1000.0; - VIDEO_SINGLETON::instance ()->cmdsn = para.sn; - VIDEO_SINGLETON::instance ()->currentUPF = para.usecPerFrame; - VIDEO_SINGLETON::instance ()->VStimeAdvance = para.VStimeAdvance; - - { - int ts = htonl(get_usec()); - CmdWrite((char *)&ts, sizeof(int)); - } - - if (VIDEO_SINGLETON::instance ()->live_source || VIDEO_SINGLETON::instance ()->video_format != VIDEO_MPEG1) { - if (VIDEO_SINGLETON::instance ()->live_source) - PLAYliveVideo (¶); - return 0; - } - - - fprintf(stderr, "VIDEO_SINGLETON::instance ()->VStimeAdvance from client: %d\n", VIDEO_SINGLETON::instance ()->VStimeAdvance); - - VIDEO_SINGLETON::instance ()->sendPatternGops = para.sendPatternGops; - ComputeFirstSendPattern(VIDEO_SINGLETON::instance ()->frameRateLimit); -#ifdef STAT - if (para.collectStat) - memset(VIDEO_SINGLETON::instance ()->framesSent, 0, (VIDEO_SINGLETON::instance ()->numF + 7)>>3); -#endif - CheckFrameRange(para.nextFrame); - timerFrame = para.nextFrame; - timerGroup = FrameToGroup(&timerFrame); - timerHeader = VIDEO_SINGLETON::instance ()->gopTable[timerGroup].systemHeader; - ACE_OS::memcpy (VIDEO_SINGLETON::instance ()->sendPattern, para.sendPattern, PATTERN_SIZE); - result = SendReferences(timerGroup, timerFrame); - if (result < 0) - return result; - StartTimer(); - - fprintf (stderr, "VS Going into the for loop\n"); - for (;;) - { - int curGroup = timerGroup; - int curFrame = timerFrame; - int curHeader = timerHeader; - char * sp; - struct fd_set read_mask; - int nfds = (VIDEO_SINGLETON::instance ()->serviceSocket > VIDEO_SINGLETON::instance ()->videoSocket ? VIDEO_SINGLETON::instance ()->serviceSocket : VIDEO_SINGLETON::instance ()->videoSocket) + 1; - - if (preGroup != curGroup || curFrame != preFrame) - { - int sendStatus = -1; - int frameStep = 1; - if (curGroup == 0) - { - int i = curFrame + 1; - while (i < VIDEO_SINGLETON::instance ()->firstPatternSize && !VIDEO_SINGLETON::instance ()->firstSendPattern[i]) - { - frameStep ++; - i++; - } - } - else /* (curGroup > 0) */ - { - int i = curFrame + 1; - sp = VIDEO_SINGLETON::instance ()->sendPattern + ((curGroup - 1) % VIDEO_SINGLETON::instance ()->sendPatternGops) * VIDEO_SINGLETON::instance ()->patternSize; - while (i < VIDEO_SINGLETON::instance ()->patternSize && !sp[i]) - { - frameStep ++; - i++; - } - } - if (curGroup == 0) - { - if (VIDEO_SINGLETON::instance ()->firstSendPattern[curFrame]) - sendStatus = 0; - else /* (!VIDEO_SINGLETON::instance ()->firstVIDEO_SINGLETON::instance ()->SendVIDEO_SINGLETON::Instance ()->Pattern[curFrame]) */ - { - int i = curFrame - 1; - while (i > 0 && !VIDEO_SINGLETON::instance ()->firstSendPattern[i]) - i--; - if (i > preFrame) - /* the frame (curGroup, i) hasn't been sent yet */ - { - sendStatus = 0; - curFrame = i; - } - else - sendStatus = -1; - } - } - else if (sp[curFrame]) /* curGroup > 0 */ - sendStatus = 0; - else /* (!sp[curFrame]) */ - { - int i = curFrame - 1; - while (i > 0 && !sp[i]) - i--; - if (curGroup == preGroup && i > preFrame) - /* the frame (curGroup, i) hasn't been sent yet */ - { - sendStatus = 0; - curFrame = i; - } - else - sendStatus = -1; - } - if (!sendStatus) - { - // Send the current video frame, calls send_to_network which - // fragments and sends via blocking write . - sendStatus = SendPacket(preHeader != curHeader, - curGroup, curFrame, - (VIDEO_SINGLETON::instance ()->currentUPF + VIDEO_SINGLETON::instance ()->addedUPF) * frameStep); - if (!sendStatus) - { - preHeader = curHeader; - preGroup = curGroup; - preFrame = curFrame; -#ifdef STAT - if (para.collectStat) - { - int f = VIDEO_SINGLETON::instance ()->gopTable[curGroup].previousFrames + curFrame; - VIDEO_SINGLETON::instance ()->framesSent[f>>3] |= (1 << (f % 8)); - } -#endif - } - } - } - - // Wait for a command on serviceSocket or Feedback on videoSocket (UDP) - FD_ZERO(&read_mask); - FD_SET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask); - FD_SET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask); -#ifdef _HPUX_SOURCE - if (select(nfds, (int *)&read_mask, NULL, NULL, NULL) == -1) -#else - if (select(nfds, &read_mask, NULL, NULL, NULL) == -1) -#endif - { - if (errno == EINTR) /* select() interrupted */ - { - ACE_DEBUG ((LM_DEBUG, - "PLAYVideo:Select interrupted coninuing..\n")); - continue; - } - ACE_OS::perror ("Error - VS select between service and video sockets"); - ACE_OS::exit (1); - - } - if (FD_ISSET(VIDEO_SINGLETON::instance ()->serviceSocket, &read_mask)) /* stop, speed change, loop swap */ - { - ACE_DEBUG ((LM_DEBUG, - "PLAYvideo:serviceSocket selected \n")); - unsigned char tmp; - result = CmdRead((char *)&tmp, 1); - if (result != 0) - return result; - - if (tmp == CmdCLOSE) { - exit(0); - } - else if (tmp == CmdSTOP) { - VIDEO_SINGLETON::instance ()->cmd = tmp; - /* - fprintf(stderr, "VS: VIDEO_SINGLETON::Instance ()->CmdSTOP. . .\n"); - */ - result = CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmdsn, sizeof(int)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - VIDEO_SINGLETON::instance ()->cmdsn = ntohl(VIDEO_SINGLETON::instance ()->cmdsn); -#endif - StopTimer(); - break; - } - else if (tmp == CmdSPEED) - { - SPEEDpara para; - /* - fprintf(stderr, "VS: VIDEO_SINGLETON::Instance ()->CmdSPEED. . .\n"); - */ - result = CmdRead((char *)¶, sizeof(para)); - if (result != 0) - return result; -#ifdef NeedByteOrderConversion - para.sn = ntohl(para.sn); - para.usecPerFrame = ntohl(para.usecPerFrame); - para.framesPerSecond = ntohl(para.framesPerSecond); - para.sendPatternGops = ntohl(para.sendPatternGops); - para.frameRateLimit1000 = ntohl(para.frameRateLimit1000); -#endif - VIDEO_SINGLETON::instance ()->frameRateLimit = para.frameRateLimit1000 / 1000.0; - VIDEO_SINGLETON::instance ()->sendPatternGops = para.sendPatternGops; - VIDEO_SINGLETON::instance ()->currentUPF = para.usecPerFrame; - VIDEO_SINGLETON::instance ()->addedUPF = 0; - memcpy(VIDEO_SINGLETON::instance ()->sendPattern, para.sendPattern, PATTERN_SIZE); - TimerSpeed(); - } - else - { - fprintf(stderr, "VS error: VIDEO_SINGLETON::instance ()->cmd=%d while expect STOP/SPEED.\n", tmp); - VIDEO_SINGLETON::instance ()->normalExit = 0; - exit(1); - } - } - if (FD_ISSET(VIDEO_SINGLETON::instance ()->videoSocket, &read_mask)) /* feedBack, speed adjustment */ - { - ACE_DEBUG ((LM_DEBUG, - "PLAYVIDEO:Data SOCKET selected\n")); - GetFeedBack(); - } - ACE_DEBUG ((LM_DEBUG, - "PLAYVIDEO:none selected\n")); - } - return 0; -} - -#include - -static void STATstream(void) -{ - int i, j = 0; - for (i = 0; i < VIDEO_SINGLETON::instance ()->numF; i++) - { - short size = htons(VIDEO_SINGLETON::instance ()->frameTable[i].size); - char type = VIDEO_SINGLETON::instance ()->frameTable[i].type; - if (i == VIDEO_SINGLETON::instance ()->gopTable[j].previousFrames) - { - type = tolower(type); - j ++; - } - CmdWrite((char *)&type, 1); - CmdWrite((char *)&size, 2); - } -} - -static void STATsent(void) -{ -#ifdef STAT - CmdWrite((char *)VIDEO_SINGLETON::instance ()->framesSent, (VIDEO_SINGLETON::instance ()->numF + 7) / 8); -#else - int i; - char zeroByte = 0; - for (i = 0; i < (VIDEO_SINGLETON::instance ()->numF + 7) / 8; i++) - CmdWrite((char *)&zeroByte, 1); -#endif -} - -static void on_exit_routine(void) -{ - struct sockaddr_in peeraddr_in; - int size = sizeof(peeraddr_in); - /* - if (!VIDEO_SINGLETON::instance ()->normalExit) { - fprintf(stderr, "VS exitting abnormally, dump core...\n"); - ACE_OS::kill (getpid(), SIGSEGV); - usleep(2000000); - } - */ - /* - fprintf(stderr, "A VS session terminated.\n"); - */ - if (getpeername(VIDEO_SINGLETON::instance ()->serviceSocket, - (struct sockaddr *)&peeraddr_in, &size) == 0 && - peeraddr_in.sin_family == AF_INET) { - if (strncmp(inet_ntoa(peeraddr_in.sin_addr), "129.95.50", 9)) { - struct hostent *hp; - time_t val =ACE_OS::time (NULL); - char * buf = ACE_OS::ctime (&VIDEO_SINGLETON::instance ()->start_time); - - hp = gethostbyaddr((char *)&(peeraddr_in.sin_addr), 4, AF_INET); - buf[strlen(buf)-1] = 0; - printf("%s: %s %3dm%02ds %dP %s\n", - buf, - hp == NULL ? inet_ntoa(peeraddr_in.sin_addr) : hp->h_name, - (val - VIDEO_SINGLETON::instance ()->start_time) / 60, (val - VIDEO_SINGLETON::instance ()->start_time) % 60, - VIDEO_SINGLETON::instance ()->pkts_sent, VIDEO_SINGLETON::instance ()->videoFile); - } - } - ComCloseConn(VIDEO_SINGLETON::instance ()->serviceSocket); - ComCloseConn(VIDEO_SINGLETON::instance ()->videoSocket); -} - -int VideoServer(int ctr_fd, int data_fd, int rttag, int max_pkt_size) -{ - int result; - - VIDEO_SINGLETON::instance ()->serviceSocket = ctr_fd; - VIDEO_SINGLETON::instance ()->videoSocket = data_fd; - VIDEO_SINGLETON::instance ()->conn_tag = max_pkt_size; - - if (max_pkt_size > 0) VIDEO_SINGLETON::instance ()->msgsize = max_pkt_size; - else if (max_pkt_size < 0) VIDEO_SINGLETON::instance ()->msgsize = - max_pkt_size; - else VIDEO_SINGLETON::instance ()->msgsize = 1024 * 1024; - /* - SFprintf(stderr, "VS VIDEO_SINGLETON::instance ()->msgsize = %d\n", VIDEO_SINGLETON::instance ()->msgsize); - */ - VIDEO_SINGLETON::instance ()->msgsize -= sizeof(VideoMessage); - - VIDEO_SINGLETON::instance ()->start_time =ACE_OS::time (NULL); - - atexit(on_exit_routine); - - VIDEO_SINGLETON::instance ()->lastRef[0] = VIDEO_SINGLETON::instance ()->lastRef[1] = -1; - VIDEO_SINGLETON::instance ()->lastRefPtr = 0; - - result = INITvideo(); - - if (result != 0) - return result; - - if (rttag) { - if (SetRTpriority("VS", 0) == -1) rttag = 0; - } - - for (;;) - { - - fprintf(stderr, "VS: waiting for a new command...\n"); - - VIDEO_SINGLETON::instance ()->precmd = VIDEO_SINGLETON::instance ()->cmd; - result = CmdRead((char *)&VIDEO_SINGLETON::instance ()->cmd, 1); - if (result != 0) - { - // cerr << result; - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) VideoServer "), - result); - } - fprintf(stderr, "VS got VIDEO_SINGLETON::instance ()->cmd %d\n", VIDEO_SINGLETON::instance ()->cmd); - - switch (VIDEO_SINGLETON::instance ()->cmd) - { - case CmdPOSITION: - case CmdPOSITIONrelease: - result = POSITIONvideo(); - if (result != 0) - return result; - break; - case CmdSTEP: - result = STEPvideo(); - if (result != 0) - return result; - break; - case CmdFF: - FFvideo(); - break; - case CmdFB: - FBvideo(); - break; - case CmdPLAY: - result = PLAYvideo(); - if (result != 0) - return result; - break; - case CmdCLOSE: - /* - fprintf(stderr, "a session closed.\n"); - VIDEO_SINGLETON::instance ()->normalExit =1; - */ - // ACE_OS::exit (0); - return 0; - break; - case CmdSTATstream: - STATstream(); - break; - case CmdSTATsent: - STATsent(); - break; - default: - fprintf(stderr, - "VS error: video channel command %d not known.\n", VIDEO_SINGLETON::instance ()->cmd); - VIDEO_SINGLETON::instance ()->normalExit = 0; - return -1; - break; - } - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_Control.idl b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_Control.idl deleted file mode 100644 index 0719e784c3b..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_Control.idl +++ /dev/null @@ -1,78 +0,0 @@ -// -*- C++ -*- - -// $Id$ - -interface Audio_Control -{ - typedef sequence my_seq_char; - - struct AudioParameter - { - long encodeType; - long channels; - long samplesPerSecond; - long bytesPerSample; - }; - - - /* CmdINITaudio parameter of fixed structure of 3 integers and a AudioPara, - replys with CmdINITaudio followed by reply or CmdFAIL followed by a string */ - struct INITaudioPara - { - long sn; - long version; - AudioParameter para; - long nameLength; - my_seq_char audiofile; - /* char audioFile[] */ - }; - - struct INITaudioReply - { - long live; - long format; - AudioParameter para; - long totalSamples; - }; - - - /* CmdPLAY parameter */ - struct PLAYPara - { - long sn; - long nextSample; - long samplesPerSecond; /* audio playback speed */ - long samplesPerPacket; /* Number of samples in a packet */ - long ABsamples; /* size of client VB buffer in samples */ - long spslimit; /* QoS parameter: sps supported by the audio channel */ - }; - - /* STOP followed only by SN */ - - /* CmdSPEED parameter */ - struct SPEEDPara - { - long sn; - long samplesPerSecond; - long samplesPerPacket; /* Number of samples in a packet */ - long spslimit; - }; - - boolean init_audio (in INITaudioPara para, - out INITaudioReply reply_para); - boolean play (in PLAYPara para, out long ats); - - boolean speed (in SPEEDPara para); - - boolean stop (in long cmdsn); - - oneway void close (); - - boolean set_peer (inout string peer); - // Initializes the server to communicate to the , which can be - // "ip-number:port-number" (e.g., "tango.cs.wustl.edu:1234" or - // "128.252.166.57:1234"). If there is no ':' in the
it - // is assumed to be a port number, with the IP address being - // INADDR_ANY. - // Server returns it's UDP data port number. -}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/MMDevice_Exporter.idl b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/MMDevice_Exporter.idl deleted file mode 100644 index 2cee7d3f2d5..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/MMDevice_Exporter.idl +++ /dev/null @@ -1,8 +0,0 @@ -// $Id$ -#include "CosPropertyService.idl" - -interface MMDevice_Exporter : CosPropertyService::PropertySet -{ - Object get_audio_mmdevice (); - Object get_video_mmdevice (); -}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Makefile deleted file mode 100644 index 63568534b56..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Makefile +++ /dev/null @@ -1,174 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -MAKEFILE = Makefile -LIBNAME = libmpeg_shared -LIB = $(LIBNAME).a -SHLIB = $(LIBNAME).$(SOEXT) - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -#TAO_IDLFLAGS = -Wb,export_macro=TAO_ORBSVCS_Export -Wb,export_include=orbsvcs_export.h - -IDL_FILES = Video_ControlS Video_ControlC Audio_ControlS Audio_ControlC ReceiverS ReceiverC MMDevice_ExporterC MMDevice_ExporterS - -# On non-Windows environment, we should at least define -# the export_include IDL flag. -override TAO_IDLFLAGS += \ - -I$(TAO_ROOT)/orbsvcs/orbsvcs - -FILES = $(IDL_FILES) - -DEFS = $(addsuffix .h,$(FILES)) -LSRC = $(addsuffix .cpp,$(FILES)) - -FILES += com fileio filters routine sendpt - -LDFLAGS += -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs $(TSS_ORB_FLAG) -I$(TAO_ROOT)/orbsvcs/orbsvcs - -MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source -CPPFLAGS += -I$(MPEG_ROOT) - -LIBS += -lTAO -lACE - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets (and local hacks) -#---------------------------------------------------------------------------- - -##LDFLAGS += -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs $(TSS_ORB_FLAG) -CPPFLAGS += -DSH_MEM -DNDEBUG - -.PRECIOUS: Video_ControlS.cpp Video_ControlC.cpp Audio_ControlS.cpp Audio_ControlC.cpp - -idl_stubs: $(addsuffix .h, $(IDL_FILES)) - -clean: - -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state - -realclean: clean - -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES)) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/com.o .obj/com.so .shobj/com.o .shobj/com.so: com.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i fileio.h \ - routine.h com.h -.obj/fileio.o .obj/fileio.so .shobj/fileio.o .shobj/fileio.so: fileio.cpp routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i fileio.h -.obj/filters.o .obj/filters.so .shobj/filters.o .shobj/filters.so: filters.cpp filters.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/routine.o .obj/routine.so .shobj/routine.o .shobj/routine.so: routine.cpp routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i -.obj/sendpt.o .obj/sendpt.so .shobj/sendpt.o .shobj/sendpt.so: sendpt.cpp sendpt.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Receiver.idl b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Receiver.idl deleted file mode 100644 index 19589c057b2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Receiver.idl +++ /dev/null @@ -1,7 +0,0 @@ -/* _*_C++_*_ */ - -// $Id$ -interface Receiver -{ - void push_mmdevice (in Object audio_mmdevice,in string audio_file,in Object video_mmdevice,in string video_file); -}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control.idl b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control.idl deleted file mode 100644 index 2c9a5ade7f2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_Control.idl +++ /dev/null @@ -1,112 +0,0 @@ -// -*- C++ -*- - -// $Id$ - -interface Video_Control -{ - - typedef sequence my_seq_char; - const long VIDEO_PATTERN_SIZE = 100; - struct INITvideoPara - { - long sn; - long version; - my_seq_char videofile; - }; - - struct INITvideoReply - { - long live; - long format; - - long totalHeaders; - long totalFrames; - long totalGroups; - long horizontalSize; - long verticalSize; - long pelAspectRatio; - long pictureRate1000; - long vbvBufferSize; - long sizeIFrame; - long sizePFrame; - long sizeBFrame; - long sizeSystemHeader; - long sizeGop; - long averageFrameSize; - long firstGopFrames; - my_seq_char pattern; - }; - - /* CmdPOSITION, CmdPOSITIONrelease: followed by following parameter */ - struct POSITIONpara - { - long sn; - long nextGroup; - }; - - /* CmdSTEP: followed by following parameter */ - struct STEPpara - { - long sn; - long nextFrame; - }; - - /* CmdFF, CmdFB: followed by following parameter */ - struct FFpara - { - long sn; - long nextGroup; - long usecPerFrame; - long framesPerSecond; - long VStimeAdvance; - }; - - typedef FFpara FBpara; - - /*CmdPLAY: followed by following parameter */ - struct PLAYpara - { - long sn; - long collectStat; - long nextFrame; - long usecPerFrame; - long framesPerSecond; - long frameRateLimit1000; - long VStimeAdvance; - long sendPatternGops; - my_seq_char sendPattern; - }; - - /* CmdSPEED: parameter */ - struct SPEEDpara - { - long sn; - long usecPerFrame; - long framesPerSecond; - long frameRateLimit1000; - long sendPatternGops; - my_seq_char sendPattern; - }; - - - boolean init_video (in INITvideoPara para, - out INITvideoReply reply_para); - boolean stat_stream (out char ch, out long size); - oneway void close (); - boolean stat_sent (); - boolean fast_forward (in FFpara para); - boolean fast_backward (in FFpara para); - boolean step (in STEPpara para); - boolean play (in PLAYpara para, out long vts); - boolean position (in POSITIONpara para); - boolean speed (in SPEEDpara para); - boolean stop (in long cmdsn); - - boolean set_peer (inout string peer); - // Initializes the server to communicate to the , which can be - // "ip-number:port-number" (e.g., "tango.cs.wustl.edu:1234" or - // "128.252.166.57:1234"). If there is no ':' in the
it - // is assumed to be a port number, with the IP address being - // INADDR_ANY. - // Server returns it's UDP data port number. -}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.cpp deleted file mode 100644 index df6bb1229a1..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.cpp +++ /dev/null @@ -1,2136 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -#include "include/common.h" -#include "fileio.h" -#include "routine.h" -#include "com.h" -#include "ace/OS.h" - -#ifdef NATIVE_ATM -#include "atmcom.h" -#endif - -ACE_RCSID(mpeg_shared, com, "$Id$") - -#define CONN_INET 1 -#define CONN_UNIX 2 -#define CONN_ATM 3 - -#define SERVER_FDTABLE_SIZE 50 -#define CLIENT_FDTABLE_SIZE 10 - -#define STATE_PENDING 1 -#define STATE_CONTROL 2 -#define STATE_DATA 3 -#define STATE_SINGLE 4 - -static int inet_port; -static char * unix_port, * atm_port; - -static struct FdTable -{ - int fd; /* -1 -- free item, >=0 -- fd value */ - int type; - unsigned stime; /* setup time, in seconds */ - int state; -} * fdTable = NULL; -static int size = 0; - -int ComInitClient(int pinet_port, char * punix_port, char * patm_port) -{ - int i; - - inet_port = pinet_port; - unix_port = punix_port; - atm_port = patm_port; - if (size) { - fprintf(stderr, - "Error ComInitClient: pid %d already done ComInitClient/Server\n", - ACE_OS::getpid ()); - return -1; - } - size = CLIENT_FDTABLE_SIZE; - fdTable = (struct FdTable *)ACE_OS::malloc(size * sizeof(*fdTable)); - if (fdTable == NULL) { - fprintf(stderr, - "Error ComInitClient: pid %d failed to allocated fdTable space:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - for (i = 0; i < size; i ++) { - fdTable[i].fd = -1; - } -#ifdef NATIVE_ATM - return ATMinitClient(atm_port); -#else - return 0; -#endif -} - -void ComCloseClient(void) -{ - int i; - for (i = 0; i < size; i ++) { - if (fdTable[i].fd >= 0) ComCloseConn(fdTable[i].fd); - } -#ifdef NATIVE_ATM - ATMcloseClient(); -#endif - return; -} - -int ComCloseFd(int fd) -{ - int i; - if (!size) { - fprintf(stderr, - "Error ComCloseFd: pid %d not done ComInitClient/Server yet.\n", - ACE_OS::getpid ()); - return -1; - } - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == fd) break; - } - if (i < size) { - fdTable[i].fd = -1; - if (fdTable[i].type == CONN_ATM) { -#ifdef NATIVE_ATM - return ATMcloseFd(fd); -#else - fprintf(stderr, - "Error ComCloseFd: pid %d CONN_ATM not supported.\n", - ACE_OS::getpid ()); - return -1; -#endif - } - else { - ACE_OS::close (fd); - } - return 0; - } - else { - fprintf(stderr, - "Error ComCloseFd: pid %d can't find fd %d in table\n", - ACE_OS::getpid (), fd); - return -1; - } -} - -int ComCloseConn(int fd) -{ - int i; - if (!size) { - fprintf(stderr, - "Error ComCloseConn: pid %d not done ComInitClient/Server yet.\n", - ACE_OS::getpid ()); - return -1; - } - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == fd) break; - } - if (i < size) { - fdTable[i].fd = -1; - if (fdTable[i].type == CONN_ATM) { -#ifdef NATIVE_ATM - return ATMcloseConn(fd); -#else - fprintf(stderr, - "Error ComCloseConn: pid %d CONN_ATM not supported.\n", - ACE_OS::getpid ()); - return -1; -#endif - } - else { - ACE_OS::close (fd); - } - return 0; - } - else { - fprintf(stderr, - "Error ComCloseConn: pid %d can't find fd %d in table\n", - ACE_OS::getpid (), fd); - return -1; - } -} - -int ComOpenConnPair(char * address, int *ctr_fd, int *data_fd, int *max_pkt_size) -{ - - // This is right now called only by the audio client. - // The protocol is slightly modified as after connecting we need to - // inform that we are a audio client so that it can fork a process. - int i; - int cfd, dfd, csocktype, dsocktype; - int conn_tag = !(*max_pkt_size); - struct sockaddr_in addressIn; - struct sockaddr_un addressUn; - - if (!size) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d not done ComInitClient/Server yet.\n", - ACE_OS::getpid ()); - return -1; - } - - cfd = 0; - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == -1) cfd ++; - } - if (cfd < 2) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d no faTable entry for the pair", - ACE_OS::getpid ()); - return -1; - } - - /* tell the type of connections to establish: - If the server is on the same host, then UNIX socket is used */ - if (address[0] == 0) { - csocktype = CONN_UNIX; - dsocktype = CONN_UNIX; - } - else if (!strncasecmp(address, "atm:", 4)) { - address += 4; - csocktype = CONN_ATM; - dsocktype = CONN_ATM; - } - else if (!strncasecmp(address, "datm:", 5)) { - address += 5; - csocktype = CONN_INET; - dsocktype = CONN_ATM; - } - else { - csocktype = CONN_INET; - dsocktype = CONN_INET; - } - if (csocktype == CONN_INET || dsocktype == CONN_INET) { - struct hostent *hp; - char hostname[100]; - addressIn.sin_family = AF_INET; - if (!strncasecmp(address, "inet:", 5)) { - address += 5; - } - if (isascii(address[0]) && isdigit(address[0])) - addressIn.sin_addr.s_addr = inet_addr(address); - else { - if ((hp = gethostbyname(address)) == NULL) { /* No such host! */ - fprintf(stderr, - "Error ComOpenConnPair: pid %d host %s can't be found:", - getpid(), address); - perror(""); - return -1; - } - if (hp->h_addrtype != AF_INET) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d host %s is not of INET type address.\n", - getpid(), address); - return -1; - } - ACE_OS::memcpy ((char *)&addressIn.sin_addr.s_addr, (char *)hp->h_addr, - sizeof(addressIn.sin_addr.s_addr)); - /* - bcopy((char *)hp->h_addr, (char *)&addressIn.sin_addr.s_addr, - sizeof(addressIn.sin_addr.s_addr)); - */ - } - if (get_hostname(hostname, 100)) { - fprintf(stderr, "Error ComOpenConnPair: pid %d failed to get_hostname:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - if ((hp = gethostbyname(hostname)) == NULL) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to its own IP address:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - if (hp->h_addrtype != AF_INET) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d own address is not INET type", - ACE_OS::getpid ()); - return -1; - } - - if (!memcmp((char *)hp->h_addr, (char *)&addressIn.sin_addr.s_addr, - sizeof(addressIn.sin_addr.s_addr))) { - if (csocktype == CONN_INET) csocktype = CONN_UNIX; - if (dsocktype == CONN_INET) dsocktype = CONN_UNIX; - } - } - - /* build appropriate type of Connections to Server */ - if (csocktype == CONN_UNIX && dsocktype == CONN_UNIX) { - /* build UNIX connection to server */ - addressUn.sun_family = AF_UNIX; - strncpy(addressUn.sun_path, unix_port, - sizeof(struct sockaddr_un) - sizeof(short)); - cfd = socket(AF_UNIX, SOCK_STREAM, 0); - if (cfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open UNIX cfd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - usleep(10000); /* this is for waiting for the uncaught signal mentioned - below */ - if (connect(cfd, (struct sockaddr *)&addressUn, sizeof(addressUn)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to conn UNIX cfd to server:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - i = -3; /* I don't understand why when connect() returns EINTR, the connection - is still built, and the other end can still get what written at - this end, 'i = -3' is a garbage to be written. */ - ACE_OS::write (cfd, &i, 4); - ACE_OS::close (cfd); - return -1; - } - if (time_write_int(cfd, -1) == -1 || time_read_int(cfd, &i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write -1 to UNIX cfd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (cfd); - return -1; - } - - dfd = socket(AF_UNIX, SOCK_STREAM, 0); - if (dfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open UNIX dfd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (cfd); - return -1; - } - usleep(10000); - if (connect(dfd, (struct sockaddr *)&addressUn, sizeof(addressUn)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to conn UNIX dfd to server:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - i = -3; - ACE_OS::write (dfd, &i, 4); - ACE_OS::close (cfd); - ACE_OS::close (dfd); - return -1; - } - if (time_write_int(dfd, i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write (cfd) to UNIX dfd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (cfd); - ACE_OS::close (dfd); - return -1; - } - *max_pkt_size = 0; - } - else if (csocktype == CONN_INET && dsocktype == CONN_INET) { - /* build TCP connection to server */ - addressIn.sin_port = htons(inet_port); - cfd = socket(AF_INET, SOCK_STREAM, 0); - if (cfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open TCP cfd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - usleep(10000); - if (connect(cfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to conn TCP cfd to server:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - i = -3; - ACE_OS::write (cfd, &i, 4); - ACE_OS::close (cfd); - return -1; - } - if (conn_tag) { /* create a second connection with server */ - if (time_write_int(cfd, -1) == -1 || time_read_int(cfd, &i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write -1 to TCP cfd:", - getpid()); - perror(""); - close(cfd); - return -1; - } - dfd = socket(AF_INET, SOCK_STREAM, 0); - if (dfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open TCP dfd:", - getpid()); - perror(""); - close(cfd); - return -1; - } - usleep(10000); - if (connect(dfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to conn TCP dfd to server:", - getpid()); - perror(""); - i = -3; - write(dfd, &i, 4); - close(cfd); - close(dfd); - return -1; - } - if (time_write_int(dfd, i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write (cfd) to TCP dfd:", - getpid()); - perror(""); - close(cfd); - close(dfd); - return -1; - } - *max_pkt_size = 0; - } - else { /* create a UDP socket for data */ - // Write a byte saying that we are a audio client. - - if (time_write_int(cfd,CmdINITaudio) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write -2 to TCP cfd:", - getpid()); - perror(""); - close(cfd); - close(dfd); - return -1; - } - - dfd = socket(AF_INET, SOCK_DGRAM, 0); - if (dfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open UDP dfd:", - getpid()); - perror(""); - close(cfd); - return -1; - } - memset((char *)&addressIn, 0, sizeof(addressIn)); - - i = sizeof(addressIn); - if (getsockname(cfd, (struct sockaddr *)&addressIn, &i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to getsocketname on TCP cfd:", - getpid()); - perror(""); - close(dfd); - close(cfd); - return -1; - } - - addressIn.sin_family = AF_INET; - addressIn.sin_port = 0; - if (bind(dfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to bind UDP dfd:", - getpid()); - perror(""); - close(cfd); - close(dfd); - return -1; - } - if (time_write_int(cfd, -2) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write -2 to TCP cfd:", - getpid()); - perror(""); - close(cfd); - close(dfd); - return -1; - } - - i = sizeof(addressIn); - if (getsockname(dfd, (struct sockaddr *)&addressIn, &i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to getsocketname on UDP fd:", - getpid()); - perror(""); - close(dfd); - close(cfd); - return -1; - } - if (time_write_bytes(cfd, (char *)&addressIn.sin_port, sizeof(short)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write (port) to TCP cfd:", - getpid()); - perror(""); - close(dfd); - close(cfd); - return -1; - } - - fprintf(stderr, "ComOpenConnPair local UDP socket: addr - %s,%d, port - %u.\n", - inet_ntoa(addressIn.sin_addr), addressIn.sin_addr.s_addr,ntohs(addressIn.sin_port)); - - - fprintf(stderr, "ComOpenConnPair UDP port %d (should be > 0)\n", - ntohs(addressIn.sin_port)); - - - i = sizeof(addressIn); - if (getsockname(cfd, (struct sockaddr *)&addressIn, &i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to getsocketname on TCP cfd:", - getpid()); - perror(""); - close(dfd); - close(cfd); - return -1; - } - - if (time_write_bytes(cfd, (char *)&addressIn.sin_addr.s_addr, sizeof(int)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write (IP addr) to TCP cfd:", - getpid()); - perror(""); - close(dfd); - close(cfd); - return -1; - } - - fprintf(stderr, "ComOpenConnPair TCP cfd socket: addr - %s, port - %u.\n", - inet_ntoa(addressIn.sin_addr), ntohs(addressIn.sin_port)); - - if (time_read_bytes(cfd, (char *)&addressIn.sin_port, sizeof(short)) == -1 || - time_read_bytes(cfd, (char *)&addressIn.sin_addr.s_addr, sizeof(int)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to read (IP addr/port) from TCP cfd:", - getpid()); - perror(""); - close(dfd); - close(cfd); - return -1; - } - usleep(10000); - if (connect(dfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed conn UDP dfd to peer:", - getpid()); - perror(""); - close(cfd); - close(dfd); - return -1; - } - - fprintf(stderr, "ComOpenConnPair UDP dfd connects to host-%s (port %u)\n", - inet_ntoa(addressIn.sin_addr), - ntohs(addressIn.sin_port)); - -#ifndef LINUX - /* adjust the dfd REVBUF size */ - { - int len; - len = INET_SOCKET_BUFFER_SIZE + 100; - /* - if (setsockopt(dfd, SOL_SOCKET, SO_SNDBUF, (char *)&len, sizeof(len)) == -1) { - fprintf(stderr, - "Warning ComOpenConnPair: pid %d failed to set UDP dfd-snd to size %d:", - ACE_OS::getpid (), len); - ACE_OS::perror (""); - ACE_OS::close (dfd); - ACE_OS::close (cfd); - return -1; - } - */ - len = 65536; - while (setsockopt(dfd, SOL_SOCKET, SO_RCVBUF, (char *)&len, sizeof(len)) == -1) { - len -= 1024; - if (len < 8192) break; - /* - fprintf(stderr, - "Warning ComOpenConnPair: pid %d failed to set UDP dfd-rcv to size %d:", - ACE_OS::getpid (), len); - ACE_OS::perror (""); - ACE_OS::close (dfd); - ACE_OS::close (cfd); - return -1; - */ - } - if (getuid() == DEVELOPER_UID) - fprintf(stderr, "Set UDP dfd-rcv to %dB\n", len); - } -#endif - *max_pkt_size = - INET_SOCKET_BUFFER_SIZE; - /* UDP sockets on HP and SUN are discard mode */ - } - if (setsockopt(cfd, IPPROTO_TCP, TCP_NODELAY, - (const char *)&i, sizeof(i)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to setsockopt on TCP cfd with TCP_NODELAY:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (dfd); - ACE_OS::close (cfd); - return -1; - } - } - else if (dsocktype == CONN_ATM) { /* CONN_ATM */ -#ifdef NATIVE_ATM - if (csocktype == CONN_INET) { - /* build TCP connection to server */ - addressIn.sin_port = htons(inet_port); - cfd = socket(AF_INET, SOCK_STREAM, 0); - if (cfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open TCP1 cfd:", - getpid()); - perror(""); - return -1; - } - usleep(10000); - if (connect(cfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to conn TCP1 cfd to server:", - getpid()); - perror(""); - i = -3; - write(cfd, &i, 4); - close(cfd); - return -1; - } - } - else if (csocktype == CONN_UNIX) { - /* build UNIX connection to server */ - addressUn.sun_family = AF_UNIX; - strncpy(addressUn.sun_path, unix_port, - sizeof(struct sockaddr_un) - sizeof(short)); - cfd = socket(AF_UNIX, SOCK_STREAM, 0); - if (cfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open UNIX1 cfd:", - getpid()); - perror(""); - return -1; - } - usleep(10000); /* this is for waiting for the uncaught signal mentioned - below */ - if (connect(cfd, (struct sockaddr *)&addressUn, sizeof(addressUn)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to conn UNIX1 cfd to server:", - getpid()); - perror(""); - i = -3; /* I don't understand why when select() returns EINTR, the connection - is still built, and the other end can still get what written at - this end, 'i = -3' is a garbage to be written. */ - write(cfd, &i, 4); - close(cfd); - return -1; - } - } - else { /* CONN_ATM */ - cfd = ATMopenConn(address, max_pkt_size); - if (cfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open ATM cfd conn:", - getpid()); - perror(""); - return -1; - } - usleep(100000); /* be nice to buggy ATM driver */ - } - if (time_write_int(cfd, -1) == -1 || time_read_int(cfd, &i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write -1 to %s cfd:", - ACE_OS::getpid (), - (csocktype == CONN_UNIX) ? "UNIX1" : - (csocktype == CONN_INET) ? "INET1" : "ATM"); - ACE_OS::perror (""); - if (csocktype == CONN_ATM) ATMcloseConn(cfd); - else ACE_OS::close (cfd); - return -1; - } - - dfd = ATMopenConn(address, max_pkt_size); - if (dfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open ATM dfd conn:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ATMcloseConn(cfd); - return -1; - } - usleep(100000); /* be nice to buggy ATM driver */ - if (time_write_int(dfd, i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write (cfd) to ATM dfd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ATMcloseConn(cfd); - ATMcloseConn(dfd); - return -1; - } -#else - fprintf(stderr, - "Error ComOpenConnPair: pid %d addresstype %d not supported\n", - ACE_OS::getpid (), dsocktype); - return -1; -#endif - } - for (i = 0; i < size; i ++) { /* guaranteed to succeed */ - if (fdTable[i].fd == -1) break; - } - if (i < size) { - fdTable[i].fd = cfd; - fdTable[i].type = csocktype; - fdTable[i].stime = get_sec(); - fdTable[i].state = STATE_CONTROL; - } - else { - fprintf(stderr, "Error ComOpenConnPair: no entry for cfd %d\n", cfd); - return -1; - } - for (; i < size; i ++) { - if (fdTable[i].fd == -1) break; - } - if (i < size) { - fdTable[i].fd = dfd; - fdTable[i].type = dsocktype; - fdTable[i].stime = get_sec(); - fdTable[i].state = STATE_DATA; - } - else { - fprintf(stderr, "Error ComOpenConnPair: no entry for dfd %d\n", dfd); - return -1; - } - *ctr_fd = cfd; - *data_fd = dfd; - ACE_DEBUG ((LM_DEBUG,"(%P|%t)Returning from ComOpenConnpair\n")); - return 0; -} - -/* address format: [ATM:|INET:]real_address | "" - - "" -- UNIX socket, reliable byte stream - [INET:]real_address -- INET sockets, reliable control byte stream, and - *max_pkt_size == 0 : reliable data byte stream, or - != 0 : unreliable packet stream; - ATM:real_address -- ATM sockets, both data and control are - unreliable packet streams; - DATM:real_address -- INET/UNIX control reliable byte stream - and ATM unreliable byte stream; - - Communication between client and server: - - ctr_fd: client --> server server --> client - -2: conn-less INET Open udp sock, send addr in net byte order - - -1: conn-orient Send value of fd, wait to be paired - cfd>=0: data sock Paired with cfd and return. - */ - -#if 0 -int VideoComOpenConnPair (char * address, - int *ctr_fd, - int *data_fd, - int *max_pkt_size) -{ - int i; - int cfd, dfd, csocktype, dsocktype; - int conn_tag = !(*max_pkt_size); - struct sockaddr_in addressIn; - struct sockaddr_un addressUn; - - ACE_DEBUG ((LM_DEBUG, - "%s %d\n", - __FILE__,__LINE__)); - - if (!size) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d not done ComInitClient/Server yet.\n", - ACE_OS::getpid ()); - return -1; - } - - cfd = 0; - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == -1) cfd ++; - } - if (cfd < 2) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d no faTable entry for the pair", - ACE_OS::getpid ()); - return -1; - } - - /* tell the type of connections to establish: - If the server is on the same host, then UNIX socket is used */ - if (address[0] == 0) { - csocktype = CONN_UNIX; - dsocktype = CONN_UNIX; - } - else if (!strncasecmp(address, "atm:", 4)) { - address += 4; - csocktype = CONN_ATM; - dsocktype = CONN_ATM; - } - else if (!strncasecmp(address, "datm:", 5)) { - address += 5; - csocktype = CONN_INET; - dsocktype = CONN_ATM; - } - else { - csocktype = CONN_INET; - dsocktype = CONN_INET; - } - if (csocktype == CONN_INET || dsocktype == CONN_INET) { - struct hostent *hp; - char hostname[100]; - addressIn.sin_family = AF_INET; - if (!strncasecmp(address, "inet:", 5)) { - address += 5; - } - if (isascii(address[0]) && isdigit(address[0])) - addressIn.sin_addr.s_addr = inet_addr(address); - else { - if ((hp = gethostbyname(address)) == NULL) { /* No such host! */ - fprintf(stderr, - "Error ComOpenConnPair: pid %d host %s can't be found:", - getpid(), address); - perror(""); - return -1; - } - if (hp->h_addrtype != AF_INET) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d host %s is not of INET type address.\n", - getpid(), address); - return -1; - } - ACE_OS::memcpy ((char *)&addressIn.sin_addr.s_addr, (char *)hp->h_addr, - sizeof(addressIn.sin_addr.s_addr)); - /* - bcopy((char *)hp->h_addr, (char *)&addressIn.sin_addr.s_addr, - sizeof(addressIn.sin_addr.s_addr)); - */ - } - if (get_hostname(hostname, 100)) { - fprintf(stderr, "Error ComOpenConnPair: pid %d failed to get_hostname:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - if ((hp = gethostbyname(hostname)) == NULL) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to its own IP address:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - if (hp->h_addrtype != AF_INET) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d own address is not INET type", - ACE_OS::getpid ()); - return -1; - } - - if (!memcmp((char *)hp->h_addr, (char *)&addressIn.sin_addr.s_addr, - sizeof(addressIn.sin_addr.s_addr))) { - if (csocktype == CONN_INET) csocktype = CONN_UNIX; - if (dsocktype == CONN_INET) dsocktype = CONN_UNIX; - } - } - - /* build appropriate type of Connections to Server */ - - if (csocktype == CONN_INET && dsocktype == CONN_INET) { - /* build TCP connection to server */ - addressIn.sin_port = htons(inet_port); - cfd = socket(AF_INET, SOCK_STREAM, 0); - if (cfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open TCP cfd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - usleep(10000); - if (connect(cfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to conn TCP cfd to server:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - i = -3; - ACE_OS::write (cfd, &i, 4); - ACE_OS::close (cfd); - return -1; - } -// if (conn_tag) { /* create a second connection with server */ -// if (time_write_int(cfd, -1) == -1 || time_read_int(cfd, &i) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to write -1 to TCP cfd:", -// getpid()); -// perror(""); -// close(cfd); -// return -1; -// } - dfd = socket(AF_INET, SOCK_STREAM, 0); - if (dfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open TCP dfd:", - getpid()); - perror(""); - close(cfd); - return -1; - } - usleep(10000); - if (connect(dfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to conn TCP dfd to server:", - getpid()); - perror(""); - i = -3; - write(dfd, &i, 4); - close(cfd); - close(dfd); - return -1; - } - if (time_write_int(dfd, i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to write (cfd) to TCP dfd:", - getpid()); - perror(""); - close(cfd); - close(dfd); - return -1; - } - *max_pkt_size = 0; - } - else { /* create a UDP socket for data */ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) ::VideoComOpenConnPair: making UDP connection\n")); - dfd = socket(AF_INET, SOCK_DGRAM, 0); - if (dfd == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to open UDP dfd:", - getpid()); - perror(""); - close(cfd); - return -1; - } - memset((char *)&addressIn, 0, sizeof(addressIn)); - - i = sizeof(addressIn); - if (getsockname(cfd, (struct sockaddr *)&addressIn, &i) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to getsocketname on TCP cfd:", - getpid()); - perror(""); - close(dfd); - close(cfd); - return -1; - } - -// addressIn.sin_family = AF_INET; -// addressIn.sin_port = 0; -// if (bind(dfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to bind UDP dfd:", -// getpid()); -// perror(""); -// close(cfd); -// close(dfd); -// return -1; -// } -// if (time_write_int(cfd, -2) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to write -2 to TCP cfd:", -// getpid()); -// perror(""); -// close(cfd); -// close(dfd); -// return -1; -// } - -// i = sizeof(addressIn); -// if (getsockname(dfd, (struct sockaddr *)&addressIn, &i) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to getsocketname on UDP fd:", -// getpid()); -// perror(""); -// close(dfd); -// close(cfd); -// return -1; -// } -// if (time_write_bytes(cfd, (char *)&addressIn.sin_port, sizeof(short)) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to write (port) to TCP cfd:", -// getpid()); -// perror(""); -// close(dfd); -// close(cfd); -// return -1; -// } - -// fprintf(stderr, "ComOpenConnPair local UDP socket: addr - %s, port - %u.\n", -// inet_ntoa(addressIn.sin_addr), ntohs(addressIn.sin_port)); - - -// fprintf(stderr, "ComOpenConnPair UDP port %d (should be > 0)\n", -// ntohs(addressIn.sin_port)); - -// /* -// i = sizeof(addressIn); -// if (getsockname(cfd, (struct sockaddr *)&addressIn, &i) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to getsocketname on TCP cfd:", -// getpid()); -// perror(""); -// close(dfd); -// close(cfd); -// return -1; -// } -// */ -// if (time_write_bytes(cfd, (char *)&addressIn.sin_addr.s_addr, sizeof(int)) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to write (IP addr) to TCP cfd:", -// getpid()); -// perror(""); -// close(dfd); -// close(cfd); -// return -1; -// } - -// fprintf(stderr, "ComOpenConnPair TCP cfd socket: addr - %s, port - %u.\n", -// inet_ntoa(addressIn.sin_addr), ntohs(addressIn.sin_port)); - -// if (time_read_bytes(cfd, (char *)&addressIn.sin_port, sizeof(short)) == -1 || -// time_read_bytes(cfd, (char *)&addressIn.sin_addr.s_addr, sizeof(int)) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to read (IP addr/port) from TCP cfd:", -// getpid()); -// perror(""); -// close(dfd); -// close(cfd); - // return -1; - // } - // usleep(10000); - // if (connect(dfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { - // fprintf(stderr, - // "Error ComOpenConnPair: pid %d failed conn UDP dfd to peer:", - // getpid()); - // perror(""); - // close(cfd); - // close(dfd); - // return -1; - // } - - fprintf(stderr, "ComOpenConnPair UDP dfd connects to host-%s (port %u)\n", - inet_ntoa(addressIn.sin_addr), - ntohs(addressIn.sin_port)); - -#ifndef LINUX - /* adjust the dfd REVBUF size */ - { - int len; - len = INET_SOCKET_BUFFER_SIZE + 100; - /* - if (setsockopt(dfd, SOL_SOCKET, SO_SNDBUF, (char *)&len, sizeof(len)) == -1) { - fprintf(stderr, - "Warning ComOpenConnPair: pid %d failed to set UDP dfd-snd to size %d:", - ACE_OS::getpid (), len); - ACE_OS::perror (""); - ACE_OS::close (dfd); - ACE_OS::close (cfd); - return -1; - } - */ - len = 65536; - while (setsockopt(dfd, SOL_SOCKET, SO_RCVBUF, (char *)&len, sizeof(len)) == -1) { - len -= 1024; - if (len < 8192) break; - /* - fprintf(stderr, - "Warning ComOpenConnPair: pid %d failed to set UDP dfd-rcv to size %d:", - ACE_OS::getpid (), len); - ACE_OS::perror (""); - ACE_OS::close (dfd); - ACE_OS::close (cfd); - return -1; - */ - } - if (getuid() == DEVELOPER_UID) - fprintf(stderr, "Set UDP dfd-rcv to %dB\n", len); - } -#endif - *max_pkt_size = - INET_SOCKET_BUFFER_SIZE; - /* UDP sockets on HP and SUN are discard mode */ - } - if (setsockopt(cfd, IPPROTO_TCP, TCP_NODELAY, - (const char *)&i, sizeof(i)) == -1) { - fprintf(stderr, - "Error ComOpenConnPair: pid %d failed to setsockopt on TCP cfd with TCP_NODELAY:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (dfd); - ACE_OS::close (cfd); - return -1; - } - // } -// else if (dsocktype == CONN_ATM) { /* CONN_ATM */ -// #ifdef NATIVE_ATM -// if (csocktype == CONN_INET) { -// /* build TCP connection to server */ -// addressIn.sin_port = htons(inet_port); -// cfd = socket(AF_INET, SOCK_STREAM, 0); -// if (cfd == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to open TCP1 cfd:", -// getpid()); -// perror(""); -// return -1; -// } -// usleep(10000); -// if (connect(cfd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to conn TCP1 cfd to server:", -// getpid()); -// perror(""); -// i = -3; -// write(cfd, &i, 4); -// close(cfd); -// return -1; -// } -// } -// else if (csocktype == CONN_UNIX) { -// /* build UNIX connection to server */ -// addressUn.sun_family = AF_UNIX; -// strncpy(addressUn.sun_path, unix_port, -// sizeof(struct sockaddr_un) - sizeof(short)); -// cfd = socket(AF_UNIX, SOCK_STREAM, 0); -// if (cfd == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to open UNIX1 cfd:", -// getpid()); -// perror(""); -// return -1; -// } -// usleep(10000); /* this is for waiting for the uncaught signal mentioned -// below */ -// if (connect(cfd, (struct sockaddr *)&addressUn, sizeof(addressUn)) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to conn UNIX1 cfd to server:", -// getpid()); -// perror(""); -// i = -3; /* I don't understand why when select() returns EINTR, the connection -// is still built, and the other end can still get what written at -// this end, 'i = -3' is a garbage to be written. */ -// write(cfd, &i, 4); -// close(cfd); -// return -1; -// } -// } -// else { /* CONN_ATM */ -// cfd = ATMopenConn(address, max_pkt_size); -// if (cfd == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to open ATM cfd conn:", -// getpid()); -// perror(""); -// return -1; -// } -// usleep(100000); /* be nice to buggy ATM driver */ -// } -// if (time_write_int(cfd, -1) == -1 || time_read_int(cfd, &i) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to write -1 to %s cfd:", -// ACE_OS::getpid (), -// (csocktype == CONN_UNIX) ? "UNIX1" : -// (csocktype == CONN_INET) ? "INET1" : "ATM"); -// ACE_OS::perror (""); -// if (csocktype == CONN_ATM) ATMcloseConn(cfd); -// else ACE_OS::close (cfd); -// return -1; -// } - -// dfd = ATMopenConn(address, max_pkt_size); -// if (dfd == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to open ATM dfd conn:", -// ACE_OS::getpid ()); -// ACE_OS::perror (""); -// ATMcloseConn(cfd); -// return -1; -// } -// usleep(100000); /* be nice to buggy ATM driver */ -// if (time_write_int(dfd, i) == -1) { -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d failed to write (cfd) to ATM dfd:", -// ACE_OS::getpid ()); -// ACE_OS::perror (""); -// ATMcloseConn(cfd); -// ATMcloseConn(dfd); -// return -1; -// } -// #else -// fprintf(stderr, -// "Error ComOpenConnPair: pid %d addresstype %d not supported\n", -// ACE_OS::getpid (), dsocktype); -// return -1; -// #endif -// } - for (i = 0; i < size; i ++) { /* guaranteed to succeed */ - if (fdTable[i].fd == -1) break; - } - if (i < size) { - fdTable[i].fd = cfd; - fdTable[i].type = csocktype; - fdTable[i].stime = get_sec(); - fdTable[i].state = STATE_CONTROL; - } - else { - fprintf(stderr, "Error ComOpenConnPair: no entry for cfd %d\n", cfd); - return -1; - } - for (; i < size; i ++) { - if (fdTable[i].fd == -1) break; - } - if (i < size) { - fdTable[i].fd = dfd; - fdTable[i].type = dsocktype; - fdTable[i].stime = get_sec(); - fdTable[i].state = STATE_DATA; - } - else { - fprintf(stderr, "Error ComOpenConnPair: no entry for dfd %d\n", dfd); - return -1; - } - *ctr_fd = cfd; - *data_fd = dfd; - return 0; -} -#endif - -/* returns: -1 -- failed, >=0 -- fd */ -int ComOpenConn(char * address, int *max_pkt_size) -{ - int i; - int fd, socktype; - struct sockaddr_in addressIn; - struct sockaddr_un addressUn; - - if (!size) { - fprintf(stderr, - "Error ComOpenConn: pid %d not done ComInitClient/Server yet.\n", - ACE_OS::getpid ()); - return -1; - } - - fd = 0; - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == -1) fd ++; - } - if (fd < 1) { - fprintf(stderr, - "Error ComOpenConn: pid %d no faTable entry for the pair", - ACE_OS::getpid ()); - return -1; - } - - /* tell the type of connections to establish: - If the server is on the same host, then UNIX socket is used */ - if (address[0] == 0) { - socktype = CONN_UNIX; - } - else if (!strncasecmp(address, "atm:", 4)) { - address += 4; - socktype = CONN_ATM; - } - else if (!strncasecmp(address, "datm:", 5)) { - address += 5; - socktype = CONN_ATM; - } - else { - socktype = CONN_INET; - } - if (socktype == CONN_INET) { - struct hostent *hp; - char hostname[100]; - addressIn.sin_family = AF_INET; - if (!strncasecmp(address, "inet:", 5)) { - address += 5; - } - if (isascii(address[0]) && isdigit(address[0])) - addressIn.sin_addr.s_addr = inet_addr(address); - else { - if ((hp = gethostbyname(address)) == NULL) { /* No such host! */ - fprintf(stderr, - "Error ComOpenConn: pid %d host %s can't be found:", - getpid(), address); - perror(""); - return -1; - } - if (hp->h_addrtype != AF_INET) { - fprintf(stderr, - "Error ComOpenConn: pid %d host %s is not of INET type address.\n", - getpid(), address); - return -1; - } - ACE_OS::memcpy ((char *)&addressIn.sin_addr.s_addr, (char *)hp->h_addr, - sizeof(addressIn.sin_addr.s_addr)); - /* - bcopy((char *)hp->h_addr, (char *)&addressIn.sin_addr.s_addr, - sizeof(addressIn.sin_addr.s_addr)); - */ - } - if (get_hostname(hostname, 100)) { - fprintf(stderr, "Error ComOpenConn: pid %d failed to get_hostname:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - if ((hp = gethostbyname(hostname)) == NULL) { - fprintf(stderr, - "Error ComOpenConn: pid %d failed to its own IP address:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - if (hp->h_addrtype != AF_INET) { - fprintf(stderr, - "Error ComOpenConn: pid %d own address is not INET type", - ACE_OS::getpid ()); - return -1; - } - - if (!memcmp((char *)hp->h_addr, (char *)&addressIn.sin_addr.s_addr, - sizeof(addressIn.sin_addr.s_addr))) { - if (socktype == CONN_INET) socktype = CONN_UNIX; - } - } - - /* build appropriate type of Connections to Server */ - if (socktype == CONN_UNIX) { - /* build UNIX connection to server */ - addressUn.sun_family = AF_UNIX; - strncpy(addressUn.sun_path, unix_port, - sizeof(struct sockaddr_un) - sizeof(short)); - fd = socket(AF_UNIX, SOCK_STREAM, 0); - if (fd == -1) { - fprintf(stderr, - "Error ComOpenConn: pid %d failed to open UNIX fd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - if (connect(fd, (struct sockaddr *)&addressUn, sizeof(addressUn)) == -1) { - fprintf(stderr, - "Error ComOpenConn: pid %d failed to conn UNIX fd to server:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (fd); - return -1; - } - *max_pkt_size = 0; - } - else if (socktype == CONN_INET) { - /* build TCP connection to server */ - addressIn.sin_port = htons(inet_port); - fd = socket(AF_INET, SOCK_STREAM, 0); - if (fd == -1) { - fprintf(stderr, - "Error ComOpenConn: pid %d failed to open TCP fd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - if (connect(fd, (struct sockaddr *)&addressIn, sizeof(addressIn)) == -1) { - fprintf(stderr, - "Error ComOpenConn: pid %d failed to conn TCP fd to server:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (fd); - return -1; - } - if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, - (const char *)&i, sizeof(i)) == -1) { - fprintf(stderr, - "Error ComOpenConn: pid %d failed to setsockopt on TCP fd with TCP_NODELAY:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (fd); - return -1; - } - *max_pkt_size = 0; - } - else if (socktype == CONN_ATM) { /* CONN_ATM */ -#ifdef NATIVE_ATM - /* CONN_ATM */ - fd = ATMopenConn(address, max_pkt_size); - if (fd == -1) { - fprintf(stderr, - "Error ComOpenConn: pid %d failed to open ATM fd conn:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } -#else - fprintf(stderr, - "Error ComOpenConn: pid %d addresstype %d not supported\n", - ACE_OS::getpid (), socktype); - return -1; -#endif - } - for (i = 0; i < size; i ++) { /* guaranteed to succeed */ - if (fdTable[i].fd == -1) break; - } - if (i < size) { - fdTable[i].fd = fd; - fdTable[i].type = socktype; - fdTable[i].stime = get_sec(); - fdTable[i].state = STATE_SINGLE; - return fd; - } - else { - fprintf(stderr, "Error ComOpenConn: no entry for fd %d\n", fd); - return -1; - } -} - - -static int fd_unix, fd_inet, fd_atm; /* for use in the server side */ - - -int ComInitServer(int pinet_port, char * punix_port, char * patm_port) -{ - int i; - - struct sockaddr_in myaddr_in; - struct sockaddr_un myaddr_un; - - inet_port = pinet_port; - unix_port = punix_port; - atm_port = patm_port; - - if (size) { - fprintf(stderr, - "Error ComInitServer: pid %d already done ComInitServer/Server\n", - ACE_OS::getpid ()); - return -1; - } - size = CLIENT_FDTABLE_SIZE; - // create and initialize the File Descriptor Table - fdTable = (struct FdTable *)ACE_OS::malloc(size * sizeof(*fdTable)); - if (fdTable == NULL) { - fprintf(stderr, - "Error ComInitServer: pid %d failed to allocated fdTable space:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - for (i = 0; i < size; i ++) { - fdTable[i].fd = -1; - } - // Set all the file descriptor for atm ,inet and unix to be -1 - fd_atm = fd_inet = fd_unix = -1; - - memset((char *)&myaddr_in, 0, sizeof(struct sockaddr_in)); - memset((char *)&myaddr_un, 0, sizeof(struct sockaddr_un)); - - myaddr_in.sin_family = AF_INET; - - myaddr_in.sin_addr.s_addr = htonl(INADDR_ANY); - myaddr_in.sin_port = htons((short)inet_port); - - /* setup INET listen socket */ - fd_inet = socket(AF_INET, SOCK_STREAM, 0); - if (fd_inet == -1) { - fprintf(stderr, - "Error ComInitServer: pid %d failed to open fd_inet:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - goto open_fd_unix; - } - - i = 1; - if (setsockopt(fd_inet, SOL_SOCKET, SO_REUSEADDR, - (const char *)&i, sizeof(i)) == -1) { - fprintf(stderr, - "Error ComInitServer: pid %d failed to setsockopt fd_inet with REUSEADDR:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (fd_inet); - fd_inet = -1; - goto open_fd_unix; - } - - if (bind(fd_inet, (struct sockaddr *)&myaddr_in, sizeof(struct sockaddr_in)) == -1) { - fprintf(stderr, - "Error ComInitServer: pid %d failed to bind fd_inet:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (fd_inet); - fd_inet = -1; - goto open_fd_unix; - } - if (listen(fd_inet, 2) == -1) { - fprintf(stderr, - "Error ComInitServer: pid %d failed to listen on fd_inet:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (fd_inet); - fd_inet = -1; - goto open_fd_unix; - } - - open_fd_unix: - - myaddr_un.sun_family = AF_UNIX; - strncpy(myaddr_un.sun_path, unix_port, - (sizeof(struct sockaddr_un) - sizeof(short))); - fd_unix = socket(AF_UNIX, SOCK_STREAM, 0); - if (fd_unix == -1) { - fprintf(stderr, - "Error ComInitServer: pid %d failed to open fd_unix:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - goto open_fd_atm; - } - if ((bind(fd_unix, (struct sockaddr *)&myaddr_un, - sizeof(struct sockaddr_un))) == -1) { - fprintf(stderr, - "Error ComInitServer: pid %d failed to bind fd_unix:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (fd_unix); - fd_unix = -1; - goto open_fd_atm; - } - if ((listen(fd_unix, 2)) == -1) { - fprintf(stderr, - "Error ComInitServer: pid %d failed to liston on fd_unix:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::close (fd_unix); - fd_unix = -1; - goto open_fd_atm; - } - - open_fd_atm: - -#ifdef NATIVE_ATM - fd_atm = ATMinitServer(atm_port); -#endif - - if (fd_inet >= 0 || fd_unix >= 0 || fd_atm >= 0) return 0; - else return -1; -} - -void ComCloseListen(void) -{ - if (fd_atm >= 0) { -#ifdef NATIVE_ATM - /* fd_atm is not connected to a user_plane, ignore - ATMcloseFd(fd_atm); - */ - ACE_OS::close (fd_atm); - fd_atm = -1; -#else - fprintf(stderr, "Error ComCloseListen: CONN_ATM not supported.\n"); -#endif - } - if (fd_unix >= 0) { - ACE_OS::close (fd_unix); - fd_unix = -1; - } - if (fd_inet >= 0) { - ACE_OS::close (fd_inet); - fd_inet = -1; - } - return; -} - -void ComCloseServer(void) -{ - int i; - for (i = 0; i < size; i ++) { - if (fdTable[i].fd >= 0) ComCloseConn(fdTable[i].fd); - } - if (fd_atm >= 0) { -#ifdef NATIVE_ATM - /* fd_atm not connected to a user-plane, igore it - ATMcloseConn(fd_atm); - */ - ACE_OS::close (fd_atm); - fd_atm = -1; -#else - fprintf(stderr, "Error ComCloseServer: CONN_ATM not supported.\n"); -#endif - } - if (fd_unix >= 0) { - ACE_OS::close (fd_unix); - fd_unix = -1; - ACE_OS::unlink (unix_port); - } - if (fd_inet >= 0) { - ACE_OS::close (fd_inet); - fd_inet = -1; - } -#ifdef NATIVE_ATM - ATMcloseServer(); -#endif - return; -} - -static int change_option(int fd) -{ - struct linger linger = {1, 1}; - int i = 1; - if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, - (const char *)&i, sizeof(i)) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to setsockopt on fd_inet:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - /* data socket also NODELAY */ - if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (const char *)&linger, - sizeof(linger)) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to linger on fd_inet:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - return 0; -} - -int ComGetConnPair(int *ctr_fd, int *data_fd, int *max_pkt_size) -{ - int i; - int fd, fdType; - int addrlen; - struct sockaddr_in peeraddr_in; - struct fd_set read_mask; - struct timeval tval; - int nfds; - - fd = 0; - addrlen = get_sec(); - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == -1) { - fd ++; - } - else if (fdTable[i].type == STATE_PENDING && - get_duration(fdTable[i].stime, addrlen) > 10) { - fprintf(stderr, - "ComGetConnPair: pid %d closed fd %d (PENDING >= 10 sec)\n", - ACE_OS::getpid (), fdTable[i].fd); - ComCloseConn(fdTable[i].fd); - fdTable[i].fd = -1; - fd ++; - } - } - if (fd < 2) { - fprintf(stderr, - "Error ComGetConnPair: pid %d no faTable entry for the pair", - ACE_OS::getpid ()); - return -1; - } - - FD_ZERO(&read_mask); - if (fd_inet >= 0) FD_SET(fd_inet, &read_mask); - if (fd_unix >= 0) FD_SET(fd_unix, &read_mask); - if (fd_atm >= 0) FD_SET(fd_atm, &read_mask); - - tval.tv_sec = 1; /* wait at most 1 second */ - tval.tv_usec = 0; - - - nfds = fd_inet; - if (fd_unix > nfds) nfds = fd_unix; - if (fd_atm > nfds) nfds = fd_atm; - // nfds now holds the highest numbered open file descriptor - nfds ++; // increment so that select can use o to nfds -1 no. of - // file descriptors. - errno = 0; - // fd is here used as the result of the select call -#ifdef _HPUX_SOURCE - if ((fd = select(nfds, (int *)&read_mask, NULL, NULL, &tval)) == -1) -#else - if ((fd = select(nfds, &read_mask, NULL, NULL, &tval)) == -1) -#endif - { - - if (errno == EINTR) return -1; - - fprintf(stderr, - "Error ComGetConnPair: pid %d failed on select():", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - if (fd == 0) return -1; /* time expire */ - - fd = -1; - // fd will be reused inside this code as the accepted socket. - if (fd == -1 && fd_unix >= 0 && FD_ISSET(fd_unix, &read_mask)) { - struct sockaddr_un peeraddr_un; - - fprintf(stderr, "Server to accept a UNIX connection.\n"); - - addrlen = sizeof(struct sockaddr_un); - fd = accept(fd_unix, (struct sockaddr *)&peeraddr_un, &addrlen); - if (fd == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to accpet on fd_unix:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - } - else fdType = CONN_UNIX; - *max_pkt_size = 0; - } - // fd here is the result of the accept for unix if fd_unix is valid - // Hence if fd_unix is present then this won't be called if the - // accept for the fd_unix succeeds. - if (fd == -1 && fd_inet >= 0 && FD_ISSET(fd_inet, &read_mask)) { - - fprintf(stderr, "Server to accept a INET connection.\n"); - - addrlen = sizeof(struct sockaddr_in); - fd = accept(fd_inet, (struct sockaddr *)&peeraddr_in, &addrlen); - if (fd == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to accpet on fd_inet:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - } - else fdType = CONN_INET; - *max_pkt_size = 0; - } - if (fd == -1 && fd_atm >= 0 && FD_ISSET(fd_atm, &read_mask)) { -#ifdef NATIVE_ATM - fd = ATMaccept(fd_atm, max_pkt_size); - fdType = CONN_ATM; -#else - fprintf(stderr, - "Error ComGetConnPair: pid %d CONN_ATM not supported.\n", - ACE_OS::getpid ()); -#endif - } - // fd = -1 implies accept failed in any of the active connections - // which came out of the select call. - if (fd == -1) return -1; - - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == -1) break; - } - // Enter the accepted fd in the file descriptor Table - if (i < size) { - fdTable[i].fd = fd; - fdTable[i].type = fdType; - fdTable[i].stime = get_sec(); - } - else { - fprintf(stderr, "Weird\n"); - } - - // read the port number for the UDP socket of the client - if (time_read_int(fd, &nfds) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to read int from %s fd:", - ACE_OS::getpid (), - fdType == CONN_ATM ? "ATM" : - fdType == CONN_INET ? "INET" : "UNIX"); - ACE_OS::perror (""); - ComCloseConn(fd); - return -1; - } - fprintf (stderr, - " Received int nfds = %d \n", - nfds); - // nfds holds the int read in time_read_int - // if nfds is -1 then read int error. - fprintf(stderr, "ComGetConnPair got %s fd = %d with value %d\n", - fdType == CONN_ATM ? "ATM" : - fdType == CONN_INET ? "INET" : "UNIX", - fd, nfds); - - if (nfds >= 0) { /* can be paired and return */ - // This is the success case where you got a control fd and a data fd. - fdTable[i].state = STATE_DATA; - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == nfds) break; - } - if (i < size && fdTable[i].state == STATE_PENDING) { - fdTable[i].state = STATE_CONTROL; - } - else { - if (i >= 0) fprintf(stderr, " i %d\n", i); - ComCloseConn(fd); - return -1; - } - // ???? - *ctr_fd = fdTable[i].fd; - *data_fd = fd; - return 0; - } - else if (nfds == -1) { /* wait to be paired */ - fdTable[i].state = STATE_PENDING; - // fd is the inet or unix accepted socket. - // why is anyone writing the fd to the peer? - // looks like he is indicating an error to the client!! - // is this a hack ;-( - if (time_write_int(fd, fd) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to write (fd) to %s fd:", - ACE_OS::getpid (), - fdType == CONN_ATM ? "ATM" : - fdType == CONN_INET ? "INET" : "UNIX"); - ACE_OS::perror (""); - ComCloseConn(fd); - return -1; - } - if (fdType == CONN_INET && change_option(fd) == -1) { - ComCloseConn(fd); - } - return -1; - } - else if (nfds == -2) { /* inet case only, UDP data sock is requested */ - int dfd; - struct sockaddr_in * in = &(peeraddr_in); - - fdTable[i].state = STATE_CONTROL; - - if (fdType == CONN_INET && change_option(fd) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to change options of TCP cfd:", - ACE_OS::getpid ()); - ComCloseConn(fd); - return -1; - } - - dfd = socket(AF_INET, SOCK_DGRAM, 0); - if (dfd == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to open dfd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ComCloseConn(fd); - return -1; - } - memset((char *)in, 0, sizeof(* in)); - - addrlen = sizeof(*in); - if (getsockname(fd, (struct sockaddr *)in, &addrlen) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to getsockname of fd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ComCloseConn(fd); - ACE_OS::close (dfd); - return -1; - } - - in->sin_family = AF_INET; - in->sin_port = 0; - /* - in->sin_addr.s_addr = htonl(INADDR_ANY); - */ - if (bind(dfd, (struct sockaddr *)in, sizeof(* in)) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to bind dfd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ComCloseConn(fd); - ACE_OS::close (dfd); - return -1; - } - addrlen = sizeof(*in); - if (getsockname(dfd, (struct sockaddr *)in, &addrlen) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to getsockname of dfd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ComCloseConn(fd); - ACE_OS::close (dfd); - return -1; - } - if (time_write_bytes(fd, (char *)&in->sin_port, sizeof(short)) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to write (dfd.port) to fd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ComCloseConn(fd); - ACE_OS::close (dfd); - return -1; - } - /* - addrlen = sizeof(*in); - if (getsockname(fd, (struct sockaddr *)in, &addrlen) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to getsockname of fd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ComCloseConn(fd); - ACE_OS::close (dfd); - return -1; - } - */ - if (time_write_bytes(fd, (char *)&in->sin_addr.s_addr, sizeof(int)) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to write (dfd.IPaddr) to fd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ComCloseConn(fd); - ACE_OS::close (dfd); - return -1; - } - - fprintf(stderr, "ComGetConnPair local UDP socket: addr - %s, port - %u.\n", - inet_ntoa(in->sin_addr), ntohs(in->sin_port)); - - if (time_read_bytes(fd, (char *)&in->sin_port, sizeof(short)) == -1 || - time_read_bytes(fd, (char *)&in->sin_addr.s_addr, sizeof(int)) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to read (port, IPaddr) from fd:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ComCloseConn(fd); - ACE_OS::close (dfd); - return -1; - } - usleep(10000); - if (connect(dfd, (struct sockaddr *)in, sizeof(*in)) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed conn UDP dfd to peer:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - ComCloseConn(fd); - ACE_OS::close (dfd); - return -1; - } -#if 0 - { - int len; - len = 65536; /* INET_SOCKET_BUFFER_SIZE + 100; */ - /* - if (setsockopt(dfd, SOL_SOCKET, SO_SNDBUF, (char *)&len, sizeof(len)) == -1) { - fprintf(stderr, - "Error ComGetConnPair: pid %d failed to set UDP dfd-snd to size %d:", - getpid(), len); - perror(""); - ComCloseConn(fd); - close(dfd); - return -1; - } - */ - len = 65536; - while (setsockopt(dfd, SOL_SOCKET, SO_RCVBUF, (char *)&len, sizeof(len)) == -1) { - len -= 1024; - if (len < 8192) break; - /* - fprintf(stderr, - "Warning ComGetConnPair: pid %d failed to set UDP dfd-rcv to size %d:", - getpid(), len); - perror(""); - ComCloseConn(fd); - close(dfd); - return -1; - */ - } - if (getuid() == DEVELOPER_UID) - fprintf(stderr,"Set UDP dfd-rcv to %dB\n", len); - } -#endif - // Most common return case where the server creates a UDP socket , - // writes the port and ip addr and also gets the client's UDP - // endpoint . - *max_pkt_size = - INET_SOCKET_BUFFER_SIZE; /* UDP sockets on HP and SUN - are known to be discard mode */ - - fprintf(stderr, "ComGetConnPair UDP dfd connects to host-%s (port %u)\n", - inet_ntoa(in->sin_addr), ntohs(in->sin_port)); - - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == -1) break; - } - if (i < size) { - fdTable[i].fd = dfd; - fdTable[i].type = CONN_INET; - fdTable[i].stime = get_sec(); - fdTable[i].state = STATE_DATA; - - *ctr_fd = fd; - *data_fd = dfd; - return 0; - } - else { - fprintf(stderr, "ComGetConnPair : no space left\n"); - return -1; - } - } - else { - fprintf(stderr, - "Error ComGetConnPair: pid %d get invalid value %d from fd\n", - ACE_OS::getpid (), nfds); - ComCloseConn(fd); - } - return -1; -} - -/* returns: -1 -- failed, >= 0 -- fd */ -int ComGetConn(int *max_pkt_size) -{ - int i; - int fd, fdType; - int addrlen; - struct fd_set read_mask; - struct timeval tval; - int nfds; - - fd = 0; - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == -1) { - fd ++; - } - } - if (fd < 1) { - fprintf(stderr, - "Error ComGetConn: pid %d no faTable entry for the pair", - ACE_OS::getpid ()); - return -1; - } - - FD_ZERO(&read_mask); - if (fd_inet >= 0) FD_SET(fd_inet, &read_mask); - if (fd_unix >= 0) FD_SET(fd_unix, &read_mask); - if (fd_atm >= 0) FD_SET(fd_atm, &read_mask); - - tval.tv_sec = 1; /* wait at most 1 second */ - tval.tv_usec = 0; - - nfds = fd_inet; - if (fd_unix > nfds) nfds = fd_unix; - if (fd_atm > nfds) nfds = fd_atm; - nfds ++; - errno = 0; -#ifdef _HPUX_SOURCE - if ((fd = select(nfds, (int *)&read_mask, NULL, NULL, &tval)) == -1) -#else - if ((fd = select(nfds, &read_mask, NULL, NULL, &tval)) == -1) -#endif - { - - if (errno == EINTR) return -1; - - fprintf(stderr, - "Error ComGetConn: pid %d failed on select():", - ACE_OS::getpid ()); - ACE_OS::perror (""); - return -1; - } - if (fd == 0) return -1; /* time expire */ - - fd = -1; - - if (fd == -1 && fd_unix >= 0 && FD_ISSET(fd_unix, &read_mask)) { - struct sockaddr_un peeraddr_un; - - fprintf(stderr, "Server to accept a UNIX connection.\n"); - - addrlen = sizeof(struct sockaddr_un); - fd = accept(fd_unix, (struct sockaddr *)&peeraddr_un, &addrlen); - if (fd == -1) { - fprintf(stderr, - "Error ComGetConn: pid %d failed to accpet on fd_unix:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - } - else fdType = CONN_UNIX; - *max_pkt_size = 0; - } - if (fd == -1 && fd_inet >= 0 && FD_ISSET(fd_inet, &read_mask)) { - struct sockaddr_in peeraddr_in; - - fprintf(stderr, "Server to accept a INET connection.\n"); - - addrlen = sizeof(struct sockaddr_in); - fd = accept(fd_inet, (struct sockaddr *)&peeraddr_in, &addrlen); - if (fd == -1) { - fprintf(stderr, - "Error ComGetConn: pid %d failed to accpet on fd_inet:", - ACE_OS::getpid ()); - ACE_OS::perror (""); - } - else fdType = CONN_INET; - *max_pkt_size = 0; - } - if (fd == -1 && fd_atm >= 0 && FD_ISSET(fd_atm, &read_mask)) { -#ifdef NATIVE_ATM - fd = ATMaccept(fd_atm, max_pkt_size); - fdType = CONN_ATM; -#else - fprintf(stderr, - "Error ComGetConn: pid %d CONN_ATM not supported.\n", - ACE_OS::getpid ()); -#endif - } - if (fd == -1) return -1; - - for (i = 0; i < size; i ++) { - if (fdTable[i].fd == -1) break; - } - if (i < size) { - fdTable[i].fd = fd; - fdTable[i].type = fdType; - fdTable[i].stime = get_sec(); - fdTable[i].state = STATE_SINGLE; - return fd; - } - else { - fprintf(stderr, "Weird\n"); - ComCloseConn(fd); - return -1; - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h deleted file mode 100644 index cf97b4b1796..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h +++ /dev/null @@ -1,112 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -/* -Some assumptions about the streams created in this file: - - PACKET STREAM: - - * send(), recv() may not work, we can only use - read()/write(). - - * write(): either send the whole packet, or send nothing - - * read(): read() will read the minimun of the - requested number of bytes and current packet size. - read() can read part of a packet, but it - will not read cross packet boundaris - - There are two modes: non-discard and dicard. If a packets is - not read all its bytes, the remaining bytes will be - or not be discarded. - - This is indicated by if (*max_pkt_size) is positive - (non-discard) or negative (discard) - - BYTE_STREAM: reliable - - * write(): might write only part of requested bytes - each time. (this is the case in SunOS4) - - * read(): might read less than requested bytes. - (this is the case in SunOS4). -*/ - -/* returns: -1 -- failed, 0 -- successful */ -int ComInitClient(int inet_port, char * unix_port, char * atm_port); - -void ComCloseClient(void); - -/* address format: [ATM:|INET:]real_address | "" - - "" -- UNIX socket, reliable byte stream - [INET:]real_address -- INET sockets, reliable control byte stream, and - *max_pkt_size == 0 : reliable data byte stream, or - != 0 : unreliable packet stream; - ATM:real_address -- ATM sockets, both data and control are - unreliable packet streams; - DATM:real_address -- INET/UNIX control reliable byte stream - and ATM unreliable byte stream; - - returns: -1 -- failed, 0 -- successful - *ctr_fd -- control connection file descriptor - *data_fd -- data connection file descriptor - *max_pkt_size -- == 0 : reliable BYTE_STREAM - > 0 : unreliable non-discard PACKET STREAM - with given maximum packet size (bytes); - < 0 : unreliable discard PACKET STREAM - with given maximum packet size (bytes); - - It is suggested that if a BYTE_STREAM is not known to be discarded, - than it is safer to indicate it as discard. - */ -int ComOpenConnPair(char * address, int *ctr_fd, int *data_fd, int *max_pkt_size); -int VideoComOpenConnPair(char * address, int *ctr_fd, int *data_fd, int *max_pkt_size); - - -/* returns: -1 -- failed, >=0 -- fd */ -int ComOpenConn(char * address, int *max_pkt_size); - -/* returns: -1 -- failed, 0 -- successful */ -int ComCloseFd(int fd); - -/* returns: -1 -- failed, 0 -- successful */ -int ComCloseConn(int fd); - -/* returns: -1 -- failed, 0 -- successful */ -int ComInitServer(int inet_port, char * unix_port, char * atm_port); - -void ComCloseListen(void); - -void ComCloseServer(void); - -/* returns: -1 -- failed, 0 -- successful - *max_pkt_size is used only for returning value -*/ -int ComGetConnPair(int *ctr_fd, int *data_fd, int *max_pkt_size); - -/* returns: -1 -- failed, >= 0 -- fd */ -int ComGetConn(int *max_pkt_size); - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.cpp deleted file mode 100644 index 2506186cdb8..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.cpp +++ /dev/null @@ -1,410 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "routine.h" -#include "fileio.h" - -ACE_RCSID(mpeg_shared, fileio, "$Id$") - -/* - Statfile(filename, sb) - input: filename - path name of a directory entry; - output: sb - StatBuf structure of the given directory entry; - returns: 0 - successful, -1 - failed, with errno indicating error - */ -int StatFile(char *filename, struct StatBuf * sb) -{ - struct stat statbuf; - struct passwd *pw; - struct group *grp; - - if (stat(filename, &statbuf) == -1) - return -1; - - sb->mode = statbuf.st_mode; - sb->size = statbuf.st_size; - - strcpy(sb->ctime, ACE_OS::ctime (&(statbuf.st_ctime))); - sb->ctime[strlen(sb->ctime)-1] = 0; /* remove CR */ - - if ((pw = getpwuid(statbuf.st_uid)) == NULL) - sprintf(sb->uid, "%-10d", statbuf.st_uid); - else - strncpy(sb->uid, pw->pw_name, 32); - - if ((grp = getgrgid(statbuf.st_gid)) == NULL) - sprintf(sb->gid, "%-10d", statbuf.st_gid); - else - strncpy(sb->gid, grp->gr_name, 32); -} - -/* - read_bytes(s, buf, size) - input: s - socket to read from - buf - address of a buffer for the read - size - number of bytes to read - output: non - action: try read given number of bytes, all errors are reported, and - cause program to exit. -*/ -void read_bytes(int s, char * buf, int size) -{ - int val, remain = size; - char * ptr = buf; - - if (size == 0) return; - - for (;;) - { - val = ACE_OS::read (s, ptr, remain); - - if (val == -1 && (errno == EINTR || errno == EAGAIN | errno == EWOULDBLOCK)) - { /* interrupted or need to wait, try again */ - if (errno == EAGAIN | errno == EWOULDBLOCK) usleep(10000); - errno = 0; - continue; - } - if (val == -1) - { - ACE_OS::perror ("Error -- Read from socket"); - ACE_OS::exit (1); - } - if (val == 0) /* EOF encountered */ - { - fprintf(stderr, "Error -- EOF reached while trying to read %d bytes.\n", size); - ACE_OS::exit (1); - } - ptr += val; - remain -= val; - if (remain < 0) /* weird thing is happening */ - { - fprintf(stderr, "Error: read too much from socket, %d out of %d bytes.\n", - size-remain, size); - ACE_OS::exit (1); - } - if (remain == 0) - break; - } -} - -int wait_read_bytes (int s, char *buf, int size) -{ - int val, remain = size; - char * ptr = buf; - - if (size == 0) return 1; - - for (;;) - { - val = ACE_OS::read (s, ptr, remain); - - if (val == -1 && (errno == EINTR || errno == EAGAIN | errno == EWOULDBLOCK)) - { /* interrupted or need to wait, try again */ - if (errno == EAGAIN | errno == EWOULDBLOCK) usleep(10000); - errno = 0; - continue; - } - if (val == -1) - { - /* - ACE_OS::perror ("Error -- wait_read from socket"); - */ - return -1; - } - if (val == 0) /* EOF encountered */ - { - /* - fprintf(stderr, "Warn pid %d -- EOF on wait_read %d bytes.\n", - ACE_OS::getpid (), size); - */ - return 0; - } - ptr += val; - remain -= val; - if (remain < 0) /* weird thing is happening */ - { - fprintf(stderr, - "Error: weird, read too much from socket, %d out of %d bytes.\n", - size-remain, size); - return -1; - } - if (remain == 0) - break; - } - return size; -} - -#define WAIT_DURATION 5000000 - -int time_read_bytes(int s, char * buf, int size) -{ - int val, remain = size; - char * ptr = buf; - long start = get_usec(); - - int times = 0; - - if (size == 0) return 0; - - for (;;) { - struct fd_set read_mask; - struct timeval tval = {0, 0}; - - FD_ZERO(&read_mask); - FD_SET(s, &read_mask); -#ifdef _HPUX_SOURCE - if (select(s+1, (int *)&read_mask, NULL, NULL, &tval) <= 0) -#else - if (select(s+1, &read_mask, NULL, NULL, &tval) <= 0) -#endif - { - /* - if (get_duration(start, get_usec()) < WAIT_DURATION) { - usleep(10000); - continue; - } - */ - if (times < WAIT_DURATION / 10000) { - usleep(10000); - times ++; - continue; - } - else { - fprintf(stderr, "time_read_bytes() %d seconds expired\n", - WAIT_DURATION/1000000); - return -1; - } - } - - if (!(FD_ISSET(s, &read_mask))) continue; - - val = ACE_OS::read (s, ptr, 1); - - if (val == -1 && (errno == EINTR)) - { /* interrupted or need to wait, try again */ - errno = 0; - continue; - } - if (val == -1) - { - ACE_OS::perror ("Error -- time_read_bytes() from socket"); - return -1; - } - if (val == 0) /* EOF encountered */ - { - /* - fprintf(stderr, "Error -- EOF reached while trying to read %d bytes.\n", size); - */ - return -1; - /* 'continue' causes infinite loop if the pipe is closed by peer - continue; - */ - } - ptr += val; - remain -= val; - if (remain == 0) - return 0; - } -} - -/* - write_bytes(sock, data, len): - try write len byte of data to sock, report all errors by - warning message. -*/ -void write_bytes(int sock, char * data, int len) -{ - while (len > 0) { - int res = ACE_OS::write (sock, data, len); - if (res == -1) { - if (errno == EINTR || errno == EAGAIN) continue; - fprintf(stderr, "Error pid %d",ACE_OS::getpid ()); - ACE_OS::perror (" -- failed to write all bytes to socket"); - ACE_OS::exit (1); - } - len -= res; - data += res; - } -} - -int time_write_bytes(int sock, char * data, int plen) -{ - int len = plen; - while (len > 0) { - int res = ACE_OS::write (sock, data, len); - if (res == -1) { - if (errno == EINTR || errno == EAGAIN) continue; - fprintf(stderr, "Error pid %d",ACE_OS::getpid ()); - ACE_OS::perror (" -- failed to time_write all bytes to socket"); - return -1; - } - len -= res; - data += res; - } - return plen; -} - -int wait_write_bytes(int sock, char * data, int plen) -{ - int len = plen; - while (len > 0) { - int res = ACE_OS::write (sock, data, len); - if (res == -1) { - if (errno == EINTR || errno == EAGAIN) continue; - /* - fprintf(stderr, "Error pid %d",ACE_OS::getpid ()); - ACE_OS::perror (" -- failed to wait_write all bytes to socket"); - */ - return -1; - } - len -= res; - data += res; - } - return plen; -} - -/* read_byte: - read one byte from sock to buffer data */ - -void read_byte(int sock, char * data) -{ - read_bytes(sock, data, 1); -} - -/* read_short: - read a short integer from socket sock to buffer data, - byte order conversion is also done. -*/ -void read_short(int sock, short * data) -{ - read_bytes(sock, (char *)data, sizeof(short)); - *data = ntohs(*data); -} - -/* read_int: - read a integer from socket sock to buffer data, - byte order conversion is also done */ - -void read_int(int sock, int * data) -{ - read_bytes(sock, (char *)data, sizeof(int)); - *data = ntohl(*data); -} - -int time_read_int(int sock, int * data) -{ - if (time_read_bytes(sock, (char *)data, sizeof(int)) == -1) { - return -1; - } - *data = ntohl(*data); - return 0; -} - -/* read a string. Returns the length of the string. - transfer through the socket. - but the string in buffer might have been truncated. - the returned string is '\0' terminated */ - -int read_string(int sock, char *data, int maxlen) -{ - int len; - read_int(sock, &len); - if (len == 0) - { - data[0] = 0; - return 0; - } - if (len < maxlen) - { - read_bytes(sock, data, len); - data[len] = 0; - } - else - { - int i; - char tmp; - read_bytes(sock, data, maxlen-1); - data[maxlen-1] = 0; - for (i = 0; i < len - maxlen + 1; i ++) /* discard extra data */ - read_byte(sock, &tmp); - } - return len; -} - - -/* write_byte: - write a byte to socket sock */ - -void write_byte(int sock, char data) -{ - write_bytes(sock, &data, 1); -} - -/* write_short: - byte order convert the short integer in data and write to socket sock */ - -void write_short(int sock, short data) -{ - short val = htons(data); - write_bytes(sock, (char *)&val, sizeof(short)); -} - -/* write_int: - byte order convert the integer in data and write to socket sock */ -void write_int(int sock, int data) -{ - int val = htonl(data); - write_bytes(sock, (char *)&val, sizeof(int)); -} - -int time_write_int(int sock, int data) -{ - int val = htonl(data); - return time_write_bytes(sock, (char *)&val, sizeof(int)); -} - -/* write a string in data to socket sock, the string is led by a length */ - -void write_string(int sock, char *data) -{ - int len =ACE_OS::strlen (data); - - write_int(sock, len); - write_bytes(sock, data, len); -} - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h deleted file mode 100644 index 640037cbd5c..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h +++ /dev/null @@ -1,100 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -/* data structure used by StatFile() */ - -#ifndef _MPEG_FILE_IO_H -#define _MPEG_FILE_IO_H - -struct StatBuf -{ - unsigned short mode; - long size; - char uid[32]; - char gid[32]; - char ctime[32]; -}; - -/* protocol of functions defined in shared.c */ - -int StatFile(char *filename, struct StatBuf * sb); - - - -/* Following read...()'s would exit(1) if requested bytes can not be - read, and EOF or error other than EINTR, EAGAIN or EWOULDBLOCK is - encountered */ - -void read_bytes(int s, char * buf, int size); - -void read_byte(int sock, char * data); - -void read_short(int sock, short * data); - -void read_int(int sock, int * data); - -int read_string(int sock, char *data, int maxlen); /* returns the length of a stream */ - - -/* Following write...()'s would exit(1) if requested bytes can not - be written to socket because of error has happened*/ - -void write_bytes(int sock, char * data, int len); - -void write_byte(int sock, char data); - -void write_short(int sock, short data); - -void write_int(int sock, int data); - -void write_string(int sock, char *data); - - -/* following returns: 0 -- succ, -1 -- failed. - time_read*() will wait at most 5 seconds before they return */ - -int time_read_bytes(int s, char * buf, int size); - -int time_read_int(int sock, int * data); - -int time_write_bytes(int sock, char * data, int len); - -int time_write_int(int sock, int data); - - -/* Following read...()'s would return 0/-1 if requested bytes can not - be read, and EOF (return 0) or error (return -1) other than EINTR, - EAGAIN or EWOULDBLOCK is encountered */ - -int wait_read_bytes(int s, char *buf, int size); - - -/* Following write...()'s would return 0/-1 if requested bytes can not - be written and error (return -1) other than EINTR, EAGAIN or is - encountered */ - -int wait_write_bytes(int s, char *buf, int size); - -#endif /* _MPEG_FILE_IO_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.cpp deleted file mode 100644 index 7458bb9ea02..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.cpp +++ /dev/null @@ -1,370 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -#include -#include /* INT_MIN, INT_MAX are defined here */ -#include -#include -#include -/* -#include -#include -#include -*/ -#include "filters.h" -#include "ace/OS.h" - -ACE_RCSID(mpeg_shared, filters, "$Id$") - -#define BUFSIZE 256 -#define maxval(a,b) ((a) > (b) ? (a) : (b)) -#define minval(a,b) ((a) < (b) ? (a) : (b)) - -static float FLOAT_MIN = (float)INT_MIN; -static float FLOAT_MAX = (float)INT_MAX; - -AverageFilter * NewAverageFilter(int nsamples) -{ - AverageFilter * f; - f = (AverageFilter *) ACE_OS::malloc(sizeof(*f)); - if (f == NULL) - return NULL; - f->type = FILTER_AVERAGE; - f->nsamples = nsamples; - f->buf = (double *)ACE_OS::malloc(nsamples * sizeof(double)); - if (f->buf == NULL) { - ACE_OS::free(f); - return NULL; - } - f->count = 0; - f->ptr = 0; - f->sum = 0; - return f; -} - -AverageFilter * ResetAverageFilter(AverageFilter *f, int nsamples) -{ - if (f->nsamples != nsamples) { - ACE_OS::free(f->buf); - f->nsamples = nsamples; - f->buf = (double *)ACE_OS::malloc(nsamples * sizeof(double)); - if (f->buf == NULL) { - ACE_OS::free(f); - return NULL; - } - } - f->count = 0; - f->ptr = 0; - f->sum = 0; - return f; -} - -void FreeAverageFilter(AverageFilter * f) -{ - ACE_OS::free(f->buf); - ACE_OS::free(f); -} - -double DoAverageFilter(AverageFilter *f, double value) -{ - int offset; - double oldval = f->buf[f->ptr]; - f->buf[f->ptr] = value; - f->ptr = (f->ptr + 1) % f->nsamples; - f->sum += value; - if (f->count >= f->nsamples) { - f->sum -= oldval; - } - else { - f->count ++; - } - return (double)(f->sum) / (double)f->count; -} - - -LowPassFilter * NewLowPassFilter(double Rvalue) -{ - LowPassFilter * f; - f = (LowPassFilter *)ACE_OS::malloc(sizeof(*f)); - if (f == NULL) { - return NULL; - } - if (Rvalue > 1.0) { - Rvalue = 1.0; - } - else if (Rvalue < 0.0) { - Rvalue = 0.0; - } - f->type = FILTER_LOWPASS; - f->count = 0; - f->maxcount = (int)(1.0 / maxval(Rvalue, 0.0001)); - f->R = Rvalue; - f->result = FLOAT_MIN; - return f; -} - -LowPassFilter * ResetLowPassFilter(LowPassFilter * f, double Rvalue) -{ - if (Rvalue > 1.0) { - Rvalue = 1.0; - } - else if (Rvalue < 0.0) { - Rvalue = 0.0; - } - f->count = 0; - f->maxcount = (int)(1.0 / maxval(Rvalue, 0.0001)); - f->R = Rvalue; - f->result = FLOAT_MIN; - return f; -} - -void FreeLowPassFilter(LowPassFilter * f) -{ - ACE_OS::free(f); -} - -double DoLowPassFilter(LowPassFilter * f, double value) -{ - if (f->count <= f->maxcount) { - if (!f->count) { - f->count ++; - return (f->result = value); - } - f->count ++; - return (f->result = (1.0 - (1.0/(double)f->count)) * f->result + - (1.0/(double)f->count) * value); - } - return (f->result = (1.0 - f->R) * f->result + f->R * value); -} - -MedianFilter * NewMedianFilter(int nsamples) -{ - int minv = 0, maxv = 1; - MedianFilter * f; - f = (MedianFilter *) ACE_OS::malloc(sizeof(*f)); - if (f == NULL) - return NULL; - f->type = FILTER_MEDIAN; - f->nsamples = nsamples; - f->max = maxval(maxv, minv); - f->min = minval(maxv, minv); - f->statsize = f->max - f->min + 1; - f->buf = (int *)ACE_OS::malloc(nsamples * sizeof(int)); - if (f->buf == NULL) { - ACE_OS::free(f); - return NULL; - } - f->stat = (int *)ACE_OS::malloc(f->statsize * sizeof(int)); - if (f->stat == NULL) { - ACE_OS::free(f->buf); - ACE_OS::free(f); - return NULL; - } - f->count = 0; - f->ptr = 0; - f->med = 0; - f->below = 0; - memset(f->stat, 0, f->statsize * sizeof(int)); - return f; -} - -MedianFilter * ResetMedianFilter(MedianFilter * f, int nsamples) -{ - if (f->nsamples != nsamples) { - ACE_OS::free(f->buf); - f->nsamples = nsamples; - f->buf = (int *)ACE_OS::malloc(nsamples * sizeof(int)); - if (f->buf == NULL) { - ACE_OS::free(f); - return NULL; - } - } - f->count = 0; - f->ptr = 0; - f->med = 0; - f->below = 0; - memset(f->stat, 0, f->statsize * sizeof(int)); - return f; -} - -void FreeMedianFilter(MedianFilter * f) -{ - ACE_OS::free(f->buf); - ACE_OS::free(f->stat); - ACE_OS::free(f); -} - -double DoMedianFilter(MedianFilter *f, double pvalue) -{ - int value = (int)pvalue; - int offset; - int oldval = f->buf[f->ptr]; - if (value > f->max) { - int * oldstat = f->stat; - int oldsize = f->statsize; - f->max = value + 10; - f->statsize = f->max - f->min + 1; - f->stat = (int *)ACE_OS::malloc(f->statsize * sizeof(int)); - if (f->stat == NULL) { - fprintf(stderr, "MedianFilter Failed to extend up stat to % items", - f->statsize); - ACE_OS::perror (""); - ACE_OS::exit (1); - } - memset((char *)(f->stat) + sizeof(int) * oldsize, 0, - sizeof(int) * (f->statsize - oldsize)); - ACE_OS::memcpy (f->stat, oldstat, oldsize * sizeof(int)); - } - else if (value < f->min) { - int * oldstat = f->stat; - int oldsize = f->statsize; - f->min = value - 10; - f->statsize = f->max - f->min + 1; - f->stat = (int *)ACE_OS::malloc(f->statsize * sizeof(int)); - if (f->stat == NULL) { - fprintf(stderr, "MedianFilter Failed to extend down stat to % items", - f->statsize); - ACE_OS::perror (""); - ACE_OS::exit (1); - } - memset(f->stat, 0, sizeof(int) * (f->statsize - oldsize)); - ACE_OS::memcpy ((char *)(f->stat) + sizeof(int) * (f->statsize - oldsize), - oldstat, sizeof(int) * oldsize); - f->med += f->statsize - oldsize; - } - f->buf[f->ptr] = value; - f->ptr = (f->ptr + 1) % f->nsamples; - offset = value - f->min; - if (offset < 0) { - offset = 0; - } - else if (offset >= f->statsize) { - offset = f->statsize - 1; - } - f->stat[offset] ++; - if (offset < f->med) { - f->below ++; - } - if (f->count >= f->nsamples) { - offset = oldval - f->min; - if (offset < 0) { - offset = 0; - } - else if (offset >= f->statsize) { - offset = f->statsize - 1; - } - f->stat[offset] --; - if (offset < f->med) { - f->below --; - } - } - else { - f->count ++; - } - oldval = f->count >> 1; - if (f->below > oldval) { - offset = f->med - 1; - while (offset >= 0 && (f->below - f->stat[offset]) > oldval) { - f->below -= f->stat[offset]; - offset --; - } - f->med = offset + 1; - } - else { - offset = f->med; - while (offset < f->statsize && (f->below + f->stat[offset]) <= oldval) { - f->below += f->stat[offset]; - offset ++; - } - f->med = offset; - } - return (double)(f->med + f->min); -} - -Filter * NewFilter(int type, int parameter) -{ - switch (type) { - case FILTER_LOWPASS: - return (Filter *)NewLowPassFilter(1.0/(double)parameter); - case FILTER_MEDIAN: - return (Filter *)NewMedianFilter(parameter); - case FILTER_AVERAGE: - return (Filter *)NewAverageFilter(parameter); - default: - break; - } - return NULL; -} - -Filter * ResetFilter(Filter * f, int parameter) -{ - switch (f->type) { - case FILTER_LOWPASS: - return (Filter *)ResetLowPassFilter((LowPassFilter *)f, 1.0/(double)parameter); - case FILTER_MEDIAN: - return (Filter *)ResetMedianFilter((MedianFilter *)f, parameter); - case FILTER_AVERAGE: - return (Filter *)ResetAverageFilter((AverageFilter *)f, parameter); - default: - break; - } - return NULL; -} - -void FreeFilter(Filter * f) -{ - switch (f->type) { - case FILTER_LOWPASS: - FreeLowPassFilter((LowPassFilter *)f); - break; - case FILTER_MEDIAN: - FreeMedianFilter((MedianFilter *)f); - break; - case FILTER_AVERAGE: - FreeAverageFilter((AverageFilter *)f); - break; - default: - break; - } -} - -double DoFilter(Filter *f, double value) -{ - switch (f->type) { - case FILTER_LOWPASS: - return DoLowPassFilter((LowPassFilter *)f, value); - break; - case FILTER_MEDIAN: - return DoMedianFilter((MedianFilter *)f, value); - break; - case FILTER_AVERAGE: - return DoAverageFilter((AverageFilter *)f, value); - break; - default: - break; - } - return FLOAT_MIN; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h deleted file mode 100644 index 50950277478..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h +++ /dev/null @@ -1,91 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ - -#if !defined (AV_FILTERS_H) -#define AV_FILTERS_H - -#define FILTER_LOWPASS 0 -#define FILTER_MEDIAN 1 -#define FILTER_AVERAGE 2 - -typedef struct MedianFilter { - int type; - int * buf; - int nsamples; - int count; - int ptr; - int * stat; - int statsize; - int max, min; - int med; /* median offset to stat */ - int below; /* total points below the med entry */ -} MedianFilter; - -typedef struct LowPassFilter { - int type; - int count; - int maxcount; - double R; - double result; -} LowPassFilter; - -typedef struct AverageFilter { - int type; - double * buf; - int nsamples; - int ptr; - double sum; - int count; -} AverageFilter; - -typedef union Filter { - int type; - MedianFilter m; - AverageFilter a; - LowPassFilter l; -} Filter; - -Filter * NewFilter(int type, int parameter); -Filter * ResetFilter(Filter * f, int parameter); -void FreeFilter(Filter * f); -double DoFilter(Filter *f, double value); - -MedianFilter * NewMedianFilter(int nsamples); -MedianFilter * ResetMedianFilter(MedianFilter * f, int nsamples); -void FreeMedianFilter(MedianFilter * f); -double DoMedianFilter(MedianFilter *f, double value); - -AverageFilter * NewAverageFilter(int nsamples); -AverageFilter * ResetAverageFilter(AverageFilter * f, int nsamples); -void FreeAverageFilter(AverageFilter * f); -double DoAverageFilter(AverageFilter *f, double value); - -LowPassFilter * NewLowPassFilter(double R); -LowPassFilter * ResetLowPassFilter(LowPassFilter * f, double R); -void FreeLowPassFilter(LowPassFilter * f); -double DoLowPassFilter(LowPassFilter *f, double value); - -#endif /* AV_FILTERS_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.cpp deleted file mode 100644 index e4fa8d8a6b5..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.cpp +++ /dev/null @@ -1,522 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -#include -#include -#include -#include -#include -#include -#ifdef __svr4__ -#include -#endif -#ifdef _HPUX_SOURCE -#include -#elif defined(__svr4__) -#include -#include -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "routine.h" - -ACE_RCSID(mpeg_shared, routine, "$Id$") - -#define TEST_TYPE 1 -#define SIGSETMASK 0 -#define stacksize 10000 -#define TIME_ROUND 4000 -#define BLOCK_NUM 5 -#define DELTA_MSEC 20 - -union semun sem_union; - -int get_hostname(char *name, int len) -{ -#ifdef __svr4__ - if (sysinfo(SI_HOSTNAME, name, len) == -1) return -1; - else return 0; -#else - return ACE_OS::hostname(name, len); -#endif -} - -long get_usec(void) -{ - struct timeval tp; - struct timezone tzp; - int err; - if (err=gettimeofday(&tp, &tzp)) - { - return 0; - } - else { - /* - return ((long)1000000)*(tp.tv_sec%TIME_ROUND) + (tp.tv_usec); - */ - return ((long)1000000)*(tp.tv_sec) + (tp.tv_usec); - } -} - -long get_msec(void) -{ - struct timeval tp; - struct timezone tzp; - int err; - if (err=gettimeofday(&tp, &tzp)) - { - return 0; - } - else - { - return ((long)1000)*(tp.tv_sec) + (tp.tv_usec / 1000); - } -} - -long get_sec(void) -{ - struct timeval tp; - struct timezone tzp; - int err; - if (err=gettimeofday(&tp, &tzp)) - { - return 0; - } - else - { - return tp.tv_sec; - } -} - -/* returns the difference of the two usec time values */ - -long get_duration(long val1, long val2) -{ - /* - return val2>=val1 ? val2-val1 : (val2+TIME_ROUND-val1); - */ - return val2>=val1 ? val2-val1 : ((LONG_MAX - val1) + (val2 - LONG_MIN) + 1); -} - -#ifdef LINUX -#else -void usleep(unsigned int usec) -{ - struct timeval val; - - if (usec <= 0) return; - val.tv_sec = usec / 1000000; - val.tv_usec = usec % 1000000; - if (select(0, NULL, NULL, NULL, &val) == -1 && errno != 4) - { - ACE_OS::perror ("sleep with select"); - ACE_OS::exit (1); - } -} -#endif - -void beep(void) -{ - fprintf(stderr, "\007"); -} - -#ifndef FreeBSD -#include -#endif -#include - -void remove_shmem_id(int id) -{ - ACE_OS::shmctl (id, IPC_RMID, NULL); -#if 0 - /* weird also on some sunOs4 machines */ - /* weird, HPUX always report error on this operation */ - if (errno) - { - fprintf(stderr, "shmctl shm_id:%d to IPC_RMID error:", id); - ACE_OS::perror (""); - } -#endif -} - -char * creat_shared_mem_id(int size, int * id) -{ - char * shm; - int shm_id; - - shm_id = ACE_OS::shmget (IPC_PRIVATE, size, IPC_CREAT | 0666); - if (shm_id == -1) - { - shm_id = ACE_OS::shmget (IPC_PRIVATE, 0, IPC_CREAT | 0666); - if (shm_id == -1) - { - ACE_OS::perror ("Shared MEM shmget1 error"); - ACE_OS::exit (1); - } - else - { - if (shmctl(shm_id, IPC_RMID, NULL) == -1) - { - ACE_OS::perror ("Shared MEM shmctl error"); - ACE_OS::exit (1); - } - shm_id = ACE_OS::shmget (IPC_PRIVATE, 0, IPC_CREAT | 0666); - if (shm_id == -1) - { - ACE_OS::perror ("Shared MEM shmget2 error"); - ACE_OS::exit (1); - } - } - } - shm = (char *)shmat(shm_id, (char *)0, 0); - if ((int)shm == -1) - { - ACE_OS::perror ("Shared MEM shmat error"); - ACE_OS::exit (1); - } - *id = shm_id; - return shm; -} - -char * creat_shared_mem(int size) -{ - int shm_id; - char * shm = creat_shared_mem_id(size, &shm_id); - remove_shmem_id(shm_id); - return shm; -} - -void remove_shared_mem(char *ptr) -{ - ACE_OS::shmdt (ptr); -} - -#define SEM_NUM 6 -static int semId = -1; -static int masterPid = -1; -static int nextSem = -1; - -void enter_cs(int semaphore_id) -{ - struct sembuf sop; - sop.sem_num = semaphore_id; - sop.sem_op = -1; - sop.sem_flg = 0; - while (ACE_OS::semop(semId, &sop, 1) == -1) - { - if (errno == EINTR) - continue; - fprintf(stderr, "semop(enter_cs) error: pid=%d",ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::exit (1); - } -} - -void leave_cs(int semaphore_id) -{ - struct sembuf sop; - sop.sem_num = semaphore_id; - sop.sem_op = 1; - sop.sem_flg = 0; - while (ACE_OS::semop(semId, &sop, 1) == -1) - { - if (errno == EINTR) - continue; - fprintf(stderr, "semop(leave_cs) error, pid=%d",ACE_OS::getpid ()); - ACE_OS::perror (""); - ACE_OS::exit (1); - } -} - -int creat_semaphore(void) -{ - int i; - int sem_val; - int semaphore_id; - if (semId == -1) { - semId = ACE_OS::semget (IPC_PRIVATE, SEM_NUM, IPC_CREAT | 0666); - if (semId == -1) { - ACE_OS::perror ("Semaphore semget error"); - ACE_OS::exit (1); - } - masterPid =ACE_OS::getpid (); - nextSem = 0; - } - else if (masterPid !=ACE_OS::getpid ()) { - fprintf(stderr, "Error: this creat_semaphore() assumes semaphores are allocated\n"); - fprintf(stderr, " only in single process %d, while current pid=%d\n", - masterPid,ACE_OS::getpid ()); - ACE_OS::exit (1); - } - semaphore_id = nextSem ++; - if (semaphore_id >= SEM_NUM) { - fprintf(stderr, "Error: all of %d semaphores used up.\n", SEM_NUM); - ACE_OS::exit (1); - } - sem_val = ACE_OS::semctl (semId, semaphore_id, GETVAL, sem_union); -/* - fprintf(stderr, "Initial semaphore value: %d\n", sem_val); -*/ - if (sem_val == 0) - leave_cs(semaphore_id); - return semaphore_id; -} - -void delete_semaphore() -{ - if (masterPid ==ACE_OS::getpid () && semId >= 0) { - sem_union.val = 0; - ACE_OS::semctl (semId, 0, IPC_RMID, sem_union); - } else { - if (masterPid !=ACE_OS::getpid ()) - fprintf(stderr, "Pid %d not supposed to remove semId created by pid %d\n", - ACE_OS::getpid (), masterPid); - else - fprintf(stderr, "The semaphore has been deleted.\n"); - } - return; -} - -void remove_semaphore(int sid) -{ - return; - // ACE_OS::semctl (semId, semaphore_id, IPC_RMID, 0); -} - -void remove_all_semaphores (void) -{ - sem_union.val = 0; - ACE_OS::semctl (semId,0, IPC_RMID, sem_union); - return; -} - -int get_semval(int sid) -{ - int val, val1 = 0; - errno = 0; - sem_union.val = 0; - val = ACE_OS::semctl (semId, sid, GETVAL, sem_union); - if (val == -1) { - ACE_OS::perror ("getting value of a semaphore"); - ACE_OS::exit (1); - } - /* - if (val == 0) { - fprintf(stderr, "pid %d to call ACE_OS::semctl (%d, 0, GETZCNT)\n",ACE_OS::getpid (), sid); - sem_union.val = 0; - val = ACE_OS::semctl (semId, 0, GETZCNT, 0); - if (val == -1) { - ACE_OS::perror ("getting semzcnt of a semaphore"); - ACE_OS::exit (1); - } - - fprintf(stderr, "pid %d to call ACE_OS::semctl (%d, 0, GETNCNT)\n",ACE_OS::getpid (), sid); - usleep(10000000); - sem_union.val = 0; - val1 = ACE_OS::semctl (semId, sid, GETNCNT, sem_union); - if (val1 == -1) { - ACE_OS::perror ("getting semncnt of a semaphore"); - } - fprintf(stderr, "pid %d to called ACE_OS::semctl (GETNCNT)\n",ACE_OS::getpid ()); - - fprintf(stderr, "Semval val %d, val1 %d\n", val, val1); - return (0-(val + val1)); - } - else - */ - return val; -} - -void get_full_path(char *filename, char * buffer, int bufsize) -{ - char path[MAXPATHLEN]; - - path[0] = 0; - - if (*filename == '/') - strncpy(path, filename, MAXPATHLEN); - else if (*filename == '~') - { - char * env = getenv("HOME"); - if (env != NULL) - { - strncpy(path, env, MAXPATHLEN); - strncat(path, filename+1, MAXPATHLEN -ACE_OS::strlen (path)); - } - else - strncpy(path, filename, MAXPATHLEN); - } - else /* from current dir */ - { - getcwd(path, MAXPATHLEN); - if (errno) - strncpy(path, filename, MAXPATHLEN); - else - { - path[MAXPATHLEN-4] = 0; - strcat(path, "/"); - strncat(path, filename, MAXPATHLEN -ACE_OS::strlen (path)); - } - } - path[MAXPATHLEN-1] = 0; - strncpy(buffer, path, bufsize); - buffer[bufsize-1] = 0; - /* - fprintf(stderr, "%s extended to %s\n", filename, buffer); - */ -} - -void setsignal(int sig, void (func)(int)) -{ -#ifdef _HPUX_SOURCE - struct sigvec sv; - - sv.sv_handler = func; - sv.sv_mask = 0; - sv.sv_flags = 0; - if (sigvector (sig, &sv, (struct sigvec *) NULL) == -1) { - fprintf(stderr, "sigvector(%d) error", sig); - ACE_OS::perror (""); - ACE_OS::exit (1); - } -#elif defined(__svr4__) || defined(IRIX) - if (sigset(sig, func) == SIG_ERR) { - fprintf(stderr, "sigset(%d,func) error", sig); - ACE_OS::perror (""); - ACE_OS::exit (1); - } -#elif defined(sun) || defined(FreeBSD) || defined(ULTRIX) || defined(LINUX) - { - struct sigaction act; - act.sa_handler = func; -#ifdef FreeBSD - act.sa_flags = SV_INTERRUPT; -#else - act.sa_flags =/* SA_INTERRUPT;*/ SA_RESTART; -#endif - // @@ Naga commented this line. - // act.sa_mask = 0; - if (!sigaction(sig, &act, NULL)) return; - fprintf(stderr, "sigaction(%d,...) error", sig); - ACE_OS::perror (""); - ACE_OS::exit (1); - } - /* - if (signal(sig, func) == SIG_ERR) { - fprintf(stderr, "signal(%d,func) error", sig); - ACE_OS::perror (""); - ACE_OS::exit (1); - } - */ -#else - fprintf(stderr, - "Error: code for setsignal(%d,func) is missing in source/mpeg_shared/routine.cpp\n", - sig); - ACE_OS::exit (1); -#endif -} - -/* set to 'pri': 0 -lowest RT, higher value higher RT priority. -1 - Time Sharing. - For HPUX, 0 -> 127, 1 -> 127, ..., pri -> 127 - pri; - For Solaris, -> 0, 1 -> 1, pri -> pri; - - The function returns 0 on success, -1 on failure - */ -int SetRTpriority(char *msg, int pri) -{ - if (pri >= 0) { -#ifdef _HPUX_SOURCE - if (rtprio(0, 127 - pri) == -1) - { - fprintf(stderr, "%s fails to be set to RT priority %d", msg, 127 - pri); - ACE_OS::perror (""); - return -1; - } - return 0; -#elif defined(__svr4__) - pcinfo_t pci; - pcparms_t pcp; - rtparms_t * rtp = (rtparms_t *)pcp.pc_clparms; - strcpy(pci.pc_clname, "RT"); - if (priocntl(P_PID, P_MYID, PC_GETCID, (char *)&pci) == -1) { - fprintf(stderr, "%s priocntl(PC_GETCID) failed for RT pri %d", msg, pri); - ACE_OS::perror (""); - return -1; - } - pcp.pc_cid = pci.pc_cid; - rtp->rt_pri = pri; - rtp->rt_tqsecs = 0; - rtp->rt_tqnsecs = 10000000; /* 10 (ten) milliseconds */ - if (priocntl(P_PID, P_MYID, PC_SETPARMS, (char *)&pcp) == -1) { - fprintf(stderr, "%s priocntl(PC_SETPARMS) failed for RT pri %d", msg, pri); - ACE_OS::perror (""); - return -1; - } - return 0; -#else - fprintf(stderr, "%s warning: RT priority not available on this arch.\n", msg); - return -1; -#endif - } - else { /* set to TS priority */ -#ifdef _HPUX_SOURCE - if (rtprio(0, RTPRIO_RTOFF) == -1) { - fprintf(stderr, "%s fails to be set to RTPRIO_RTOFF", msg); - ACE_OS::perror (""); - return -1; - } - return 0; -#elif defined(__svr4__) - pcinfo_t pci; - pcparms_t pcp; - tsparms_t * tsp = (tsparms_t *)pcp.pc_clparms; - strcpy(pci.pc_clname, "TS"); - if (priocntl(P_PID, P_MYID, PC_GETCID, (char *)&pci) == -1) { - fprintf(stderr, "%s priocntl(PC_GETCID) failed for TS priority", msg); - ACE_OS::perror (""); - return -1; - } - pcp.pc_cid = pci.pc_cid; - tsp->ts_uprilim = 0; - tsp->ts_upri = 0; - if (priocntl(P_PID, P_MYID, PC_SETPARMS, (char *)&pcp) == -1) { - fprintf(stderr, "%s priocntl(PC_SETPARMS) failed for TS priority", msg); - ACE_OS::perror (""); - return -1; - } - return 0; -#endif - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h deleted file mode 100644 index fa55050458b..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h +++ /dev/null @@ -1,55 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -/* routine.c */ -#ifndef _MPEG_ROUTINE_H -#define _MPEG_ROUTINE_H - -#include "include/common.h" -#ifdef LINUX -#else -void usleep(unsigned int usec); -#endif -void beep(void); -int get_hostname(char *name, int len); -long get_usec(void); -long get_msec(void); -long get_sec(void); -long get_duration(long valstart, long valstop); -void remove_shmem_id(int id); -char * creat_shared_mem_id(int size, int * id); -char * creat_shared_mem(int size); -void remove_shared_mem(char *ptr); -void enter_cs(int semaphore_id); -void leave_cs(int semaphore_id); -int creat_semaphore(void); -void remove_semaphore(int sid); -void remove_all_semaphores (void); -int get_semval(int sid); -void get_full_path(char *filename, char * buffer, int bufsize); -void setsignal(int sig, void (func)(int)); -int SetRTpriority(char *msg, int pri); - -#endif /* _MPEG_ROUTINE_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.cpp deleted file mode 100644 index ce036d608f8..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -#include -#include "sendpt.h" - -ACE_RCSID(mpeg_shared, sendpt, "$Id$") - -/* parameters: - pat -- pattern - buf -- buffer for holding sendpattern computed; - len -- length of pattern and send pattern (number of frames); - f -- number of frames to send (represented by result send pattern); -*/ -void ComputeSendPattern(char * pat, char * buf, int len, int f) -{ - memset(buf, 0, len); - if (f >= len) - { - memset(buf, 1, len); - } - else if (f <= 1) - { - buf[0] = 1; - } - else - { - int i, is = 0, ps = 0, bs = 0; - - memset(buf, 1, len); - for (i = 0; i < len; i++) - { - if (pat[i] == 'I') - is ++; - else if (pat[i] == 'P') - ps ++; - else /* B frame */ - bs ++; - } - f = len - f; /* number of frames to drop */ - if (f < bs) /* drops only B frames */ - { - double scale = (double)bs / (double)f; - int ptr = 0, ptr1 = 0; - for (i = 0; i < len; i ++) - { - if (pat[i] == 'B') - { - if ( ptr == (int) ((double)ptr1 * scale + 0.5)) - { - buf[i] = 0; - ptr1 ++; - } - ptr ++; - } - } - goto endOfCompute; - } - - /* drop all B frames */ - for (i = 0; i < len; i ++) - if (pat[i] == 'B') - buf[i] = 0; - - if (f == bs) - goto endOfCompute; - - if (f > bs && f < bs + ps) /* drop also some P frames */ - { - int ptr = len - 1; - for (i = 0; i < is; i ++) - { - int j; - for (j = 0; j < (f - bs) / is; j ++) - { - while (pat[ptr] != 'P') ptr --; - buf[ptr] = 0; - ptr --; - } - while (pat[ptr] != 'I') ptr --; - } - ptr = len - 1; - for (i = 0; i < (f - bs) % is; i ++) - { - while (pat[ptr] != 'P' || buf[ptr] == 0) ptr --; - buf[ptr] = 0; - while (pat[ptr] != 'I') ptr --; - } - goto endOfCompute; - } - - /* drop all P frames */ - for (i = 0; i < len; i ++) - if (pat[i] == 'P') - buf[i] = 0; - - if (f > bs + ps) /* needs to drop some I frames */ - { - double scale = (double)is / (double)(f - bs - ps); - int ptr = 0, ptr1 = 0; - for (i = 0; i < len; i ++) - { - if (pat[i] == 'I') - { - if ( ptr == (int) ((double)ptr1 * scale + 0.5)) - { - buf[i] = 0; - ptr1 ++; - } - ptr ++; - } - } - goto endOfCompute; - } - } - endOfCompute:; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h deleted file mode 100644 index 60935fae8ed..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h +++ /dev/null @@ -1,39 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -/* parameters: - pat -- pattern - buf -- buffer for holding sendpattern computed; - len -- length of pattern and send pattern (number of frames); - f -- number of frames to send (represented by result send pattern); -*/ -#include "ace/OS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -void ComputeSendPattern(char * pat, char * buf, int len, int f); - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.cpp deleted file mode 100644 index 1862a44a28a..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.cpp +++ /dev/null @@ -1,284 +0,0 @@ -// $Id$ - -#include "Machine_Properties.h" - -ACE_RCSID(server, Machine_Properties, "$Id$") - -const int TAO_Machine_Properties::NUM_PROPERTIES = 10; - -const int DEFAULT_TIMEOUT_SEC = 1; -const int DEFAULT_TIMEOUT_USEC = 0; - -const char* TAO_Machine_Properties::PROP_NAMES[] = -{ - "CPU", - "Disk", - "Pages", - "Swaps", - "Packets", - "Errors", - "Context_Switches", - "Collisions", - "Interrupts", - "Load" -}; - -TAO_Machine_Properties:: -TAO_Machine_Properties (void) - : timeout_ (ACE_Time_Value (DEFAULT_TIMEOUT_SEC, DEFAULT_TIMEOUT_USEC)), - timestamp_ (0), - sample_time_ (0) -{ - this->init (); -} - - -TAO_Machine_Properties:: -TAO_Machine_Properties (const ACE_Time_Value& timeout) - : timeout_ (timeout), - timestamp_ (0), - sample_time_ (0) -{ - this->init (); -} - -void -TAO_Machine_Properties::init (void) -{ - /* - this->rstat_client_ = - ::clnt_create("localhost", RSTATPROG, RSTATVERS_TIME, "udp"); - - if (this->rstat_client_ == 0) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) %s\n", - ::clnt_spcreateerror ("localhost"))); - } - - ::memset (&this->old_stats_, 0, sizeof (statstime)); - */ - this->retrieve_stats (); -} - -int -TAO_Machine_Properties::retrieve_stats (void) -{ - // initialize the handle everytime ?? - this->rstat_client_ = - ::clnt_create("localhost", RSTATPROG, RSTATVERS_TIME, "udp"); - - if (this->rstat_client_ == 0) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) %s\n", - ::clnt_spcreateerror ("localhost"))); - } - - ::memset (&this->old_stats_, 0, sizeof (statstime)); - - // if (this->rstat_client_ == 0) - // return -1; - - static struct timeval timeout = {25, 0}; - u_int result; - if ((result =clnt_call (this->rstat_client_, - RSTATPROC_STATS, - xdr_void, - 0, - (xdrproc_t) xdr_statstime, - (caddr_t) &this->stats_, - timeout)) != RPC_SUCCESS) - { - ACE_DEBUG ((LM_DEBUG,"rpc-error:%d\n",result)); - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %s\n", - ::clnt_sperror (this->rstat_client_, "localhost")), -1); - } - else - ACE_DEBUG ((LM_DEBUG,"rpc client call worked\n")); - - this->sample_time_ = ACE_OS::gettimeofday () - this->timestamp_; - this->timestamp_ = ACE_OS::gettimeofday (); - return 0; -} - -CORBA::Any* -TAO_Machine_Properties::evalDP (const char* prop_name, - CORBA::TypeCode_ptr returned_type, - const CORBA::Any& extra_info, - CORBA::Environment& TAO_IN_ENV) - TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)) -{ - CORBA::Any* return_value; - - ACE_DEBUG ((LM_DEBUG, "Evaluating machine properties.\n")); - - ACE_NEW_RETURN (return_value, CORBA::Any, 0); - - if (ACE_OS::gettimeofday () - this->timestamp_ > this->timeout_) - { - if (this->retrieve_stats () == -1) - return return_value; - } - - CORBA::String_var prop_name_var (prop_name); - int elapsed_seconds = this->sample_time_.sec () + - (this->sample_time_.usec () > 500000) ? 1 : 0; - - if (ACE_OS::strcmp (prop_name, PROP_NAMES[CPU]) == 0) - this->compute_cpu (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[DISK]) == 0) - this->compute_disk (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[PAGES]) == 0) - this->compute_pages (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[SWAPS]) == 0) - this->compute_swaps (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[PACKETS]) == 0) - this->compute_packets (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[ERRORS]) == 0) - this->compute_errors (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[CONTEXT_SWITCHES]) == 0) - this->compute_context (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[COLLISIONS]) == 0) - this->compute_collisions (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[INTERRUPTS]) == 0) - this->compute_interrupts (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[LOAD]) == 0) - this->compute_load (*return_value, elapsed_seconds); - - ::memcpy (&this->old_stats_, &this->stats_, sizeof (statstime)); - - return return_value; -} - -void -TAO_Machine_Properties:: -export_properties (TAO_Property_Exporter& prop_exporter) -{ - ACE_DEBUG ((LM_ERROR, "Adding machine properties.\n")); - for (int i = 0; i < NUM_PROPERTIES; i++) - { - CORBA::Any extra_info; - const char* name = PROP_NAMES[i]; - const CORBA::TypeCode_ptr prop_type = CORBA::_tc_float; - - CosTradingDynamic::DynamicProp* dp_struct = - this->construct_dynamic_prop (name, prop_type, extra_info); - - prop_exporter.add_dynamic_property (name, dp_struct); - } -} - -int -TAO_Machine_Properties:: -define_properties (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq, - CORBA::ULong offset) const -{ - prop_seq.length (NUM_PROPERTIES + offset); - for (int j = prop_seq.length () - offset - 1, i = offset; j >= 0; j--, i++) - { - prop_seq[i].name = PROP_NAMES[i - offset]; - prop_seq[i].value_type = CORBA::TypeCode::_duplicate (CORBA::_tc_float); - prop_seq[i].mode = CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; - } - - return NUM_PROPERTIES; -} - -void -TAO_Machine_Properties::compute_cpu (CORBA::Any& value, int elapsed_seconds) -{ - - // The first three cpu stats are for user, kernal, iowait - CORBA::ULong used = 0.0; - for (int i = 0; i < RSTAT_CPUSTATES - 1; i++) - used += (this->stats_.cp_time[i] - this->old_stats_.cp_time[i]); - - // The last is the amount idle. - CORBA::ULong idle = - this->stats_.cp_time[RSTAT_CPUSTATES - 1] - - this->old_stats_.cp_time[RSTAT_CPUSTATES - 1]; - - // The CPU usage is the amount used over the total available. - value <<= (CORBA::Float) ((((CORBA::Float) used) / (used + idle)) * 100.0); -} - -void -TAO_Machine_Properties::compute_disk (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float used = 0.0; - for (int i = 0; i < RSTAT_DK_NDRIVE; i++) - used += (this->stats_.dk_xfer[i] - this->old_stats_.dk_xfer[i]); - - value <<= (CORBA::Float)(used / (float) elapsed_seconds); -} - -void -TAO_Machine_Properties::compute_pages (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float pages = - (this->stats_.v_pgpgin - this->old_stats_.v_pgpgin) + - (this->stats_.v_pgpgout - this->old_stats_.v_pgpgout); - - value <<= (CORBA::Float) (pages / elapsed_seconds); -} - -void -TAO_Machine_Properties::compute_swaps (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float swaps = - (this->stats_.v_pswpin - this->old_stats_.v_pswpin) + - (this->stats_.v_pswpout - this->old_stats_.v_pswpout); - - value <<= (CORBA::Float) (swaps / elapsed_seconds); -} - -void -TAO_Machine_Properties::compute_packets (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float packets = - (this->stats_.if_ipackets - this->old_stats_.if_ipackets) + - (this->stats_.if_opackets - this->old_stats_.if_opackets); - - value <<= (CORBA::Float) (packets / elapsed_seconds); -} - -void -TAO_Machine_Properties::compute_errors (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float packets = - (this->stats_.if_ipackets - this->old_stats_.if_ipackets) + - (this->stats_.if_opackets - this->old_stats_.if_opackets); - - value <<= (CORBA::Float) (packets / elapsed_seconds); -} - -void -TAO_Machine_Properties:: -compute_context (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float switches = (this->stats_.v_swtch - this->old_stats_.v_swtch); - value <<= (CORBA::Float) (switches / elapsed_seconds); -} - -void -TAO_Machine_Properties:: -compute_collisions (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float cols = - (this->stats_.if_collisions - this->old_stats_.if_collisions); - value <<= (CORBA::Float) (cols / elapsed_seconds); -} - -void -TAO_Machine_Properties:: -compute_interrupts (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float intr = (this->stats_.v_intr - this->old_stats_.v_intr); - value <<= (CORBA::Float) (intr / elapsed_seconds); -} - -void -TAO_Machine_Properties::compute_load (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float load = ((CORBA::Float) this->stats_.avenrun[0]) / FSCALE; - value <<= load; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.h deleted file mode 100644 index 99c6079a419..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.h +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- C++ -*- */ - -// ============================================================================ -// $Id$ -// -// = FILENAME -// Machine_Properties.h -// -// = DESCRIPTION -// As a trading service dynamic property, retrieves machine -// statistics from the rstatd using Sun RPC. -// -// = AUTHORS -// Seth Widoff -// -// ============================================================================ - -#if (! defined TAO_MACHINE_PROPERTIES) -#define TAO_MACHINE_PROPERTIES - -#include "orbsvcs/Trader/Trader_Utils.h" -#include "Property_Exporter.h" - -//RPC related includes -#include -#include - -class TAO_Machine_Properties : - public TAO_Dynamic_Property, - public TAO_Exportable -{ -public: - - enum PROP_TYPES - { - CPU, - DISK, - PAGES, - SWAPS, - PACKETS, - ERRORS, - CONTEXT_SWITCHES, - COLLISIONS, - INTERRUPTS, - LOAD - }; - - static const int NUM_PROPERTIES; - static const char* PROP_NAMES[]; - - TAO_Machine_Properties (void); - - TAO_Machine_Properties (const ACE_Time_Value& timeout); - - virtual CORBA::Any* evalDP (const char* name, - CORBA::TypeCode_ptr returned_type, - const CORBA::Any& extra_info, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)); - // Return the value of a machine performance property whose name is - // contained in , which in essence is another - // demultiplexing key. - - virtual void export_properties (TAO_Property_Exporter& prop_exporter); - - virtual int define_properties - (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq, - CORBA::ULong offset = 0) const; - -private: - - void init (void); - - int retrieve_stats (void); - - void compute_cpu (CORBA::Any& value, int elapsed_time); - void compute_disk (CORBA::Any& value, int elapsed_time); - void compute_pages (CORBA::Any& value, int elapsed_time); - void compute_swaps (CORBA::Any& value, int elapsed_time); - void compute_packets (CORBA::Any& value, int elapsed_time); - void compute_errors (CORBA::Any& value, int elapsed_time); - void compute_context (CORBA::Any& value, int elapsed_time); - void compute_collisions (CORBA::Any& value, int elapsed_time); - void compute_interrupts (CORBA::Any& value, int elapsed_time); - void compute_load (CORBA::Any& value, int elapsed_time); - - const ACE_Time_Value timeout_; - ACE_Time_Value timestamp_; - ACE_Time_Value sample_time_; - - statstime stats_; - statstime old_stats_; - CLIENT* rstat_client_; - -}; - -#endif /* TAO_MACHINE_PROPERTIES */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Makefile deleted file mode 100644 index f590e6e5815..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Makefile +++ /dev/null @@ -1,865 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -MAKEFILE = Makefile -BIN = augmented_server server vs as - -BUILD = $(BIN) - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -AV_SERVER_OBJS = server.o -AV_AUGSERVER_OBJS = Video_RepositoryC.o augmented_server.o \ - Property_Exporter.o Machine_Properties.o \ - Video_Repository.o -AV_VS_OBJS = vs.o -AV_AS_OBJS = as.o - -# On non-Windows environment, we should at least define -# the export_include IDL flag. -override TAO_IDLFLAGS += \ - -I$(TAO_ROOT)/orbsvcs/orbsvcs - -IDL_FILES = Video_RepositoryC Video_RepositoryS - -FILES = augmented_server server vs as Property_Exporter Machine_Properties $(IDL_FILES) - -DEFS = $(addsuffix .h,$(FILES)) -LSRC = $(addsuffix .cpp,$(FILES)) - - -LIBS += -lTAO -lACE -lorbsvcs -lmpeg_server -lmpeg_shared -lrpcsvc - -MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source -CPPFLAGS += -I$(MPEG_ROOT) -I$(TAO_ROOT)/orbsvcs/orbsvcs - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU -#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets (and local hacks) -#---------------------------------------------------------------------------- - -CPPFLAGS += -DSH_MEM -DNDEBUG -CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs $(TSS_ORB_FLAG) - -.PRECIOUS: Video_RepositoryC.cpp - -idl_stubs: $(addsuffix .h, $(IDL_FILES)) - - -ifdef stat -CPPFLAGS += -DSTAT -endif - -server:$(addprefix $(VDIR),$(AV_SERVER_OBJS)) - $(LINK.cc) $(LDFAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -augmented_server:$(addprefix $(VDIR),$(AV_AUGSERVER_OBJS)) - $(LINK.cc) $(LDFAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -vs:$(addprefix $(VDIR),$(AV_VS_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -as:$(addprefix $(VDIR),$(AV_AS_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -clean: - -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state - -realclean: clean - -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES)) \ - $(addsuffix _T.h, $(IDL_FILES)) $(addsuffix _T.i, $(IDL_FILES)) $(addsuffix _T.cpp, $(IDL_FILES)) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/server.o .obj/server.so .shobj/server.o .shobj/server.so: server.cpp server.h \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.h \ - vs.h -.obj/vs.o .obj/vs.so .shobj/vs.o .shobj/vs.so: vs.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - vs.h $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h -.obj/as.o .obj/as.so .shobj/as.o .shobj/as.so: as.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/include/common.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Video_ControlS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS_T.cpp \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/Audio_ControlS.i \ - as.h $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h -.obj/Property_Exporter.o .obj/Property_Exporter.so .shobj/Property_Exporter.o .shobj/Property_Exporter.so: Property_Exporter.cpp Property_Exporter.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i -.obj/Machine_Properties.o .obj/Machine_Properties.so .shobj/Machine_Properties.o .shobj/Machine_Properties.so: Machine_Properties.cpp Machine_Properties.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - Property_Exporter.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.cpp deleted file mode 100644 index d3b5c62b869..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.cpp +++ /dev/null @@ -1,420 +0,0 @@ -// $Id$ - -#include "Property_Exporter.h" - -ACE_RCSID(server, Property_Exporter, "$Id$") - -// ************************************************************* -// DP_Adapter -// ************************************************************* - -class DP_Adapter : public TAO_Dynamic_Property -// = TITLE -// This class links the a dynamic property in a Trading Service -// Offer with its value in a CosPropertyService::PropertySet. -{ -public: - - DP_Adapter (const char* prop_name, - CosPropertyService::PropertySet_ptr prop_set); - - ~DP_Adapter (void); - - virtual CORBA::Any* evalDP (const char* name, - CORBA::TypeCode_ptr returned_type, - const CORBA::Any& extra_info, - CORBA::Environment& TAO_IN_ENV) - TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)); - // Call back to the Property Service interface. The Property - // Service reference is contained in the extra_info -- an - // Asynchronous Completion Token. - -private: - - const char* prop_name_; - CosPropertyService::PropertySet_var prop_set_; -}; - -DP_Adapter::DP_Adapter (const char* prop_name, - CosPropertyService::PropertySet_ptr prop_set) - : prop_name_ (prop_name), - prop_set_ (prop_set) -{ -} - -DP_Adapter::~DP_Adapter (void) -{ -} - -CORBA::Any* -DP_Adapter::evalDP (const char* name, - CORBA::TypeCode_ptr returned_type, - const CORBA::Any& extra_info, - CORBA::Environment& TAO_IN_ENV) - TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)) -{ - TAO_TRY - { - CORBA::Any* return_value = - this->prop_set_->get_property_value (this->prop_name_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - return return_value; - } - TAO_CATCHANY - { - TAO_THROW_RETURN (CosTradingDynamic::DPEvalFailure - (this->prop_name_, returned_type, extra_info), - 0); - } - TAO_ENDTRY; -} - -// ************************************************************* -// TAO_Property_Exporter -// ************************************************************* - -TAO_Property_Exporter:: -TAO_Property_Exporter (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ULong initial_size) - : increment_ (initial_size), - lookup_ (lookup_if), - prop_set_ (prop_set), - tprops_ (initial_size), - pprops_ (initial_size), - pcount_ (0), - tcount_ (0) -{ -} - -TAO_Property_Exporter::~TAO_Property_Exporter (void) -{ -} - -void -TAO_Property_Exporter::add_static_property (const char* name, - const CORBA::Any& value) -{ - CORBA::ULong plength = this->pprops_.length (), - tlength = this->tprops_.length (); - - if (tlength == this->tcount_) - this->tprops_.length (tlength + this->increment_); - - if (plength == this->pcount_) - this->pprops_.length (plength + this->increment_); - - // Add the value to the property service sequence. - this->tprops_[this->tcount_].name = name; - this->tprops_[this->tcount_].value = value; - this->tcount_++; - - // Add the value to the trading service sequence. - this->pprops_[this->pcount_].property_name = name; - this->pprops_[this->pcount_].property_value = value; - this->pcount_++; -} - - -void -TAO_Property_Exporter:: -add_dynamic_property (const char* name, - const CORBA::Any& value, - TAO_Dynamic_Property& dynamic_prop) -{ - // Add a property to the PropSet and a dynamic property to the - // Offer. Have the dynamic property connect to the PropSet accessor - // for that name. - DP_Adapter* dp_adapter; - ACE_NEW_RETURN (dp_adapter, DP_Adapter (name, this->prop_set_),); - - CORBA::ULong plength = this->pprops_.length (), - tlength = this->tprops_.length (); - - if (tlength == this->tcount_) - this->tprops_.length (tlength + this->increment_); - - if (plength == this->pcount_) - this->pprops_.length (plength + this->increment_); - - CORBA::Any extra_info; - - CosTradingDynamic::DynamicProp_var dp_struct = - dynamic_prop.construct_dynamic_prop (name, value.type (), extra_info); - - // Copy the dynamic property struct into the property value - this->tprops_[this->tcount_].name = name; - this->tprops_[this->tcount_].value <<= dp_struct.in (); - this->tcount_++; - - this->pprops_[this->pcount_].property_name = name; - this->pprops_[this->pcount_].property_value = value; - this->pcount_++; -} - -void -TAO_Property_Exporter:: -add_dynamic_property (const char* name, - CosTradingDynamic::DynamicProp& dp_struct) -{ - CORBA::ULong tlength = this->tprops_.length (); - - if (tlength == this->tcount_) - this->tprops_.length (tlength + this->increment_); - - this->tprops_[this->tcount_].name = name; - this->tprops_[this->tcount_].value <<= dp_struct; - this->tcount_++; -} - -void -TAO_Property_Exporter:: -add_dynamic_property (const char* name, - CosTradingDynamic::DynamicProp* dp_struct) -{ - CORBA::ULong tlength = this->tprops_.length (); - - if (tlength == this->tcount_) - this->tprops_.length (tlength + this->increment_); - - this->tprops_[this->tcount_].name = name; - this->tprops_[this->tcount_].value <<= dp_struct; - this->tcount_++; -} - - -CosTrading::OfferId -TAO_Property_Exporter::export (const CORBA::Object_ptr object_ref, - const CosTrading::ServiceTypeName type, - CORBA::Environment& TAO_IN_ENV) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Register::InvalidObjectRef, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)) -{ - CosTrading::Register_var reg = this->lookup_->register_if (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV, 0); - - // Export the offer to the trader under the given type. - CosTrading::OfferId offer_id = 0; - this->tprops_.length (this->tcount_); - offer_id = reg->export (object_ref, type, this->tprops_, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV, 0); - - this->pprops_.length (this->pcount_); - this->prop_set_->define_properties (this->pprops_, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV, offer_id); - - return offer_id; -} - -CosTrading::OfferId -TAO_Property_Exporter::export (const CORBA::Object_ptr object_ref, - const CosTrading::ServiceTypeName type, - const TRADING_REPOS::PropStructSeq& props, - const TRADING_REPOS::ServiceTypeNameSeq& stypes, - CORBA::Environment& TAO_IN_ENV) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - TRADING_REPOS::ServiceTypeExists, - TRADING_REPOS::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - TRADING_REPOS::ValueTypeRedefinition, - TRADING_REPOS::DuplicateServiceTypeName, - CosTrading::Register::InvalidObjectRef, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)) -{ - CosTrading::Register_var reg; - CosTrading::OfferId offer_id = 0; - - TAO_TRY - { - reg = this->lookup_->register_if (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->pprops_.length (this->pcount_); - this->prop_set_->define_properties (this->pprops_, TAO_TRY_ENV); - TAO_CHECK_ENV; - - - - /***************** UTTER HACK: REMOVE WHEN EXCEPTIONS WORK! **** - CosTrading::TypeRepository_ptr obj = this->lookup_->type_repos (_env); - - ACE_DEBUG ((LM_DEBUG, "Attempting add_type.\n")); - CosTradingRepos::ServiceTypeRepository_var str = - - CosTradingRepos::ServiceTypeRepository::_narrow (obj, _env); - TAO_CHECK_ENV_RETURN (_env, 0); - - str->add_type (type, - - object_ref->_interface_repository_id (), - props, - stypes, - - _env); - TAO_CHECK_ENV_RETURN (_env, 0); - ***************** UTTER HACK: REMOVE WHEN EXCEPTIONS WORK! ****/ - - - // Attempt to export the offer. - ACE_DEBUG ((LM_DEBUG, "Attempting export.\n")); - this->tprops_.length (this->tcount_); - offer_id = reg->export (object_ref, type, this->tprops_, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CosTrading::UnknownServiceType, excp) - { - - - cout<<"Within the UnknownServiceType exception"<lookup_->type_repos (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV, 0); - - ACE_DEBUG ((LM_DEBUG, "Export failed. Attempting add_type.\n")); - CosTradingRepos::ServiceTypeRepository_var str = - CosTradingRepos::ServiceTypeRepository::_narrow (obj, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV, 0); - - // If the ServiceTypeName wasn't found, we'll have to add the - // type to the Service Type repository ourselves. - str->add_type (type, - object_ref->_interface_repository_id (), - props, - stypes, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV, 0); - - // Now we'll try again to register the offer. - ACE_DEBUG ((LM_DEBUG, "Attempting export again.\n")); - - this->tprops_.length (this->tcount_); - offer_id = reg->export (object_ref, type, this->tprops_, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV, 0); - cout<<"It reached here"<pdelete_.length (), - tlength = this->tdelete_.length (); - - if (tlength == this->tdcount_) - this->tdelete_.length (tlength + this->increment_); - - if (plength == this->pdcount_) - this->pdelete_.length (plength + this->increment_); - - this->tdelete_[this->tdcount_] = name; - this->tdcount_++; - - this->pdelete_[this->pdcount_] = name; - this->pdcount_++; -} - -void -TAO_Property_Modifier::modify_property (const char* name, const Any& value) -{ - CORBA::ULong plength = this->pmodify_.length (), - tlength = this->tmodify_.length (); - - if (tlength == this->tmcount_) - this->tmodify_.length (tlength + this->increment_); - - if (plength == this->pmcount_) - this->pmodify_.length (plength + this->increment_); - - this->tmodify_[this->tmcount_].name = name; - this->tmodify_[this->tmcount_].value = value; - this->tdcount_++; - - this->pmodify_[this->pmcount_].property_name = name; - this->pmodify_[this->pmcount_].property_value = value; - this->pdcount_++; -} - -void -TAO_Property_Modifier::commit (CosTrading::OfferId id, - CORBA::Environment& TAO_IN_ENV) - TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::NotImplemented, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId, - CosTrading::IllegalPropertyName, - CosTrading::Register::UnknownPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::Register::MandatoryProperty, - CosTrading::Register::ReadonlyProperty, - CosTrading::DuplicatePropertyName)) -{ - this->tdelete_.length (this->tdcount_); - this->tmodify_.length (this->tmcount_); - this->pdelete_.length (this->pdcount_); - this->pmodify_.length (this->pmcount_); - - CosTrading::Register_var reg = this->lookup_->register_if (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV,); - - reg->modify (id, this->tdelete_, this->tmodify_, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV,); - - this->prop_set_->define_properties (this->pmodify_, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV,); - - this->prop_set_->delete_properties (this->pdelete_, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV,); -} - - - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.h deleted file mode 100644 index 4c236f3e8bb..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.h +++ /dev/null @@ -1,211 +0,0 @@ -/* -*- C++ -*- */ - -// ======================================================================== -// $Id$ -// -// = LIBRARY -// TAO/orbsvcs/orbsvcs -// -// = FILENAME -// Property_Exporter.h -// -// = DESCRIPTION -// Allows a service to export properties to both a Property Set and -// a Trading Service simulatenously. -// -// = AUTHORS -// Seth Widoff -// -// ======================================================================== - -#ifndef TAO_PROPERTY_EXPORTER_H -#define TAO_PROPERTY_EXPORTER_H - -#include "orbsvcs/CosTradingC.h" -#include "orbsvcs/CosPropertyServiceC.h" -#include "orbsvcs/Trader/Trader_Utils.h" - -class TAO_Property_Exporter; - -class TAO_Exportable -// = DESCRIPTION -// Interface that allows property containers to export their -// properties to a TAO_Property_Exporter instance. -{ -public: - - virtual void - export_properties (TAO_Property_Exporter& prop_exporter) {} - // Insert exportable properties into the proper_exporter. - - virtual int define_properties - (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq, - CORBA::ULong offset = 0) const = 0; - // Append property definitions to the service type defintition - // sequence. The is the point at which the method can begin - // placing the PropStructures. define_properties returns the number - // of properties inserted from the offset. -}; - - -class TAO_Property_Exporter -// = TITLE -// Publish public properties of a servant to a -// CosPropertyService::PropSet instance and a Trading Service -// offer. -// -// Use this class in the following way: -// 1. Instantiate. -// 2. for (int i = 0; i < num_properties; i++) add_*_property (); -// 3. export () -{ - public: - - TAO_Property_Exporter (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ULong initial_size = 10); - - - ~TAO_Property_Exporter (void); - // Delete all Dynamic Property adapters - - void add_static_property (const char* name, - const CORBA::Any& value); - // Add a property to the Offer and the PropSet. - - void add_dynamic_property (const char* name, - const CORBA::Any& intial_value, - TAO_Dynamic_Property& dp); - // Add a property to the PropSet and a dynamic property to the - // Offer. Have the dynamic property connect to the PropSet accessor - // for that name. - - void add_dynamic_property (const char* name, - CosTradingDynamic::DynamicProp& dp_struct); - - void add_dynamic_property (const char* name, - CosTradingDynamic::DynamicProp* dp_struct); - - CosTrading::OfferId export (const CORBA::Object_ptr object_ref, - const CosTrading::ServiceTypeName type, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::Register::InvalidObjectRef, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); - // Export the offer to the trader under the given type. - - typedef CosTradingRepos::ServiceTypeRepository TRADING_REPOS; - CosTrading::OfferId export (const CORBA::Object_ptr object_ref, - const CosTrading::ServiceTypeName type, - const TRADING_REPOS::PropStructSeq& props, - const TRADING_REPOS::ServiceTypeNameSeq& stypes, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::IllegalServiceType, - TRADING_REPOS::ServiceTypeExists, - TRADING_REPOS::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - TRADING_REPOS::ValueTypeRedefinition, - TRADING_REPOS::DuplicateServiceTypeName, - CosTrading::Register::InvalidObjectRef, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); - // Export the offer to the trader under the given type. Register the - // type with the current definition if the type can't be found in - // the service type repository. - -private: - - TAO_Property_Exporter (const TAO_Property_Exporter&); - void operator= (const TAO_Property_Exporter&); - // These don't make sense on this class. - - const int increment_; - - CosTrading::Lookup_var lookup_; - CosPropertyService::PropertySet_var prop_set_; - - CORBA::ULong pcount_, tcount_; - CosTrading::PropertySeq tprops_; - CosPropertyService::Properties pprops_; -}; - -class TAO_Property_Modifier -// = TITLE -// Modify or delete properties published in a PropSet instance or as -// an offer in a Trading Service instance. -// -// = DESCRIPTION -// This interface is primarily for properties registered as static -// with the trading service, yet periodically change. The change -// isn't frequent enough to warrant the constant overhead of dynamic -// properties, which can affect the server performance. -{ -public: - - TAO_Property_Modifier (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ULong initial_size = 10); - - // If no Lookup Interface is provided to the constructor, then - // resolve_initial_references ("TradingService") will be used. - - void delete_property (const char* name); - // Remove a property from the current prop_set/offer. - - void modify_property (const char* name, const CORBA::Any& value); - // Modify a property from the current prop_set/offer. - - void commit (CosTrading::OfferId id, CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::NotImplemented, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId, - CosTrading::IllegalPropertyName, - CosTrading::Register::UnknownPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::Register::MandatoryProperty, - CosTrading::Register::ReadonlyProperty, - CosTrading::DuplicatePropertyName)); - // Commit your changes to the trading service. - - private: - - const int increment_; - - int pdcount_; - int pmcount_; - - int tdcount_; - int tmcount_; - - CosTrading::Lookup_var lookup_; - CosPropertyService::PropertySet_var prop_set_; - - CosPropertyService::PropertyNames pdelete_; - CosPropertyService::Properties pmodify_; - - CosTrading::PropertyNameSeq tdelete_; - CosTrading::PropertySeq tmodify_; - - TAO_Property_Modifier (const TAO_Property_Modifier&); - void operator= (const TAO_Property_Modifier&); - // These don't make sense on this class. -}; - -#endif /* TAO_PROPERTY_EXPORTER_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.cpp deleted file mode 100644 index 27db11ebe94..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.cpp +++ /dev/null @@ -1,159 +0,0 @@ -// $Id$ - -#include "Video_Repository.h" -#include "ace/Read_Buffer.h" - -ACE_RCSID(server, Video_Repository, "$Id$") - - -const char* TAO_Video_Repository::MOVIE_INFO = "Movie_Info"; - -TAO_Video_Repository::TAO_Video_Repository (const char* file_name) - : filename_ (file_name), - movie_info_ (0), - num_movies_ (0), - lastchanged_ (0) -{ - cout<<"The movie file is "<movie_info_); -} - -CORBA::Any* -TAO_Video_Repository::evalDP (const char* name, - CORBA::TypeCode_ptr returned_type, - const CORBA::Any& extra_info, - CORBA::Environment& TAO_IN_ENV) - TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)) -{ - ACE_DEBUG ((LM_DEBUG,"TAO_Video_Repository::evalDP:%s\n",name)); - CORBA::Any* return_value = 0; - ACE_NEW_RETURN (return_value, CORBA::Any, 0); - - struct stat file_stat; - if (ACE_OS::stat (this->filename_, &file_stat) == 0) - { - if (this->lastchanged_ < file_stat.st_mtime) - { - FILE* file = ACE_OS::fopen (this->filename_, "r"); - - if (file != 0) - { - // Read the file into a buffer - ACE_Read_Buffer read_file (file, 1); - char* database = read_file.read (EOF, '\n', '%'); - - // Parse the file into a sequence and insert it into an - // Any (i.e., this->return_) - TAO_Video_Repository::parse_file (database, - read_file.replaced ()); - - ACE_Allocator* alloc = ACE_Allocator::instance (); - alloc->free (database); - - this->lastchanged_ = file_stat.st_mtime; - } - else cout<<"The movie_database.txt file does not exist"<num_movies_, - this->num_movies_, - this->movie_info_, - 0), - 0); - - (*return_value) <<= movie_info; - } - else - { - ACE_DEBUG ((LM_DEBUG,"TAO_Video_Repository::evalDP::stat failed\n")); - } - - return return_value; -} - -void -TAO_Video_Repository::parse_file (const char* database, int num_lines) -{ - const char* delim = "%"; - CORBA::ULong i = 0; - CORBA::Any* return_value = 0; - char* current = (char *) database; - - ACE_DEBUG ((LM_DEBUG, "Recomputing the movie stats.\n")); - - TAO_VR::Movie_Info::freebuf (this->movie_info_); - - this->movie_info_ = TAO_VR::Movie_Info::allocbuf (num_lines); - - if (this->movie_info_ != 0) - { - current = ACE_OS::strtok (current, "%"); - while (current != 0) - { - TAO_VR::Movie& movie = this->movie_info_[i]; - - movie.name_ = (const char*) current; - movie.audio_filename_ = (const char*) ACE_OS::strtok (0, delim); - movie.video_filename_ = (const char*) ACE_OS::strtok (0, delim); - movie.description_ = (const char*) ACE_OS::strtok (0, delim); - - ACE_DEBUG ((LM_DEBUG, - "Movie Name: %s\nFile Name: %s\nDescription: %s\n", - (const char *) movie.name_, - (const char *) movie.audio_filename_, - (const char *) movie.video_filename_, - (const char *) movie.description_)); - - // From the actual movie file, extract the techincal information. - TAO_Video_Repository:: - obtain_movie_info (movie.audio_filename_, movie); - - TAO_Video_Repository:: - obtain_movie_info (movie.video_filename_, movie); - - - current = ACE_OS::strtok (0, delim); - i++; - } - } - - this->num_movies_ = num_lines; -} - -void -TAO_Video_Repository:: -export_properties (TAO_Property_Exporter& prop_exporter) -{ - CORBA::Any extra_info; - - extra_info <<= MOVIE_INFO; - CosTradingDynamic::DynamicProp* dp_struct = - this->construct_dynamic_prop (MOVIE_INFO, - TAO_VR::_tc_Movie_Info, - extra_info); - - prop_exporter.add_dynamic_property (MOVIE_INFO, dp_struct); -} - -int -TAO_Video_Repository:: -define_properties (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq, - CORBA::ULong offset) const -{ - CORBA::ULong num_props = prop_seq.length (); - - if (num_props <= offset) - prop_seq.length (offset + 1); - - prop_seq[offset].name = MOVIE_INFO; - prop_seq[offset].value_type = CORBA::TypeCode::_duplicate (TAO_VR::_tc_Movie_Info); - prop_seq[offset].mode = CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.h deleted file mode 100644 index 88dda6f6a5e..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.h +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- C++ -*- */ - -// ============================================================================ -// $Id$ -// -// -// = FILENAME -// Video_Repository.h -// -// = DESCRIPTION -// As a trading service dynamic property, creates a sequence of -// structures, each structure describing a movie in the video -// repository. -// -// = AUTHORS -// Seth Widoff -// -// ============================================================================ - -#if (! defined TAO_VIDEO_REPOSITORY_H) -#define TAO_VIDEO_REPOSITORY_H - -#include "orbsvcs/Trader/Trader_Utils.h" - -#include "ace/OS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "Video_RepositoryC.h" -#include "Property_Exporter.h" - -class TAO_Video_Repository : - public TAO_Dynamic_Property, - public TAO_Exportable -// = DESCRIPTION -// When evalDP is invoked by the Dynamic Property Dispatcher, the -// TAO_Video_Repository parses the database file and creates a Movie -// Sequence, each structure of which describes a movie in the -// database. The evalDP then crams the sequence into a dynamically -// allocated Any, which it returns to the dispatcher. -// -// The format of the database file is the following: -// -// %% -{ -public: - - static const char* MOVIE_INFO; - - TAO_Video_Repository (const char* filename); - // TAO_Video_Repository requires the pathname of the video - // repository database. - - ~TAO_Video_Repository (void); - - virtual CORBA::Any* evalDP (const char* name, - CORBA::TypeCode_ptr returned_type, - const CORBA::Any& extra_info, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)); - - virtual void export_properties (TAO_Property_Exporter& prop_exporter); - - virtual int define_properties - (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq, - CORBA::ULong offet = 0) const; - -private: - - void parse_file (const char* database, int num_lines); - - static void obtain_movie_info (const char* file_name, - TAO_VR::Movie& movie) {} - // Extract the techincal information from the actual MPEG file. - - TAO_Video_Repository (void) {} - TAO_Video_Repository& operator= (const TAO_Video_Repository& rep) - { return *this; } - // TAO_Video_Repository requires the path of the video repository - // database. - - const char* filename_; - TAO_VR::Movie* movie_info_; - int num_movies_; - time_t lastchanged_; -}; - -#endif /* TAO_VIDEO_REPOSITORY_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.idl b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.idl deleted file mode 100644 index e7e93b2b7df..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.idl +++ /dev/null @@ -1,32 +0,0 @@ -// ============================================================================ -// $Id$ -// -// = FILENAME -// Video_Repository.idl -// -// = DESCRIPTION -// Data Structures used by the Video_Repository to describe movies in -// the Video Repository. -// -// = AUTHORS -// Seth Widoff -// -// ============================================================================ - -module TAO_VR -{ - struct Movie - { - string name_; - string audio_filename_; - string video_filename_; - string description_; - // string movie_format_; - // unsigned long filesize_; - // unsigned long duration_; - // unsigned long framerate_; - // unsigned long framesize_; - }; - - typedef sequence Movie_Info; -}; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.cpp deleted file mode 100644 index 9e14f732d28..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// $Id$ - -#include "mpeg_server/Audio_Server.h" -#include "as.h" - -ACE_RCSID(server, as, "$Id$") - -int -Audio_Child_Process::init (int argc, - char **argv) -{ - if (TAO_AV_Child_Process_B::init (argc,argv) == -1) - return -1; - - int max_pkt_size = -INET_SOCKET_BUFFER_SIZE; - AUDIO_GLOBAL::instance ()->serviceSocket = -1; - - AUDIO_GLOBAL::instance ()->conn_tag = max_pkt_size; - - if (max_pkt_size < 0) - max_pkt_size = -max_pkt_size; - else if (max_pkt_size == 0) - max_pkt_size = 1024 * 1024; - - AUDIO_GLOBAL::instance ()->start_time =ACE_OS::time (NULL); - - AUDIO_GLOBAL::instance ()->fbpara = (AudioFeedBackPara *)ACE_OS::malloc(FBBUF_SIZE); - if (AUDIO_GLOBAL::instance ()->fbpara == NULL) { - ACE_OS::perror ("AS failed to allocate mem for fbpara"); - return (-1); - } - - AUDIO_GLOBAL::instance ()->databuf_size = max_pkt_size - sizeof(AudioPacket); - if (AUDIO_GLOBAL::instance ()->databuf_size > DATABUF_SIZE) - AUDIO_GLOBAL::instance ()->databuf_size = DATABUF_SIZE; - - AUDIO_GLOBAL::instance ()->pktbuf = (AudioPacket *)ACE_OS::malloc(sizeof(AudioPacket) + - AUDIO_GLOBAL::instance ()->databuf_size); - if (AUDIO_GLOBAL::instance ()->pktbuf == NULL) { - ACE_OS::perror ("AS failed to allocate mem for pktbuf"); - return(-1); - } -} - -int -Audio_Child_Process::make_mediactrl (Audio_Control_i *& media_ctrl) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_Child_Process::make_mediactrl ()\n")); - media_ctrl = AUDIO_CONTROL_I::instance (); - return 0; -} - - -int -main (int argc,char **argv) -{ - Audio_Child_Process audio_child; - - - if (audio_child.init (argc,argv) == -1) - return 1; -// while (1) -// { - int result = audio_child.run () ; -// if (errno == EINTR) -// continue; -// else -// break; -// } - return 0; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.h deleted file mode 100644 index 754917b3a75..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.h +++ /dev/null @@ -1,59 +0,0 @@ -/* $Id$ */ - -// ============================================================================ -// -// = LIBRARY -// as -// -// = FILENAME -// as.h -// -// = DESCRIPTION -// @@ Please add a synopsis of this file. -// -// = AUTHORS -// Sumedh Mungee (sumedh@cs.wustl.edu) -// Nagarajan Surendran (naga@cs.wustl.edu) -// -// ============================================================================ - -#ifndef TAO_AV_AS_H -#define TAO_AV_AS_H - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_CODgram.h" -#include "ace/Select_Reactor.h" - -#include "include/common.h" -#include "mpeg_server/server_proto.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/com.h" -#include "mpeg_server/Audio_Control_i.h" -#include "orbsvcs/orbsvcs/Naming/Naming_Utils.h" - -#include "mpeg_server/Audio_Server.h" -#include "orbsvcs/AV/AVStreams_i.h" - -class Audio_Child_Process - :public TAO_AV_Child_Process_B -{ -public: - int init (int argc, - char **argv); - // init the Video Singleton. - - int make_mediactrl (Audio_Control_i *&media_ctrl); -}; - - -#endif /* TAO_AV_AS_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.cpp deleted file mode 100644 index 659348337e2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.cpp +++ /dev/null @@ -1,725 +0,0 @@ -// $Id$ - -#include "augmented_server.h" -#include "ace/Process.h" - -ACE_RCSID(server, augmented_server, "$Id$") - -int AV_Server::done_; -pid_t AV_Server::current_pid_ = -1; - -const char* MMDevice_Exporter_i::NUMBER_OF_CONNECTIONS = "Number_Of_Connections"; -const char* MMDevice_Exporter_i::MAX_CONNECTIONS = "Max_Connections"; -const char* MMDevice_Exporter_i::SERVER_NAME = "Server_Name"; - -MMDevice_Exporter_i::MMDevice_Exporter_i () - : audio_mmdevice_ (0), - video_mmdevice_ (0), - connections_ (0), - max_connections_ (10) -{ -} - -CORBA::ULong -MMDevice_Exporter_i::connections (void) const -{ - return this->connections_; -} - -// CORBA::Object_ptr -// MMDevice_Exporter_i:: -// audio_mmdevice_reference_ (CORBA_Environment &TAO_IN_ENV) -// { -// return this->audio_mmdevice_; -// } - -// CORBA::Object_ptr -// MMDevice_Exporter_i:: -// video_mmdevice_reference_ (CORBA_Environment &TAO_IN_ENV) -// { -// return this->video_mmdevice_; -// } - - CORBA::Object_ptr -MMDevice_Exporter_i::get_audio_mmdevice (CORBA_Environment &TAO_IN_ENV) -{ - return CORBA::Object::_duplicate (this->audio_mmdevice_); -} - -CORBA::Object_ptr -MMDevice_Exporter_i::get_video_mmdevice (CORBA_Environment &TAO_IN_ENV) -{ - return CORBA::Object::_duplicate (this->video_mmdevice_); -} - -void -MMDevice_Exporter_i:: -export_properties (TAO_Property_Exporter& prop_exporter) -{ - CORBA::Any connections, max_connections, server_name; - - connections <<= (CORBA::ULong) this->connections_; - prop_exporter.add_static_property (NUMBER_OF_CONNECTIONS, connections); - - max_connections <<= (CORBA::ULong) this->max_connections_; - prop_exporter.add_static_property (MAX_CONNECTIONS, max_connections); - - char* hostname = ACE_OS::getenv ("HOST"); - server_name <<= hostname; - prop_exporter.add_static_property (SERVER_NAME, server_name); -} - -int -MMDevice_Exporter_i:: -define_properties (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq, - CORBA::ULong offset) const -{ - CORBA::ULong num_props = prop_seq.length (); - - if (num_props <= offset + 2) - prop_seq.length (offset + 3); - - prop_seq[offset].name = NUMBER_OF_CONNECTIONS; - prop_seq[offset].value_type = CORBA::TypeCode::_duplicate (CORBA::_tc_ulong); - prop_seq[offset].mode = CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY; - prop_seq[offset + 1].name = MAX_CONNECTIONS; - prop_seq[offset + 1].value_type = CORBA::TypeCode::_duplicate (CORBA::_tc_ulong); - prop_seq[offset + 1].mode = CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY; - prop_seq[offset + 2].name = SERVER_NAME; - prop_seq[offset + 2].value_type = CORBA::TypeCode::_duplicate (CORBA::_tc_string); - prop_seq[offset + 2].mode = CosTradingRepos::ServiceTypeRepository::PROP_MANDATORY_READONLY; - - return 3; -} - -AV_Audio_MMDevice:: -AV_Audio_MMDevice (TAO_AV_Endpoint_Process_Strategy *endpoint_strategy) - :TAO_MMDevice (endpoint_strategy) - -{ -} - -AVStreams::StreamEndPoint_B_ptr -AV_Audio_MMDevice:: -create_B (AVStreams::StreamCtrl_ptr the_requester, - AVStreams::VDev_out the_vdev, - AVStreams::streamQoS &the_qos, - CORBA::Boolean_out met_qos, - char *&named_vdev, - const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_MMDevice::create_B called \n")); - AVStreams::StreamEndPoint_B_ptr stream_ptr; - stream_ptr = TAO_MMDevice::create_B (the_requester, - the_vdev, - the_qos, - met_qos, - named_vdev, - the_spec, - env); - - /* NOT CLEAR ABOUT THIS - if (stream_ptr != 0) - this->connections_; - */ - return stream_ptr; - -} - - -AV_Video_MMDevice:: -AV_Video_MMDevice (TAO_AV_Endpoint_Process_Strategy *endpoint_strategy) - :TAO_MMDevice (endpoint_strategy) - -{ -} - -AVStreams::StreamEndPoint_B_ptr -AV_Video_MMDevice:: -create_B (AVStreams::StreamCtrl_ptr the_requester, - AVStreams::VDev_out the_vdev, - AVStreams::streamQoS &the_qos, - CORBA::Boolean_out met_qos, - char *&named_vdev, - const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Video_MMDevice::create_B called \n")); - AVStreams::StreamEndPoint_B_ptr stream_ptr; - stream_ptr = TAO_MMDevice::create_B (the_requester, - the_vdev, - the_qos, - met_qos, - named_vdev, - the_spec, - env); - /*NEED TO CHECK THIS - if (stream_ptr != 0) - this->connections_; - */ - return stream_ptr; -} - - -// AV_Server_Sig_Handler routines -AV_Server_Sig_Handler::AV_Server_Sig_Handler (const AV_Server& av_server) - : av_server_ (av_server) -{ -} - -int -AV_Server_Sig_Handler::register_handler (void) -{ - // Assign the Sig_Handler a dummy I/O descriptor. Note that even - // though we open this file "Write Only" we still need to use the - // ACE_Event_Handler::NULL_MASK when registering this with the - // ACE_Reactor (see below). - this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY); - ACE_ASSERT (this->handle_ != -1); - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) sig_handler == %d\n",this->handle_)); - - // Register signal handler object. Note that NULL_MASK is used to - // keep the ACE_Reactor from calling us back on the "/dev/null" - // descriptor. - - if (TAO_ORB_Core_instance ()->reactor ()->register_handler - (this, ACE_Event_Handler::NULL_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - - // handles these signals. - // this->sig_set.fill_set (); - this->sig_set.sig_add (SIGCHLD); - // this->sig_set.sig_add (SIGBUS); - this->sig_set.sig_add (SIGINT); - this->sig_set.sig_add (SIGTERM); - - // Register the signal handler object to catch the signals. if - if (TAO_ORB_Core_instance ()->reactor ()->register_handler - (this->sig_set, this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - return 0; -} - -// Called by the ACE_Reactor to extract the fd. -ACE_HANDLE -AV_Server_Sig_Handler::get_handle (void) const -{ - return this->handle_; -} - -int -AV_Server_Sig_Handler::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n")); - return 0; -} - -int -AV_Server_Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n")); - return 0; -} - -// This method handles all the signals that are being caught by this -// object. - -int -AV_Server_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) -{ - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum)); - - switch (signum) - { - case SIGCHLD: - // Handle the death of child signal. - this->clear_child (SIGCHLD); - break; - // case SIGBUS: - // Handle the Bus error signal - // exit (2); - case SIGINT: - // Handle the interrupt signal - case SIGTERM: - // Handle the process termination signal. - this->int_handler (signum); - break; - default: - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) %S: not handled, returning to program\n", signum)); - break; - } - return 0; -} - -// SIGCHLD handler -void -AV_Server_Sig_Handler::clear_child (int sig) -{ - int pid; - int status; - - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) AV_Server: Reaping the children\n")); - // reap the children - while ((pid = ACE_OS::waitpid (-1, - &status, - WNOHANG)) > 0) - { - if (pid == AV_Server::current_pid_) - { - cerr << "The child currently being waited for has died\n"; - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) The child currently being waited for has died.\n")); - AV_Server::done_ = 1; - } - - // decrement the count of number of active children - Mpeg_Global::session_num --; - - if (status == 0) - continue; - - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) AV_Server: child %d (status %d)\n", pid, status)); - } - return; -} - -int -AV_Server_Sig_Handler::remove_names (void) -{ - TAO_TRY - { - /* - CORBA::Object_var naming_obj = TAO_ORB_Core_instance ()->orb ()->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to resolve the Name Service.\n"), - -1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Unregister the video_mmdevice with the naming service. - - CosNaming::Name video_server_mmdevice_name (1); - video_server_mmdevice_name.length (1); - video_server_mmdevice_name [0].id = CORBA::string_dup ("Video_Server_MMDevice"); - - // Register the video control object with the naming server. - naming_context->unbind (video_server_mmdevice_name, - TAO_TRY_ENV); - // Unregister the audio_mmdevice with the naming service. - - CosNaming::Name audio_server_mmdevice_name (1); - audio_server_mmdevice_name.length (1); - audio_server_mmdevice_name [0].id = CORBA::string_dup ("Audio_Server_MMDevice"); - - // Register the audio control object with the naming server. - naming_context->unbind (audio_server_mmdevice_name, - TAO_TRY_ENV); - */ - this->av_server_.shutdown (); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("AV_Server_Sig_Handler::remove_names ()"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -// ctrl-c, Bus error, interrupt sig handler -void -AV_Server_Sig_Handler::int_handler (int sig) -{ - // unbind the names from the naming service. - - this->remove_names (); - TAO_ORB_Core_instance ()->orb ()->shutdown (); - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) AV server killed by signal %d\n", - sig)); -} - -AV_Server_Sig_Handler::~AV_Server_Sig_Handler (void) -{ - TAO_ORB_Core_instance ()->reactor ()->remove_handler (this->sig_set); -} - -// AV_Server routines - -const char* AV_Server::MMDEVICE_SERVICE_TYPE = "MMDevice"; - - -// Default Constructor -AV_Server::AV_Server (void) - : video_rep_ ("movie_database.txt"), - signal_handler_ (*this), - video_process_strategy_ (&video_process_options_), - audio_process_strategy_ (&audio_process_options_) -{ - this->video_process_options_.command_line ("./vs -ORBport 0 -ORBobjrefstyle url"); - this->audio_process_options_.command_line ("./as -ORBport 0 -ORBobjrefstyle url"); -} - -// %% move to the destructor or sig handler -void -AV_Server::on_exit_routine (void) -{ - // %% what does the following do - if (Mpeg_Global::parentpid != ACE_OS::getpid ()) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Process is exiting\n")); - return; - } - - // %% what does the following do - if (Mpeg_Global::live_audio > 1) - ExitLiveAudio (); - if (Mpeg_Global::live_video > 1) - ExitLiveVideo (); - // ComCloseServer(); - - // Remove the elements from the Naming service. -} - - -// Parses the command line arguments -int -AV_Server::parse_args (int argc, - char **argv) -{ - ACE_Get_Opt get_opts (argc, argv, "rd:s:vamh"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'r': // real time flag - Mpeg_Global::rttag = 1; - break; - case 'd': // clock drift in ppm - Mpeg_Global::drift_ppm = ACE_OS::atoi (get_opts.optarg); - break; - case 's':// limit on number of sessions - Mpeg_Global::session_limit = ACE_OS::atoi (get_opts.optarg); - break; - case 'v':// live video flag - Mpeg_Global::live_video = 1; - break; - case 'a':// live audio flag - Mpeg_Global::live_audio = 1; - break; - case '?': - case 'h':// help flag - ACE_DEBUG ((LM_DEBUG, - "Usage: %s [-r ] [-m]\n" - " [-d#int(clock drift in ppm)]\n" - " [-s#int(limit on number of sessions)]\n" - " [-v] [-a] [-?] [-h]", - argv [0])); - return -1; - } - return 0; -} - - -// Initializes the mpeg server -int -AV_Server::init (int argc, - char **argv, - CORBA::Environment& env) -{ - int result; - - // Initialize the orb_manager - this->orb_manager_.init_child_poa (argc, - argv, - "child_poa", - env); - TAO_CHECK_ENV_RETURN (env, - -1); - - CORBA::ORB_var orb = - this->orb_manager_.orb (); - - PortableServer::POA_var child_poa = - this->orb_manager_.child_poa (); - - result = this->parse_args (argc, argv); - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Error parsing arguments"), - -1); - - // Resolve the Naming service reference. - /* - CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to resolve the Name Service.\n"), - -1); - - this->naming_context_ = - CosNaming::NamingContext::_narrow (naming_obj.in (), - env); - TAO_CHECK_ENV_RETURN (env,-1); - */ - - - ACE_NEW_RETURN (this->video_mmdevice_, - AV_Video_MMDevice (&this->video_process_strategy_), - -1); - - // Register the video mmdevice object with the ORB - this->orb_manager_.activate_under_child_poa ("Video_Server_MMDevice", - this->video_mmdevice_, - env); - // CORBA::String_var server_ior = this->orb_manager_.orb ()->object_to_string (mmdevice_reference, - // TAO_TRY_ENV); - TAO_CHECK_ENV_RETURN (env,-1); - - /* - // Register the video_mmdevice with the naming service. - CosNaming::Name video_server_mmdevice_name (1); - video_server_mmdevice_name.length (1); - video_server_mmdevice_name [0].id = CORBA::string_dup ("Video_Server_MMDevice"); - - // Register the video control object with the naming server. - this->naming_context_->bind (video_server_mmdevice_name, - this->video_mmdevice_->_this (env), - env); - - if (env.exception () != 0) - { - env.clear (); - this->naming_context_->rebind (video_server_mmdevice_name, - this->video_mmdevice_->_this (env), - env); - TAO_CHECK_ENV_RETURN (env,-1); - } - - */ - - ACE_NEW_RETURN (this->audio_mmdevice_, - AV_Audio_MMDevice (&this->audio_process_strategy_), - -1); - - // Register the audio mmdevice object with the ORB - this->orb_manager_.activate_under_child_poa ("Audio_Server_MMDevice", - this->audio_mmdevice_, - env); - TAO_CHECK_ENV_RETURN (env,-1); - - - CORBA::Object_ptr audio_object_ptr = this->audio_mmdevice_->_this (env); - TAO_CHECK_ENV_RETURN (env,-1); - - CORBA::Object_ptr video_object_ptr = this->video_mmdevice_->_this (env); - TAO_CHECK_ENV_RETURN (env,-1); - - ACE_NEW_RETURN (this->mmdevice_exporter_, - MMDevice_Exporter_i (), - -1); - - this->mmdevice_exporter_->audio_mmdevice_ = audio_object_ptr; - this->mmdevice_exporter_->video_mmdevice_ = video_object_ptr; - - // Register the audio mmdevice object with the ORB - this->orb_manager_.activate_under_child_poa ("MMDevice_Exporter", - this->mmdevice_exporter_, - env); - TAO_CHECK_ENV_RETURN (env,-1); - /* - // Register the audio_mmdevice with the naming service. - - CosNaming::Name audio_server_mmdevice_name (1); - audio_server_mmdevice_name.length (1); - audio_server_mmdevice_name [0].id = CORBA::string_dup ("Audio_Server_MMDevice"); - - // Register the audio control object with the naming server. - this->naming_context_->bind (audio_server_mmdevice_name, - this->audio_mmdevice_->_this (env), - env); - - if (env.exception () != 0) - { - env.clear (); - this->naming_context_->rebind (audio_server_mmdevice_name, - this->audio_mmdevice_->_this (env), - env); - TAO_CHECK_ENV_RETURN (env,-1); - } - - */ - // Invoke this once, passing in an object for each trading service - // service type. - - - - if (this->resolve_trader (env) != -1) - { - // Invoke this for each offer. - this->export_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); - } - - // Register the various signal handlers with the reactor. - result = this->signal_handler_.register_handler (); - - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Error registering signal handler"), - -1); - - ::atexit (on_exit_routine); - return 0; -} - -// Runs the mpeg server -int -AV_Server::run (CORBA::Environment& env){ - int result; - // Run the ORB event loop - this->orb_manager_.run (env); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) AV_Server::run () " - "came out of the (ORB) " - "event loop %p\n", - "run_event_loop")); - return 0; - -} - -void -AV_Server::export_properties (CORBA::Environment& TAO_IN_ENV) -{ - CORBA::Object_ptr mmdevice_object_ptr = this->mmdevice_exporter_->_this (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - CosPropertyService::PropertySet_ptr mmdevice_prop_set = - CosPropertyService::PropertySet::_narrow (mmdevice_object_ptr, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - // Instantiate the property exporter helper class. - TAO_Property_Exporter mmdevice_prop_exporter (this->trader_, mmdevice_prop_set); - - // Add properties to server description. - this->mmdevice_exporter_->export_properties (mmdevice_prop_exporter); - this->mach_props_.export_properties (mmdevice_prop_exporter); - this->video_rep_.export_properties (mmdevice_prop_exporter); - - CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq mmdevice_super_types; - this->mmdevice_offer_id_ = - mmdevice_prop_exporter.export (mmdevice_object_ptr, - (CosTrading::ServiceTypeName) MMDEVICE_SERVICE_TYPE, - this->prop_seq_, - mmdevice_super_types, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - - -} - -int -AV_Server::resolve_trader (CORBA::Environment& TAO_IN_ENV) -{ - if (this->trader_.ptr () == 0) - { - // Bootstrap to the Lookup interface. - ACE_DEBUG ((LM_ERROR, "Bootstrap to the Lookup interface.\n")); - CORBA::Object_var trading_obj = - this->orb_manager_.orb ()->resolve_initial_references ("TradingService"); - - if (CORBA::is_nil (trading_obj.in ())) - { - ACE_ERROR ((LM_ERROR, - " (%P|%t) Unable to bootstrap to the Trading Service.\n")); - return -1; - } - - // Narrow the lookup interface. - ACE_DEBUG ((LM_DEBUG, "Narrowing the lookup interface.\n")); - this->trader_ = CosTrading::Lookup::_narrow (trading_obj.in (), TAO_IN_ENV); - TAO_CHECK_ENV_RETURN (TAO_IN_ENV, -1); - - // Add property definitions to the service type. - CORBA::ULong offset = this->mmdevice_exporter_->define_properties (this->prop_seq_); - // TAO_CHECK_ENV_RETURN (TAO_IN_ENV,-1); - offset += this->mach_props_.define_properties (this->prop_seq_, offset); - this->video_rep_.define_properties (this->prop_seq_, offset); - } - ACE_DEBUG ((LM_DEBUG,"Trader IOR: %s\n", - this->orb_manager_.orb ()->object_to_string (this->trader_.in (),TAO_IN_ENV))); - -} - -AV_Server::~AV_Server (void) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) AV_Server: Removing handlers from the Reactor\n")); - - if (this->video_mmdevice_ != 0) - delete this->video_mmdevice_; - if (this->audio_mmdevice_ != 0) - delete this->audio_mmdevice_; - -} - -void -AV_Server::shutdown (void) const -{ - TAO_TRY - { - if (this->trader_.ptr () != 0) - { - CosTrading::Register_var reg = this->trader_->register_if (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "Withdrawing offer...\n")); - reg->withdraw (this->mmdevice_offer_id_.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - } - } - TAO_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, "Failed to withdraw offer.")); - } - TAO_ENDTRY; -} - -int -main (int argc, char **argv) -{ - TAO_TRY - { - int return_value = - AV_SERVER::instance ()->init (argc, argv, TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (return_value != -1) - { - AV_SERVER::instance ()->run (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Exception"); - return -1; - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.h deleted file mode 100644 index fc2fe1aadeb..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.h +++ /dev/null @@ -1,303 +0,0 @@ -/* -*- c++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// server -// -// = FILENAME -// server.h -// -// = DESCRIPTION -// This defines the Audio/Video Server using TAO'S Audio/Video streaming service. -// -// = AUTHORS -// Sumedh Mungee (sumedh@cs.wustl.edu) -// Nagarajan Surendran (naga@cs.wustl.edu) -// -// ============================================================================ - -#ifndef TAO_AV_SERVER_H -#define TAO_AV_SERVER_H - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_CODgram.h" -#include "ace/Select_Reactor.h" - -#include "include/common.h" -#include "mpeg_server/server_proto.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/com.h" -#include "mpeg_server/Video_Control_i.h" -#include "orbsvcs/orbsvcs/Naming/Naming_Utils.h" - -#if defined (NATIVE_ATM) -#include "atmcom.h" -#endif /* NATIVE_ATM */ - -#include "mpeg_server/Video_Server.h" -#include "mpeg_server/Audio_Server.h" -#include "orbsvcs/AV/AVStreams_i.h" -#include "orbsvcs/AV/Endpoint_Strategy.h" -#include "vs.h" - -#include "Property_Exporter.h" -#include "Machine_Properties.h" -#include "Video_Repository.h" - -#include "mpeg_shared/MMDevice_ExporterS.h" - - - -class AV_Audio_MMDevice - : public TAO_MMDevice -{ -public: - - static const char* NUMBER_OF_CONNECTIONS; - static const char* MAX_CONNECTIONS; - static const char* SERVER_NAME; - - AV_Audio_MMDevice (TAO_AV_Endpoint_Process_Strategy *endpoint_strategy); - // Default constructor - - virtual AVStreams::StreamEndPoint_B_ptr - create_B (AVStreams::StreamCtrl_ptr the_requester, - AVStreams::VDev_out the_vdev, - AVStreams::streamQoS &the_qos, - CORBA::Boolean_out met_qos, - char *&named_vdev, - const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Called by StreamCtrl to create a "B" type streamandpoint and vdev - - -}; - -class AV_Video_MMDevice - : public TAO_MMDevice//, - // public TAO_Exportable -{ -public: - - AV_Video_MMDevice (TAO_AV_Endpoint_Process_Strategy *endpoint_strategy); - // Default constructor - - virtual AVStreams::StreamEndPoint_B_ptr - create_B (AVStreams::StreamCtrl_ptr the_requester, - AVStreams::VDev_out the_vdev, - AVStreams::streamQoS &the_qos, - CORBA::Boolean_out met_qos, - char *&named_vdev, - const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Called by StreamCtrl to create a "B" type streamandpoint and vdev - - -}; - -class MMDevice_Exporter_i - : public POA_MMDevice_Exporter, - public TAO_Exportable, - public TAO_PropertySet -{ - - public: - CORBA_Object_ptr audio_mmdevice_; - CORBA_Object_ptr video_mmdevice_; - - static const char* NUMBER_OF_CONNECTIONS; - static const char* MAX_CONNECTIONS; - static const char* SERVER_NAME; - - MMDevice_Exporter_i(); - - CORBA::ULong connections (void) const; - // Retrieve the number of connections. - -// virtual CORBA::Object_ptr audio_mmdevice_reference_ (CORBA_Environment &_env = CORBA_Environment::default_environment ()); - -// virtual CORBA::Object_ptr video_mmdevice_reference_ (CORBA_Environment &_env = CORBA_Environment::default_environment ()); - - virtual CORBA::Object_ptr get_audio_mmdevice (CORBA_Environment &_env = CORBA_Environment::default_environment ()); - virtual CORBA::Object_ptr get_video_mmdevice (CORBA_Environment &_env = CORBA_Environment::default_environment ()); - - virtual void export_properties (TAO_Property_Exporter& prop_exporter); - - virtual int define_properties (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq, - CORBA::ULong offset = 0) const; - - private: - - CORBA::ULong connections_; - // Number of active connections - - CORBA::ULong max_connections_; - -}; - -class AV_Server; - -class AV_Server_Sig_Handler - : public virtual ACE_Event_Handler -{ -public: - AV_Server_Sig_Handler (const AV_Server& av_server); - - virtual ACE_HANDLE get_handle (void) const; - - int register_handler (void); - // this will register this sig_handler - // with the reactor for SIGCHLD,SIGTERM,SIGINT - - virtual int shutdown (ACE_HANDLE, - ACE_Reactor_Mask); - - virtual int handle_input (ACE_HANDLE); - // handle input on the dummy handle. - - virtual int handle_signal (ACE_HANDLE signum, - siginfo_t * = 0, - ucontext_t* = 0); - // handles the SIGCHLD,SIGTERM,SIGINT for the parent process i.e - // the main thread.. - - void int_handler (int sig); - // Signal handler function for SIGTERM,SIGBUS,SIGINT - - int remove_names (void); - // Removes the audio server mmdevice and video server mmdevice from the naming service. - - void clear_child (int sig); - // Signal handler function for SIGCHLD - - ~AV_Server_Sig_Handler (void); - // Destructor - -private: - const AV_Server& av_server_; - - ACE_HANDLE handle_; - // dummy handle for the sig handler. - ACE_Sig_Set sig_set; -}; - -class AV_Server -{ - // = TITLE - // Defines a class that abstracts the functionality of a - // video and audio server. - // - // = DESCRIPTION - // Using the class is as simple as calling init () first and then - // run. It uses an acceptor with the default ACE_Reactor::instance (). -public: - - static const char* MMDEVICE_SERVICE_TYPE; - - AV_Server (void); - // constructor - - int init (int argc, - char **argv, - CORBA::Environment& env); - // Initialize the AV_Server - - int run (CORBA::Environment& env); - // Run the AV_Server - - void shutdown (void) const; - - static void on_exit_routine (void); - // Routine called when this process exits. - - static pid_t current_pid_; - // %% the pid the server is currently waiting on - - static int done_; - // %% the done flag, set by the signal handler - - ~AV_Server (void); - // Destructor - //private: -private: - int parse_args (int argcs, - char **argv); - // Parse the arguments. - - void export_properties (CORBA::Environment& _env); - - int resolve_trader (CORBA::Environment& _env); - - TAO_ORB_Manager orb_manager_; - // the TAO ORB manager. - - TAO_Machine_Properties mach_props_; - // Dynamic properties concerning the server's performance. - - TAO_Video_Repository video_rep_; - // Dynamic property that assesses the contents of the sever's video - // repository. - - CosTrading::Lookup_var trader_; - // Reference to the Lookup interface of the trading service. - - // CosTrading::OfferId_var audio_offer_id_; - // Server offer id. - - CosTrading::OfferId_var mmdevice_offer_id_; - // Server offer id. - - CosTradingRepos::ServiceTypeRepository::PropStructSeq prop_seq_; - // Service type definition. - - CosNaming::NamingContext_var naming_context_; - // The root naming context of the naming service - - AV_Server_Sig_Handler signal_handler_; - // Signal handler for SIGCHLD,SIGINT,SIGTERM,SIGBUS - - ACE_INET_Addr server_control_addr_; - // Control (TCP) Address of this server. - - ACE_Process_Options video_process_options_; - // The process options for the process to be spawned by the process strategy - - TAO_AV_Endpoint_Process_Strategy_B video_process_strategy_; - // The proces strategy for the video. - - // TAO_MMDevice *video_mmdevice_; - // The video server multimedia device - - ACE_Process_Options audio_process_options_; - // The process options for the process to be spawned by the process strategy - - TAO_AV_Endpoint_Process_Strategy_B audio_process_strategy_; - // The proces strategy for the audio. - - // TAO_MMDevice *audio_mmdevice_; - AV_Audio_MMDevice *audio_mmdevice_; - // The audio server multimedia device - - AV_Video_MMDevice *video_mmdevice_; - // The video server multimedia device - - MMDevice_Exporter_i *mmdevice_exporter_; -}; - - - -typedef ACE_Singleton AV_SERVER; - -#endif /* TAO_AV_SERVER_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp deleted file mode 100644 index dd2f7cf2f21..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp +++ /dev/null @@ -1,478 +0,0 @@ -// $Id$ - -#include "server.h" -#include "ace/Process.h" - -ACE_RCSID(server, server, "$Id$") - -int AV_Server::done_; -pid_t AV_Server::current_pid_ = -1; - - -Audio_MMDevice::Audio_MMDevice (TAO_AV_Endpoint_Process_Strategy *endpoint_strategy) - :TAO_MMDevice (endpoint_strategy), - connections_ (0) -{ -} - -AVStreams::StreamEndPoint_B_ptr -Audio_MMDevice::create_B (AVStreams::StreamCtrl_ptr the_requester, - AVStreams::VDev_out the_vdev, - AVStreams::streamQoS &the_qos, - CORBA::Boolean_out met_qos, - char *&named_vdev, - const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Audio_MMDevice::create_B called \n")); - AVStreams::StreamEndPoint_B_ptr stream_ptr; - stream_ptr = TAO_MMDevice::create_B (the_requester, - the_vdev, - the_qos, - met_qos, - named_vdev, - the_spec, - env); - if (stream_ptr != 0) - this->connections_; - return stream_ptr; -} - -int -Audio_MMDevice::connections (void) -{ - return this->connections_; -} - -// AV_Server_Sig_Handler routines - -AV_Server_Sig_Handler::AV_Server_Sig_Handler (void) -{ -} - -int -AV_Server_Sig_Handler::register_handler (void) -{ - // Assign the Sig_Handler a dummy I/O descriptor. Note that even - // though we open this file "Write Only" we still need to use the - // ACE_Event_Handler::NULL_MASK when registering this with the - // ACE_Reactor (see below). - this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY); - ACE_ASSERT (this->handle_ != -1); - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) sig_handler == %d\n",this->handle_)); - - // Register signal handler object. Note that NULL_MASK is used to - // keep the ACE_Reactor from calling us back on the "/dev/null" - // descriptor. - - if (TAO_ORB_Core_instance ()->reactor ()->register_handler - (this, ACE_Event_Handler::NULL_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - - // handles these signals. - // this->sig_set.fill_set (); - this->sig_set.sig_add (SIGCHLD); - this->sig_set.sig_add (SIGBUS); - this->sig_set.sig_add (SIGINT); - this->sig_set.sig_add (SIGTERM); - - // Register the signal handler object to catch the signals. if - if (TAO_ORB_Core_instance ()->reactor ()->register_handler - (this->sig_set, this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_handler"), - -1); - return 0; -} - -// Called by the ACE_Reactor to extract the fd. -ACE_HANDLE -AV_Server_Sig_Handler::get_handle (void) const -{ - return this->handle_; -} - -int -AV_Server_Sig_Handler::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n")); - return 0; -} - -int -AV_Server_Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n")); - return 0; -} - -// This method handles all the signals that are being caught by this -// object. - -int -AV_Server_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) -{ - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum)); - - switch (signum) - { - case SIGCHLD: - // Handle the death of child signal. - this->clear_child (SIGCHLD); - break; - case SIGBUS: - // Handle the Bus error signal - case SIGINT: - // Handle the interrupt signal - case SIGTERM: - // Handle the process termination signal. - this->int_handler (signum); - break; - default: - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) %S: not handled, returning to program\n", signum)); - break; - } - return 0; -} - -// SIGCHLD handler -void -AV_Server_Sig_Handler::clear_child (int sig) -{ - int pid; - int status; - - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) AV_Server: Reaping the children\n")); - // reap the children - while ((pid = ACE_OS::waitpid (-1, - &status, - WNOHANG)) > 0) - { - if (pid == AV_Server::current_pid_) - { - cerr << "The child currently being waited for has died\n"; - // ACE_DEBUG ((LM_DEBUG,"(%P|%t) The child currently being waited for has died.\n")); - AV_Server::done_ = 1; - } - - // decrement the count of number of active children - Mpeg_Global::session_num --; - - if (status == 0) - continue; - - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) AV_Server: child %d (status %d)\n", pid, status)); - } - return; -} - -int -AV_Server_Sig_Handler::remove_names (void) -{ - TAO_TRY - { - CORBA::Object_var naming_obj = - TAO_ORB_Core_instance ()->orb ()->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to resolve the Name Service.\n"), - -1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Unregister the video_mmdevice with the naming service. - - CosNaming::Name video_server_mmdevice_name (1); - video_server_mmdevice_name.length (1); - video_server_mmdevice_name [0].id = CORBA::string_dup ("Video_Server_MMDevice"); - - // Register the video control object with the naming server. - naming_context->unbind (video_server_mmdevice_name, - TAO_TRY_ENV); - // Unregister the audio_mmdevice with the naming service. - - CosNaming::Name audio_server_mmdevice_name (1); - audio_server_mmdevice_name.length (1); - audio_server_mmdevice_name [0].id = CORBA::string_dup ("Audio_Server_MMDevice"); - - // Register the audio control object with the naming server. - naming_context->unbind (audio_server_mmdevice_name, - TAO_TRY_ENV); - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("AV_Server_Sig_Handler::remove_names ()"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -// ctrl-c, Bus error, interrupt sig handler -void -AV_Server_Sig_Handler::int_handler (int sig) -{ - // unbind the names from the naming service. - - this->remove_names (); - TAO_ORB_Core_instance ()->orb ()->shutdown (); - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) AV server killed by signal %d\n", - sig)); -} - -AV_Server_Sig_Handler::~AV_Server_Sig_Handler (void) -{ - // TAO_ORB_Core_instance ()->reactor ()->remove_handler (this->sig_set); -} - -// AV_Server routines - -// Default Constructor -AV_Server::AV_Server (void) - :video_process_strategy_ (&video_process_options_), - audio_process_strategy_ (&audio_process_options_) -{ - this->video_process_options_.command_line ("./vs -ORBport 0 -ORBobjrefstyle url"); - this->audio_process_options_.command_line ("./as -ORBport 0 -ORBobjrefstyle url"); -} - -// %% move to the destructor or sig handler -void -AV_Server::on_exit_routine (void) -{ - // %% what does the following do - if (Mpeg_Global::parentpid != ACE_OS::getpid ()) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Process is exiting\n")); - return; - } - - // %% what does the following do - if (Mpeg_Global::live_audio > 1) - ExitLiveAudio (); - if (Mpeg_Global::live_video > 1) - ExitLiveVideo (); - // ComCloseServer(); - - // Remove the elements from the Naming service. -} - - -// Parses the command line arguments -int -AV_Server::parse_args (int argc, - char **argv) -{ - ACE_Get_Opt get_opts (argc, argv, "rd:s:vamh"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'r': // real time flag - Mpeg_Global::rttag = 1; - break; - case 'd': // clock drift in ppm - Mpeg_Global::drift_ppm = ACE_OS::atoi (get_opts.optarg); - break; - case 's':// limit on number of sessions - Mpeg_Global::session_limit = ACE_OS::atoi (get_opts.optarg); - break; - case 'v':// live video flag - Mpeg_Global::live_video = 1; - break; - case 'a':// live audio flag - Mpeg_Global::live_audio = 1; - break; - case '?': - case 'h':// help flag - ACE_DEBUG ((LM_DEBUG, - "Usage: %s [-r ] [-m]\n" - " [-d#int(clock drift in ppm)]\n" - " [-s#int(limit on number of sessions)]\n" - " [-v] [-a] [-?] [-h]", - argv [0])); - return -1; - } - return 0; -} - - -// Initializes the mpeg server -int -AV_Server::init (int argc, - char **argv, - CORBA::Environment& env) -{ - int result; - - // Initialize the orb_manager - this->orb_manager_.init_child_poa (argc, - argv, - "child_poa", - env); - TAO_CHECK_ENV_RETURN (env, - -1); - - CORBA::ORB_var orb = - this->orb_manager_.orb (); - - PortableServer::POA_var child_poa = - this->orb_manager_.child_poa (); - - result = this->parse_args (argc, argv); - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Error parsing arguments"), - -1); - - // Initialize the naming services - if (my_name_client_.init (this->orb_manager_.orb ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - // Register the video mmdevice object with the ORB - ACE_NEW_RETURN (this->video_mmdevice_, - TAO_MMDevice (&this->video_process_strategy_), - -1); - - // create the video server mmdevice with the naming service pointer. - CORBA::String_var video_mmdevice_ior = this->orb_manager_.activate_under_child_poa ("Video_Server_MMDevice", - this->video_mmdevice_, - env); - ACE_DEBUG ((LM_DEBUG,"(%P|%t) video_mmdevice_ior is :%s\n",video_mmdevice_ior.in ())); - - TAO_CHECK_ENV_RETURN (env,-1); - - // Register the video_mmdevice with the naming service. - CosNaming::Name video_server_mmdevice_name (1); - video_server_mmdevice_name.length (1); - video_server_mmdevice_name [0].id = CORBA::string_dup ("Video_Server_MMDevice"); - - // Register the video control object with the naming server. - this->my_name_client_->bind (video_server_mmdevice_name, - this->video_mmdevice_->_this (env), - env); - - if (env.exception () != 0) - { - env.clear (); - this->my_name_client_->rebind (video_server_mmdevice_name, - this->video_mmdevice_->_this (env), - env); - TAO_CHECK_ENV_RETURN (env,-1); - } - - - // Register the audio mmdevice object with the ORB - ACE_NEW_RETURN (this->audio_mmdevice_, - Audio_MMDevice (&this->audio_process_strategy_), - -1); - - // create the audio server mmdevice with the naming service pointer. - CORBA::String_var audio_mmdevice_ior = this->orb_manager_.activate_under_child_poa ("Audio_Server_MMDevice", - this->audio_mmdevice_, - env); - ACE_DEBUG ((LM_DEBUG,"Audio MMDevice ior is: %s\n",audio_mmdevice_ior.in ())); - TAO_CHECK_ENV_RETURN (env,-1); - - // Register the audio_mmdevice with the naming service. - - CosNaming::Name audio_server_mmdevice_name (1); - audio_server_mmdevice_name.length (1); - audio_server_mmdevice_name [0].id = CORBA::string_dup ("Audio_Server_MMDevice"); - - // Register the audio control object with the naming server. - this->my_name_client_->bind (audio_server_mmdevice_name, - this->audio_mmdevice_->_this (env), - env); - - if (env.exception () != 0) - { - env.clear (); - this->my_name_client_->rebind (audio_server_mmdevice_name, - this->audio_mmdevice_->_this (env), - env); - TAO_CHECK_ENV_RETURN (env,-1); - } - - - - // Register the various signal handlers with the reactor. - result = this->signal_handler_.register_handler (); - - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Error registering signal handler"), - -1); - - ::atexit (on_exit_routine); - return 0; -} - -// Runs the mpeg server -int -AV_Server::run (CORBA::Environment& env){ - int result; - // Run the ORB event loop -// while (1) -// { - this->orb_manager_.run (env); -// if (errno == EINTR) -// continue; -// else -// break; -// } - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) AV_Server::run () " - "came out of the (ORB) " - "event loop %p\n", - "run_event_loop")); - return 0; - -} - -AV_Server::~AV_Server (void) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) AV_Server: Removing handlers from the Reactor\n")); - delete this->video_mmdevice_; - delete this->audio_mmdevice_; -} - -int -main (int argc, char **argv) -{ - TAO_TRY - { - if (AV_SERVER::instance ()->init (argc, argv, TAO_TRY_ENV) == -1) - return 1; - TAO_CHECK_ENV; - AV_SERVER::instance ()->run (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Exception"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - - - diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h deleted file mode 100644 index e263670efaa..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h +++ /dev/null @@ -1,196 +0,0 @@ -/* -*- c++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// server -// -// = FILENAME -// server.h -// -// = DESCRIPTION -// This defines the Audio/Video Server using TAO'S Audio/Video streaming service. -// -// = AUTHORS -// Sumedh Mungee (sumedh@cs.wustl.edu) -// Nagarajan Surendran (naga@cs.wustl.edu) -// -// ============================================================================ - -#ifndef TAO_AV_SERVER_H -#define TAO_AV_SERVER_H - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_CODgram.h" -#include "ace/Select_Reactor.h" - -#include "include/common.h" -#include "mpeg_server/server_proto.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/com.h" -#include "mpeg_server/Video_Control_i.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -#if defined (NATIVE_ATM) -#include "atmcom.h" -#endif /* NATIVE_ATM */ - -#include "mpeg_server/Video_Server.h" -#include "mpeg_server/Audio_Server.h" -#include "orbsvcs/AV/AVStreams_i.h" -#include "orbsvcs/AV/Endpoint_Strategy.h" -#include "vs.h" - -class Audio_MMDevice - :public TAO_MMDevice -{ -public: - Audio_MMDevice (TAO_AV_Endpoint_Process_Strategy *endpoint_strategy_); - // Default constructor - - virtual AVStreams::StreamEndPoint_B_ptr create_B (AVStreams::StreamCtrl_ptr the_requester, - AVStreams::VDev_out the_vdev, - AVStreams::streamQoS &the_qos, - CORBA::Boolean_out met_qos, - char *&named_vdev, - const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Called by StreamCtrl to create a "B" type streamandpoint and vdev - - int connections (void); -private: - int connections_; - // Number of active connections -}; - -class AV_Server_Sig_Handler - : public virtual ACE_Event_Handler -{ -public: - AV_Server_Sig_Handler (void); - - virtual ACE_HANDLE get_handle (void) const; - - int register_handler (void); - // this will register this sig_handler - // with the reactor for SIGCHLD,SIGTERM,SIGINT - - virtual int shutdown (ACE_HANDLE, - ACE_Reactor_Mask); - - virtual int handle_input (ACE_HANDLE); - // handle input on the dummy handle. - - virtual int handle_signal (ACE_HANDLE signum, - siginfo_t * = 0, - ucontext_t* = 0); - // handles the SIGCHLD,SIGTERM,SIGINT for the parent process i.e - // the main thread.. - - void int_handler (int sig); - // Signal handler function for SIGTERM,SIGBUS,SIGINT - - int remove_names (void); - // Removes the audio server mmdevice and video server mmdevice from the naming service. - - void clear_child (int sig); - // Signal handler function for SIGCHLD - - ~AV_Server_Sig_Handler (void); - // Destructor - -private: - ACE_HANDLE handle_; - // dummy handle for the sig handler. - ACE_Sig_Set sig_set; - - TAO_Naming_Client my_name_client_; - // Name_Client used for unregistering the audio and video - -}; - -class AV_Server -{ - // = TITLE - // Defines a class that abstracts the functionality of a - // video and audio server. - // - // = DESCRIPTION - // Using the class is as simple as calling init () first and then - // run. It uses an acceptor with the default ACE_Reactor::instance (). -public: - AV_Server (void); - // constructor - - int init (int argc, - char **argv, - CORBA::Environment& env); - // Initialize the AV_Server - - int run (CORBA::Environment& env); - // Run the AV_Server - - static void on_exit_routine (void); - // Routine called when this process exits. - - static pid_t current_pid_; - // %% the pid the server is currently waiting on - - static int done_; - // %% the done flag, set by the signal handler - - ~AV_Server (void); - // Destructor - //private: -private: - int parse_args (int argcs, - char **argv); - // Parse the arguments. - - TAO_ORB_Manager orb_manager_; - // the TAO ORB manager. - - TAO_Naming_Client my_name_client_; - // Name_Server used to bind audio and video controls - - AV_Server_Sig_Handler signal_handler_; - // Signal handler for SIGCHLD,SIGINT,SIGTERM,SIGBUS - - ACE_INET_Addr server_control_addr_; - // Control (TCP) Address of this server. - - ACE_Process_Options video_process_options_; - // The process options for the process to be spawned by the process strategy - - TAO_AV_Endpoint_Process_Strategy_B video_process_strategy_; - // The proces strategy for the video. - - TAO_MMDevice *video_mmdevice_; - // The video server multimedia device - - ACE_Process_Options audio_process_options_; - // The process options for the process to be spawned by the process strategy - - TAO_AV_Endpoint_Process_Strategy_B audio_process_strategy_; - // The proces strategy for the audio. - - // TAO_MMDevice *audio_mmdevice_; - Audio_MMDevice *audio_mmdevice_; - // The audio server multimedia device - -}; - -typedef ACE_Singleton AV_SERVER; - -#endif /* TAO_AV_SERVER_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/svc.conf b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/svc.conf deleted file mode 100644 index a0bb21242b7..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/svc.conf +++ /dev/null @@ -1,50 +0,0 @@ -# $Id$ -# -# This file contains a sample ACE_Service_Config configuration -# file specifying the strategy factories utilized by an application -# using TAO. There are currently only two possible factories: -# Client_Strategy_Factory and Server_Strategy_Factory. These names -# must be used as the second argument to their corresponding line, -# because that's what the ORB uses to find the desired factory. -# -# Note that there are two unordinary characteristics of the way *this* -# file is set up: -# - both client and server strategies are specified in the same -# file, which would only make sense for co-located clients & servers -# - both of the factories are actually sourced out of libTAO.so -# (TAO.DLL on Win32), and they would normally be in a separate -# dll from the TAO ORB Core. -# -# The options which can be passed to the Resource Factory are: -# -# -ORBresources -# where can be 'global' to specify globally-held resources, -# or 'tss' to specify thread-specific resources. -# -# The options which can be passed to the Client are: -# -# -# The options which can be passed to the Server are: -# -# -ORBconcurrency -# where can be 'thread-per-connection' to specify -# use of the ACE_Threaded_Strategy concurrency strategy, -# or 'reactive' to specify use of the ACE_Reactive_Strategy -# concurrency strategy. -# -# -ORBthreadflags -# specifies the default thread flags to use, where is a -# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP, -# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid -# on every platform. -# -# -ORBsystemidpolicydemuxstrategy -# where can be one of 'dynamic', 'linear', 'active', or 'user', -# and specifies the type of object lookup strategy used internally. -# -ORBtablesize -# specifies the size of the object table -# -dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global" -dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() -###dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBsystemidpolicydemuxstrategy dynamic -ORBtablesize 128" -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBsystemidpolicydemuxstrategy dynamic -ORBtablesize 128" diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vcrs.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vcrs.cpp deleted file mode 100644 index c9f12cc847f..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vcrs.cpp +++ /dev/null @@ -1,264 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology - * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Shanwei Cen - * Department of Computer Science and Engineering - * email: scen@cse.ogi.edu - */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include "../include/common.h" -#include "../mpeg_shared/com.h" -#include "../mpeg_shared/routine.h" -#include "../mpeg_server/proto.h" - -ACE_RCSID(server, vcrs, "$Id$") - -#define SESSION_NUM 4 - -static int parentpid = -1; - -static int listenSocketIn = -1; -static int listenSocketUn = -1; - -static struct linger linger = {1,1}; - -static int live_audio = 0, live_video = 0; /* 0 - no, 1 - to open, 2 - opened */ - -int drift_ppm = 0; /* clock drift in ppm */ - -int session_limit = SESSION_NUM; -int session_num = 0; - -static void int_handler(int sig) -{ - /* - fprintf(stderr, "process %d killed by sig %d\n",ACE_OS::getpid (), sig); - */ - ACE_OS::exit (0); -} - -static void on_exit_routine(void) -{ - if (parentpid !=ACE_OS::getpid ()) { - /* - fprintf(stderr, "process %d exiting...\n",ACE_OS::getpid ()); - */ - return; - } - /* - fprintf(stderr, "deamon exiting . . .\n"); - */ - if (live_audio > 1) ExitLiveAudio(); - if (live_video > 1) ExitLiveVideo(); - ComCloseServer(); -} - -static void clear_child(int sig) -{ - int pid; - int status; - - while ((pid = ACE_OS::waitpid (-1, &status, WNOHANG)) > 0) - { - session_num --; - - if (status == 0) { - continue; - } - fprintf(stderr, "VCRS: child %d (status %d) ", pid, status); - if (WIFEXITED(status)) { - fprintf(stderr, "exited with status %d\n", WEXITSTATUS(status)); - } - else if (WIFSIGNALED(status)) { -#if defined(_HPUX_SOURCE) || defined(__svr4__) || defined(IRIX) - fprintf(stderr, "terminated at signal %d%s.\n", WTERMSIG(status), - WCOREDUMP(status) ? ", core dumped" : ""); -#else - fprintf(stderr, "terminated at signal %d.\n", WTERMSIG(status)); -#endif - } - else if (WIFSTOPPED(status)) { - fprintf(stderr, "stopped at signal %d\n", WSTOPSIG(status)); - } - - } -} - -main(int argc, char *argv[]) -{ - int i, rttag = 0; - int addrlen; - - for (i = 1; i < argc; i++) { - if (!strcmp(argv[i], "-rt")) { - rttag = 1; - } - else if (!strcmp(argv[i], "-nrt")) { - rttag = 0; - } - else if (!strncmp(argv[i], "-d", 2)) { - sscanf(&argv[i][2], "%d", &drift_ppm); - } - else if (!strncmp(argv[i], "-s", 2)) { - sscanf(&argv[i][2], "%d", &session_limit); - if (session_limit < 1) - session_limit = SESSION_NUM; - } - else if (!strcmp(argv[i], "-lv")) { - live_video = 1; - } - else if (!strcmp(argv[i], "-la")) { - live_audio = 1; - } - else if (!strcmp(argv[i], "-rm")) { - ACE_OS::unlink (VCR_UNIX_PORT); - } - else if (!strncmp(argv[i], "-he", 3)) { - fprintf(stderr, "Usage: %s [-rt] [-nrt] [-rm]\n", argv[0]); - fprintf(stderr, " [-d#int(clock drift in ppm)]\n"); - fprintf(stderr, " [-s#int(limit on number of sessions)]\n"); - ACE_OS::exit (1); - } - } - if (drift_ppm) { - fprintf(stderr, "Clock set to drift at %d ppm (positive is faster and neg. slower)\n", - drift_ppm); - } - - setsignal(SIGCHLD, clear_child); - setsignal(SIGPIPE, SIG_IGN); - setsignal(SIGBUS, int_handler); - setsignal(SIGINT, int_handler); - setsignal(SIGTERM, int_handler); - setsignal(SIGALRM, SIG_IGN); - - parentpid =ACE_OS::getpid (); - - atexit(on_exit_routine); - - if (live_audio) { - if (InitLiveAudio(argc, argv) == -1) - live_audio = 0; - else - live_audio = 2; - } - - if (live_video) { - if (InitLiveVideo(argc, argv) == -1) - live_video = 0; - else - live_video = 2; - } - - ComInitServer(VCR_TCP_PORT, VCR_UNIX_PORT, VCR_ATM_PORT); - - /* - setpgrp(); - */ - { - char buf[100]; - sprintf(buf, "%s%s", LOG_DIR, "vcrsSession.log"); - if (freopen(buf, "a", stdout) == NULL) { - freopen("/dev/null", "w", stdout); - } - } - - for (;;) - { - int val; - unsigned char cmd; - int serverpid = -1; - int cfd, dfd; - int max_pkt_size; - - if (ComGetConnPair(&cfd, &dfd, &max_pkt_size) == -1) continue; - - if ((serverpid = ACE_OS::fork ()) == -1) - { - ACE_OS::perror ("VCRS error on creating service process"); - ACE_OS::exit (1); - } - session_num ++; - if (serverpid > 0) /* parent process for forking servers */ - { - ComCloseFd(cfd); - ComCloseFd(dfd); - continue; - } - else - { - if (session_num > session_limit) { - time_t t; - char *buf; - t =ACE_OS::time (NULL); - buf = ACE_OS::ctime (&t); - buf[strlen(buf) - 1] = 0; - fprintf(stderr, "VCRS: %s, session_limit %d, session_number %d\n", - buf, session_limit, session_num); - } - - if ((val = ACE_OS::read (cfd, &cmd, 1)) < 0) - { - ACE_OS::perror ("VCRS fails to read command from service socket"); - ACE_OS::exit (1); - } - if (val == 0) { - fprintf(stderr, "Remote client has closed connection.\n"); - ComCloseConn(cfd); - ComCloseConn(dfd); - /* continue; -- I don't know why I wrote this line? scen 5-12-96 */ - exit(0); - } - ComCloseListen(); - if (cmd == CmdINITvideo) - { - /* - fprintf(stderr, "Server forked a VideoServer process.\n"); - */ - if (live_audio) LeaveLiveAudio(); - VideoServer(cfd, dfd, rttag, max_pkt_size); - fprintf(stderr, "Weird: video server returned.\n"); - } - else - { - /* - fprintf(stderr, "Server forked a AudioServer process.\n"); - */ - if (live_video) LeaveLiveVideo(); - AudioServer(cfd, dfd, rttag, max_pkt_size); - fprintf(stderr, "Weird: audio server returned.\n"); - } - ACE_OS::exit (1); - } - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.cpp deleted file mode 100644 index ea6f1a82ff2..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// $Id$ - -#include "mpeg_server/Video_Server.h" -#include "vs.h" - -ACE_RCSID(server, vs, "$Id$") - -int -Video_Child_Process::init (int argc, - char **argv) -{ - if (TAO_AV_Child_Process_B::init (argc,argv) == -1) - return -1; - - int max_pkt_size = -INET_SOCKET_BUFFER_SIZE; - VIDEO_SINGLETON::instance ()->serviceSocket = -1; - - VIDEO_SINGLETON::instance ()->conn_tag = max_pkt_size; - - if (max_pkt_size > 0) - VIDEO_SINGLETON::instance ()->msgsize - = max_pkt_size; - else - if (max_pkt_size < 0) - VIDEO_SINGLETON::instance ()->msgsize - = - max_pkt_size; - else - VIDEO_SINGLETON::instance ()->msgsize - = 1024 * 1024; - /* - SFprintf(stderr, "VS VIDEO_SINGLETON::instance ()->msgsize = %d\n", VIDEO_SINGLETON::instance ()->msgsize); - */ - VIDEO_SINGLETON::instance ()->msgsize -= sizeof(VideoMessage); - - VIDEO_SINGLETON::instance ()->start_time =ACE_OS::time (NULL); - - VIDEO_SINGLETON::instance ()->lastRef [0] - = VIDEO_SINGLETON::instance ()->lastRef[1] - = -1; - - VIDEO_SINGLETON::instance ()->lastRefPtr = 0; - - -} -int -Video_Child_Process::make_mediactrl (Video_Control_i *& media_ctrl) -{ - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Video_Child_Process::make_mediactrl ()\n")); - media_ctrl = VIDEO_CONTROL_I::instance (); - return 0; -} - -int -main (int argc, char **argv) -{ - Video_Child_Process video_child; - - if (video_child.init (argc,argv) == -1) - return 1; -// while (1) -// { - video_child.run (); -// if (errno == EINTR) -// continue; -// else -// break; -// } - - return 0; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.h deleted file mode 100644 index a8dc2a63f55..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- c++ -*- */ -/* $Id$ */ - -// ============================================================================ -// -// = LIBRARY -// vs -// -// = FILENAME -// vs.h -// -// = DESCRIPTION -// @@ Please add a synopsis of this file. -// -// = AUTHORS -// Sumedh Mungee (sumedh@cs.wustl.edu) -// Nagarajan Surendran (naga@cs.wustl.edu) -// -// ============================================================================ - -#ifndef TAO_AV_VS_H -#define TAO_AV_VS_H - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_CODgram.h" -#include "ace/Select_Reactor.h" - -#include "include/common.h" -#include "mpeg_server/server_proto.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/com.h" -#include "mpeg_server/Video_Control_i.h" -#include "orbsvcs/orbsvcs/Naming/Naming_Utils.h" - -#include "mpeg_server/Video_Server.h" -#include "orbsvcs/AV/AVStreams_i.h" - -class Video_Child_Process - :public TAO_AV_Child_Process_B -{ -public: - int init (int argc, - char **argv); - // init the Video Singleton. - - int make_mediactrl (Video_Control_i *&media_ctrl); -}; - - -#endif /* TAO_AV_VS_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/vcr.1 b/TAO/orbsvcs/tests/AVStreams/mpeg/vcr.1 deleted file mode 100644 index 24e9688f674..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/vcr.1 +++ /dev/null @@ -1,610 +0,0 @@ -.\" Copyright (c) 1995 Oregon Graduate Institute -.TH vcr 1 "November 1995" "MPEG video audio player" - -.SH NAME -.B vcr vcrs -\- Distributed, real-time synchronized video audio player, version 2.0 -.SH SYNOPSIS - -.B vcrs -[ -.B \-rt -] [ -.B \-rm -] [ -.B \-s\fIsession_limit\fP -] [ -.B \-help -] - -.B vcr -[ -.B\-rt -] [ -.B \-shmem -] [ -.B \-rmsem -] -.ti +5n -[ -.BR \-dither " ordered\||\|ordered2\||\|fs4\||\|fs2\||\|fs2fast\||\|hybrid\||\| -.if n .ti +5n - hybrid2\||\|2x2\||\|gray\||\|color\||\|mono\||\|threshold -] -.if n .ti +5n -[ -.I X-window options -] -.if n .ti +5n -[ -.BR \-v " \fI[hostname:]video-filename\fP" -] -.if n .ti +5n -[ -.BR \-a " \fI[hostname:]audio-filename\fP" -] -.if n .ti +5n -[ -.BR \-p " \fImovie-file-name\fP" -] -.if n .ti +5n -[ -.BR \-l " \fImovie-list-file-name\fP" -] -.if n .ti +5n -[ -.BR \-quiet -] -.if n .ti +5n -[ -.BR \-help -] -.SH DESCRIPTION - -The player plays \fBMPEG\-1\fP video and \fB8\-bit mu\-law (Sun -Sparc)\fP audio. It supports -following \fBfour types\fP of playback: -.TP -\ \ \ \(bu -Plays both video and audio synchronously, in real-time mode. Video -frames, or even audio samples are dropped if needed. -.TP -\ \ \ \(bu -Plays video only, in real-time mode. Video frames are dropped if -needed. -.TP -\ \ \ \(bu -Plays video only, in best-effort mode, video frames are played as fast -as possible. -.TP -\ \ \ \(bu -Plays audio only, in real time mode. -.PP - -When video/audio is played in \fBreal-time\fP mode, play speed (defined in -terms of frames-per-second (fps) for video and samples-per-second (sps) -for audio) can be specified through a speed scale. If audio is played at a -speed other than the recording (normal) speed, samples are interpolated. - -When video is played in \fBbest-effort\fP mode, the player tries its -best to play video frame by frame, and not to drop frames. This mode -is not supported very well. Now and then some frames may be -dropped. Audio is disabled in this mode. - -As well as various types of playback, the player also supports other -common VCR functions such as fast forward, rewind, step -(forward), random positioning, etc.. - -The player is of \fBdistributed architecture\fP, with servers and -clients communicating across Internet. A \fBserver\fP resides on a -host, and services coming audio/video retrieval requests from clients. -A \fBclient\fP receives instructions from the user, makes connection -to servers, buffers incoming streams, decodes video frames, -interpolates audio samples, and outputs audio and video to -corresponding devices in a timely manner. A client can connect to -different servers for audio and video streams, and still plays them -synchronously. - - -.SH SERVER - -To start the server, type: - -.B vcrs -[ -.B \-rt -] [ -.B \-rm -] [ -.B \-s\fIsession_limit\fP -] [ -.B \-help -] - -One host can have a SINGLE server running, which responds to -connection requests from all clients to that host. Subsequent -invocation is terminated with an error message. - -\fBOptions\fP - -.IP "\fB-rt\fP" -On \fBhpux\fP, \fBsparc-sunos5.3\fP and \fBi86pc-solaris2.4\fP, if you -have real-time execution privilege, you can start the server with -the option \fB\-rt\fP to get better service. - -.IP "\fB-rm\fP" -With option \fB\-rm\fP, the server will try to remove socket names -left by previous crashed invocations before initialization. - -.IP "\fB-s\fIsession_limit\fP" - -With the option of \fB\-s\fP followed by a positive integer, e.g. -\fB-s2\fP, \fB-s4\fP or \fB-s10\fP, the number of sessions -serviced by the server at any time will be limited to be no more than -the given number. Both audio and video sessions are counted. The -default session number limit is \fB4\fI. - -.IP "\fB-help\fP" -This option tells the server to print all available options and then -quit. - -.PP - -In a video session, the server tries to find a -corresponding \fB.Info\fP file describing the structure of the MPEG -file of the session. If this fails, the server scans the MPEG file for -structure information and tries to create the \fB.Info\fP file. For -big MPEG files, this scanning process may take quite a few minutes -(some times even tens of minutes). If the \fB.Info\fP file is found, -the server simply reads structure information from it. - -.SH CLIENT - -The client program is available on \fBsun4\fP, \fBhpux\fP and -\fBi86pc-solaris2.4\fP. It needs a \fBMotif\fP environment, and -outputs audio to the default \fBAudioFile\fP server. If the client -fails to connect to the default AudioFile server, then the audio is -disabled. - -To start the client, type: - -.B vcr -[ -.B\-rt -] [ -.B \-shmem -] [ -.B \-rmsem -] -.ti +5n -[ -.BR \-dither " ordered\||\|ordered2\||\|fs4\||\|fs2\||\|fs2fast\||\|hybrid\||\| -.if n .ti +5n - hybrid2\||\|2x2\||\|gray\||\|color\||\|mono\||\|threshold -] -.if n .ti +5n -[ -.I X-window options -] -.if n .ti +5n -[ -.BR \-v " \fI[hostname:]video-filename\fP" -] -.if n .ti +5n -[ -.BR \-a " \fI[hostname:]audio-filename\fP" -] -.if n .ti +5n -[ -.BR \-p " \fImovie-file-name\fP" -] -.if n .ti +5n -[ -.BR \-l " \fImovie-list-file-name\fP" -] -.if n .ti +5n -[ -.BR \-quiet -] -.if n .ti +5n -[ -.BR \-help -] - -\fBOptions\fP - -.IP \fB-rt\fP -On \fBhpux\fP, and \fBi86pc-solaris2.4\fP, if you have real-time -execution privilege, with this option you may get better service. -.IP \fB-shmem\fP -With this option, the client tries to output video frames to the -X-server via shared memory instead of sockets. -.IP \fB-rmsem\fP -With this option, prior to initialization, the client tries to remove -\fBall\fP existing semaphore and shared memory ids you have access to. -\fBBe careful\fP, with this option, you also face the danger of -removing semaphores or shared memory ids being used by other programs, -as well as all the ones created by failed invocation of the player. See -\fBSemaphore ids and shared memory ids used up\fP in \fBKNOWN PROBLEMS\fP -section. -.IP "\fB-dither\fP ordered|ordered2|fs4|fs2|fs2fast|hybrid|" - hybrid2|2x2|gray|color|mono|threshold - -This option specifies the type of dithering performed on video frames -in order to be displayed on an X-window. The default is -\fIordered\fP. \fIcolor\fP only works with full color (24-bit) -displays. All others work with 8-bit color displays. \fImono\fP and -\fIthreshold\fP also work with mono displays. Different types of -dithering have different computational complexity and offer different -image quality. -.IP "\fIX-window options\fP" -All standard X-window Toolkit command line options are accepted -(see \fBX\fP(1)). -.IP "\fB-v\fP \fI[hostname:]video-filename\fP" -The very first program for the player can be specified in command line -with \fB-v\fP and/or \fB-a\fP options, for video and/or audio streams -respectively. - -This option specifies a video stream. If the \fIhostname\fP part is -given, the client tries to connect to a running server on the given -host, and plays the given file. If the hostname part is missing, the -client assumes there is a running server on the local host or tries to -fork one. and tries to connect to it. - -.IP "\fB-a\fP \fI[hostname:]audio-filename\fP" -This option specifies an audio stream of the very first program. -Only file names with suffix \fB.au\fP are accepted as audio files. -.IP "\fB-p\fP \fImovie-file-name\fP" -This option specifies a file specifying a movie to be played upon -client startup. A movies file contains \fBfive lines\fP lines: title, -video host name, video file path, audio host name, and audio file path. -.IP "\fB-l\fP \fImovie-list-file-name\fP" -This option specifies a movie list file to replace the default movie -list file \fI$(HOME)/.vcr/vcrPrograms\fP. A movie list file contains a -banner line, followed by a list of movies. -.IP "\fB-quiet\fP" -This option tells the client not to print any text message. This is -useful when the player is invoked from within a web browser. -.IP "\fB-help\fP" -This option tells the client to print all available options and quit. - -.PP - -\fBOperations\fP - -There are \fBtwelve buttons\fP and \fBfour scales\fP defined in the top-level window. -Buttons from left to right are: -.PP -.IP \fIExit\fP -Exits the client right away. -.IP \fIInfo\fP -Pops up a window containing information about the player. -.IP \fIPara\fP -Pops up a window with a list of parameters. Parameter values -can be viewed and modified through this window. -.IP \fIProg\fP -Pops up a window with a list of programs. You -can select a program from this list to play. -.IP \fIFile\fP -This is an alternative way to select programs. pressing this button -pops up a standard Motif file selection window. You can select -audio/video file on local host to play. The client assumes a running -server on local host, or tries to fork one. - -File names with suffix \fB.au\fP are accepted as audio, and file -names with suffices \fB.mpg\fP, or \fB.mpeg\fP (some or all letters in -the suffices can be upper-case ones) as MPEG video. Other types of -file names are rejected. - -Selection of a new program causes the current program to be discarded. -.IP \fILoop\fP -A toggle button. When pressed, the current program is played -repeatedly until stopped explicitly by the user, otherwise, playback stops when -program end is hit. This button has no effect on rewind and fast -forward. -.IP \fINorm\fP -Restores play speed to the normal (recording) speed. -.IP \fIRewind\fP -For video programs. Plays backward from the current position at a -speed given by the parameter \fI(Rewind frames-per-second)\fP. Only first -frames of MPEG picture groups (I-frames) are played. Audio is -disabled. -.IP \fIStop\fP -Stops active playback, fast forward or rewind. -.IP \fIFast-Forward\fP -For video programs. Plays forward from the current position at a speed -given by the parameter \fI(FF frames-per-second)\fP. Only first frames of MPEG -picture groups (I-frames) are played. Audio is disabled. -.IP \fIPlay\fP -Plays the program from the current position in one of the two modes, -depending on if video is involved and the value of an parameter \fI(Real -time(audio on)(tag))\fP: -.RS -.IP - -Best-effort mode, if the parameter is off (0), and video is involved. -.IP - -Real-time mode, otherwise. -.RE -.IP \fIStep\fP -Steps forward for one frame from the current position. -.PP -Clicking on buttons \fIRewind\fP, \fIFast-Forward\fP, \fIPlay\fP and -\fIStep\fP and dragging the \fIPlay-Speed\fP scale all stop current -active rewind, fast forward, or play. - -.B "Four scales \fP from left to right are:" - -.IP \fIBalance\fP -Currently not functional, because only mono audio is -supported. -.IP \fIVolume\fP -Audio volume. -.IP \fIPlay-Speed\fP -Specifies play speed for real-time mode playback. This scale is not -completely linear, with a special middle point (\fB50\fP). -.RS -.IP \fB50\fP -normal (recording) speed. -.IP "\fB[1 - 50)\fP" -linear speed value increase from zero to the normal speed. -.IP "\fB(50 - 100]\fP" -Linear speed value increase from the normal speed to the maximum -speed given by the parameter \fI(Video max frames-per-second)\fP when -video is involved in the current program, or \fI(Audio max -samples-per-second)\fP when only audio is involved. -.RE -This scale also defines the upper-limit of the best-effort playback -speed. -.IP \fIPosition\fP -This scale has multiple functionalities: -.RS -.IP - -Indicates the beginning position for rewind, fast forward and -playback. -.IP - -Shows the current position during rewind, fast forward, and playback. -.IP - -Random positioning: you can set the position by dragging the -slider. when video is involved, the first frame of the picture group -at the current position is displayed. -.RE -.PP -.B "Program list" - -.B Program list -is maintained through the \fBprogram list\fP window, which is popped up by -clicking the \fIProg\fP button in the main window. Currently only \fISelect\fP -and \fIDismiss\fP buttons are fully functional, and contents of a selected -program can be viewed (but not modified) by pressing the \fIModify\fP -button. To select a program, \fBhighlight\fP the desired item and -click \fISelect\fP. To modify the program list, edit the program file given -below. - -.B "Parameters" - -.B Parameters -are viewed and maintained through the parameter window, which is activated -by clicking the \fIPara\fP button in the main window. To update a parameter, -\fBhighlight\fP the item, enter the new value in the text window next -to the \fIUpdate\fP button, and press \fIUpdate\fP. Following parameters -are supported: - -.IP "\fIReal time (audio on)(tag)\fP" -Best-effort play mode when this parameter is 0 and video is involved -in the current program, otherwise real-time play mode. Default: 1, -range: 0, non-0. -.IP "\fIVideo max frames-per-second\fP" -For video programs, real-time mode play speed when speed scale has a -value of 100. Default: 60, range: > the normal speed. -.IP "\fIAudio max samples-per-second\fP" -For audio-only programs, play speed when speed scale has a value of -100. Default: 16000, range: > the normal speed. -.IP "\fIFF frames-per-second\fP" -Fast forward speed. Default: 150, range: > 0. -.IP "\fIRewind frames-per-second\fP" -Rewind speed. Default: 150, range: > 0. -.IP "\fIFeedback delay (msec)\fP" -Currently not used. -.IP "\fIAudio output mask\fP" -Currently not used. -.IP "\fIAudio_para.encodeType\fP" -Currently not used. -.IP "\fIAudio_para.channels\fP" -Currently not used. -.IP "\fIAudio_para.samplesPerSecond\fP" -Currently not used. -.IP "\fIAudio_para.bytesPerSamples\fP" -Currently not used. -.IP "\fIAudio timer interval (millisec)\fP" -For audio-only programs. Playback -timer interval in milliseconds. Playback of audio and video is -driven by a timer in the client. Default: 500, range: > 0. -.IP "\fIAudio buffered intervals\fP" -For audio-only programs. This number of timer intervals of audio -samples are to be buffered in the AudioFile server internal buffer. This -parameter and the previous one determine how many milliseconds of -audio samples are to be buffered in AudioFile. Buffering too -many samples reduces responsiveness, too few may degrade playback -quality. Default: 2, range: > 0. -.IP "\fIFrames per audio play\fP" -For audio+video programs, this parameter determines the ratio of the -audio timer interval over the video timer interval. Default: 4, -range: > 0. -.IP "\fIAudio forward (samples)\fP" -For audio+video programs, this number of samples of audio is -played ahead of video stream. This is supposed to compensate the -delay in AudioFile server. Default: 800, range: > 0. -.IP "\fIVS work-ahead (milli-seconds)\fP" -For video program, this number of milli-seconds the player tries to -keep the video server ahead of the client during playback, rewind and -fast forward. - -If the parameter \fISync effective\fP has a value of non-0, then this -parameter gives the initial value of the VS work-ahead time, and the -actual work ahead time is adjusted according to current network delay -jitter level. If a value less than the default is set, then the -default instead of the given one is used by the player. - -Default: 100, range: >= Default. - -.IP "\fIFrame rate limit (fps, float)\fP" -For video programs. In real-time play mode, if current play speed is -higher than the value of this parameter, then this -parameter defines the maximum frame rate the player tries to play. -Default: 60.0, range: >0. -.IP "\fICollect statistics(tag)\fP" -For video programs. If both the server and the client programs are compiled -with STAT defined, this tag indicates that, at the end of a playback -session, when \fIStop\fP button is pressed (or in loop-back mode when the -end of the program is reached) statistics is collected to file -stat.\fIn\fP in current directory (from which the client is -invoked). Default: 0, range: 0, non-0. -.IP "\fICollect video structure info(tag)\fP" -For video programs. If both the server and the client programs are compiled -with STAT defined, this tag indicates that, upon successful -initialization of a video stream, structure information of the MPEG -stream is collected to a file named struct.\fIn\fP in -current directory Default: 0, range: 0, non-0. -.IP "\fISync effective(tag)\fP" -For video programs, when set, server/client synchronization control is -effective during playback, rewind and fast forward. Default: 1, range: -0, non-0. -.IP "\fIQoS effective(tag)\fP" -For video programs, when set, automatic frame rate control is -effective during playback. Default: 1, range: 0, non-0. -.IP "\fIAudio offset(samples)\fP" -For audio+video programs. The player assumes that in a program, audio -and video are recorded strictly synchronously. But it is usually not -the case, and there is a certain amount of timing shift between audio -and video. This parameter specifies audio forward offset against video -in order to compensate the shift. Default: 0, range: integer -.IP "\fIFilter parameter(1/R or n-samples)\fP" -Parameter of the filters for client/server synchronization and frame rate -control. Default: 50, range: > 0. -.IP "\fIMax send pattern frames\fP" -This parameter sets the granularity of the frame rate control -algorithm. Default: 60, range: > 0. -.IP "\fIReliable byte-stream audio (tag)\fP" -In the case when the server is on a remote host, when this tag is set, -the client establishes a TCP connection to the server for shipping -audio samples, otherwise a UDP is used. The client always setup a TCP -connection to the server for control messages, no matter what value -the tag is. -.IP "\fIReliable byte-stream video (tag)\fP" -Similar effort as previous tag, but for video channel. -.IP "\fIVerbose message(tag)\fP" -If this tag is set, then verbose message is printed (provided that -command line option \fB-quiet\fP is not specified. Otherwise the -client will still print some, but less verbose message. -.PP -Parameter setting is for experienced user only. It is suggested that -you leave values of most parameters as default. If you like to change -some of them, be careful. It may make the player behave improperly. In -case you made some change, the player fails to work, and you are -unable to undo the change, delete the parameter file shown below and -restart the client. - -.SH FILES - -.IP "\fI($HOME)/.vcr/vcrPrograms\fP" -Program file. If this file is absent, it is created with a default -movie list of several basketball game sample movies in it. The movies -in the default movies list are maintained at CSE OGI. In a movie list -file, the first line is a banner. Following this line, each contiguous -four lines describe a movie: video host, MPEG file path, audio host, -audio file path. You may edit the movie list fileto include any movies -you like. - -.IP "\fI($HOME)/.vcr/vcrParameters\fP" -Parameter file. When absent, the system default parameter values -apply. Whenever you update a parameter, this parameter file is also -created or updated. - -.SH KNOWN PROBLEMS - -.B "The player stalls" -when or after playing audio program at very \fBlow speed\fP, or the -product of \fI(Audio timer interval)\fP and \fI(Audio buffered intervals)\fP -parameters \fBtoo large\fP, or \fI(Frames per audio play)\fP too -large. This is because the client tries to put too many audio -samples to AudioFile each time, blocking itself for output. - -In this version of the player, when an video+audio program is played, -some conditions are checked and low speed limit is enforced. You -are not able to set too low play speed (even if you set the speed -slider to 0 position). But the conditions might not be sufficient. - -.B "Play at too high speed\fP," -or \fI(Audio timer interval)\fP too small, or \fI(Video max -frames-per-second)\fP, \fI(FF frames-per-second)\fP, or \fI(Rewind -frames-per-second)\fP too high, presentation quality may be worse than -expected. This is because of the resolution limit of the UNIX interval -timer, which is about 10 milliseconds. - -.B "When Play speed jump from high to very low\fP," -a few seconds of worse-than-expected video presentation quality may be -experienced. Because at high speed, the video server usually drops -frames, and play speed changes, the player does not flush the video -pipeline. - -Various problems may be experienced if the \fBparameter\fP values are too -far from their default. The parameter values are seldomly guarded. - -.B "Audio doesn't work when played across the Internet\fP." -This is because audio is retrieved from the audio server to the -client via TCP, and the Internet TCP connection fails to provide -enough (e.g. 8KB/s) sustained bandwidth. In this case, all audio -samples would be too late showing up at the client, and thus are -dropped. - -.B "X shared memory problem\fP." -Parts of the user interface may not work correctly when the player -outputs to X-window via shared memory (with option \fB-shmem\fP). For -example, some of the buttons may not show up. Usually, the missing -buttons will show up by iconifying the user interface. - -.B "Core dump." -The player may core dump when playing a specific MPEG stream, at a -specific position. This may be because the parameters in the MPEG -stream is out of the ability of the decoder code. Upon core dump, you -may want to reproduce the problem, and recompile the player with -option -DNDEBUG, run the player again to see if any assertions fails. - -.B "Semaphore or shared memory ids used up\fP." -When this happens, an error shmget() or semget() is reported by the -player. This may happen if previous invocation(s) of the player have -exit abnormally causing core dump, and you try to run the player -again. Because semaphores and shared memory segments might not be -reclaimed when the player exits abnormally. You may run the client -with option \fB\-rmsem\fP to remove all existing semaphores and shared -memory ids accessable by you. See description of \fB\-rmsem\fP. If -\fB-rmsem\fP does not work, you may need to use tools like -\fBipcrm(1)\fP. - -.B "Undeleted UNIX socket pathes /tmp/vcrs*\fP" -Some UNIX socket names may remain in /tmp directory as "vcrs*", if the -server or the client has terminated abnormally. - -.SH BUG REPORT - -If you experience problems, look at the above KNOWN PROBLEM section -first. If the problem is not described, try to reproduce the problem, and -\fBreport bug\fP to \fBscen@cse.ogi.edu\fP. Thanks. - -.SH COPYRIGHT - -This software is covered by copyrights. It contains code contributed -by the author and several other parties. Please see the beginning of -source files and copyright file(s) in the root directory of the source -kit. - -.SH SEE ALSO - -.B "AF\fP(1), \fBX\fP(1)" - -.SH AUTHOR - - Shanwei Cen - Department of Computer Science and Engineering - Oregon Graduate Institute of Science and Technology - scen@cse.ogi.edu diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/vcrs.1 b/TAO/orbsvcs/tests/AVStreams/mpeg/vcrs.1 deleted file mode 100644 index a9769fc8944..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/vcrs.1 +++ /dev/null @@ -1 +0,0 @@ -.so vcr.1 diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/AV_Demo b/TAO/orbsvcs/tests/AVStreams/server_discovery/AV_Demo deleted file mode 100644 index 9c256fefdab..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/AV_Demo +++ /dev/null @@ -1,191 +0,0 @@ -Greetings, person designated to complete the AVDemo!, - -This document details my design for the AVDemo, just how far I got in -implementing those designs, and what remains to be done. First, let me -explain that I had originally intended to use the JavaIDL ORB for this -demo, but their implementation of demarshalling Anys tossed -CORBA::Unknown and NullPointer exceptions like a sailor tossing -cookies in a typhoon. So then, I figured I could use the VisiBroker -for Java ORB, while continuing to use the nifty jdk1.2 GUI extensions ---- the "swing" components --- which I had already begun to -incorporate into the demo. However, in this latest version of the JDK, -the system classes are located automatically, and their path is not -required in the CLASSPATH environment variable. Since the Java CORBA -package names are standardized, I couldn't arrange the package search -order so that the VisiBroker packages were searched before the JavaIDL -ones. Conflicts occurred. - -At this point, frustrated and dejected, I renounced Java ORBS -entirely, and decided to implement the client interaction using C++ -TAO while keeping the GUI using Java1.2, and have the GUI invoke -native methods when it needed to fetch information from the Trading -Service. If you're unfamiliar with the Java Native Interface (JNI), -now's the time to get familiar, since this demo relies heavily on it, -but I'll give you a brief synopsis. In the Java code you declare -methods as native by prefixing the declaration with the 'native' -keyword. Once you've compiled the Java source into byte code, you run -the 'javah' program to generate C/C++ function declarations. The names -of this functions are the product of name mangling the Java methods, -so the Java Runtime can call "dlsym" to retrieve a pointer to the -function's implementation when the native method is invoked in Java -code. At some point prior to invoking the native method, your Java -code must explicitly load the shared library in which your native -method implementations reside by calling System.loadLibrary (). Of -course, when I attempted to load the shared library contating my -TAO Trading Service client code, Java threw an -UnsatisfiedLinkException, not because it couldn't locate the library -as the misleading error message reported, but for some mysterious -reason which Carlos suspects has something to do with the native TAO -threads clashing with the Java VM's user-level threads. (In retropsect -I could have enabled native threads which seem to be supported in -Java1.2 for Solaris, but what I came up with is a more elgant design -anyway). After trying various hacks, I settled on the following -design. Brace yourself.... - -DEMO VISION - -My goals for this first demo were modest. And became increasingly more -modest as I began meeting failure at every door. My full intentions -are described in my thesis (doc/papers/ugthesis_seth), but since I can -already sense your guffawing at the notion of reading my thesis, I'll -summarize for you -- right now. Essentially, I wanted the initial query -to the Trading Service to be as productive as possible, eliminating -the possibility that attempting to connect to a server in the returned -offers will fail. Thus, that initial query will should include things -like: can accept another connection, supports the media formats -understood by the client, can transmit at a rate suitable to the -client's limiting bandwidth. Moreover, the client might want to limit -the pool of possible servers based on content --- must have movies of -a certain category --- or server performance --- must have a load less -than 2.4. This kind of configuration information can be obtained -through dialogue boxes in the GUI, and then formatted as a constraint -string in the OMG Standard Constraint language. The results --- -performance properties and movie offerings for each server --- would -be displayed in the GUI, and the user would nominate a server who -offers the best performance for the content desired by the user. - -DEMO REALITY --- the Server Side - -orbsvcs/tests/AVStreams/mpeg/source/server contains the code for the -augmented server --- augmented from the original server because it -uses the TAO_Property_Exporter to form a service offer that it exports -to a Trading Service instance. Properties exported by the -augmented_server include: maxmimum number of connections allowed, -current number of connections, list of movies offered and their -attributes, performance statistics (CPU usage, disk usage, load, -etc...). The TAO_Property_Exporter presents a kind of uniform -interface for exporting static and dynamic properties --- every -property mentioned above is dynamic except perhaps the maximum number -of connections allowed. There are actually three types of properties -exportable by Property_Exporter: static, where the value of the -property is stored twice: once in the offer and once in the MMDevice's -CosProperty::PropertySet; semi-dynamic, where the value of the -property is stored in the property set, and a dynamic property in the -service offer retrieves the value from the property set (this is -useful for MMDevice dynamic properties); and dynamic, where the value -of the property isn't stored anywhere, but lazily-evaluated by a -dynamic property in the offer (this is useful for non-MMDevice -properties). - -Classes that export properties via the TAO_Property_Exporter inherit -from the TAO_Exportable interface. The define_properties and -export_properties methods allow an exporting class to encapsulate the -exporting of its own properties. The augmented server has three -TAO_Exportable classes representing three categories of properties: 1) -The AV_Audio_MMDevice exports those properties that are also -properties of the MMDevice --- properties that are used in the -lower-level AVStream stream establishment negotiation. The properties -are static and semi-dynamic. Hence when its define_properties method -is invoked, the AV_Audio_MMDevice adds to the Service Type Description -PropStructSeq, the names, types, and modes of each of the properties -its exporting. When its define_properties method is invoked, the -AV_Audio_MMDevice uses the TAO_Property_Exporter reference it's passed -to export its properties. 2) TAO_Video_Repository in addition to being -a TAO_Exportable is also a TAO_Dynamic_Property. In define_properties -is exports itself as a dynamic property with the TAO_Property_Exporter -its passed, and when called back, parses a manifest of available -movies, obtains information about them by parsing the headers of each -of the media files, and returns this information of a sequence of -structs, each struct containing the attributes of an individual -movie. The IDL code for this structure --- TAO_VR::Movie --- can be -found in VideoRepository.idl. 3) TAO_Machine_Properties is also a -dynamic property --- serveral actually. For each of the ten or so -performance properties, it exports a dynamic property with itself as -the evaluation interface reference. When its evalDP method is called, -it obtains the value for the statistic whose name is in the prop_name -parameter. The statistics are gathered by SunRPC from the rstatd -daemon and cached. The cache expires every so often and is then -refreshed by another rpc call, obviating the need for an rpc call for -every call to evalDP. - -DEMO REALITY --- the Client Side - -The Server Selection portion of the demo is actually a Java VM -embedded in a TAO Trading Service client. The main program bootstraps -the vm, initializes the ORB and bootstraps to the Trading Service, -performs the initial query of the Trading Service, and invokes the -'main' method on the Java Server_Discovery class. Embedding the VM in -this way is possible because of the JNI Invocation interface. On the -C++ side of things, the Trader_Client class queries the Trading -Service and caches the results in a two-tier hashtable: the first tier -maps the server name to who the offer belongs to a second-tier -hashtable, which maps each property name in the offer to its -value. The Server_Discovery.cpp file implements each of the native -methods used in the java portion of the demo, and each method -implementation follows the same pattern: convert the java string -paraemters into C++ strings, obtain the Trader_Client singleton -instance, delegate to that instance, and convert the return results to -Java objects. - -The Server_Discovery class creates a JFrame with a JDesktopPane as its -ContentPane. The first window onto the Desktop is a -Server_Discovery_Selection pane which it split (JSplitPane) into two -halves: the upper portion containing a hierarcical menu (JTree) of -available movies, organized by category, title, and server; and the -bottom portion containing a table (JTable) of attributes for a selected -movie. The Server_Discovery class uses the native methods in -Server_Discovery_Util, get_server_names and get_movie_info, to supply -Server_Discovery_Selection with the information necessary to create -its displays. When a user clicks on a leaf node of the hierarchical -menuthe bottom half displays the table for that -server's movie offering. The table displays the contents of -TAO_VR::Movie structure for the selected movies. Also in the tables -are clickable labels to display the performance information for the -server, and to call up a web page describing the movie. - -For viewing the performance a Server_Discovery_Perf JInternalFrame is -created in a callback to the Server_Discovery (a Mediator object). The -Server_Discovery_Perf is supplied with the names of each of the -performance properties, instantiates a Strip_Chart for each one, and -spawns a thread to periodically update each chart by calling -Server_Discovery_Util.evaluate_performance_property for the chart's -property_name. For viewing a web page describing the movie, the -Server_Discovery_Browser, when given the description field of the -TAO_VR::Movie structure, will load a JEditorPane to fetch the page and -display the parsed html! Pretty damn slick. The "browser" will also -respond to clicks on hyperlinks and fetch the selected pages! No joke! - -Finally, if the user clicks on the button at the bottom of the -selection frame, Server_Discovery_Selection calls the native method -load_movie, which uses a UNIX socket to connect to the controller -process of the AV client, and passes it the name of the movie and the -IOR of the MMDevice interface. The AV client then transmutes the IOR -to an MMDevice object reference, and establishes the AV -stream. Hoorah! - -WHAT'S WRONG WITH THE DEMO? - -Well, the first native method invocation --- get_server_names --- -works as verified by ACE_DEBUG messages, but hangs on returning from -it. Once this problem is solved, all that remains is to ensure the GUI -looks and works as I've envisioned, and to code the interaction between -the Server Discovery and A/V client. - -The wrong stated above has been set right and he deemo actually works....Hoorah!!!! - -That, my friend, is the demo in an anxiously written nutshell. Enjoy! -Don't forget to set the JAVA_ROOT enivronment variable to the location -of the lastest JDK version (when I was here, that was -/project/doc/pkg/jdk1.2beta4)! - --- Seth Widoff, sbw1@cs.wustl.edu diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Makefile b/TAO/orbsvcs/tests/AVStreams/server_discovery/Makefile deleted file mode 100644 index 72396cb0cac..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Makefile +++ /dev/null @@ -1,1077 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -# -# Makefile for TAO -#---------------------------------------------------------------------------- -shared_libs_only=1 -MAKEFILE = Makefile -LIBNAME = libavdemo -SHLIB = $(LIBNAME).$(SOEXT) - -BIN = main - -IDL_SRCS= Video_Repository - -IDL_FILES = \ - $(addsuffix S, $(IDL_SRCS)) \ - $(addsuffix C, $(IDL_SRCS)) - -SRCS = $(IDL_FILES) \ - Trader_Client \ - Server_Discovery - -FILES = $(SRCS) - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -MPEG_ROOT = $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source -LSRC = $(addsuffix .cpp,$(FILES)) - -LDFLAGS += -L$(JAVA_ROOT)/jre/lib/sparc -L$(JAVA_ROOT)/jre/lib/sparc/native_threads -L$(MPEG_ROOT)/mpeg_shared - -LIBS = -lorbsvcs -lTAO -lACE -lmpeg_shared -LDLIBS = -lavdemo -ljava -ljvm -VLDLIBS = $(LDLIBS:%=%$(VAR)) -CPPFLAGS += -I$(JAVA_ROOT)/include-old -I$(JAVA_ROOT)/include-old/solaris \ - -I$(TAO_ROOT)/orbsvcs -I$(MPEG_ROOT) -I$(TAO_ROOT) $(TSS_ORB_FLAG) -I$(TAO_ROOT)/orbsvcs/orbsvcs - -BUILD = TAO_VR.module $(VSHLIB) $(VLIB) $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -#---------------------------------------------------------------------------- -# Local targets (and local hacks) -#---------------------------------------------------------------------------- - -idl_stubs: $(addsuffix .h, $(IDL_FILES)) - -Video_Repository.idl: $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.idl - cp $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.idl . - -TAO_VR.module: Video_Repository.idl - $(JAVA_ROOT)/bin/idltojava Video_Repository.idl - touch TAO_VR.module - -clean: - -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state - -realclean: clean - -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES)) \ - $(addsuffix _T.h, $(IDL_FILES)) $(addsuffix _T.i, $(IDL_FILES)) $(addsuffix _T.cpp, $(IDL_FILES)) - -IDL_EXT=C.h C.i C.cpp S.h S.i S.cpp S_T.h S_T.i S_T.cpp - -.PRECIOUS: $(foreach file, $(IDL_SRCS), $(foreach ext, $(IDL_EXT), $(file)$(ext)))) - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Video_RepositoryS.o .obj/Video_RepositoryS.so .shobj/Video_RepositoryS.o .shobj/Video_RepositoryS.so: Video_RepositoryS.cpp Video_RepositoryS.h \ - Video_RepositoryC.h $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(TAO_ROOT)/tao/Align.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.i \ - $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/IIOP_Object.h \ - $(TAO_ROOT)/tao/IIOP_Object.i \ - $(TAO_ROOT)/tao/IIOP_ORB.h \ - $(TAO_ROOT)/tao/IIOP_ORB.i \ - $(TAO_ROOT)/tao/CDR_Interpreter.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - Video_RepositoryC.i Video_RepositoryS_T.h Video_RepositoryS_T.i \ - Video_RepositoryS_T.cpp Video_RepositoryS.i -.obj/Video_RepositoryC.o .obj/Video_RepositoryC.so .shobj/Video_RepositoryC.o .shobj/Video_RepositoryC.so: Video_RepositoryC.cpp Video_RepositoryC.h \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(TAO_ROOT)/tao/Align.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.i \ - $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/IIOP_Object.h \ - $(TAO_ROOT)/tao/IIOP_Object.i \ - $(TAO_ROOT)/tao/IIOP_ORB.h \ - $(TAO_ROOT)/tao/IIOP_ORB.i \ - $(TAO_ROOT)/tao/CDR_Interpreter.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - Video_RepositoryC.i Video_RepositoryS.h Video_RepositoryS_T.h \ - Video_RepositoryS_T.i Video_RepositoryS_T.cpp Video_RepositoryS.i -.obj/Trader_Client.o .obj/Trader_Client.so .shobj/Trader_Client.o .shobj/Trader_Client.so: Trader_Client.cpp Trader_Client.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(TAO_ROOT)/tao/Align.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.i \ - $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/IIOP_Object.h \ - $(TAO_ROOT)/tao/IIOP_Object.i \ - $(TAO_ROOT)/tao/IIOP_ORB.h \ - $(TAO_ROOT)/tao/IIOP_ORB.i \ - $(TAO_ROOT)/tao/CDR_Interpreter.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - Video_RepositoryC.h Video_RepositoryC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader_Utils.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/MMDevice_ExporterC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/MMDevice_ExporterC.i -.obj/Server_Discovery.o .obj/Server_Discovery.so .shobj/Server_Discovery.o .shobj/Server_Discovery.so: Server_Discovery.cpp \ - Server_0005fDiscovery_0005fUtil.h Trader_Client.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(TAO_ROOT)/tao/Align.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.i \ - $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/IIOP_Object.h \ - $(TAO_ROOT)/tao/IIOP_Object.i \ - $(TAO_ROOT)/tao/IIOP_ORB.h \ - $(TAO_ROOT)/tao/IIOP_ORB.i \ - $(TAO_ROOT)/tao/CDR_Interpreter.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - Video_RepositoryC.h Video_RepositoryC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTradingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Trader/Trader_Utils.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverC.h \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/ReceiverC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/MMDevice_ExporterC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/MMDevice_ExporterC.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Queue.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Queue.java deleted file mode 100644 index 5387d5dd0c8..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Queue.java +++ /dev/null @@ -1,189 +0,0 @@ -// $Id$ - -import java.util.Enumeration; - -public class Queue -{ - // Friendly? - Queue_Node head_ = null; - Queue_Node tail_ = null; - - private int length_ = 0; - - public Queue() - { - } - - public Enumeration forward_iterator() - { - return new Queue_Iterator(this, Queue_Iterator.FORWARD); - } - - public Enumeration reverse_iterator() - { - return new Queue_Iterator(this, Queue_Iterator.REVERSE); - } - - public void enqueue_tail(Object new_data) - { - Queue_Node new_node = new Queue_Node(new_data); - - if (tail_ == null) - { - tail_ = new_node; - head_ = new_node; - } - else - { - new_node.prev_ = tail_; - tail_.next_ = new_node; - tail_ = new_node; - } - - length_++; - } - - public void enqueue_head(Object new_data) - { - Queue_Node new_node = new Queue_Node(new_data); - - if (head_ == null) - { - tail_ = new_node; - head_ = new_node; - } - else - { - new_node.next_ = head_; - head_.prev_ = new_node; - head_ = new_node; - } - - length_++; - } - - public Object dequeue_head() - { - Object return_value = null; - - if (head_ == null) - return_value = null; - else if (tail_ == head_) - { - return_value = head_.data_; - tail_ = null; - head_ = null; - } - else - { - return_value = head_.data_; - head_ = head_.next_; - head_.prev_ = null; - } - - length_--; - - return return_value; - } - - public Object dequeue_tail() - { - Object return_value = null; - - if (tail_ == null) - return_value = null; - else if (tail_ == head_) - { - return_value = tail_.data_; - tail_ = null; - head_ = null; - } - else - { - return_value = tail_.data_; - tail_ = tail_.prev_; - tail_.next_ = null; - } - - length_--; - - return return_value; - } - - public int length() - { - return length_; - } - - public Object head() - { - if (head_ != null) - return head_.data_; - else - return null; - } - - public Object tail() - { - if (tail_ != null) - return tail_.data_; - else - return null; - } -} - -class Queue_Node -{ - public Queue_Node prev_ = null; - public Queue_Node next_ = null;; - public Object data_; - - public Queue_Node(Object data) - { - data_ = data; - } -} - -class Queue_Iterator implements Enumeration -{ - public static final boolean FORWARD = true; - public static final boolean REVERSE = false; - - private Queue queue_; - private Queue_Node queue_ptr_; - private boolean direction_ = FORWARD; - - public Queue_Iterator(Queue queue) - { - queue_ = queue; - queue_ptr_ = queue.head_; - } - - public Queue_Iterator(Queue queue, boolean direction) - { - queue_ = queue; - direction_ = direction; - - if (direction_) - queue_ptr_ = queue_.head_; - else - queue_ptr_ = queue_.tail_; - } - - public Object nextElement() - { - Object data = queue_ptr_.data_; - - if (direction_) - queue_ptr_ = queue_ptr_.next_; - else - queue_ptr_ = queue_ptr_.prev_; - - return data; - } - - public boolean hasMoreElements() - { - return queue_ptr_ != null; - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/README b/TAO/orbsvcs/tests/AVStreams/server_discovery/README deleted file mode 100644 index e10c103bad0..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/README +++ /dev/null @@ -1,33 +0,0 @@ -A/V Demo -======== - -To run: -====== - -1. Run $TAO_ROOT/orbsvcs/tests/AVStreams/server_discovery/main - -This will give you a Java Frame with a tree that displays the movies -available and the server they are available on. You can select one of -the movies from any of the servers it is available on and click on -the "View the Selection" button which will then display the movie on -the mpeg client. - -The table shows all the properties of the movie that is being viewed -for the particular server. - -Environment Settings: -==================== - -1. Set the ACE_ROOT and TAO_ROOT -2. Set PATH $JAVA_ROOT/bin -3. Set LD_LIBRARY_PATH $JAVA_ROOT/jre/lib/sparc:$JAVA_ROOT/jre/lib/sparc/native_threads: -4. Set CLASSPATH $JAVA_ROOT $JAVA_ROOT/lib:$JAVA_ROOT/jre/lib/i18n.jar:$JAVA_ROOT/jre/lib/rt.jar:. - -NOTE: This demo has been developed using jdk1.2 beta 4 -==== - -For further information regarding the Java interface to the A/V Demo read up -$TAO_ROOT/orbsvcs/tests/AVStreams/server_discovery/AV_Demo - -Yamuna Krishnamurthy (yamuna@cs.wustl.edu) - diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h deleted file mode 100644 index 79eca86e009..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h +++ /dev/null @@ -1,54 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -/* $Id$ */ -#include -/* Header for class Server_0005fDiscovery_0005fUtil */ - -#ifndef _Included_Server_0005fDiscovery_0005fUtil -#define _Included_Server_0005fDiscovery_0005fUtil -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: evaluate_performance_property - * Signature: (Ljava/lang/String;Ljava/lang/String;)F - */ -JNIEXPORT jfloat JNICALL Java_Server_1Discovery_1Util_evaluate_1performance_1property - (JNIEnv *, jclass, jstring, jstring); - -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: get_movie_info - * Signature: (Ljava/lang/String;)[LTAO_VR/Movie; - */ -JNIEXPORT jobjectArray JNICALL Java_Server_1Discovery_1Util_get_1movie_1info - (JNIEnv *, jclass, jstring); - -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: get_servers - * Signature: ()[Ljava/lang/String; - */ -JNIEXPORT jobjectArray JNICALL Java_Server_1Discovery_1Util_get_1servers - (JNIEnv *, jclass); - -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: load_movie - * Signature: (Ljava/lang/String;LTAO_VR/Movie;)V - */ -JNIEXPORT void JNICALL Java_Server_1Discovery_1Util_load_1movie - (JNIEnv *, jclass, jstring, jobject); - -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: query_trader - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_Server_1Discovery_1Util_query_1trader - (JNIEnv *, jclass); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.cpp b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.cpp deleted file mode 100644 index 9e97260fc31..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.cpp +++ /dev/null @@ -1,338 +0,0 @@ -// ======================================================================== -// $Id$ -// -// = FILENAME -// Server_Discovery.cpp -// -// = AUTHOR -// Seth Widoff -// -// ======================================================================== - -// %% Beware of this hack %% -// We define _BOOL_H so that $JAVA_ROOT/include/bool.h bool_t doesn't get -// defined conflicting with /usr/include/rpc/types.h definition of -// bool_t. The order of including Trader_client.h before -// Server_0005fDiscovery_0005fUtil.h also matters. - -#define _BOOL_H_ -#include "Trader_Client.h" -#include "Server_0005fDiscovery_0005fUtil.h" - -ACE_RCSID(server_discovery, Server_Discovery, "$Id$") - -// Since we're doing C-like function calls here, let's throw in some -// global variables for good measure. - -//static const char* LIBRARY_NAME = "libtclient.so"; -//static const char* FACTORY_NAME = "create_trader_client"; -static jclass _movie_class; -static jfieldID _name_id, _audio_filename_id, _video_filename_id, _category_id, _description_id; -static jobjectArray server_names = 0; - -// Static function declarations: -//void print_dlerror (void); - -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: evaluate_performance_property - * Signature: (Ljava/lang/String;Ljava/lang/String;)F - */ -JNIEXPORT jfloat JNICALL -Java_Server_1Discovery_1Util_evaluate_1performance_1property -(JNIEnv *env, - jclass this_class, - jstring java_server_name, - jstring java_prop_name) -{ - jfloat return_value = 0.0; - - Trader_Client* trader_client = Trader_Client::instance (); - if (trader_client != 0) - { - const char* server_name = env->GetStringUTFChars (java_server_name, 0); - const char* prop_name = env->GetStringUTFChars (java_prop_name, 0); - - return_value = - trader_client->evaluate_performance_property (server_name, prop_name); - - env->ReleaseStringUTFChars (java_server_name, server_name); - env->ReleaseStringUTFChars (java_prop_name, prop_name); - } - - return return_value; -} - -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: get_movie_info - * Signature: (Ljava/lang/String;)[LTAO_VR/Movie; - */ -JNIEXPORT jobjectArray JNICALL -Java_Server_1Discovery_1Util_get_1movie_1info -(JNIEnv * env, - jclass this_class, - jstring java_server_name) -{ - // fprintf (stderr, "Server_Discover: get movie info.\n"); - //cout<< "Server_Discover: get movie info"<GetStringUTFChars (java_server_name, 0); - Movie_Iterator* movie_iter = trader_client->get_movie_info (server_name); - - // Init some global variables - jclass movie_class = env->FindClass ("TAO_VR/Movie"); - _movie_class = static_cast (env->NewGlobalRef (movie_class)); - _name_id = env->GetFieldID (movie_class, "name_", "Ljava/lang/String;"); - _audio_filename_id = env->GetFieldID (movie_class, "audio_filename_", "Ljava/lang/String;"); - _video_filename_id = env->GetFieldID (movie_class, "video_filename_", "Ljava/lang/String;"); - // _category_id = env->GetFieldID (movie_class, "category_", "Ljava/lang/String;"); - _description_id = env->GetFieldID (movie_class, "description_", "Ljava/lang/String;"); - - if (movie_iter != 0) - { - // Allocate a new array of structures. - int length = movie_iter->num_movies (), i = 0; - jobject initial_object = env->AllocObject (_movie_class); - return_value = env->NewObjectArray (length, _movie_class, initial_object); - env->DeleteLocalRef (initial_object); - - for (; movie_iter->has_more_elements (); movie_iter->advance (), i++) - { - // For each movie structure, convert the C++ strings - // into java strings, and set them in the structure. - jobject movie_struct = env->AllocObject (_movie_class); - jstring name = env->NewStringUTF (movie_iter->name ()); - jstring audio_filename = env->NewStringUTF (movie_iter->audio_filename ()); - jstring video_filename = env->NewStringUTF (movie_iter->video_filename ()); - //jstring category = env->NewStringUTF (movie_iter->category ()); - jstring description = env->NewStringUTF (movie_iter->description ()); - env->SetObjectField (movie_struct, _name_id, name); - env->SetObjectField (movie_struct, _audio_filename_id, audio_filename); - env->SetObjectField (movie_struct, _video_filename_id, video_filename); - //env->SetObjectField (movie_struct, _category_id, category); - env->SetObjectField (movie_struct, _description_id, description); - env->SetObjectArrayElement (return_value, i, movie_struct); - env->DeleteLocalRef (movie_struct); - } - - - delete movie_iter; - } - else cout<<"Movie Info Not found"<ReleaseStringUTFChars (java_server_name, server_name); - } - - return return_value; -} - -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: get_servers - * Signature: ()[Ljava/lang/String; - */ -JNIEXPORT jobjectArray JNICALL -Java_Server_1Discovery_1Util_get_1servers (JNIEnv *env, jclass this_class) -{ - fprintf (stderr, "Server Discovery: get servers.\n"); - - - Trader_Client* trader_client = Trader_Client::instance (); - if (trader_client != 0) - { - int length = 0; - char** server_names_str = 0; - trader_client->get_servers (length, server_names_str); - - if (length > 0) - { - ACE_DEBUG ((LM_DEBUG, "Converting to java strings.\n")); - // Create an array of Java strings, suitable for returning - // to the Java invoker. - jstring initial_string = env->NewStringUTF (""); - jclass string_class = env->FindClass ("java/lang/String"); - server_names = env->NewObjectArray (length, string_class, initial_string); - - // Convert those C++ strings into Java Strings. - for (int i = 0; i < length; i++) - { - const char* server_name = server_names_str[i]; - ACE_DEBUG ((LM_DEBUG, "Converting %s to a java string.\n", server_name)); - jstring java_server_name = env->NewStringUTF (server_name); - - ACE_DEBUG ((LM_DEBUG, "Placing %s in the return array.\n", server_name)); - env->SetObjectArrayElement (server_names, i, java_server_name); - - ACE_DEBUG ((LM_DEBUG, "Deleting a reference to the java string.\n")); - env->DeleteLocalRef (java_server_name); - } - } - - ACE_DEBUG ((LM_DEBUG, "Deleting the array of C++ server name strings.\n")); - delete [] server_names_str; - } - - return server_names; -} - -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: load_movie - * Signature: (Ljava/lang/String;Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL -Java_Server_1Discovery_1Util_load_1movie (JNIEnv * env, - jclass this_class, - jstring java_server_name, - jobject movie_info) -{ - Trader_Client* trader_client = Trader_Client::instance (); - if (trader_client != 0) - { - const char* server_name = env->GetStringUTFChars (java_server_name, 0); - cout<<"Within load movie"<(env->GetObjectClass (movie_info)); - //_movie_class = static_cast (env->NewGlobalRef (movie_class)); - _name_id = env->GetFieldID (movie_class, "name_", "Ljava/lang/String;"); - _audio_filename_id = env->GetFieldID (movie_class, "audio_filename_", "Ljava/lang/String;"); - _video_filename_id = env->GetFieldID (movie_class, "video_filename_", "Ljava/lang/String;"); - _description_id = env->GetFieldID (movie_class, "description_", "Ljava/lang/String;"); - - jstring name =static_cast(env->GetObjectField (movie_info,_name_id)); - jstring audio_filename =static_cast(env->GetObjectField (movie_info,_audio_filename_id)); - jstring video_filename =static_cast(env->GetObjectField (movie_info,_video_filename_id)); - jstring description =static_cast(env->GetObjectField (movie_info,_description_id)); - - //TAO_VR::Movie_Info* movie_info = TAO_VR::Movie_Info::allocbuf (1); - - TAO_VR::Movie* movie = 0; - - ACE_NEW (movie,TAO_VR::Movie ()); - - movie->name_ = CORBA::String_var(env->GetStringUTFChars (name, 0)); - movie->audio_filename_ = CORBA::String_var(env->GetStringUTFChars (audio_filename, 0)); - movie->video_filename_ = CORBA::String_var(env->GetStringUTFChars (video_filename, 0)); - movie->description_ = CORBA::String_var(env->GetStringUTFChars (description, 0)); - - - /* TAO_VR::Movie* movie_info = 0; - ACE_NEW (movie_info, - TAO_VR::Movie (name_, - filename_, - description_ - ) ); - */ - trader_client->load_movie (server_name, movie); - env->ReleaseStringUTFChars (java_server_name, server_name); - // env->ReleaseStringUTFChars (name, name_); - //env->ReleaseStringUTFChars (filename, filename_); - //env->ReleaseStringUTFChars (description, description_); - // env->ReleaseStringUTFChars (java_movie_name, movie_name); - } -} - -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: query_trader - * Signature: ()V - */ -JNIEXPORT void JNICALL -Java_Server_1Discovery_1Util_query_1trader (JNIEnv *env, jclass this_class) -{ - Trader_Client* trader_client = Trader_Client::instance (); - if (trader_client != 0) - trader_client->query_trader (); -} - -/* - * Class: Server_0005fDiscovery_0005fUtil - * Method: init - * Signature: ()V - */ -/* -void print_dlerror (void) -{ - const char* error_msg = ::dlerror (); - if (error_msg != 0) - { - ::fprintf (stderr, "Horrors of horrors! Dynamic linking failed " - "for the following reason: %s\n", error_msg); - } - else - ::fprintf (stderr, "Horrors of horrors! Dynamic linking failed.\n"); -} - -JNIEXPORT jint JNICALL -Java_Server_1Discovery_1Util_init (JNIEnv * env, - jclass this_class, - jobjectArray args) -{ - // Explicitly dynamically link to the Trader_Client library and - // obtain a pointer to its factory global function. - ::fprintf (stderr, "Attempting to open trader client library.\n"); - void* handle = ::dlopen (LIBRARY_NAME, RTLD_NOW); - - if (handle != 0) - { - ::fprintf (stderr, "Attempting to resolve factory function.\n"); - Trader_Client* (*factory) (void) = - (Trader_Client* (*) (void)) ::dlsym (handle, FACTORY_NAME); - - if (factory != 0) - { - ::fprintf (stderr, "Invoking factory method.\n"); - _trader_client = factory (); - } - else - ::print_dlerror (); - } - else - ::print_dlerror (); - - int return_value = 0; - if (_trader_client != 0) - { - int argc = env->GetArrayLength (args); - char** argv = new char*[argc]; - - // Pull the command line args into C++ format from the java format. - for (int i = 0; i < argc; i++) - { - jstring arg = static_cast (env->GetObjectArrayElement (args, i)); - argv[i] = const_cast (env->GetStringUTFChars (arg, 0)); - env->DeleteLocalRef (arg); - } - - _trader_client->init (argc, argv); - - // Release the allocated command line arguments. - for (i = 0; i < argc; i++) - { - jstring arg = static_cast (env->GetObjectArrayElement (args, i)); - env->ReleaseStringUTFChars (arg, argv[i]); - env->DeleteLocalRef (arg); - } - - // Init some global variables - jclass movie_class = env->FindClass ("TAO_VR/Movie"); - _movie_class = static_cast (env->NewGlobalRef (movie_class)); - _name_id = env->GetFieldID (movie_class, "name_", "Ljava/lang/String;"); - _filename_id = env->GetFieldID (movie_class, "filename_", "Ljava/lang/String;"); - _category_id = env->GetFieldID (movie_class, "category_", "Ljava/lang/String;"); - _description_id = env->GetFieldID (movie_class, "description_", "Ljava/lang/String;"); - - delete [] argv; - return_value = 0; - } - - return return_value = -1; -} -*/ diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.java deleted file mode 100644 index 5d7ad4a459b..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery.java +++ /dev/null @@ -1,142 +0,0 @@ -// ======================================================================== -// $Id$ -// -// = FILENAME -// Server_Discovery.java -// -// = AUTHOR -// Seth Widoff -// -// ======================================================================== - -import java.awt.*; -import java.awt.event.*; -import java.beans.*; -import com.sun.java.swing.*; -import Server_Discovery_Util; -import Server_Discovery_Selection; - - -public class Server_Discovery extends JFrame -{ - Thread thread; - private static final Integer DOCLAYER = new Integer(5); - private static final Integer TOOLLAYER = new Integer(6); - private static final Integer HELPLAYER = new Integer(7); - - private JMenuBar menu_bar_; - private JDesktopPane desktop_; - private Server_Discovery_Selection movies_selector_= new Server_Discovery_Selection (this); - // private User_Interface user_interface = new User_Interface(); - - public Server_Discovery () - { - super ("Server Discovery"); - - final int inset = 50; - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - this.setBounds (inset, inset, screenSize.width - inset*2, screenSize.height - inset*2); - - // Ok, as grotesque as these anonymous classes are, they do have - // their uses. - WindowAdapter window_adapter = new WindowAdapter () - { - - public void windowClosing (WindowEvent e) - { - Server_Discovery_Perf doc = (Server_Discovery_Perf)e.getSource(); - Server_Discovery sd = (Server_Discovery)doc.getParent(); - //sd.thread.stop(); - doc.continue_ = false; - System.out.println("Within Window Close"); - System.exit (0); - } - }; - - System.out.println("It reachead here"); - this.addWindowListener (window_adapter); - this.desktop_ = new JDesktopPane (); - this.getContentPane ().add (this.desktop_); - - //this.desktop_.add (this.user_interface , DOCLAYER); - this.desktop_.add (this.movies_selector_, DOCLAYER); - try - { - System.out.println ("Compiling movies..."); - this.compile_movies (); - this.movies_selector_.setSelected (true); - } - catch (java.beans.PropertyVetoException e2) {} - } - - // Mediator callback methods. - public void display_performance (String movie_name, String host_name) - { - Server_Discovery_Perf doc = new Server_Discovery_Perf (host_name); - - doc.add_dynamic_property ("CPU"); - doc.add_dynamic_property ("Disk"); - doc.add_dynamic_property ("Pages"); - doc.add_dynamic_property ("Swaps"); - doc.add_dynamic_property ("Packets"); - doc.add_dynamic_property ("errors"); - doc.add_dynamic_property ("switches"); - doc.add_dynamic_property ("collisions"); - doc.add_dynamic_property ("interrupts"); - doc.add_dynamic_property ("load"); - - this.desktop_.add (doc, DOCLAYER); - - try - { - doc.setSelected (true); - thread = new Thread(doc); - thread.start(); - } - catch (java.beans.PropertyVetoException e2) {} - } - - public void load_page (String url) - { - Server_Discovery_Browser doc = new Server_Discovery_Browser (url); - this.desktop_.add (doc, DOCLAYER); - - try - { - doc.setSelected (true); - } - catch (java.beans.PropertyVetoException e2) {} - - } - - private void compile_movies () - { - // Add the movies to the list. - System.out.println ("Getting a list of servers."); - String[] host_names = Server_Discovery_Util.get_servers (); - - System.out.println ("Number of server names returned: " + host_names.length); - for (int i = 0; i < host_names.length; i++) - { - System.out.println ("Getting movies for server " + host_names[i]); - TAO_VR.Movie[] movies = Server_Discovery_Util.get_movie_info (host_names[i]); - - System.out.println ("Adding movies for server " + host_names[i]); - for (int j = 0; j < movies.length; j++) - { - System.out.println ("Adding movie: " + movies[j].name_); - this.movies_selector_.add_movie (host_names[i], movies[j]); - } - } - } - - public static void main (String[] args) - { - System.loadLibrary ("avdemo"); - - System.out.println ("Launching the Server Discovery frame."); - JFrame frame = new Server_Discovery (); - frame.setVisible (true); - } -} - diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Browser.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Browser.java deleted file mode 100644 index 8a0172cb453..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Browser.java +++ /dev/null @@ -1,141 +0,0 @@ -import com.sun.java.swing.*; -import java.awt.*; -import java.net.URL; -import java.net.MalformedURLException; -import java.io.*; -import com.sun.java.swing.text.*; -import com.sun.java.swing.event.*; - -public class Server_Discovery_Browser - extends JInternalFrame -{ - public Server_Discovery_Browser (String initial_url) - { - super ("Movie Description", true, true, true, true); - - HtmlPane html = new HtmlPane (initial_url); - this.setBounds (200, 25, 400, 400); - this.getContentPane ().add (html); - } - - public void pack() - { - Dimension size = getPreferredSize (); - this.setSize (size.width, size.height); - } -} - -// This code was liberated from the jfc demo "Metalworks", which is -// included with the jdk 1.2 beta 3 distribution. -class HtmlPane - extends JPanel - implements HyperlinkListener -{ - JEditorPane html_; - - public HtmlPane (String initial_url) - { - this.setLayout( new BorderLayout() ); - - try - { - URL url = new URL (initial_url); - this.html_ = new JEditorPane (initial_url); - this.html_.setEditable (false); - this.html_.addHyperlinkListener (this); - } - catch (Exception excp) - { - System.err.println (excp); - } - - JScrollPane scroller = new JScrollPane (); - JViewport vp = scroller.getViewport (); - vp.add (this.html_); - this.add (scroller, BorderLayout.CENTER); - } - - /** - * Notification of a change relative to a - * hyperlink. - */ - public void hyperlinkUpdate (HyperlinkEvent e) - { - if (e.getEventType () == HyperlinkEvent.EventType.ACTIVATED) - { - this.linkActivated (e.getURL ()); - } - } - - /** - * Follows the reference in an - * link. The given url is the requested reference. - * By default this calls setPage, - * and if an exception is thrown the original previous - * document is restored and a beep sounded. If an - * attempt was made to follow a link, but it represented - * a malformed url, this method will be called with a - * null argument. - * - * @param u the URL to follow - */ - protected void linkActivated (URL u) - { - Cursor c = this.html_.getCursor (); - Cursor waitCursor = Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR); - this.html_.setCursor (waitCursor); - SwingUtilities.invokeLater (new PageLoader(u, c)); - } - - /** - * temporary class that loads synchronously (although - * later than the request so that a cursor change - * can be done). - */ - class PageLoader implements Runnable - { - PageLoader (URL u, Cursor c) - { - this.url_ = u; - this.cursor_ = c; - } - - public void run () - { - if (this.url_ == null) - { - // restore the original cursor - html_.setCursor (this.cursor_); - - // PENDING(prinz) remove this hack when - // automatic validation is activated. - Container parent = html_.getParent (); - parent.repaint (); - } - else - { - Document doc = html_.getDocument (); - try - { - html_.setPage (this.url_); - } - catch (IOException ioe) - { - html_.setDocument (doc); - getToolkit ().beep (); - } - finally - { - // schedule the cursor to revert after - // the paint has happended. - this.url_ = null; - SwingUtilities.invokeLater (this); - } - } - } - - URL url_; - Cursor cursor_; - } -} - diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Perf.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Perf.java deleted file mode 100644 index 097311e6eb0..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Perf.java +++ /dev/null @@ -1,145 +0,0 @@ -import java.awt.*; -import com.sun.java.swing.*; -import com.sun.java.swing.event.*; -import java.util.*; -import Strip_Chart; - -public class Server_Discovery_Perf - extends JInternalFrame - implements Runnable -{ - private static final int HSPACE = 10; - private static final int VSPACE = 10; - private static final int MAX_WIDTH = 5; - private static final int MAX_HEIGHT = 5; - private static final int GRAPH_DIMENSION = 175; - - public boolean continue_ = true; - private JPanel[] graph_panels_ = new JPanel[MAX_HEIGHT]; - private Hashtable props_ = new Hashtable (); - private String server_name_ = null; - // Vector containing each of the dynamic properties we will - // periodically poll for their status. - - class Prop_Struct - { - public String dp_; - public Strip_Chart graph_; - - public Prop_Struct (String dp, Strip_Chart graph) - { - this.dp_ = dp; - this.graph_ = graph; - } - } - - public Server_Discovery_Perf (String server_name) - { - super (server_name, true, true, true, true); - this.setSize (MAX_WIDTH*(GRAPH_DIMENSION + HSPACE), GRAPH_DIMENSION); - this.setLocation (375, 15); - this.server_name_ = server_name; - - // Create each of the five graph rows. - this.getContentPane().setLayout (new GridLayout (5, 1, HSPACE, 0)); - FlowLayout panel_layout = new FlowLayout (FlowLayout.CENTER, 0, VSPACE); - for (int i = 0; i < MAX_HEIGHT; i++) - { - this.graph_panels_[i] = new JPanel (); - this.graph_panels_[i].setLayout (panel_layout); - this.getContentPane ().add (this.graph_panels_[i]); - } - - // When the frame closes, end the graph updating. - this.addInternalFrameListener (new InternalFrameAdapter () - { - public void internalFrameClosing (InternalFrameEvent event) - { - - cease_updates (); - - } - } - ); - } - - public void add_dynamic_property (String prop_name) - { - Prop_Struct ps = new Prop_Struct (prop_name, new Strip_Chart (prop_name)); - this.props_.put (prop_name, ps); - - int num_graphs = this.props_.size (); - int row_panel_index = num_graphs % MAX_HEIGHT; - this.graph_panels_[row_panel_index].add (ps.graph_); - } - - public Dimension getPreferredSize () - { - // The preferred size is: height = the height of the number of - // rows; width = static --- always the width of 5 graphs. - int num_graphs = this.props_.size (); - int num_rows = (num_graphs % MAX_HEIGHT) + 1; - - return new Dimension (MAX_WIDTH * (GRAPH_DIMENSION + HSPACE), - num_rows * (GRAPH_DIMENSION + VSPACE)); - } - - public void run () - { - // Periodically awaken and poll the dynamic properties, updating - // the graphs with the new values. - //float new_point = 0; - for (;;) - //for (;;) - { - //System.out.println("Within loop"); - synchronized (this) - { - // An atomic operation. - - if (! this.continue_) - { - - break; - } - } - - // Update each dynamic property's graph. - Enumeration dprops = this.props_.elements (); - while (dprops.hasMoreElements ()) - { - - Prop_Struct ps = (Prop_Struct) dprops.nextElement (); - - // Pull the new value of the dynamic property and insert - // it into the corresponding strip chart. - try - { - float new_point = - Server_Discovery_Util.evaluate_performance_property (this.server_name_, ps.dp_); - - ps.graph_.update (new_point); - - } - catch (Exception excp) {} - } - - // Go to sleep for 2 seconds. - try - { - Thread.sleep (2000); - } - catch (Exception excp) {} - } - } - - private void cease_updates () - { - synchronized (this) - { - // An atomic operation. - //System.out.println("Just after cease updates"); - this.continue_ = false; - } - } -} diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Selection.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Selection.java deleted file mode 100644 index e75ad434681..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Selection.java +++ /dev/null @@ -1,291 +0,0 @@ -import java.awt.*; -import java.awt.event.*; -import java.util.*; -import com.sun.java.swing.*; -import com.sun.java.swing.event.*; -import com.sun.java.swing.border.*; -import com.sun.java.swing.tree.*; -import com.sun.java.swing.table.*; -import com.sun.java.swing.border.*; -import Server_Discovery; -import Server_Discovery_Util; - -public class Server_Discovery_Selection - extends JInternalFrame -{ - JTree tree_; - Server_Discovery sd_; - JScrollPane table_scroller_ = new JScrollPane (); - DefaultMutableTreeNode root_ = new DefaultMutableTreeNode ("Movies"); - String selected_movie_ = null, selected_server_ = null, selected_url_ = null; - Hashtable movie_map_ = new Hashtable (); - JTable movie_table; - TAO_VR.Movie selected_movie_info_; - - public Server_Discovery_Selection (Server_Discovery sd) - { - super ("Movie Selection", true, true, true, true); - this.sd_ = sd; - - tree_ = new JTree (this.root_); - JScrollPane tree_scroller = new JScrollPane (this.tree_); - JSplitPane split_pane = - new JSplitPane (JSplitPane.HORIZONTAL_SPLIT, false, - tree_scroller, this.table_scroller_); - - - - - TreeSelectionListener tsl = new TreeSelectionListener () - { - public void valueChanged (TreeSelectionEvent e) - { - - DefaultMutableTreeNode tree_node = - (DefaultMutableTreeNode) (e.getPath().getLastPathComponent ()); - - //if(tree_node.getChildCount()==1) - if(tree_node.isLeaf()) - { - String movie_name = ((DefaultMutableTreeNode)tree_node.getParent()).toString();//getUserObject (); - System.out.println("The moviename is" + movie_name); - - // DefaultMutableTreeNode child_node = - // (DefaultMutableTreeNode) tree_node.getChildAt (0); - String host_name = (String) tree_node.getUserObject(); - System.out.println("The hostname is" + host_name); - - String key = host_name + movie_name; - System.out.println("The host and movie name are " +key); - TAO_VR.Movie movie = (TAO_VR.Movie) movie_map_.get (key); - - generate_table (host_name, movie); - movie_table.updateUI(); - System.out.println("Seleceted URL"+selected_url_); - ListSelectionModel rowSM = movie_table.getSelectionModel(); - rowSM.addListSelectionListener(new Row_Selected(selected_movie_,selected_server_, selected_url_)); - selected_server_=host_name; - selected_movie_=movie_name; - selected_movie_info_=movie; - System.out.println("Movie Name is "+movie.name_); - } - } - }; - - - this.tree_.addTreeSelectionListener (tsl); - tree_scroller.setBackground (this.tree_.getBackground ()); - - JPanel content_pane = new JPanel (); - JPanel button_pane = new JPanel (); - ImageIcon mmedia = new ImageIcon ("select", "mmedia3.gif"); - JButton select_button = new JButton ("View This Selection", mmedia); - button_pane.setBorder (new EtchedBorder ()); - button_pane.add (select_button); - content_pane.setLayout (new BorderLayout ()); - content_pane.add ("Center", split_pane); - content_pane.add ("South", button_pane); - - ActionListener al = new ActionListener () - { - public void actionPerformed (ActionEvent e) - { - if (selected_server_ != null && selected_movie_ != null) - { - Server_Discovery_Util.load_movie (selected_server_,selected_movie_info_); - } - } - }; - - select_button.addActionListener (al); - - this.setContentPane (content_pane); - this.setSize (350, 400); - this.setLocation (15, 15); - } - - public void add_movie (String host_name, TAO_VR.Movie movie) - { - // @ TODO: Order the movies alphabetically by name. - // DefaultMutableTreeNode category = - //new DefaultMutableTreeNode (movie.category_); - - - - MutableTreeNode movie_name = - new DefaultMutableTreeNode (movie.name_); - DefaultMutableTreeNode server_name = - new DefaultMutableTreeNode (host_name); - - Enumeration children = root_.children(); - int index=0; - if(children.hasMoreElements()) - { - while(children.hasMoreElements()) - { - Object child = children.nextElement(); - if(!(((DefaultMutableTreeNode)child).toString().equals(movie.name_))) - { - index++; - } - else - { - ((DefaultMutableTreeNode) root_.getChildAt(index)).add(server_name); - break; - } - } - - if(index==root_.getChildCount()) - { - root_.add(movie_name); - ((DefaultMutableTreeNode)movie_name).add(server_name); - } - - } - else - { - root_.add(movie_name); - ((DefaultMutableTreeNode)movie_name).add(server_name); - } - String key = host_name + movie.name_; - this.movie_map_.put (key, movie); - - } - - public void flush () - { - } - - private void generate_table (String host_name, TAO_VR.Movie movie) - { - // The user object here is going to be a JTable instead of a - // simply a string. The table will contain values for each of - // the fields of the TAO_VR.Movie struct, where the description - // URL will be hightlighted as a link. Clicking on that link in - // the table will call up a JEditorPane with the html file in - // it. In addition, there will be a button in one of table - // entries for viewing performance numbers. - DefaultTableModel table_model = new DefaultTableModel (10, 2); - - // Set the column values: - table_model.setValueAt ("Name", 0, 0); - table_model.setValueAt ("AudioFile Name", 1, 0); - table_model.setValueAt ("VideoFile Name", 2, 0); - table_model.setValueAt ("Description", 3, 0); - table_model.setValueAt ("Format", 4, 0); - table_model.setValueAt ("File Size", 5, 0); - table_model.setValueAt ("Duration", 6, 0); - table_model.setValueAt ("Frame Rate", 7, 0); - table_model.setValueAt ("Frame Size", 8, 0); - table_model.setValueAt ("Server Performance", 9, 0); - - table_model.setValueAt (movie.name_, 0, 1); - table_model.setValueAt (movie.audio_filename_, 1, 1); - table_model.setValueAt (movie.video_filename_, 2, 1); - table_model.setValueAt (movie.description_, 3, 1); - table_model.setValueAt ("MPEG1", 4, 1); - table_model.setValueAt ("0", 5, 1); - table_model.setValueAt ("0", 6, 1); - table_model.setValueAt ("0", 7, 1); - table_model.setValueAt ("0", 8, 1); - - // Special cases: - Font label_font = new Font ("Dialog", Font.BOLD, 12); - ImageIcon link_icon = new ImageIcon ("link", "www1.gif"); - JLabel url_label = new JLabel (movie.description_, link_icon, JLabel.RIGHT); - url_label.setFont (label_font); - url_label.setForeground (Color.blue); - url_label.addMouseListener (new Clicked_URL (movie.description_)); - table_model.setValueAt (movie.description_, 3, 1); - - ImageIcon graph_icon = new ImageIcon ("graph", "graph02.gif"); - JLabel graph_label = new JLabel ("Display server performance", graph_icon, JLabel.RIGHT); - graph_label.setFont (label_font); - graph_label.setForeground (Color.blue); - graph_label.addMouseListener (new Clicked_Graph (movie.name_, host_name)); - table_model.setValueAt ("Performance Graph", 9, 1); - - movie_table = new JTable (table_model); - DefaultMutableTreeNode table_node = new DefaultMutableTreeNode (movie_table, false); - - JViewport viewport = new JViewport (); - viewport.setView (movie_table); - movie_table.updateUI(); - this.table_scroller_.setViewport (viewport); - this.selected_movie_ = movie.name_; - this.selected_server_ = host_name; - this.selected_url_ = movie.description_; - } - - class Clicked_URL extends MouseAdapter - { - private String url_; - - public Clicked_URL (String url) - { - this.url_ = url; - } - - public void mouseClicked (MouseEvent e) - { - sd_.load_page (this.url_); - } - } - - - class Clicked_Graph extends MouseAdapter - { - private String movie_, host_; - - public Clicked_Graph (String movie, String host) - { - this.movie_ = movie; - this.host_ = host; - } - - public void mouseClicked (MouseEvent e) - { - sd_.display_performance (this.movie_, this.host_); - } - } - - - class Row_Selected implements ListSelectionListener - { - String movie_; - String server_; - String url_; - - public Row_Selected(String movie_, String server_,String url_) - { - this.movie_ = movie_; - this.server_=server_; - this.url_ = url_; - System.out.println(this.url_); - } - - public void valueChanged(ListSelectionEvent e) - { - ListSelectionModel lsm = (ListSelectionModel)e.getSource(); - if (lsm.isSelectionEmpty()) - { - //no rows are selected - } - else - { - int selectedRow = lsm.getMinSelectionIndex(); - if(selectedRow == 9) - sd_.display_performance (this.movie_, this.server_); - else if(selectedRow == 3) - { - //JTable table = (JTable)e.getSource(); - //String url = (String)table.getValueAt(3, 1); - System.out.println(this.url_); - sd_.load_page (this.url_); - } - //selectedRow is selected - } - - } - } - } diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Util.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Util.java deleted file mode 100644 index 49ccb898081..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_Discovery_Util.java +++ /dev/null @@ -1,30 +0,0 @@ -// ======================================================================== -// $Id$ -// -// = FILENAME -// Server_Discovery_Util.java -// -// = AUTHOR -// Seth Widoff -// -// ======================================================================== - -import java.io.*; -import TAO_VR.Movie; - -public class Server_Discovery_Util -{ - // public static native int init (String[] args); - - public static native void query_trader (); - - public static native String[] get_servers (); - - public static native TAO_VR.Movie[] get_movie_info (String host_name); - - public static native - void load_movie (String server_name, Movie movie_name); - - public static native - float evaluate_performance_property (String server_name, String prop_name); -} diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Strip_Chart.java b/TAO/orbsvcs/tests/AVStreams/server_discovery/Strip_Chart.java deleted file mode 100644 index e141de5aad6..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Strip_Chart.java +++ /dev/null @@ -1,203 +0,0 @@ -// $Id$ -// -// = FILENAME -// DoubleVisComp.java -// -// = AUTHOR -// Seth Widoff (core graph functionality) -// Michael Kircher (mk1@cs.wustl.edu) -// -// = DESCRIPTION -// This is a Visualization Component for displaying doubles. -// -// ============================================================================ - -import java.awt.*; -import java.util.*; - -public class Strip_Chart extends Canvas -{ - private static final int MIN_SPACING = 2; - private static final int POINT_HISTORY = 200; - private static final Font FONT = new Font ("Dialog", Font.PLAIN, 10); - - private Queue plot_; - private String title_; - private Graphics offgraphics_; - private Image offscreen_; - private Dimension offscreensize_; - private int max_value_; - private int old_max_value_; - private int spacing_; - private float local_max_ = 0; - private float old_point_; - private boolean max_increased_ = false; - - public Strip_Chart (String title) - { - super(); - - plot_ = new Queue (); - spacing_ = MIN_SPACING; - title_ = title; - max_value_ = 1; - // max_value_ = max_value; - old_max_value_ = max_value_; - old_point_=0; - java.util.Random rand = new java.util.Random (System.currentTimeMillis()); - float hue_ = rand.nextFloat(); - float brightness = rand.nextFloat(); - - hue_ += .075; - - if (hue_ > 1.0) - hue_ -= 1.0; - - if (brightness > 0.75) - brightness -= 0.25; - - Color new_color = Color.getHSBColor(hue_, 1, brightness); - - this.setBackground(new_color); - this.setForeground(Color.white); - } - - - public void setName (String title) { - title_ = title; - } - - public Dimension getMinimumSize () { - return new Dimension (75, 75); - } - - public Dimension getPreferredSize () { - return new Dimension (175, 175); - } - - public String getName() { - return title_; - } - - public int getMax() { - return old_max_value_; - } - - public void update (float new_point) - { - Float temp = (Float) plot_.dequeue_tail(); - plot_.enqueue_head (new Float (new_point)); - - if (new_point > local_max_) - local_max_ = new_point; - - while (local_max_ > max_value_) - max_value_ += 2; - - while ((local_max_ < max_value_/2) && (max_value_ > old_max_value_)) - if(max_value_!=0) - max_value_ -= 2; - //else max_value_=0; - /* - if (new_point>old_point_) - max_value_=max_value_+1; - else - if(max_value_!=0) max_value_=max_value_-1; - else max_value_=0; - old_point_=new_point; - */ - //old_max_value_=max_value_; - repaint(); - } - - public void update(Graphics g) - { - Dimension d = getSize (); - float tmp, value_1, value_2; - FontMetrics fm = g.getFontMetrics (); - Enumeration queue_iter = plot_.forward_iterator(); - int x1 = d.width - 8, y1, x2, y2, fheight = fm.getHeight (), i; - String value = "Value (of " + max_value_ + "): " + String.valueOf(plot_.head()); - - if ((offscreen_ == null) || - (offscreensize_.width != d.width - 8) || - (offscreensize_.height != d.height - 8)) - { - offscreen_ = createImage(d.width - 8, d.height - 8); - offscreensize_ = new Dimension(d.width - 8, d.height - 8); - offgraphics_ = offscreen_.getGraphics(); - offgraphics_.setFont(FONT); - } - - g.setColor (Color.lightGray); - g.draw3DRect (0, 0, d.width - 1, d.height - 1, true); - g.draw3DRect (1, 1, d.width - 3, d.height - 3, true); - g.draw3DRect (2, 2, d.width - 5, d.height - 5, true); - - local_max_ = 0; - offgraphics_.setColor (getBackground()); - offgraphics_.fillRect (0, 0, offscreensize_.width, offscreensize_.height); - offgraphics_.setColor (getForeground()); - offgraphics_.drawString(title_, 5, fheight); - offgraphics_.drawString(value, 5, offscreensize_.height - 5); - - value_1 = ((Float)queue_iter.nextElement()).floatValue(); - while (queue_iter.hasMoreElements()) - { - value_2 = ((Float)queue_iter.nextElement()).floatValue(); - - if (value_1 > local_max_) - local_max_ = value_1; - - y1 = normalize(offscreensize_.height - fheight, value_1); - y2 = normalize(offscreensize_.height - fheight, value_2); - - tmp = value_2; - value_2 = value_1; - value_1 = tmp; - - x2 = x1 - spacing_; - offgraphics_.drawLine(x1, y1, x2, y2); - String temp = new String(); - //System.out.println(temp.valueOf(x1)+" " + " "+temp.valueOf(y1)+ " "+temp.valueOf(x2)+" " + temp.valueOf(y2)); - - - x1=x2; - if (x1 <= 5) - break; - } - - g.drawImage(offscreen_, 3, 3, null); - } - - public void paint(Graphics g) - { - Dimension d = getSize (); - int plot_length = plot_.length(); - int num_points = d.width / spacing_; - - if (plot_.length() < num_points) - { - for (int i = 0; i < num_points - plot_length; i++) - plot_.enqueue_tail(new Float(0)); - } - else if (plot_.length() > num_points) - { - for (int i = 0; i < plot_length - num_points; i++) - plot_.dequeue_tail(); - } - - update(g); - } - - - private int normalize(int height, float coord) - { - float ratio = (float)coord/max_value_; - float pixels = (float)height*ratio; - float location = (float)height - pixels; - - return Math.round(location); - } -} - diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp b/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp deleted file mode 100644 index 26c77f8ba3d..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp +++ /dev/null @@ -1,455 +0,0 @@ - -// $Id$ -// ======================================================================== -// -// = FILENAME -// Trader_Client.cpp -// -// = AUTHOR -// Seth Widoff -// -// ======================================================================== - -#include "Trader_Client.h" - -ACE_RCSID(server_discovery, Trader_Client, "$Id$") - -Trader_Client* Trader_Client::instance_ = 0; - - -Trader_Client* -Trader_Client::instance (void) -{ - if (Trader_Client::instance_ == 0) - Trader_Client::instance_ = new Trader_Client; - - return Trader_Client::instance_; -} - -Trader_Client::Trader_Client (void) -{ -} - - -Trader_Client::~Trader_Client (void) -{ - // Iterate and destroy all dynamically allocated second-tier maps. - for (Server_Map::ITERATOR mmdevice_map_iter (this->mmdevice_map_); - ! mmdevice_map_iter.done (); - mmdevice_map_iter.advance ()) - { - Server_Map::ENTRY* mmdevice_map_entry = 0; - mmdevice_map_iter.next (mmdevice_map_entry); - delete mmdevice_map_entry->int_id_; - } - -} - -void -Trader_Client::init (int argc, char** argv) -{ - - cout<<"Within the Init method of Trader_Client"<orb_manager_.init (argc, argv, TAO_TRY_ENV); - TAO_CHECK_ENV; - // Bootstrap to the Trading Service. - //ACE_DEBUG ((LM_DEBUG, "Bootstrapping to the trading service")); - CORBA::ORB_var orb = this->orb_manager_.orb (); - CORBA::Object_var obj = - orb->resolve_initial_references ("TradingService"); - - // Narrow the lookup interface. - //ACE_DEBUG ((LM_DEBUG, "Narrowing the lookup interface.\n")); - this->lookup_ = CosTrading::Lookup::_narrow (obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - // Lookup the Receiver interface from a file. - - char receiver_file[BUFSIZ]; - ACE_OS::sprintf (receiver_file, - "/tmp/receiver_ior.%d", - getuid ()); - FILE *fp = ACE_OS::fopen (receiver_file,"r"); - if (fp == 0) - ACE_ERROR ((LM_ERROR,"Unable to read receiver ior\n")); - char ior[BUFSIZ]; - ACE_OS::fgets (ior,BUFSIZ,fp); - ACE_DEBUG ((LM_DEBUG,"receiver ior is :%s\n",ior)); - ACE_OS::fclose (fp); - CORBA::Object_var receiver_obj = orb->string_to_object (ior, - TAO_TRY_ENV); - TAO_CHECK_ENV; - this->receiver_ = Receiver::_narrow (receiver_obj,TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - ACE_ERROR ((LM_ERROR, "Failed to initialize the ORB and bootstrap to" - " the Trading Service. Wah!\n")); - } - TAO_ENDTRY; -} - -void -Trader_Client::query_trader (void) -{ - // This code is copied nearly verbatim from - // orbsvcs/tests/Trading/Offer_Importer.cpp, where its not well - // documented either. - TAO_TRY - { - CosTrading::OfferSeq_ptr mmdevice_offer_seq_ptr = 0; - CosTrading::OfferIterator_ptr mmdevice_offer_iterator_ptr = 0; - CosTrading::PolicyNameSeq_ptr mmdevice_limits_applied_ptr = 0; - CosTrading::Lookup::SpecifiedProps desired_props; - - - // Set the query-specific policies. - TAO_Policy_Manager policies; - policies.exact_type_match (0); - policies.search_card (16); - policies.match_card (16); - policies.return_card (16); - policies.link_follow_rule (CosTrading::always); - desired_props.all_ (1); - - CosTrading::OfferSeq_out mmdevice_offer_seq_out (mmdevice_offer_seq_ptr); - CosTrading::OfferIterator_out mmdevice_offer_iterator_out (mmdevice_offer_iterator_ptr); - CosTrading::PolicyNameSeq_out mmdevice_limits_applied_out (mmdevice_limits_applied_ptr); - - //ACE_DEBUG ((LM_DEBUG, "Querying trader...\n")); - this->lookup_->query ("MMDevice", - "Number_Of_Connections < Max_Connections", - "min Number_Of_Connections", - policies.policy_seq (), - desired_props, - 8, - mmdevice_offer_seq_out, - mmdevice_offer_iterator_out, - mmdevice_limits_applied_out, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - - CosTrading::OfferSeq_var mmdevice_offer_seq (mmdevice_offer_seq_ptr); - CosTrading::OfferIterator_var mmdevice_offer_iterator (mmdevice_offer_iterator_ptr); - CosTrading::PolicyNameSeq_var mmdevice_limits_applied (mmdevice_limits_applied_ptr); - - if (mmdevice_offer_seq_ptr != 0) - { - ACE_DEBUG ((LM_DEBUG, "Hashing the returned offers.\n")); - CORBA::ULong length = 0, i = 0; - for (length = mmdevice_offer_seq->length (), i = 0; i < length; i++) - { - this->create_hash_table_entry (mmdevice_offer_seq[i]); - } - } - - if (! CORBA::is_nil (mmdevice_offer_iterator_ptr)) - { - // Hash those offers obtained from the Offer_Iterator. - CORBA::Boolean any_left = 0; - - do - { - CosTrading::OfferSeq_ptr iter_offers_ptr; - CosTrading::OfferSeq_out iter_offers_out (iter_offers_ptr); - - any_left = mmdevice_offer_iterator->next_n (8, - iter_offers_out, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - CosTrading::OfferSeq_var iter_offers (iter_offers_ptr); - for (CORBA::ULong length = iter_offers->length (), i = 0; i < length; i++) - this->create_hash_table_entry (iter_offers[i]); - } - while (any_left); - - mmdevice_offer_iterator->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - - } - - TAO_CATCHANY {} - TAO_ENDTRY; -} - -void -Trader_Client::load_movie (const char* mmdevice_server_name, - TAO_VR::Movie* selected_movie_info) -{ - // Open a unix socket to the controller process of the AV client, - // and pass in the IOR of the selected server and the movie_name. - - // Of course, we aren't actually saving the object reference - // portion of the offer at this point. But genius that you are, - // you'll figure out some way to retrofit this code with the - // required elements. I believe in you. - - ACE_DEBUG ((LM_DEBUG,"Trader_Client::load_movie")); - TAO_TRY - { - // Get the server mmdevice object from the hash table. - Reference_Map::ENTRY* mmdevice_entry = 0; - TAO_String_Hash_Key server_key (mmdevice_server_name); - if (this->mmdevice_reference_map_.find (server_key,mmdevice_entry) == 0) - { - // ACE_DEBUG ((LM_DEBUG,"object reference for %s found",server_name)); - - CORBA::Object_ptr mmdevice_reference = mmdevice_entry->int_id_; - CORBA::String_var server_ior = this->orb_manager_.orb ()->object_to_string (mmdevice_reference, - TAO_TRY_ENV); - cout<<"The audio file name "<audio_filename_<video_filename_<get_audio_mmdevice (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Object_ptr video_object_ptr = mmdevice_exporter_reference->get_video_mmdevice (TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::String_var audio_ior = this->orb_manager_.orb ()->object_to_string (audio_object_ptr, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG,"AUDIO mmdevice ior is :%s\n",audio_ior.in ())); - CORBA::String_var video_ior = this->orb_manager_.orb ()->object_to_string (video_object_ptr, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG,"VIDEO mmdevice ior is :%s\n",video_ior.in ())); - - this->receiver_->push_mmdevice (audio_object_ptr, - selected_movie_info->audio_filename_, - video_object_ptr, - selected_movie_info->video_filename_, - TAO_TRY_ENV); - - TAO_CHECK_ENV; - } - - - } - TAO_CATCHANY - { - ACE_ERROR ((LM_ERROR,"push_audio_mmdevice failed\n")); - } - TAO_ENDTRY; - return; -} - -void -Trader_Client::get_servers (int& length, char**& server_names) -{ - ACE_DEBUG ((LM_DEBUG, "Trader_Client::get_servers.\n")); - - length = this->mmdevice_map_.current_size (); - server_names = new char* [length]; - - if (server_names != 0) - { - CORBA::ULong i = 0; - for (Server_Map::ITERATOR server_iter (this->mmdevice_map_); - ! server_iter.done (); - server_iter.advance (), i++) - { - //ACE_DEBUG ((LM_DEBUG, " adding server: %s\n", (*server_iter).ext_id_.in ())); - server_names[i] = - ACE_const_cast (char*, (*server_iter).ext_id_.in ()); - } - } -} - -Movie_Iterator* -Trader_Client::get_movie_info (const char* server_name) -{ - ACE_DEBUG ((LM_DEBUG, "Trader_Client: Get Movie Info Outside\n")); - Movie_Iterator* movie_iter = 0; - TAO_String_Hash_Key server_name_key (server_name); - - cout<<"Within Tader Client Movie Info Out side"<mmdevice_map_.find (server_name_key, server_entry) == 0) - { - cout<<"Within Tader Client Movie Info"<int_id_; - if (prop_map->find ("Movie_Info", prop_entry) == 0) - { - ACE_DEBUG ((LM_DEBUG,"Movie_Info find successful\n")); - // Make a fake sequence out of the property for use in the - // TAO_Property_Evaluator utility class. - CosTrading::Property& property = prop_entry->int_id_; - //ACE_DEBUG ((LM_DEBUG,"%s,%d\n",__FILE__,__LINE__)); - CosTrading::PropertySeq property_seq (1, 1, &property, 0); - //ACE_DEBUG ((LM_DEBUG,"%s,%d\n",__FILE__,__LINE__)); - TAO_Property_Evaluator prop_eval (property_seq); - //ACE_DEBUG ((LM_DEBUG,"%s,%d\n",__FILE__,__LINE__)); - TAO_TRY - { - // Extact the Movie_Info sequence. - TAO_VR::Movie_Info* movie_info = 0; - //ACE_DEBUG ((LM_DEBUG,"%s,%d\n",__FILE__,__LINE__)); - CORBA::Any* movie_prop = prop_eval.property_value (0, TAO_TRY_ENV); - //ACE_DEBUG ((LM_DEBUG,"%s,%d\n",__FILE__,__LINE__)); - TAO_CHECK_ENV; - - if (movie_prop == 0) - ACE_ERROR_RETURN ((LM_ERROR,"Movie_property is null\n"),0); - //ACE_DEBUG ((LM_DEBUG,"%s,%d\n",__FILE__,__LINE__)); - // Create the movie iterator. - if (((*movie_prop) >>= movie_info) == 1) - { - ACE_DEBUG ((LM_DEBUG,"%s,%d\n",__FILE__,__LINE__)); - movie_iter = new Movie_Iterator (*movie_info); - } - } - TAO_CATCHANY { - ACE_ERROR_RETURN ((LM_ERROR,"property_value failed\n"),0); - } - TAO_ENDTRY; - } - else - ACE_DEBUG ((LM_DEBUG,"Movie_Info find unsuccessful\n")); - } - else - { - cout<<"Find unsuccesful"<mmdevice_map_.find (server_name_key, server_entry) == 0) - { - cout<<"Within Trader Client evaluuate performance"<int_id_; - TAO_String_Hash_Key prop_name_key (property_name); - Property_Map::ENTRY* prop_entry = 0; - - if (prop_map->find (prop_name_key, prop_entry) == 0) - { - CosTrading::Property& property = prop_entry->int_id_; - CosTrading::PropertySeq property_seq (1, 1, &property, 0); - TAO_Property_Evaluator prop_eval (property_seq); - - TAO_TRY - { - CORBA::Any* value = prop_eval.property_value (0, TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Float prop_value = 0.0; - (*value) >>= prop_value; - (*value) >>= return_value; - cout<<"The property Value is"<bind (prop_name, offer.properties[i]); - /* - TAO_VR::Movie_Info* movie_info=0; - const char* property_name=(const char*)prop_name; - if(strcmp(property_name,"Movie_Info")==0) - { - //cout<<"The property is "<>= movie_info) == 1) - { - - Movie_Iterator* movie=new Movie_Iterator(*movie_info); - cout<<"The movie name is"<name()<find (server_name, entry) == 0) - { - entry->int_id_.value >>= server_name_string; - this->mmdevice_map_.bind (server_name_string, prop_map); - - TAO_String_Hash_Key server_reference_key (server_name_string); - CORBA::String_var server_ior = this->orb_manager_.orb ()->object_to_string (offer.reference, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->mmdevice_reference_map_.bind (server_reference_key, - CORBA::Object::_duplicate (offer.reference)); - } - else - delete prop_map; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("object_to_String"); - return; - } - TAO_ENDTRY; -} - -TAO_VR::Movie_Info* -Trader_Client::fetch_movie_array (const char* server_name) -{ - TAO_VR::Movie_Info* movie_info = 0; - Server_Map::ENTRY* server_entry = 0; - TAO_String_Hash_Key server_name_str (server_name); - if (this->mmdevice_map_.find (server_name, server_entry) == 0) - { - Property_Map::ENTRY* prop_entry = 0; - Property_Map* prop_map = server_entry->int_id_; - if (prop_map->find ("Movie_Info", prop_entry) == 0) - { - TAO_VR::Movie_Info* movie_info = 0; - prop_entry->int_id_.value >>= movie_info; - } - } - - return movie_info; -} diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h b/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h deleted file mode 100644 index 4964281d63e..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h +++ /dev/null @@ -1,156 +0,0 @@ -// ======================================================================== -// $Id$ -// -// = FILENAME -// Trader_Client.h -// -// = AUTHOR -// Seth Widoff -// -// ======================================================================== - -#ifndef TRADER_CLIENT_H -#define TRADER_CLIENT_H - -#include "tao/TAO.h" -#include "Video_RepositoryC.h" -#include "orbsvcs/Trader/Trader.h" -#include "orbsvcs/Trader/Trader_Utils.h" -#include "mpeg_shared/ReceiverC.h" -#include "mpeg_shared/MMDevice_ExporterC.h" - -class Movie_Iterator -{ -public: - - Movie_Iterator (const TAO_VR::Movie_Info& movie_info) - : movie_info_ (movie_info), index_ (0) {} - - int has_more_elements (void) const - { return this->index_ < this->movie_info_.length (); } - - void advance (void) - { this->index_++; } - - int num_movies (void) const - { return this->movie_info_.length (); } - - const char* name (void) const - { return this->movie_info_[this->index_].name_.in (); } - - const char* description (void) const - { return this->movie_info_[this->index_].description_.in (); } - - const char* audio_filename (void) const - { return this->movie_info_[this->index_].audio_filename_.in (); } - - const char* video_filename (void) const - { return this->movie_info_[this->index_].video_filename_.in (); } - -/* const char* category (void) const */ -/* { return this->movie_info_[this->index_].category_.in (); } */ - -private: - - int index_; - - TAO_VR::Movie_Info movie_info_; -}; - -class Trader_Client -// = TITLE -// Performs all the interaction with the Trading Service on behalf -// of the Java server selection GUI. -{ -public: - - ~Trader_Client (void); - // Destory all that was dynamically allocated. - - void init (int argc, char** argv); - // Call once, prior to query_trader. - - void query_trader (void); - // Call n times, after init has been called. - - void load_movie (const char* server_name, TAO_VR::Movie* selected_movie_info); - // Instruct the A/V client to begin an A/V stream with the - // designated host. - - void get_servers (int& length, char**& server_names); - // Return the list of server names whose offers were obtained from - // the Trader. - - Movie_Iterator* get_movie_info (const char* server_name); - // Fill in the sequence with movie information for all movies - // offered by the specified server. - - float evaluate_performance_property (const char* server_name, - const char* property_name); - // Evaluate the specified property with respect to the offer from - // the specified server. - - static Trader_Client* instance (void); - -protected: - - Trader_Client (void); - // No-arg, no-op constructor. Necessary since this class is - // instantiated in a no-arg factory method. - -private: - - static Trader_Client* instance_; - - Receiver_var receiver_; - // Command handler receiver for mmdevice. - - void create_hash_table_entry (CosTrading::Offer& offer); - - - TAO_VR::Movie_Info* fetch_movie_array (const char* server_name); - - typedef - ACE_Hash_Map_Manager - Property_Map; - // Second-tier map --- maps property names to their values. - - typedef - ACE_Hash_Map_Manager - Server_Map; - // First tier map --- maps server names to their second-tier maps. - - typedef - ACE_Hash_Map_Manager Reference_Map; - // First tier map --- maps server names to their object reference. - - TAO_ORB_Manager orb_manager_; - // Standard orb stuff. - - CosTrading::Lookup_var lookup_; - // A reference to the trader, what else? - - Server_Map mmdevice_map_; - // The two-tiered map of server names to a map of property names to - // values. - - Reference_Map mmdevice_reference_map_; - // Hash Map of mmdevice object references - - // Server_Map video_map_; - // The two-tiered map of server names to a map of property names to - // values. - - // Reference_Map video_reference_map_; - // Hash Map of mmdevice object references -}; - - -// Movie_Iterator* movie_iter=0; - - -#endif /* TRADER_CLIENT_H */ - - - - diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/graph02.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/graph02.gif deleted file mode 100644 index aaa6262c03e..00000000000 Binary files a/TAO/orbsvcs/tests/AVStreams/server_discovery/graph02.gif and /dev/null differ diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/graph09.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/graph09.gif deleted file mode 100644 index a090e98b277..00000000000 Binary files a/TAO/orbsvcs/tests/AVStreams/server_discovery/graph09.gif and /dev/null differ diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/main.cpp b/TAO/orbsvcs/tests/AVStreams/server_discovery/main.cpp deleted file mode 100644 index 483654c4a2a..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/main.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// ======================================================================== -// $Id$ -// -// = FILENAME -// main.cpp -// -// = AUTHOR -// Seth Widoff -// -// ======================================================================== -#include -#include "ace/OS.h" - -ACE_RCSID(server_discovery, main, "$Id$") - -#define PATH_SEPARATOR ':' -#define USER_CLASSPATH "." /* where Prog.class is */ - -#include "Trader_Client.h" - -int -main (int argc, char** argv) -{ - JNIEnv *env; - JavaVM *jvm; - JDK1_1InitArgs vm_args; - jint res; - jclass cls; - jmethodID mid; - jstring jstr; - jobjectArray args; - char classpath[1024]; - - /* IMPORTANT: specify vm_args version # if you use JDK1.1.2 and beyond */ - vm_args.version = 0x00010001; - - JNI_GetDefaultJavaVMInitArgs (&vm_args); - - /* Append USER_CLASSPATH to the end of default system class path */ - sprintf(classpath, "%s%c%s", - vm_args.classpath, PATH_SEPARATOR, USER_CLASSPATH); - vm_args.classpath = classpath; - - ACE_DEBUG ((LM_DEBUG, "Classpath: %s\n", classpath)); - - /* Create the Java VM */ - res = JNI_CreateJavaVM (&jvm, (void**) &env, (void*) &vm_args); - if (res < 0) - ACE_ERROR_RETURN ((LM_ERROR, "Can't create Java VM\n"), -1); - - cls = env->FindClass ("Server_Discovery"); - if (cls == 0) - ACE_ERROR_RETURN ((LM_ERROR, "Can't find Server Discovery class\n"), -1); - - mid = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V"); - if (mid == 0) - ACE_ERROR_RETURN ((LM_ERROR, "Can't find Server_Discovery.main\n"), -1); - - jstr = env->NewStringUTF (" from C!"); - if (jstr == 0) - ACE_ERROR_RETURN ((LM_ERROR, "Out of memory\n"), -1); - - args = env->NewObjectArray(1, env->FindClass ("java/lang/String"), jstr); - if (args == 0) - ACE_ERROR_RETURN ((LM_ERROR, "Out of memory\n"), -1); - - Trader_Client* trader_client = Trader_Client::instance (); - trader_client->init (argc, argv); - trader_client->query_trader (); - - ACE_DEBUG ((LM_DEBUG, "Launching the java GUI stuff.\n")); - env->CallStaticVoidMethod (cls, mid, args); - - jvm->DestroyJavaVM (); -} diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/mmedia3.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/mmedia3.gif deleted file mode 100644 index d92c29b370a..00000000000 Binary files a/TAO/orbsvcs/tests/AVStreams/server_discovery/mmedia3.gif and /dev/null differ diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/server01.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/server01.gif deleted file mode 100644 index b4e877d3170..00000000000 Binary files a/TAO/orbsvcs/tests/AVStreams/server_discovery/server01.gif and /dev/null differ diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/server02.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/server02.gif deleted file mode 100644 index e46bcb8deb7..00000000000 Binary files a/TAO/orbsvcs/tests/AVStreams/server_discovery/server02.gif and /dev/null differ diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/www1.gif b/TAO/orbsvcs/tests/AVStreams/server_discovery/www1.gif deleted file mode 100644 index bc4b2e434cc..00000000000 Binary files a/TAO/orbsvcs/tests/AVStreams/server_discovery/www1.gif and /dev/null differ diff --git a/TAO/orbsvcs/tests/AVStreams/sfp/client.cpp b/TAO/orbsvcs/tests/AVStreams/sfp/client.cpp deleted file mode 100644 index 1973003e689..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/sfp/client.cpp +++ /dev/null @@ -1,89 +0,0 @@ -// $Id$ - -#include "common.h" -#include "ace/Event_Handler.h" - -char *data = "Hello how are you"; - -class frame_handler: public ACE_Event_Handler -{ - public: - - frame_handler (ACE_Reactor* reactor,SFP *sfp) - :sfp_ (sfp) - { - reactor->schedule_timer (this, - 0, - 20); - } - - // Called when timer expires. - int handle_timeout (const ACE_Time_Value &tv, - const void *arg = 0) - { - ACE_DEBUG ((LM_DEBUG,"frame_handler:handle_timeout\n")); - ACE_Message_Block mb (data, - ACE_OS::strlen (data), - -1); - mb.wr_ptr (ACE_OS::strlen (data)); - int result = this->sfp_->send_simple_frame (&mb); - if (result != -1) - ACE_DEBUG ((LM_DEBUG,"simple_frame sent\n")); - else - ACE_DEBUG ((LM_DEBUG,"simple_frame send failed\n")); - return 0; -// ACE_DEBUG ((LM_DEBUG,"frame_handler:handle_timeout\n")); -// char *buf; -// ACE_NEW_RETURN (buf, -// char [4*ACE_MAX_DGRAM_SIZE], -// -1); -// ACE_Message_Block mb (buf, -// 4*ACE_MAX_DGRAM_SIZE); -// // mb.wr_ptr (ACE_OS::strlen (data)); -// mb.wr_ptr (4*ACE_MAX_DGRAM_SIZE); -// // int result = this->sfp_->send_simple_frame (&mb); -// int result = this->sfp_->send_frame (&mb); -// if (result != -1) -// ACE_DEBUG ((LM_DEBUG,"simple_frame sent\n")); -// else -// ACE_DEBUG ((LM_DEBUG,"simple_frame send failed\n")); -// return 0; - - } - - private: - - SFP *sfp_; -}; - -int -main (int argc, char **argv) -{ - TAO_ORB_Manager orb_manager; - - orb_manager.init (argc,argv); - - ACE_Time_Value timeout1 (5),timeout2 (50); - - SFP sfp (orb_manager.orb (), - TAO_ORB_Core_instance ()->reactor (), - timeout1, - timeout2, - 0); - - int result; - - result = sfp.start_stream (server_addr); - if (result != 0) - ACE_ERROR_RETURN ((LM_ERROR,"sfp start failed\n"),1); - - frame_handler handler (TAO_ORB_Core_instance ()->reactor (), - &sfp); - - result = orb_manager.run (); - if (result == 0) - ACE_DEBUG ((LM_DEBUG,"ORB run timed out\n")); - else if (result == -1) - ACE_DEBUG ((LM_DEBUG,"ORB run error\n")); - return 0; -} diff --git a/TAO/orbsvcs/tests/AVStreams/sfp/common.h b/TAO/orbsvcs/tests/AVStreams/sfp/common.h deleted file mode 100644 index 8fdabdedafd..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/sfp/common.h +++ /dev/null @@ -1,12 +0,0 @@ -// $Id$ - -#if !defined (_COMMON_H_) -#define _COMMON_H_ - -#include "orbsvcs/sfpC.h" -#include "orbsvcs/AV/sfp.h" -#include "tao/TAO.h" - -const char *server_addr = "tango.cs.wustl.edu:10000"; - -#endif /* _COMMON_H_ */ diff --git a/TAO/orbsvcs/tests/AVStreams/sfp/server.cpp b/TAO/orbsvcs/tests/AVStreams/sfp/server.cpp deleted file mode 100644 index 454ba126a3b..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/sfp/server.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// $Id$ - -#include "common.h" - -class mySFP_Callback: public SFP_Callback -{ - public: - // This is called for both active and passive start. - virtual int start_failed (void) - { - return 0; - } - - // This is a callback for both active and passive stream - // establshment. - virtual int stream_established (void) - { - return 0; - } - - virtual int receive_frame (ACE_Message_Block *frame) - { - ACE_DEBUG ((LM_DEBUG,"mySFP_Callback:receive_frame\n")); - char *buf =frame->rd_ptr (); - ACE_DEBUG ((LM_DEBUG,"length of buf = %d\n",frame->length ())); - for (int i=0;ilength ();i++) - ACE_DEBUG ((LM_DEBUG,"%c ",buf[i])); - ACE_DEBUG ((LM_DEBUG,"\n")); - return 0; - } -}; - -int -main (int argc, char **argv) -{ - TAO_ORB_Manager orb_manager; - - orb_manager.init (argc,argv); - - ACE_Time_Value timeout1 (5),timeout2 (50); - - mySFP_Callback callback; - SFP sfp (orb_manager.orb (), - TAO_ORB_Core_instance ()->reactor (), - timeout1, - timeout2, - &callback); - - int result; - // passive start. - result = sfp.start_stream (server_addr,10); - if (result != 0) - return 1; - - result = orb_manager.run (); - if (result == 0) - ACE_DEBUG ((LM_DEBUG,"ORB run timed out\n")); - else if (result == -1) - ACE_DEBUG ((LM_DEBUG,"ORB run error\n")); - return 0; -} diff --git a/TAO/orbsvcs/tests/Concurrency/CC_client.cpp b/TAO/orbsvcs/tests/Concurrency/CC_client.cpp deleted file mode 100644 index 92d6cc7ce50..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_client.cpp +++ /dev/null @@ -1,463 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests -// -// = FILENAME -// CC_client.h -// -// = DESCRIPTION -// This is the test class for the concurrency service. The class -// implements a client to the concurrency service. -// This file contains the main function for the test. -// -// = AUTHORS -// Torben Worm -// -// ============================================================================ - -#include "ace/Read_Buffer.h" -#include "CC_client.h" - -ACE_RCSID(Concurrency, CC_client, "$Id$") - -// Constructor. -CC_Client::CC_Client (void) - : naming_service_ (0), - cc_factory_ior_file_ (0), - cc_factory_key_ (0), - f_handle_ (ACE_INVALID_HANDLE), - shutdown_ (0), - use_naming_service_ (1), - run_basic_tests_ (0), - run_extended_tests_ (0), - use_script_file_ (0), - script_file_ (0) -{ -} - -CC_Client::~CC_Client (void) -{ - // Free resources and close the ior files. - if (this->cc_factory_ior_file_) - ACE_OS::fclose (this->cc_factory_ior_file_); - - if (this->f_handle_ != ACE_INVALID_HANDLE) - ACE_OS::close (this->f_handle_); - - if (this->cc_factory_key_ != 0) - ACE_OS::free (this->cc_factory_key_); - - if (naming_service_!=0) - delete naming_service_; -} - -// Reads the lock set factory ior from a file - -int -CC_Client::read_ior (char *filename) -{ - // Open the file for reading. - this->f_handle_ = ACE_OS::open (filename,0); - - if (this->f_handle_ == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: %p\n", - filename), - -1); - ACE_Read_Buffer ior_buffer (this->f_handle_); - this->cc_factory_key_ = ior_buffer.read (); - - if (this->cc_factory_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to allocate memory to read ior: %p\n"), - -1); - return 0; -} - -// Parses the command line arguments and returns an error status. - -int -CC_Client::parse_args (void) -{ - ACE_Get_Opt get_opts (argc_, argv_, "dc:sf:k:xbhe:"); - int c; - int result; - - if(argc_==1) // No arguments given on command line - { - print_usage(); - return -1; - } - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'b': // debug flag - this->run_basic_tests_ = 1; - break; - case 'c': - this->use_script_file_ = 1; - this->script_file_ = ACE_OS::strdup (get_opts.optarg); - break; - case 'd': // debug flag - TAO_debug_level++; - break; - case 'e': // debug flag - run_extended_tests_ = 1; - this->extended_tests_params_ = ACE_OS::strdup (get_opts.optarg); - break; - case 'f': // read the IOR from the file. - result = this->read_ior (get_opts.optarg); - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to read ior from %s : %p\n", - get_opts.optarg), - -1); - break; - case 'k': // read the cubit IOR from the command-line. - this->cc_factory_key_ = - ACE_OS::strdup (get_opts.optarg); - break; - case 'x': - this->shutdown_ = 1; - break; - case 's': // Don't use the TAO Naming Service. - this->use_naming_service_ = 0; - break; - case 'h': - default: - print_usage (); - ACE_ERROR_RETURN ((LM_ERROR, ""), -1); - } - - // Indicates successful parsing of command line. - return 0; -} - -// Execute client example code. - -int -CC_Client::run (void) -{ - int tests_run = 0; - // Tells whether any tests have been run - - int success = CC_SUCCESS; - // Did test succeed? - - if (this->run_basic_tests_ && success == CC_SUCCESS) - { - success = run_basic_tests (); - if(success==CC_FAIL) - ACE_DEBUG((LM_DEBUG, "Basic tests did not succeed\n")); - tests_run = 1; - } - - if (this->run_extended_tests_ && success == CC_SUCCESS) - { - success = run_extended_tests (this->extended_tests_params_); - if(success==CC_FAIL) - ACE_DEBUG((LM_DEBUG, "Extended tests did not succeed\n")); - tests_run = 1; - } - - if(this->use_script_file_ && success == CC_SUCCESS) - { - cmdlist = new CC_CommandList(); - FILE *f; - - // Open the command file for parsing if the filename!=stdin - if(ACE_OS::strcmp(this->script_file_, "stdin")!=0) - { - f = ACE_OS::fopen(this->script_file_, "r"); - if(f==0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s\n", - this->script_file_), - -1); - ace_cc_yyin = f; - } - ace_cc_yyparse(); - } - - // Other tests go here - // if (other_test_flag && success == CC_SUCCESS) ... - - if (this->shutdown_) - // @@TAO is this needed?? - - if (tests_run == 0) - { - print_usage (); - ACE_ERROR_RETURN ((LM_ERROR, - "No tests given\n"), - -1); - } - - return success; -} - -// This function runs basic tests concerned with only one lock set - -int -CC_Client::run_basic_tests (void) -{ - Test_Single_Lock_With_Mode t1 (naming_service_, - CosConcurrencyControl::read); - Test_Single_Lock_With_Mode t2 (naming_service_, - CosConcurrencyControl::write); - Test_Single_Lock_With_Mode t3 (naming_service_, - CosConcurrencyControl::upgrade); - Test_Single_Lock_With_Mode t4 (naming_service_, - CosConcurrencyControl::intention_read); - Test_Single_Lock_With_Mode t5 (naming_service_, - CosConcurrencyControl::intention_write); - // This test should be run for several different lock mode, but - // since we do not support - Test_Release_Not_Held_Lock t6 (naming_service_, - CosConcurrencyControl::read); - if (t1.run () == CC_SUCCESS && - t2.run () == CC_SUCCESS && - t3.run () == CC_SUCCESS && - t4.run () == CC_SUCCESS && - t5.run () == CC_SUCCESS && - t6.run () == CC_SUCCESS ) - return CC_SUCCESS; - else - return CC_FAIL; -} - -int -CC_Client::check_extended_test_params(char *params) -{ - // Format (regexp): [0-9]+;.*;.* - int no_of_params = 0; - char *cp = params; // pointer to walk along the string - enum {TAO_START, TAO_NUMBER, TAO_ARG, TAO_ERROR} state = TAO_START; - - while(*cp!='\0') - { - switch(state) - { - case TAO_START: - if(isdigit(*cp)) - state = TAO_NUMBER; - else - state = TAO_ERROR; - break; - - case TAO_NUMBER: - if((*cp)==';') - { - state = TAO_ARG; - no_of_params++; - } - else - if(!isdigit(*cp)) - state = TAO_ERROR; - break; - - case TAO_ARG: - if((*cp)==';') - { - no_of_params++; - } - break; - - case TAO_ERROR: - return -1; - // break; - - default: - ACE_ERROR_RETURN((LM_ERROR, - "CC_Client::check_extended_test_params\n"), -1); - } - cp++; - } - if (state==TAO_ERROR) // there was only one character given and it was wrong - return -1; - else - return no_of_params; -} - -int -CC_Client::run_extended_tests (char *params) -{ - int success = CC_FAIL; - int no_of_args = 0; - - ACE_DEBUG ((LM_DEBUG, - "Params: %s\n", - params)); - - no_of_args = check_extended_test_params(params); - if(no_of_args==-1) - { - ACE_ERROR_RETURN((LM_ERROR, - "Error in parameter string (%s). Format: ';;'\n", params), CC_FAIL); - } - - ACE_DEBUG((LM_DEBUG, "Number of arguments: %i\n", no_of_args)); - - char *cmd = ACE_OS::strtok (params, ";"); - char *arg1 = ACE_OS::strtok (NULL, ";"); - // char *arg2 = ACE_OS::strtok (NULL, ";"); - - // A possible scenario using test 1,2, and 3 Create and lock the - // lock set with the name 'Name' - // ./CC_client -e '1;Name' - // Try to lock the same lock set. The process will hang - // ./CC_client -e '2:Name' - // Unlocks the lock set. Now test 2 will continue. - // ./CC_client -e '3:Name' - - if (ACE_OS::strcmp (cmd, "1") == 0) - { - Test_Setup_LockSet t1 (naming_service_, arg1); - success = t1.run (); - } - - if (ACE_OS::strcmp (cmd, "2") == 0) - { - Test_Use_Already_Created_LockSet t2 (naming_service_, arg1); - success = t2.run (); - } - - if (ACE_OS::strcmp (cmd, "3") == 0) - { - Test_Unlock_Already_Created_LockSet t3 (naming_service_, arg1); - success = t3.run (); - } - - return success; -} - -void -CC_Client::print_usage (void) -{ - ACE_ERROR ((LM_ERROR, - "usage: %s" - " [-b]" - " [-c] cc-test-script" - " [-d]" - " [-f cc_factory-obj-ref-key-file]" - " [-k cc-obj-ref-key]" - " [-x]" - " [-s]" - "\n", - this->argv_ [0])); -} - -int -CC_Client::init_naming_service (void) -{ - TAO_TRY - { - ACE_NEW_RETURN (naming_service_, - CC_naming_service (this->orb_, TAO_TRY_ENV), - -1); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - return -1; - } - TAO_ENDTRY; - return 0; -} - -int -CC_Client::init (int argc, char **argv) -{ - int naming_result; - this->argc_ = argc; - this->argv_ = argv; - - TAO_TRY - { - // Retrieve the ORB. - this->orb_ = CORBA::ORB_init (this->argc_, - this->argv_, - "internet", - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; - - if (this->use_naming_service_) - { - naming_result = this->init_naming_service (); - if (naming_result < 0) - return naming_result; - } - else - { - if (this->cc_factory_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%s: no lock set factory key specified\n", - this->argv_[0]), - -1); - - - CORBA::Object_var factory_object = - this->orb_->string_to_object (this->cc_factory_key_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - -#if 0 - // The test cannot currently run without the naming service. - this->factory_ = - CosConcurrencyControl::LockSetFactory::_narrow - (factory_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (this->factory_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid factory key <%s>\n", - this->cc_factory_key_), - -1); -#endif /* 0 */ - } - - ACE_DEBUG ((LM_DEBUG, - "Factory received OK\n")); - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_Client::init"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -// This function runs the test. - -int -main (int argc, char **argv) -{ - CC_Client cc_client; - - ACE_DEBUG ((LM_DEBUG, - "\n \t CosConcurrencyControl: client \n\n")); - - if (cc_client.init (argc, argv) == -1) - { - ACE_DEBUG ((LM_DEBUG, - "Did not initialize correctly\n")); - return 1; - } - else - { - ACE_DEBUG ((LM_DEBUG, - "Running the test\n")); - return cc_client.run (); - } -} diff --git a/TAO/orbsvcs/tests/Concurrency/CC_client.dsp b/TAO/orbsvcs/tests/Concurrency/CC_client.dsp deleted file mode 100644 index 40b8420b51c..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_client.dsp +++ /dev/null @@ -1,142 +0,0 @@ -# Microsoft Developer Studio Project File - Name="CC_client" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=CC_client - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "CC_client.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "CC_client.mak" CFG="CC_client - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "CC_client - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "CC_client - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "CC_client - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "CC_client - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib TAOd.lib orbsvcsd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "CC_client - Win32 Release" -# Name "CC_client - Win32 Debug" -# Begin Source File - -SOURCE=.\CC_client.cpp -# End Source File -# Begin Source File - -SOURCE=.\CC_client.h -# End Source File -# Begin Source File - -SOURCE=.\CC_command.cpp -# End Source File -# Begin Source File - -SOURCE=.\CC_command.h -# End Source File -# Begin Source File - -SOURCE=.\CC_command.tab.cpp -# End Source File -# Begin Source File - -SOURCE=.\CC_command.tab.h -# End Source File -# Begin Source File - -SOURCE=.\CC_naming_service.cpp -# End Source File -# Begin Source File - -SOURCE=.\CC_naming_service.h -# End Source File -# Begin Source File - -SOURCE=.\CC_test_utils.cpp -# End Source File -# Begin Source File - -SOURCE=.\CC_test_utils.h -# End Source File -# Begin Source File - -SOURCE=.\CC_tests.cpp -# End Source File -# Begin Source File - -SOURCE=.\CC_tests.h -# End Source File -# Begin Source File - -SOURCE=.\lex.CC_command.cpp -# End Source File -# Begin Source File - -SOURCE=.\tmplinst.cpp -# End Source File -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/Concurrency/CC_client.h b/TAO/orbsvcs/tests/Concurrency/CC_client.h deleted file mode 100644 index 73d15f8326a..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_client.h +++ /dev/null @@ -1,143 +0,0 @@ -// -*- c++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Concurrency -// -// = FILENAME -// CC_client.h -// -// = DESCRIPTION -// This class implements a client used to test the CosConcurrency -// service. -// -// = AUTHORS -// Torben Worm -// -// ============================================================================ - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/corba.h" -#include "orbsvcs/CosConcurrencyControlC.h" -#include "orbsvcs/CosNamingC.h" -#include "CC_tests.h" -#include "CC_naming_service.h" -#include "CC_command.h" -#include "CC_command.tab.h" - -#ifndef _CC_CLIENT_H_ -#define _CC_CLIENT_H_ - -// Stuff to be used by the command file parser -int ace_cc_yyparse(void); -int line_no = 1; -char line_buf[500]; -CC_CommandList *cmdlist; -extern FILE *ace_cc_yyin; -// end of parser stuff - - -class CC_Client -{ - // = TITLE - // Defines a class that encapsulates the behaviour of a clien of - // the concurrency service. - // - // = DESCRIPTION - // This class declares an interface to run the test client for - // the concurrency service. -public: - // = Initialization and termination methods. - CC_Client (void); - // Default constructor. - - ~CC_Client (void); - // Destructor. - - int run (void); - // Run the test. - - int init (int argc, char **argv); - // Initialize the test with the parameters from the command line. - -private: - int init_naming_service (void); - // Function to initialize the naming service. - - int parse_args (void); - // Function to parse the command line arguments. - - int read_ior (char *filename); - // Function to read the ior from the given file. - - int run_basic_tests (void); - // Runs the basic tests (on a single lock set). Returns CC_SUCCESS - // upon success CC_FAIL otherwise. - - int run_extended_tests (char *params); - // Runs the extended tests (on more lock sets). Returns CC_SUCCESS - // upon success CC_FAIL otherwise. - - int check_extended_test_params(char *params); - // Checks the parameters given to the run_extended_tests() function. - // returns -1 if an error is found. - - CC_naming_service *naming_service_; - // A pointer to the naming service used for this test. - - FILE *cc_factory_ior_file_; - // File from which to obtain the IOR. - - char *cc_factory_key_; - // The factory key for the lock set factory. - - ACE_HANDLE f_handle_; - // File handle to read the IOR. - - int shutdown_; - // Flag to tell server to shutdown. - - CORBA::ORB_var orb_; - // Remember our orb. - - // CosConcurrencyControl::LockSetFactory_var factory_; - // factory pointer for the lock set. @@TAO maybe to be used when naming - // service is not used (for simple testing) - - int argc_; - // The number of arguments passed on the command line. - - char **argv_; - // The arguments from the command line. - - int use_naming_service_; - // Flag to tell the client whether to use the naming service or not - // to find the concurrency control factory. - - int run_basic_tests_; - // flag to tell which test should be run. - - int run_extended_tests_; - // flag to tell which test should be run. - - char *extended_tests_params_; - // Parameters to the extended tests. The parameters are of the - // following format: ::... - - int use_script_file_; - // Flag to tell whethter to use a script file to run the tests. - - char *script_file_; - // The script file to run - - void print_usage (void); - // Prints out the options to the program. -}; -#endif /* !defined (_CC_CLIENT_H_) */ diff --git a/TAO/orbsvcs/tests/Concurrency/CC_command.cpp b/TAO/orbsvcs/tests/Concurrency/CC_command.cpp deleted file mode 100644 index b34f36d88df..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_command.cpp +++ /dev/null @@ -1,667 +0,0 @@ -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests -// -// = FILENAME -// CC_command.cpp -// -// = DESCRIPTION -// This is the command classes for the test of the concurrency service. -// -// = AUTHORS -// Torben Worm -// -// ============================================================================ - -#include "CC_command.h" -#include "CC_test_utils.h" -#include "CC_naming_service.h" -#include "ace/ACE.h" -#include "ace/Process.h" -#include "orbsvcs/CosConcurrencyControlC.h" -#include - -ACE_RCSID(Concurrency, CC_command, "$Id$") - -CC_Command::~CC_Command(void) -{ -} - -int CC_Command::execute() -{ - return 0; -} - -CC_Command::CC_Command(void) -{ -} - -CosConcurrencyControl::LockSet_var -CC_Command::GetLockSet(char *lock_set_name, CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - if(ACE_OS::strcmp(lock_set_name, "")!=0) - { - CORBA::Object_var ccls_obj = - CC_naming_service::Instance()->get_obj_from_name ("", lock_set_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - CosConcurrencyControl::LockSet_var ccls = - CosConcurrencyControl::LockSet::_narrow (ccls_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - return ccls; - } - else - { - // No lock set name was given. Use the global lock set. - if(cc_lockset_.in()==0) - { - TAO_TRY_ENV.clear(); - TAO_TRY_ENV.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - } - else - return cc_lockset_; - } - } - TAO_CATCHANY - { - TAO_RETHROW_RETURN(0); - } - TAO_ENDTRY; - // We should never get here - return 0; -} - -CORBA::Exception *CC_Command::excep_ = 0; - -CosConcurrencyControl::LockSet_var CC_Command::cc_lockset_(0); - -CC_Start_Cmd::CC_Start_Cmd(char *config_file_name) - : cfg_name_ (config_file_name) -{ - // printf("CC_Start_Cmd::CC_Start_Cmd: config: %s\n", config_file_name); -} - -CC_Start_Cmd::~CC_Start_Cmd() -{ - // cfg_name_ is allocated in the lexer with strdup - if(cfg_name_) - { - ACE_OS::free(cfg_name_); - cfg_name_ = 0; - } -} - -int CC_Start_Cmd::execute(void) -{ - if(excep_) - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } - - printf("Executing start command (script file: %s)\n", cfg_name_); - - char cmd_line[1024]; - int success = ACE_OS::sprintf(&cmd_line[0], "%s -c %s", - "./CC_client", cfg_name_); - if(success>=1024 || success==-1) - ACE_ERROR_RETURN((LM_ERROR, "Creation of process failed: %s\n", - cmd_line), 0); - - ACE_Process new_process; - ACE_Process_Options options; - options.command_line(cmd_line); - - if(new_process.spawn(options) == -1) - { - ACE_ERROR_RETURN((LM_ERROR, "Creation of process failed: %s\n", - cmd_line), 0); - } - return 1; // CC_SUCCESS -} - -CC_CreateLockSet_Cmd::CC_CreateLockSet_Cmd(char *lock_set_name) - : name_ (lock_set_name) -{ - // printf("CC_CreateLockSet_Cmd::CC_CreateLockSet_Cmd: lock set: %s\n", - // lock_set_name); -} - -CC_CreateLockSet_Cmd::~CC_CreateLockSet_Cmd() -{ - // name_ is allocated in the lexer with strdup - if(name_) - { - ACE_OS::free(name_); - name_ = 0; - } -} - -int CC_CreateLockSet_Cmd::execute(void) -{ - if(excep_) - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } - - printf("Executing create command (lock set: %s)\n", name_); - - TAO_TRY - { - CosConcurrencyControl::LockSet_ptr lock_set = - CC_TestUtils::create_lock_set(); - if(ACE_OS::strcmp(name_,"")!=0)// Do not bind an empty name - { - CC_naming_service::Instance()->bind_name(name_, - lock_set, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - else - { - // We did not specify a name => the global lock set variable is set - cc_lockset_ = lock_set; - } - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception("CC_CreateLockSet_Cmd::execute(void)"); - excep_ = TAO_TRY_ENV.exception(); - } - TAO_ENDTRY; - - return 1; // CC_SUCCESS -} - -CC_Lock_Cmd::CC_Lock_Cmd(char *lock_set_name, - CosConcurrencyControl::lock_mode mode) - : name_(lock_set_name), mode_(mode) -{ - // printf("CC_Lock_Cmd::CC_Lock_Cmd: lock set: %s, mode: %s\n", - // lock_set_name, CC_TestUtils::get_lock_mode_name(mode)); -} - -CC_Lock_Cmd::~CC_Lock_Cmd() -{ -} - -int CC_Lock_Cmd::execute(void) -{ - if(excep_) - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } - - printf("Executing lock command (lock set: %s, mode: %s)\n", - name_, CC_TestUtils::get_lock_mode_name(mode_)); - - TAO_TRY - { - CosConcurrencyControl::LockSet_var ccls = GetLockSet(name_, TAO_TRY_ENV); - TAO_CHECK_ENV; - ccls->lock (mode_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_Lock_Cmd::execute(void)"); - excep_ = TAO_TRY_ENV.exception(); - // return 0; // should be CC_FAIL - } - TAO_ENDTRY; - return 1; // CC_SUCCESS -} - -CC_UnLock_Cmd::CC_UnLock_Cmd(char *lock_set_name, - CosConcurrencyControl::lock_mode mode) - : name_(lock_set_name), mode_ (mode) -{ - // printf("CC_UnLock_Cmd::CC_UnLock_Cmd: lock set: %s, mode: %s\n", - // lock_set_name, CC_TestUtils::get_lock_mode_name(mode)); -} - -CC_UnLock_Cmd::~CC_UnLock_Cmd() -{ -} - -int CC_UnLock_Cmd::execute(void) -{ - if(excep_) - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } - - printf("Executing unlock command (lock set: %s, mode: %s)\n", - name_, CC_TestUtils::get_lock_mode_name(mode_)); - - TAO_TRY - { - CosConcurrencyControl::LockSet_var ccls = GetLockSet(name_, TAO_TRY_ENV); - TAO_CHECK_ENV; - - ccls->unlock (mode_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_UnLock_Cmd::execute(void)"); - excep_ = TAO_TRY_ENV.exception(); - // return 0; // should be CC_FAIL - } - TAO_ENDTRY; - return 1; // CC_SUCCESS -} - -CC_TryLock_Cmd::CC_TryLock_Cmd(char *lock_set_name, - CosConcurrencyControl::lock_mode mode) - : name_ (lock_set_name), mode_ (mode) -{ - // printf("CC_TryLock_Cmd::CC_TryLock_Cmd: lock set: %s, mode %s\n", - // lock_set_name, CC_TestUtils::get_lock_mode_name(mode)); -} - -CC_TryLock_Cmd::~CC_TryLock_Cmd() -{ -} - -int CC_TryLock_Cmd::execute(void) -{ - if(excep_) - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } - - printf("Executing try_lock command (lock set: %s, mode: %s)\n", - name_, CC_TestUtils::get_lock_mode_name(mode_)); - - CORBA::Boolean lock_not_held; - - TAO_TRY - { - CosConcurrencyControl::LockSet_var ccls = GetLockSet(name_, TAO_TRY_ENV); - TAO_CHECK_ENV; - - lock_not_held = ccls->try_lock (mode_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (lock_not_held) - { - ACE_DEBUG ((LM_DEBUG, - "%s lock not held\n", - CC_TestUtils::get_lock_mode_name (mode_))); - } - else - ACE_DEBUG ((LM_DEBUG, - "%s lock held\n", - CC_TestUtils::get_lock_mode_name (mode_))); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_TryLock_Cmd::execute(void)"); - excep_ = TAO_TRY_ENV.exception(); - // return 0; // Should be CC_FAIL - } - TAO_ENDTRY; - - return 1; // CC_SUCCESS -} - -CC_ChangeMode_Cmd::CC_ChangeMode_Cmd(char *lock_set_name, - CosConcurrencyControl::lock_mode held_mode, - CosConcurrencyControl::lock_mode new_mode) - : name_(lock_set_name), held_mode_ (held_mode), new_mode_ (new_mode) -{ - // printf("CC_ChangeMode_Cmd::CC_ChangeMode_Cmd: lock set: %s, held mode: %s, new mode: %s\n", - // lock_set_name, - // CC_TestUtils::get_lock_mode_name(held_mode), - // CC_TestUtils::get_lock_mode_name(new_mode)); -} - -CC_ChangeMode_Cmd::~CC_ChangeMode_Cmd() -{ -} - -int CC_ChangeMode_Cmd::execute(void) -{ - if(excep_) - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } - - printf("Executing change_mode command (lock set: %s, held_mode: %s, new_mode: %s)\n", - name_, CC_TestUtils::get_lock_mode_name(held_mode_), - CC_TestUtils::get_lock_mode_name(new_mode_)); - - TAO_TRY - { - CosConcurrencyControl::LockSet_var ccls = GetLockSet(name_, TAO_TRY_ENV); - TAO_CHECK_ENV; - - ccls->change_mode (held_mode_, new_mode_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_ChangeMode_Cmd::execute(void)"); - excep_ = TAO_TRY_ENV.exception(); - // return 0; // CC_FAIL - } - TAO_ENDTRY; - return 1; // CC_SUCCESS -} - -CC_Sleep_Cmd::CC_Sleep_Cmd(int seconds) - : time_ (seconds) -{ - // printf("CC_Sleep_Cmd::CC_Sleep_Cmd: time: %i\n", seconds); -} - -CC_Sleep_Cmd::~CC_Sleep_Cmd() -{ -} - -int CC_Sleep_Cmd::execute(void) -{ - if(excep_) - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } - - printf("Executing sleep command (time: %i)\n", time_); - - ACE_OS::sleep(time_); - return 1; // CC_SUCCESS -} - -CC_Repeat_Cmd::CC_Repeat_Cmd(int times) - : times_ (times) -{ - // printf("CC_Repeat_Cmd::CC_Repeat_Cmd: times: %i\n", times); -} - -CC_Repeat_Cmd::~CC_Repeat_Cmd() -{ -} - -int CC_Repeat_Cmd::execute(void) -{ - if(excep_) - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } - - printf("Executing repeat command (times: %i)\n", times_); - - return 1; // CC_SUCCESS -} - -CC_Wait_Cmd::CC_Wait_Cmd(char *prompt) - : prompt_ (prompt) -{ - // printf("CC_Wait_Cmd::CC_Wait_Cmd: prompt: %s\n", prompt); -} - -CC_Wait_Cmd::~CC_Wait_Cmd() -{ -} - -int CC_Wait_Cmd::execute(void) -{ - if(excep_) - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } - - printf("Executing wait command\n"); - - char s[1]; - printf("%s", prompt_); - ACE_OS::gets(&s[0]); - return 1; // CC_SUCCESS -} - -CC_Excep_Cmd::CC_Excep_Cmd(char *excep) - : ex_(excep) -{ - // printf("CC_Excep_Cmd::CC_Excep_Cmd: excep: %s\n", excep); -} - -CC_Excep_Cmd::~CC_Excep_Cmd(void) -{ - if(ex_) - delete ex_; -} - -int -CC_Excep_Cmd::execute(void) -{ - printf("Executing excep command (expected: %s)\n", ex_); - // First we check to see if an exception has occured. If not we fail - // because we expected to see one - if(excep_==0) - return 0; // CC_FAIL - - // If there is an exception check that it's the expected one - if(ACE_OS::strcmp(excep_->_id(), ex_)==0) - { - delete excep_; - excep_ = 0; - return 1; // CC_SUCCESS - } - else - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } -} - -CC_Dummy_Cmd::CC_Dummy_Cmd(void) -{ -} - -CC_Dummy_Cmd::~CC_Dummy_Cmd(void) -{ -} - -int -CC_Dummy_Cmd::execute(void) -{ - return 1; // CC_SUCCESS -} - -CC_Print_Cmd::CC_Print_Cmd(char * message) - : msg_ (message) -{ -} - -CC_Print_Cmd::~CC_Print_Cmd(void) -{ - if(msg_) - { - ACE_OS::free(msg_); - msg_ = 0; - } -} - -int -CC_Print_Cmd::execute(void) -{ - printf("%s\n", msg_); - return 1; // CC_SUCCESS -} - -CC_Lookup_Cmd::CC_Lookup_Cmd(char *lock_set_name) - : name_ (lock_set_name) -{ -} - -CC_Lookup_Cmd::~CC_Lookup_Cmd() -{ - if(name_) - { - ACE_OS::free(name_); - name_ = 0; - } -} - -int -CC_Lookup_Cmd::execute(void) -{ - if(excep_) - { - printf("Exception: %s\n", excep_->_id()); - delete excep_; - excep_ = 0; - return 0; // CC_FAIL - } - - printf("Executing lookup command (lock set: %s)\n", name_); - - // Do the lookup if we haven't done it before - if(cc_lockset_.in() == 0) - { - TAO_TRY - { - CORBA::Object_var ccls_obj = - CC_naming_service::Instance()->get_obj_from_name ("", name_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - CosConcurrencyControl::LockSet_var ccls = - CosConcurrencyControl::LockSet::_narrow (ccls_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - cc_lockset_ = ccls; - TAO_CHECK_ENV; - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_UnLock_Cmd::execute(void)"); - excep_ = TAO_TRY_ENV.exception(); - // return 0; // CC_FAIL - } - TAO_ENDTRY; - } - return 1; // CC_SUCCESS -} - -CC_CommandElem::CC_CommandElem(CC_Command *cmd, CC_CommandElem *next) - : next_ (next), cmd_ (cmd) -{ -} - -CC_CommandElem::~CC_CommandElem(void) -{ -} - -CC_Command *CC_CommandElem::GetCommand(void) -{ - return cmd_; -} - -CC_CommandElem * -CC_CommandElem::GetNext(void) -{ - return next_; -} - -void -CC_CommandElem::SetNext(CC_CommandElem *next) -{ - next_ = next; -} - -CC_CommandList::CC_CommandList(void) - : head_ (0), last_ (0), times_ (1) -{ - printf("CC_CommandList::CC_CommandList\n"); -} - -CC_CommandList::~CC_CommandList(void) -{ -} - -int -CC_CommandList::add(CC_Command *cmd) -{ - if(head_==0) - { - head_ = new CC_CommandElem(cmd, 0); - last_ = head_; - } - else - { - CC_CommandElem *tmp = new CC_CommandElem(cmd, 0); - last_->SetNext(tmp); - last_ = tmp; - } - return 0; -} - -int -CC_CommandList::execute(void) -{ - CC_CommandElem *current = head_; - - for(int i=0; iGetCommand()->execute()==0) // == CC_FAIL - { - return 0; // CC_FAIL - } - current = current->GetNext(); - } - } - return 1; // CC_SUCCESS -} - -void -CC_CommandList::setrepeat(int times) -{ - times_ = times; -} diff --git a/TAO/orbsvcs/tests/Concurrency/CC_command.h b/TAO/orbsvcs/tests/Concurrency/CC_command.h deleted file mode 100644 index e695af96a92..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_command.h +++ /dev/null @@ -1,471 +0,0 @@ -// -*- c++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Concurrency -// -// = FILENAME -// CC_command.h -// -// = DESCRIPTION -// This file implements the command possible to execute on the -// concurrency service's lock set interface. The file also contains -// an implementation of a command list used by the command parser to -// store the commands to be executed. -// -// = AUTHORS -// Torben Worm -// -// ============================================================================ - -#include "orbsvcs/CosConcurrencyControlC.h" - -#ifndef _CC_COMMAND_H_ -#define _CC_COMMAND_H_ - -class CC_Command - // = TITLE - // Defines an abstact class for the commands towards the lock set - // - // = DESCRIPTION - // This class declares an interface to run a test towards one or more - // lock sets in the concurrency service. The class provides a virtual - // execute method that is common for all its subclasses. It is also the - // the base class for the auxillary commands start, wait, and sleep. -{ - public: - virtual ~CC_Command(void); - // Destructor - - virtual int execute() = 0; - // Abstract execute method - - protected: - CosConcurrencyControl::LockSet_var - GetLockSet(char *lock_set_name, CORBA::Environment &_env); - // Function to look up the lock set we are operating on, or if the - // name is "" return the global lock set variable - - CC_Command(void); - // Default constructor. We do not want instances of this class - - static CORBA::Exception *excep_; - // The last exception raised in one of the test commands. This variable - // is checked by all commands in order to determine if an exception has - // been raised. This is necessary because sometimes we want to check that - // an event caused an exception (done by the CC_Excep_Cmd command class) - // as part of the testing. - - static CosConcurrencyControl::LockSet_var cc_lockset_; - // This is the default lock set. The variable is either set by a create - // command without name or by the lookup command. - - private: -}; - -class CC_Start_Cmd:public CC_Command - // = TITLE - // Defines a class for the start command - // - // = DESCRIPTION - // This class represents the start command. The start command is used - // to start a new process with another script file in order to test the - // aspects of the concurrency service that requires several processes - // running at the same time. -{ - public: - CC_Start_Cmd(char *config_file_name); - // Constructor - - virtual ~CC_Start_Cmd(); - // Destructor - - virtual int execute(void); - // Start the child process. The current version does not wait for the - // process to terminate. - - private: - char *cfg_name_; - // The name of the script file -}; - -class CC_CreateLockSet_Cmd:public CC_Command - // = TITLE - // Defines a class for the create command on the lock set factory - // - // = DESCRIPTION - // This class represents the create command on the lock set factory. - // The lock set is registered in the naming service with the provided - // name. -{ - public: - CC_CreateLockSet_Cmd(char *lock_set_name); - // Constructor - - virtual ~CC_CreateLockSet_Cmd(); - // Destructor - - virtual int execute(void); - // Executes the command, i.e. creates the lock set and binds the name - // in the naming service. - - private: - char *name_; - // The name used to bind in the naming service. -}; - -class CC_Lock_Cmd:public CC_Command - // = TITLE - // Defines a class for the lock command on the lock set - // - // = DESCRIPTION - // This class represents the lock command on the lock set. The lock set - // is looked up in the naming service. -{ - public: - CC_Lock_Cmd(char *lock_set_name, CosConcurrencyControl::lock_mode mode); - // Constructor. - - virtual ~CC_Lock_Cmd(); - // Destructor - - virtual int execute(void); - // Executes the command, i.e. looks up the lock set with the requested - // name in the naming server and executes the lock command on that lock set. - - private: - char *name_; - // The name to look up in the naming service. - - CosConcurrencyControl::lock_mode mode_; - // The mode of the lock. -}; - -class CC_UnLock_Cmd:public CC_Command - // = TITLE - // Defines a class for the unlock command on the lock set - // - // = DESCRIPTION - // This class represents the unlock command on the lock set. The lock set - // is looked up in the naming service. -{ - public: - CC_UnLock_Cmd(char *lock_set_name, CosConcurrencyControl::lock_mode mode); - // Constructor. - - virtual ~CC_UnLock_Cmd(); - // Destructor - - virtual int execute(void); - // Executes the command, i.e. looks up the lock set with the requested - // name in the naming server and executes the unlock command on that - // lock set. - - private: - char *name_; - // The name to look up in the naming service. - - CosConcurrencyControl::lock_mode mode_; - // The mode of the lock. -}; - -class CC_TryLock_Cmd:public CC_Command - // = TITLE - // Defines a class for the try_lock command on the lock set - // - // = DESCRIPTION - // This class represents the try_lock command on the lock set. The lock set - // is looked up in the naming service. -{ - public: - CC_TryLock_Cmd(char *lock_set_name, CosConcurrencyControl::lock_mode mode); - // Constructor - - virtual ~CC_TryLock_Cmd(); - // Destructor - - virtual int execute(void); - // Executes the command, i.e. looks up the lock set with the requested - // name in the naming server and executes the try_lock command on that - // lock set. - - private: - char *name_; - // The name to look up in the naming service. - - CosConcurrencyControl::lock_mode mode_; - // The mode of the lock. -}; - -class CC_ChangeMode_Cmd:public CC_Command - // = TITLE - // Defines a class for the change_mode command on the lock set - // - // = DESCRIPTION - // This class represents the change_mode command on the lock set. - // The lock set is looked up in the naming service. -{ - public: - CC_ChangeMode_Cmd(char *lock_set_name, - CosConcurrencyControl::lock_mode held_mode, - CosConcurrencyControl::lock_mode new_mode); - // Constructor - - virtual ~CC_ChangeMode_Cmd(); - // Destructor - - virtual int execute(void); - // Executes the command, i.e. looks up the lock set with the requested - // name in the naming server and executes the change_mode command on that - // lock set. - - private: - char *name_; - // The name to look up in the naming service. - - CosConcurrencyControl::lock_mode held_mode_; - // The mode of the held lock - - CosConcurrencyControl::lock_mode new_mode_; - // The new mode of the lock -}; - -class CC_Sleep_Cmd:public CC_Command - // = TITLE - // Defines a class for the sleep command - // - // = DESCRIPTION - // This class represents the sleep command. This command is used to make - // the script pause for the requested number of second, e.g. to wait for - // another process to start. -{ - public: - CC_Sleep_Cmd(int seconds); - // Constructor. - - virtual ~CC_Sleep_Cmd(); - // Destructor. - - virtual int execute(void); - // Executes the command. - - private: - int time_; - // The number of seconds to sleep -}; - -class CC_Repeat_Cmd:public CC_Command - // = TITLE - // Defines a class for the repeat command - // - // = DESCRIPTION - // This class represents the repeat command. This command is used to make - // the script repeat the test the requested number of times. - // The command is curently NOT implemented. -{ - public: - CC_Repeat_Cmd(int times); - // Constructor. - - virtual ~CC_Repeat_Cmd(); - // Destructor. - - virtual int execute(void); - // Executes the command. - private: - int times_; - // The number of times the commands should be repeated -}; - -class CC_Wait_Cmd:public CC_Command - // = TITLE - // Defines a class for the wait command - // - // = DESCRIPTION - // This class represents the wait command. This command is used to make - // the script wait for the user to press return. It is possible to print - // different prompts, e.g. instructions. -{ - public: - CC_Wait_Cmd(char *prompt); - // Constructor. - - virtual ~CC_Wait_Cmd(); - // Destructor. - - virtual int execute(void); - // Executes the command. - - private: - char *prompt_; - // The prompt to print on the screen -}; - -class CC_Excep_Cmd: public CC_Command - // = TITLE - // Defines a class for the excep command - // - // = DESCRIPTION - // This class represents the excep command. This command is used to make - // the script capable of dealing with cases where an exception is raised - // as part of the testing. -{ - public: - CC_Excep_Cmd(char *excep); - // Constructor. - - virtual ~CC_Excep_Cmd(void); - // Destructor. - - virtual int execute(void); - // Executes the command. Checks to see if the excep_ class variable is set, - // and if that's the case check that it is of the expected type. If not the - // test fails. - - private: - char *ex_; - // The string representation of the expected exception -}; - -class CC_Dummy_Cmd: public CC_Command - // = TITLE - // Defines a class for the dummy command - // - // = DESCRIPTION - // This class represents the dummy command. This command is used to - // put in a command in the chain that does nothing. -{ - public: - CC_Dummy_Cmd(void); - // Constructor. - - virtual ~CC_Dummy_Cmd(void); - // Destructor. - - virtual int execute(void); - // Executes the command, i.e. does nothing. - - private: -}; - -class CC_Print_Cmd: public CC_Command - // = TITLE - // Defines a class for the print command - // - // = DESCRIPTION - // This class represents the print command. This command is used to - // print a message on stdout -{ - public: - CC_Print_Cmd(char *message); - // Constructor. - - virtual ~CC_Print_Cmd(void); - // Destructor. - - virtual int execute(void); - // Executes the command. - - private: - char *msg_; - // Holds the message to print -}; - -class CC_Lookup_Cmd:public CC_Command - // = TITLE - // Defines a class for the lookup command. - // - // = DESCRIPTION - // This class represents the lookup command. The lock set - // is looked up in the naming service and the class variable - // cc_lockset_ is set accordingly. -{ - public: - CC_Lookup_Cmd(char *lock_set_name); - // Constructor - - virtual ~CC_Lookup_Cmd(); - // Destructor - - virtual int execute(void); - // Executes the command, i.e. looks up the lock set with the requested - // name in the naming server and sets the cc_lockset_ variable. - - private: - char *name_; - // The name to look up in the naming service. - -}; - -class CC_CommandElem - // = TITLE - // Defines a class for a command element - // - // = DESCRIPTION - // This class implements a command element used in the command list - // below. The class is a simple tupple holding a pointer to the command - // and a pointer to the next element in the list. -{ - public: - CC_CommandElem(CC_Command *cmd, CC_CommandElem *next); - // Constructor. - - ~CC_CommandElem(void); - // Destructor. - - CC_Command *GetCommand(void); - // Returns a pointer to the command in this element - - CC_CommandElem *GetNext(void); - // Returns the pointer to the next element - - void SetNext(CC_CommandElem *next); - // Sets the next pointer - - private: - CC_CommandElem *next_; - // Pointer to the next element - - CC_Command *cmd_; - // Pointer to the command element -}; - -class CC_CommandList - // = TITLE - // Defines a class for a command list - // - // = DESCRIPTION - // This class implements a command list used from the script parser - // to store the parsed commands The class implements a simple single - // linked list. -{ - public: - CC_CommandList(void); - // Constructor. - - ~CC_CommandList(void); - // Destructor. - - int add(CC_Command *cmd); - // Adds the command to the list - - int execute(void); - // Executes all the commands in the list from head to tail - - void setrepeat(int times); - // Sets the number of times to repeat the script - - private: - CC_CommandElem *head_; - // The head of the command list - - CC_CommandElem *last_; - // The last inserted element - - int times_; - // The number of times the script should be repeated -}; - -#endif /* _CC_COMMAND_H_ */ diff --git a/TAO/orbsvcs/tests/Concurrency/CC_command.l b/TAO/orbsvcs/tests/Concurrency/CC_command.l deleted file mode 100644 index 57ff98ea222..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_command.l +++ /dev/null @@ -1,58 +0,0 @@ -/* $id$ - * ============================================================================ - * - * = LIBRARY - * TAO/orbsvcs/tests - * - * = FILENAME - * CC_command.l - * - * = DESCRIPTION - * This is the lex file for the concurrency service script language. - * - * = AUTHORS - * Torben Worm - * - * ============================================================================ - */ -%option noyywrap nounput noinput always-interactive -%{ -#include "CC_command.h" -#include "CC_command.tab.h" -#include "ace/ACE.h" - -extern int line_no; -extern char line_buf[500]; -%} - -%% - -; return T_TERM; -start return T_START_CMD; -create return T_CREATE_CMD; -lock return T_LOCK_CMD; -unlock return T_UNLOCK_CMD; -try_lock return T_TRYLOCK_CMD; -change_mode return T_CHANGEMODE_CMD; -sleep return T_SLEEP_CMD; -wait return T_WAIT_CMD; -print return T_PRINT_CMD; -repeat return T_REPEAT_CMD; -exception return T_EXCEP_CMD; -lookup return T_LOOKUP_CMD; -read return T_READ; -intention_read return T_IREAD; -upgrade return T_UPGRADE; -write return T_WRITE; -intention_write return T_IWRITE; -\".*\" { yylval.id = ACE_OS::strdup(&yytext[1]); - yylval.id[yyleng-2]='\0'; - return Q_STRING; } -[0-9]+ { yylval.num = atoi(yytext); return T_NUM; } -[A-Za-z][A-Za-z_0-9\.:/]* { yylval.id = ACE_OS::strdup(yytext); - return T_IDENT; } -^\/\/.*\n { } -[ ]+ { } -\n.* { line_no ++; - ACE_OS::strcpy(line_buf, yytext+1); - yyless(1); } diff --git a/TAO/orbsvcs/tests/Concurrency/CC_command.tab.cpp b/TAO/orbsvcs/tests/Concurrency/CC_command.tab.cpp deleted file mode 100644 index a2c608b30b0..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_command.tab.cpp +++ /dev/null @@ -1,697 +0,0 @@ -// $Id$ -#ifndef lint -char ace_cc_yysccsid[] = "@(#)yaccpar 1.4 (Berkeley) 02/25/90 \n\ - Modified 5/2/90 by J. Roskind to support graphic debugging modes"; -#endif -#line 19 "CC_command.y" -#include "CC_command.h" -#include "ace/ACE.h" -#include "orbsvcs/CosConcurrencyControlC.h" - -void ace_cc_yyerror (const char* s); -int ace_cc_yylex(void); - -extern int line_no; -extern char line_buf[500]; -extern char *ace_cc_yytext; -extern CC_CommandList *cmdlist; -#line 32 "CC_command.y" -typedef union { - CC_Command *command; - CosConcurrencyControl::lock_mode lock_mode; - char *id; - int num; -} ACE_CC_YYSTYPE; -#line 25 "CC_command.tab.cpp" -#define T_START_CMD 257 -#define T_CREATE_CMD 258 -#define T_LOCK_CMD 259 -#define T_UNLOCK_CMD 260 -#define T_TRYLOCK_CMD 261 -#define T_CHANGEMODE_CMD 262 -#define T_SLEEP_CMD 263 -#define T_WAIT_CMD 264 -#define T_REPEAT_CMD 265 -#define T_EXCEP_CMD 266 -#define T_PRINT_CMD 267 -#define T_LOOKUP_CMD 268 -#define T_TERM 269 -#define T_READ 270 -#define T_IREAD 271 -#define T_UPGRADE 272 -#define T_WRITE 273 -#define T_IWRITE 274 -#define T_IDENT 275 -#define Q_STRING 276 -#define T_NUM 277 -#define ACE_CC_YYERRCODE 256 -short ace_cc_yylhs[] = { -1, - 0, 0, 6, 6, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 3, 4, 5, 5, 5, 5, 5, -}; -short ace_cc_yylen[] = { 2, - 0, 1, 2, 1, 3, 3, 2, 4, 3, 4, - 3, 4, 3, 5, 4, 3, 2, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, -}; -short ace_cc_yydefred[] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 4, 0, 23, 0, 7, 24, 0, - 26, 27, 28, 29, 30, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 17, 0, 0, 25, 0, 0, - 0, 3, 5, 6, 0, 9, 0, 11, 0, 13, - 0, 0, 16, 18, 21, 22, 19, 20, 8, 10, - 12, 0, 15, 14, -}; -short ace_cc_yydgoto[] = { 13, - 14, 17, 20, 39, 27, 15, -}; -short ace_cc_yysindex[] = { -254, - -260, -239, -233, -233, -233, -233, -256, -249, -246, -252, - -244, -242, 0, 0, -254, 0, -235, 0, 0, -234, - 0, 0, 0, 0, 0, -222, -226, -222, -225, -222, - -224, -222, -222, -223, 0, -216, -215, 0, -214, -213, - -212, 0, 0, 0, -211, 0, -210, 0, -209, 0, - -222, -208, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -207, 0, 0, -}; -short ace_cc_yyrindex[] = { 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -}; -short ace_cc_yygindex[] = { 0, - 50, 0, 13, 0, -4, 0, -}; -#define ACE_CC_YYTABLESIZE 65 -short ace_cc_yytable[] = { 29, - 31, 33, 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 16, 26, 28, 30, 32, 35, - 34, 45, 38, 47, 41, 49, 36, 51, 52, 18, - 37, 40, 19, 43, 44, 19, 21, 22, 23, 24, - 25, 19, 46, 48, 50, 53, 62, 21, 22, 23, - 24, 25, 54, 55, 56, 57, 58, 59, 60, 61, - 63, 64, 1, 2, 42, -}; -short ace_cc_yycheck[] = { 4, - 5, 6, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 275, 3, 4, 5, 6, 269, - 277, 26, 275, 28, 12, 30, 276, 32, 33, 269, - 277, 276, 275, 269, 269, 275, 270, 271, 272, 273, - 274, 275, 269, 269, 269, 269, 51, 270, 271, 272, - 273, 274, 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 0, 0, 15, -}; -#define ACE_CC_YYFINAL 13 -#ifndef ACE_CC_YYDEBUG -#define ACE_CC_YYDEBUG 0 -#endif -#define ACE_CC_YYMAXTOKEN 277 -#if ACE_CC_YYDEBUG -char *ace_cc_yyname[] = { -"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"T_START_CMD","T_CREATE_CMD", -"T_LOCK_CMD","T_UNLOCK_CMD","T_TRYLOCK_CMD","T_CHANGEMODE_CMD","T_SLEEP_CMD", -"T_WAIT_CMD","T_REPEAT_CMD","T_EXCEP_CMD","T_PRINT_CMD","T_LOOKUP_CMD","T_TERM", -"T_READ","T_IREAD","T_UPGRADE","T_WRITE","T_IWRITE","T_IDENT","Q_STRING", -"T_NUM", -}; -char *ace_cc_yyrule[] = { -"$accept : start", -"start :", -"start : cmd_list", -"cmd_list : cmd_list cmd", -"cmd_list : cmd", -"cmd : T_START_CMD config_file_name T_TERM", -"cmd : T_CREATE_CMD lock_set_name T_TERM", -"cmd : T_CREATE_CMD T_TERM", -"cmd : T_LOCK_CMD lock_set_name lock_mode T_TERM", -"cmd : T_LOCK_CMD lock_mode T_TERM", -"cmd : T_UNLOCK_CMD lock_set_name lock_mode T_TERM", -"cmd : T_UNLOCK_CMD lock_mode T_TERM", -"cmd : T_TRYLOCK_CMD lock_set_name lock_mode T_TERM", -"cmd : T_TRYLOCK_CMD lock_mode T_TERM", -"cmd : T_CHANGEMODE_CMD lock_set_name lock_mode lock_mode T_TERM", -"cmd : T_CHANGEMODE_CMD lock_mode lock_mode T_TERM", -"cmd : T_SLEEP_CMD T_NUM T_TERM", -"cmd : T_WAIT_CMD T_TERM", -"cmd : T_WAIT_CMD Q_STRING T_TERM", -"cmd : T_PRINT_CMD Q_STRING T_TERM", -"cmd : T_LOOKUP_CMD lock_set_name T_TERM", -"cmd : T_REPEAT_CMD T_NUM T_TERM", -"cmd : T_EXCEP_CMD exception_name T_TERM", -"config_file_name : T_IDENT", -"lock_set_name : T_IDENT", -"exception_name : T_IDENT", -"lock_mode : T_READ", -"lock_mode : T_IREAD", -"lock_mode : T_UPGRADE", -"lock_mode : T_WRITE", -"lock_mode : T_IWRITE", -}; -#endif -#define ace_cc_yyclearin (ace_cc_yychar=(-1)) -#define ace_cc_yyerrok (ace_cc_yyerrflag=0) -#ifndef ACE_CC_YYSTACKSIZE -#ifdef ACE_CC_YYMAXDEPTH -#define ACE_CC_YYSTACKSIZE ACE_CC_YYMAXDEPTH -#else -#define ACE_CC_YYSTACKSIZE 300 -#endif -#endif -int ace_cc_yydebug; -int ace_cc_yynerrs; -int ace_cc_yyerrflag; -int ace_cc_yychar; -short *ace_cc_yyssp; -ACE_CC_YYSTYPE *ace_cc_yyvsp; -ACE_CC_YYSTYPE ace_cc_yyval; -ACE_CC_YYSTYPE ace_cc_yylval; -#define ace_cc_yystacksize ACE_CC_YYSTACKSIZE -short ace_cc_yyss[ACE_CC_YYSTACKSIZE]; -ACE_CC_YYSTYPE ace_cc_yyvs[ACE_CC_YYSTACKSIZE]; -#line 116 "CC_command.y" - -void -ace_cc_yyerror (const char *s) -{ - ACE_OS::printf ("%d: %s at %s in:\n%s\n", - line_no, - s, - ace_cc_yytext, - line_buf); - ACE_OS::exit (-1); -} -#line 195 "CC_command.tab.cpp" -#define ACE_CC_YYABORT goto ace_cc_yyabort -#define ACE_CC_YYACCEPT goto ace_cc_yyaccept -#define ACE_CC_YYERROR goto ace_cc_yyerrlab -#ifdef ACE_CC_YYDEBUG -#ifndef ACE_CC_YYDEBUG_LEXER_TEXT /* pointer to the text isolated by the lexer*/ -#define ACE_CC_YYDEBUG_LEXER_TEXT "ACE_CC_YYDEBUG_LEXER_TEXT not defined" -#endif -#ifndef ACE_CC_YYDEBUG_INDENT_STRING -#define ACE_CC_YYDEBUG_INDENT_STRING "| " -#endif -#ifndef ACE_CC_YYDEBUG_REDUCE_STRING -#define ACE_CC_YYDEBUG_REDUCE_STRING "+-------" -#endif -#ifndef ACE_CC_YYDEBUG_INDENT -#ifdef __cplusplus -void ACE_CC_YYDEBUG_INDENT(int ace_cc_yyindent) -#else -ACE_CC_YYDEBUG_INDENT(ace_cc_yyindent) -int ace_cc_yyindent; -#endif -{ - while(ace_cc_yyindent-- > 0) - printf("%s", ACE_CC_YYDEBUG_INDENT_STRING); -} -#endif /* ACE_CC_YYDEBUG_INDENT */ -#ifndef ACE_CC_YYDEBUG_REDUCE -#ifdef __cplusplus -void ACE_CC_YYDEBUG_REDUCE(int /* ace_cc_yynew_state */, - int /* ace_cc_yyrule_num */, - char *ace_cc_yyrule_string, - int ace_cc_yynew_indent, - int ace_cc_yyrhs_count) -#else -ACE_CC_YYDEBUG_REDUCE(ace_cc_yynew_state, ace_cc_yyrule_num, ace_cc_yyrule_string, ace_cc_yynew_indent, ace_cc_yyrhs_count) -int ace_cc_yynew_state; -int ace_cc_yyrule_num; -char * ace_cc_yyrule_string; -int ace_cc_yynew_indent; -int ace_cc_yyrhs_count; -#endif -{ - if (1 < ace_cc_yyrhs_count) - { /* draw the graphics for the reduction */ - ACE_CC_YYDEBUG_INDENT(ace_cc_yynew_indent); - while(1 < ace_cc_yyrhs_count--) - printf("%s", ACE_CC_YYDEBUG_REDUCE_STRING); - putchar('+'); /* left rotated L would look nice */ - putchar('\n'); - ACE_CC_YYDEBUG_INDENT(ace_cc_yynew_indent); - putchar('|'); /* down arrow would look nice */ - putchar('\n'); - } - ACE_CC_YYDEBUG_INDENT(ace_cc_yynew_indent); - /* Only print the resulting token name */ - while (*ace_cc_yyrule_string) - putchar(*ace_cc_yyrule_string++); - putchar('\n'); -} -#endif /* ACE_CC_YYDEBUG_REDUCE */ -#ifndef ACE_CC_YYDEBUG_SHIFT_LEXEME -#ifdef __cplusplus -void ACE_CC_YYDEBUG_SHIFT_LEXEME(int /* ace_cc_yyold_state */, - int /* ace_cc_yynew_state */, - char *ace_cc_yytoken_string, - int ace_cc_yynew_indent) -#else -ACE_CC_YYDEBUG_SHIFT_LEXEME(ace_cc_yyold_state, ace_cc_yynew_state, ace_cc_yytoken_string, ace_cc_yynew_indent) -int ace_cc_yyold_state; -int ace_cc_yynew_state; -char * ace_cc_yytoken_string; -int ace_cc_yynew_indent; -#endif -{ - ACE_CC_YYDEBUG_INDENT(ace_cc_yynew_indent); - printf("%s <-- `%s'\n", ace_cc_yytoken_string, ACE_CC_YYDEBUG_LEXER_TEXT); -} -#endif /* ACE_CC_YYDEBUG_SHIFT_LEXEME */ -#ifndef ACE_CC_YYDEBUG_LOOK_AHEAD -#ifdef __cplusplus -void ACE_CC_YYDEBUG_LOOK_AHEAD(int /* ace_cc_yynew_state */, - int ace_cc_yytoken_num, - char *ace_cc_yytoken_string, - int ace_cc_yyindent) -#else -ACE_CC_YYDEBUG_LOOK_AHEAD(ace_cc_yynew_state, ace_cc_yytoken_num, ace_cc_yytoken_string, ace_cc_yyindent) -int ace_cc_yynew_state; -int ace_cc_yytoken_num; -char * ace_cc_yytoken_string; -int ace_cc_yyindent; -#endif -{ - ACE_CC_YYDEBUG_INDENT(ace_cc_yyindent); - printf(" .... look ahead at %s `%s'\n", - ace_cc_yytoken_string, - (0 == ace_cc_yytoken_num)? "\0": ACE_CC_YYDEBUG_LEXER_TEXT); -} -#endif /* ACE_CC_YYDEBUG_LOOK_AHEAD */ -#ifndef ACE_CC_YYDEBUG_DISCARD_STATE -#ifdef __cplusplus -void ACE_CC_YYDEBUG_DISCARD_STATE(int /* ace_cc_yynew_state */, int ace_cc_yyindent) -#else -ACE_CC_YYDEBUG_DISCARD_STATE(ace_cc_yynew_state, ace_cc_yyindent) -int ace_cc_yynew_state; -int ace_cc_yyindent; -#endif -{ - if (0 < ace_cc_yyindent) - { /* draw the graphics for the reduction */ - ACE_CC_YYDEBUG_INDENT(ace_cc_yyindent-1); - printf("%s", ACE_CC_YYDEBUG_REDUCE_STRING); - putchar('+'); /* left rotated L would look nice */ - printf(" discarding state\n"); - ACE_CC_YYDEBUG_INDENT(ace_cc_yyindent-1); - putchar('|'); /* down arrow would look nice */ - putchar('\n'); - } - else - { - if (0 == ace_cc_yyindent) - printf("discarding state\n"); - else - printf("no more states to discard: parser will abort\n"); - } -} -#endif /* ACE_CC_YYDEBUG_DISCARD_STATE */ -#ifndef ACE_CC_YYDEBUG_DISCARD_TOKEN -#ifdef __cplusplus -void ACE_CC_YYDEBUG_DISCARD_TOKEN(int /* ace_cc_yynew_state */, - int /* ace_cc_yytoken_num */, - char *ace_cc_yytoken_string, - int ace_cc_yyindent) -#else -ACE_CC_YYDEBUG_DISCARD_TOKEN(ace_cc_yynew_state, ace_cc_yytoken_num, ace_cc_yytoken_string, ace_cc_yyindent) -int ace_cc_yynew_state; -int ace_cc_yytoken_num; -char * ace_cc_yytoken_string; -int ace_cc_yyindent; -#endif -{ - ACE_CC_YYDEBUG_INDENT(ace_cc_yyindent); - printf("discarding token %s\n", ace_cc_yytoken_string); -} -#endif /* ACE_CC_YYDEBUG_DISCARD_TOKEN */ -#ifndef ACE_CC_YYDEBUG_SHIFT_ERROR_LEXEME -#ifdef __cplusplus -void ACE_CC_YYDEBUG_SHIFT_ERROR_LEXEME(int /* ace_cc_yyold_state */, - int /* ace_cc_yynew_state */, - int ace_cc_yyindent) -#else -ACE_CC_YYDEBUG_SHIFT_ERROR_LEXEME(ace_cc_yyold_state, ace_cc_yynew_state, ace_cc_yyindent) -int ace_cc_yyold_state; -int ace_cc_yynew_state; -int ace_cc_yyindent; -#endif -{ - ACE_CC_YYDEBUG_INDENT(ace_cc_yyindent); - printf("error\n"); -} -#endif /* ACE_CC_YYDEBUG_SHIFT_ERROR_LEXEME */ -#endif /* ACE_CC_YYDEBUG */ -#ifdef __cplusplus -extern "C" { extern char *ace_foo(const char *); } -#endif -int -ace_cc_yyparse() -{ - register int ace_cc_yym, ace_cc_yyn, ace_cc_yystate; -#if ACE_CC_YYDEBUG - register char *ace_cc_yys; -#ifndef __cplusplus - extern char *ace_foo(); -#endif - - if (ace_cc_yys = ACE_OS::getenv("ACE_CC_YYDEBUG")) - { - ace_cc_yyn = *ace_cc_yys; - if (ace_cc_yyn >= '0' && ace_cc_yyn <= '9') - ace_cc_yydebug = ace_cc_yyn - '0'; - } -#endif - - ace_cc_yynerrs = 0; - ace_cc_yyerrflag = 0; - ace_cc_yychar = (-1); - - ace_cc_yyssp = ace_cc_yyss; - ace_cc_yyvsp = ace_cc_yyvs; - *ace_cc_yyssp = ace_cc_yystate = 0; - -ace_cc_yyloop: - if ((ace_cc_yyn = ace_cc_yydefred[ace_cc_yystate])) goto ace_cc_yyreduce; - if (ace_cc_yychar < 0) - { - if ((ace_cc_yychar = ace_cc_yylex()) < 0) ace_cc_yychar = 0; -#if ACE_CC_YYDEBUG - if (ace_cc_yydebug) - { - ace_cc_yys = 0; - if (ace_cc_yychar <= ACE_CC_YYMAXTOKEN) ace_cc_yys = ace_cc_yyname[ace_cc_yychar]; - if (!ace_cc_yys) ace_cc_yys = "illegal-symbol"; - if (5 < ace_cc_yydebug) - printf("ace_cc_yydebug: state %d, reading %d (%s)\n", ace_cc_yystate, - ace_cc_yychar, ace_cc_yys); - else - ACE_CC_YYDEBUG_LOOK_AHEAD(ace_cc_yystate, ace_cc_yychar, ace_cc_yys, ace_cc_yyssp-ace_cc_yyss); - } -#endif - } - if ((ace_cc_yyn = ace_cc_yysindex[ace_cc_yystate]) && (ace_cc_yyn += ace_cc_yychar) >= 0 && - ace_cc_yyn <= ACE_CC_YYTABLESIZE && ace_cc_yycheck[ace_cc_yyn] == ace_cc_yychar) - { -#if ACE_CC_YYDEBUG - if (ace_cc_yydebug) - if (5 < ace_cc_yydebug) - printf("ace_cc_yydebug: state %d, shifting to state %d\n", - ace_cc_yystate, ace_cc_yytable[ace_cc_yyn]); - else - ACE_CC_YYDEBUG_SHIFT_LEXEME(ace_cc_yystate, ace_cc_yytable[ace_cc_yyn], ace_cc_yys, ace_cc_yyssp-ace_cc_yyss); -#endif - if (ace_cc_yyssp >= ace_cc_yyss + ace_cc_yystacksize - 1) - { - goto ace_cc_yyoverflow; - } - *++ace_cc_yyssp = ace_cc_yystate = ace_cc_yytable[ace_cc_yyn]; - *++ace_cc_yyvsp = ace_cc_yylval; - ace_cc_yychar = (-1); - if (ace_cc_yyerrflag > 0) --ace_cc_yyerrflag; - goto ace_cc_yyloop; - } - if ((ace_cc_yyn = ace_cc_yyrindex[ace_cc_yystate]) && (ace_cc_yyn += ace_cc_yychar) >= 0 && - ace_cc_yyn <= ACE_CC_YYTABLESIZE && ace_cc_yycheck[ace_cc_yyn] == ace_cc_yychar) - { - ace_cc_yyn = ace_cc_yytable[ace_cc_yyn]; - goto ace_cc_yyreduce; - } - if (ace_cc_yyerrflag) goto ace_cc_yyinrecovery; -#ifdef lint - goto ace_cc_yynewerror; -#endif - - ace_cc_yyerror("syntax error"); -#ifdef lint - goto ace_cc_yyerrlab; -#endif - - ++ace_cc_yynerrs; -ace_cc_yyinrecovery: - if (ace_cc_yyerrflag < 3) - { - ace_cc_yyerrflag = 3; - for (;;) - { - if ((ace_cc_yyn = ace_cc_yysindex[*ace_cc_yyssp]) && (ace_cc_yyn += ACE_CC_YYERRCODE) >= 0 && - ace_cc_yyn <= ACE_CC_YYTABLESIZE && ace_cc_yycheck[ace_cc_yyn] == ACE_CC_YYERRCODE) - { -#if ACE_CC_YYDEBUG - if (ace_cc_yydebug) - if (5 < ace_cc_yydebug) - printf("ace_cc_yydebug: state %d, error recovery shifting\ - to state %d\n", *ace_cc_yyssp, ace_cc_yytable[ace_cc_yyn]); - else - ACE_CC_YYDEBUG_SHIFT_ERROR_LEXEME(*ace_cc_yyssp, ace_cc_yytable[ace_cc_yyn], ace_cc_yyssp-ace_cc_yyss); -#endif - if (ace_cc_yyssp >= ace_cc_yyss + ace_cc_yystacksize - 1) - { - goto ace_cc_yyoverflow; - } - *++ace_cc_yyssp = ace_cc_yystate = ace_cc_yytable[ace_cc_yyn]; - *++ace_cc_yyvsp = ace_cc_yylval; - goto ace_cc_yyloop; - } - else - { -#if ACE_CC_YYDEBUG - if (ace_cc_yydebug) - if (5 < ace_cc_yydebug) - printf("ace_cc_yydebug: error recovery discarding state %d\ -", - *ace_cc_yyssp); - else - ACE_CC_YYDEBUG_DISCARD_STATE(*ace_cc_yyssp, ace_cc_yyssp-ace_cc_yyss-1); -#endif - if (ace_cc_yyssp <= ace_cc_yyss) goto ace_cc_yyabort; - --ace_cc_yyssp; - --ace_cc_yyvsp; - } - } - } - else - { - if (ace_cc_yychar == 0) goto ace_cc_yyabort; -#if ACE_CC_YYDEBUG - if (ace_cc_yydebug) - { - ace_cc_yys = 0; - if (ace_cc_yychar <= ACE_CC_YYMAXTOKEN) ace_cc_yys = ace_cc_yyname[ace_cc_yychar]; - if (!ace_cc_yys) ace_cc_yys = "illegal-symbol"; - if (5 < ace_cc_yydebug) - printf("ace_cc_yydebug: state %d, error recovery discards token %d (%s)\n", - ace_cc_yystate, ace_cc_yychar, ace_cc_yys); - else - ACE_CC_YYDEBUG_DISCARD_TOKEN(ace_cc_yystate, ace_cc_yychar, ace_cc_yys, ace_cc_yyssp-ace_cc_yyss); - } -#endif - ace_cc_yychar = (-1); - goto ace_cc_yyloop; - } -ace_cc_yyreduce: - ace_cc_yym = ace_cc_yylen[ace_cc_yyn]; - ace_cc_yyval = ace_cc_yyvsp[1-ace_cc_yym]; -#if ACE_CC_YYDEBUG - if (ace_cc_yydebug) - if (5 < ace_cc_yydebug) - printf("ace_cc_yydebug: state %d, reducing by rule %d (%s)\n", - ace_cc_yystate, ace_cc_yyn, ace_cc_yyrule[ace_cc_yyn]); - else - ACE_CC_YYDEBUG_REDUCE(ace_cc_yystate, ace_cc_yyn, ace_cc_yyrule[ace_cc_yyn], ace_cc_yyssp-ace_cc_yyss-ace_cc_yym, ace_cc_yym); -#endif - switch (ace_cc_yyn) - { -case 2: -#line 52 "CC_command.y" -{ cmdlist->add(new CC_Sleep_Cmd(0)); - /* dummy to check exeption in the last command */ - if(cmdlist->execute()!=0) /*CC_FAIL*/ - { printf(" ** Test succeded!!\n"); } - else - { printf(" ** Test FAILED!!\n"); } } -break; -case 3: -#line 60 "CC_command.y" -{ cmdlist->add(ace_cc_yyvsp[0].command); } -break; -case 4: -#line 61 "CC_command.y" -{ cmdlist->add(ace_cc_yyvsp[0].command); } -break; -case 5: -#line 65 "CC_command.y" -{ ace_cc_yyval.command = new CC_Start_Cmd(ace_cc_yyvsp[-1].id); } -break; -case 6: -#line 67 "CC_command.y" -{ ace_cc_yyval.command = new CC_CreateLockSet_Cmd(ace_cc_yyvsp[-1].id); } -break; -case 7: -#line 69 "CC_command.y" -{ ace_cc_yyval.command = new CC_CreateLockSet_Cmd(""); } -break; -case 8: -#line 71 "CC_command.y" -{ ace_cc_yyval.command = new CC_Lock_Cmd(ace_cc_yyvsp[-2].id, ace_cc_yyvsp[-1].lock_mode); } -break; -case 9: -#line 73 "CC_command.y" -{ ace_cc_yyval.command = new CC_Lock_Cmd("", ace_cc_yyvsp[-1].lock_mode); } -break; -case 10: -#line 75 "CC_command.y" -{ ace_cc_yyval.command = new CC_UnLock_Cmd(ace_cc_yyvsp[-2].id, ace_cc_yyvsp[-1].lock_mode); } -break; -case 11: -#line 77 "CC_command.y" -{ ace_cc_yyval.command = new CC_UnLock_Cmd("", ace_cc_yyvsp[-1].lock_mode); } -break; -case 12: -#line 79 "CC_command.y" -{ ace_cc_yyval.command = new CC_TryLock_Cmd(ace_cc_yyvsp[-2].id, ace_cc_yyvsp[-1].lock_mode); } -break; -case 13: -#line 81 "CC_command.y" -{ ace_cc_yyval.command = new CC_TryLock_Cmd("", ace_cc_yyvsp[-1].lock_mode); } -break; -case 14: -#line 83 "CC_command.y" -{ ace_cc_yyval.command = new CC_ChangeMode_Cmd(ace_cc_yyvsp[-3].id, ace_cc_yyvsp[-2].lock_mode, ace_cc_yyvsp[-1].lock_mode); } -break; -case 15: -#line 85 "CC_command.y" -{ ace_cc_yyval.command = new CC_ChangeMode_Cmd("", ace_cc_yyvsp[-2].lock_mode, ace_cc_yyvsp[-1].lock_mode); } -break; -case 16: -#line 87 "CC_command.y" -{ ace_cc_yyval.command = new CC_Sleep_Cmd(ace_cc_yyvsp[-1].num); } -break; -case 17: -#line 89 "CC_command.y" -{ ace_cc_yyval.command = new CC_Wait_Cmd(""); } -break; -case 18: -#line 91 "CC_command.y" -{ ace_cc_yyval.command = new CC_Wait_Cmd(ace_cc_yyvsp[-1].id); } -break; -case 19: -#line 93 "CC_command.y" -{ ace_cc_yyval.command = new CC_Print_Cmd(ace_cc_yyvsp[-1].id); } -break; -case 20: -#line 95 "CC_command.y" -{ ace_cc_yyval.command = new CC_Lookup_Cmd(ace_cc_yyvsp[-1].id); } -break; -case 21: -#line 97 "CC_command.y" -{ cmdlist->setrepeat(ace_cc_yyvsp[-1].num); - ace_cc_yyval.command = new CC_Dummy_Cmd();} -break; -case 22: -#line 100 "CC_command.y" -{ ace_cc_yyval.command = new CC_Excep_Cmd(ace_cc_yyvsp[-1].id); } -break; -case 23: -#line 103 "CC_command.y" -{ace_cc_yyval.id = ace_cc_yyvsp[0].id; } -break; -case 24: -#line 105 "CC_command.y" -{ace_cc_yyval.id = ace_cc_yyvsp[0].id; } -break; -case 25: -#line 107 "CC_command.y" -{ace_cc_yyval.id = ace_cc_yyvsp[0].id; } -break; -case 26: -#line 109 "CC_command.y" -{ ace_cc_yyval.lock_mode = CosConcurrencyControl::read; } -break; -case 27: -#line 110 "CC_command.y" -{ ace_cc_yyval.lock_mode = CosConcurrencyControl::intention_read; } -break; -case 28: -#line 111 "CC_command.y" -{ ace_cc_yyval.lock_mode = CosConcurrencyControl::upgrade; } -break; -case 29: -#line 112 "CC_command.y" -{ ace_cc_yyval.lock_mode = CosConcurrencyControl::write; } -break; -case 30: -#line 113 "CC_command.y" -{ ace_cc_yyval.lock_mode = CosConcurrencyControl::intention_write; } -break; -#line 622 "CC_command.tab.cpp" - } - ace_cc_yyssp -= ace_cc_yym; - ace_cc_yystate = *ace_cc_yyssp; - ace_cc_yyvsp -= ace_cc_yym; - ace_cc_yym = ace_cc_yylhs[ace_cc_yyn]; - if (ace_cc_yystate == 0 && ace_cc_yym == 0) - { -#ifdef ACE_CC_YYDEBUG - if (5 < ace_cc_yydebug) - printf("ace_cc_yydebug: after reduction, shifting from state 0 to\ - state %d\n", ACE_CC_YYFINAL); -#endif - ace_cc_yystate = ACE_CC_YYFINAL; - *++ace_cc_yyssp = ACE_CC_YYFINAL; - *++ace_cc_yyvsp = ace_cc_yyval; - if (ace_cc_yychar < 0) - { - if ((ace_cc_yychar = ace_cc_yylex()) < 0) ace_cc_yychar = 0; -#if ACE_CC_YYDEBUG - if (ace_cc_yydebug) - { - ace_cc_yys = 0; - if (ace_cc_yychar <= ACE_CC_YYMAXTOKEN) ace_cc_yys = ace_cc_yyname[ace_cc_yychar]; - if (!ace_cc_yys) ace_cc_yys = "illegal-symbol"; - if (5 < ace_cc_yydebug) - printf("ace_cc_yydebug: state %d, reading %d (%s)\n", - ACE_CC_YYFINAL, ace_cc_yychar, ace_cc_yys); - else - ACE_CC_YYDEBUG_LOOK_AHEAD(ACE_CC_YYFINAL, ace_cc_yychar, ace_cc_yys, ace_cc_yyssp-ace_cc_yyss); - } -#endif - } - if (ace_cc_yychar == 0) goto ace_cc_yyaccept; - goto ace_cc_yyloop; - } - if ((ace_cc_yyn = ace_cc_yygindex[ace_cc_yym]) && (ace_cc_yyn += ace_cc_yystate) >= 0 && - ace_cc_yyn <= ACE_CC_YYTABLESIZE && ace_cc_yycheck[ace_cc_yyn] == ace_cc_yystate) - ace_cc_yystate = ace_cc_yytable[ace_cc_yyn]; - else - ace_cc_yystate = ace_cc_yydgoto[ace_cc_yym]; -#ifdef ACE_CC_YYDEBUG - if (5 < ace_cc_yydebug) - printf("ace_cc_yydebug: after reduction, shifting from state %d \ -to state %d\n", *ace_cc_yyssp, ace_cc_yystate); -#endif - if (ace_cc_yyssp >= ace_cc_yyss + ace_cc_yystacksize - 1) - { - goto ace_cc_yyoverflow; - } - *++ace_cc_yyssp = ace_cc_yystate; - *++ace_cc_yyvsp = ace_cc_yyval; - goto ace_cc_yyloop; -ace_cc_yyoverflow: - ace_cc_yyerror("yacc stack overflow"); -ace_cc_yyabort: - return (1); -ace_cc_yyaccept: - return (0); -} diff --git a/TAO/orbsvcs/tests/Concurrency/CC_command.tab.cpp.diff b/TAO/orbsvcs/tests/Concurrency/CC_command.tab.cpp.diff deleted file mode 100644 index 1106e37cff4..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_command.tab.cpp.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- CC_command.tab.cpp.orig Thu Jul 30 13:30:26 1998 -+++ CC_command.tab.cpp Mon Aug 17 11:06:24 1998 -@@ -1,3 +1,4 @@ -+// $Id$ - #ifndef lint - char ace_cc_yysccsid[] = "@(#)yaccpar 1.4 (Berkeley) 02/25/90 \n\ - Modified 5/2/90 by J. Roskind to support graphic debugging modes"; -@@ -367,7 +368,7 @@ - *ace_cc_yyssp = ace_cc_yystate = 0; - - ace_cc_yyloop: -- if (ace_cc_yyn = ace_cc_yydefred[ace_cc_yystate]) goto ace_cc_yyreduce; -+ if ((ace_cc_yyn = ace_cc_yydefred[ace_cc_yystate])) goto ace_cc_yyreduce; - if (ace_cc_yychar < 0) - { - if ((ace_cc_yychar = ace_cc_yylex()) < 0) ace_cc_yychar = 0; -@@ -421,7 +422,7 @@ - #ifdef lint - goto ace_cc_yyerrlab; - #endif --ace_cc_yyerrlab: -+ - ++ace_cc_yynerrs; - ace_cc_yyinrecovery: - if (ace_cc_yyerrflag < 3) diff --git a/TAO/orbsvcs/tests/Concurrency/CC_command.tab.h b/TAO/orbsvcs/tests/Concurrency/CC_command.tab.h deleted file mode 100644 index 31c03ff7ffc..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_command.tab.h +++ /dev/null @@ -1,29 +0,0 @@ -// $Id$ -#define T_START_CMD 257 -#define T_CREATE_CMD 258 -#define T_LOCK_CMD 259 -#define T_UNLOCK_CMD 260 -#define T_TRYLOCK_CMD 261 -#define T_CHANGEMODE_CMD 262 -#define T_SLEEP_CMD 263 -#define T_WAIT_CMD 264 -#define T_REPEAT_CMD 265 -#define T_EXCEP_CMD 266 -#define T_PRINT_CMD 267 -#define T_LOOKUP_CMD 268 -#define T_TERM 269 -#define T_READ 270 -#define T_IREAD 271 -#define T_UPGRADE 272 -#define T_WRITE 273 -#define T_IWRITE 274 -#define T_IDENT 275 -#define Q_STRING 276 -#define T_NUM 277 -typedef union { - CC_Command *command; - CosConcurrencyControl::lock_mode lock_mode; - char *id; - int num; -} ACE_CC_YYSTYPE; -extern ACE_CC_YYSTYPE ace_cc_yylval; diff --git a/TAO/orbsvcs/tests/Concurrency/CC_command.y b/TAO/orbsvcs/tests/Concurrency/CC_command.y deleted file mode 100644 index 339c8e47084..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_command.y +++ /dev/null @@ -1,126 +0,0 @@ -/* $Id$ - * ============================================================================ - * - * = LIBRARY - * TAO/orbsvcs/tests - * - * = FILENAME - * CC_command.y - * - * = DESCRIPTION - * This is the yacc file for the concurrency service script language. - * - * = AUTHORS - * Torben Worm - * - * ============================================================================ - */ -%{ -#include "CC_command.h" -#include "ace/ACE.h" -#include "orbsvcs/CosConcurrencyControlC.h" - -void yyerror (const char* s); -int yylex(void); - -extern int line_no; -extern char line_buf[500]; -extern char *yytext; -extern CC_CommandList *cmdlist; -%} - -%union { - CC_Command *command; - CosConcurrencyControl::lock_mode lock_mode; - char *id; - int num; -} - -%token T_START_CMD T_CREATE_CMD T_LOCK_CMD T_UNLOCK_CMD T_TRYLOCK_CMD -%token T_CHANGEMODE_CMD T_SLEEP_CMD T_WAIT_CMD T_REPEAT_CMD T_EXCEP_CMD -%token T_PRINT_CMD T_LOOKUP_CMD T_TERM -%token T_READ T_IREAD T_UPGRADE T_WRITE T_IWRITE -%token T_IDENT Q_STRING -%token T_NUM - -%type cmd -%type config_file_name lock_set_name exception_name -%type lock_mode - -%% -start: /* empty */ - | cmd_list { cmdlist->add(new CC_Sleep_Cmd(0)); - /* dummy to check exeption in the last command */ - if(cmdlist->execute()!=0) //CC_FAIL - { printf(" ** Test succeded!!\n"); } - else - { printf(" ** Test FAILED!!\n"); } } - ; - -cmd_list: cmd_list cmd { cmdlist->add($2); } - | cmd { cmdlist->add($1); } - ; - -cmd: T_START_CMD config_file_name T_TERM - { $$ = new CC_Start_Cmd($2); } - | T_CREATE_CMD lock_set_name T_TERM - { $$ = new CC_CreateLockSet_Cmd($2); } - | T_CREATE_CMD T_TERM - { $$ = new CC_CreateLockSet_Cmd(""); } - | T_LOCK_CMD lock_set_name lock_mode T_TERM - { $$ = new CC_Lock_Cmd($2, $3); } - | T_LOCK_CMD lock_mode T_TERM - { $$ = new CC_Lock_Cmd("", $2); } - | T_UNLOCK_CMD lock_set_name lock_mode T_TERM - { $$ = new CC_UnLock_Cmd($2, $3); } - | T_UNLOCK_CMD lock_mode T_TERM - { $$ = new CC_UnLock_Cmd("", $2); } - | T_TRYLOCK_CMD lock_set_name lock_mode T_TERM - { $$ = new CC_TryLock_Cmd($2, $3); } - | T_TRYLOCK_CMD lock_mode T_TERM - { $$ = new CC_TryLock_Cmd("", $2); } - | T_CHANGEMODE_CMD lock_set_name lock_mode lock_mode T_TERM - { $$ = new CC_ChangeMode_Cmd($2, $3, $4); } - | T_CHANGEMODE_CMD lock_mode lock_mode T_TERM - { $$ = new CC_ChangeMode_Cmd("", $2, $3); } - | T_SLEEP_CMD T_NUM T_TERM - { $$ = new CC_Sleep_Cmd($2); } - | T_WAIT_CMD T_TERM - { $$ = new CC_Wait_Cmd(""); } - | T_WAIT_CMD Q_STRING T_TERM - { $$ = new CC_Wait_Cmd($2); } - | T_PRINT_CMD Q_STRING T_TERM - { $$ = new CC_Print_Cmd($2); } - | T_LOOKUP_CMD lock_set_name T_TERM - { $$ = new CC_Lookup_Cmd($2); } - | T_REPEAT_CMD T_NUM T_TERM - { cmdlist->setrepeat($2); - $$ = new CC_Dummy_Cmd();} - | T_EXCEP_CMD exception_name T_TERM - { $$ = new CC_Excep_Cmd($2); } - ; - -config_file_name: T_IDENT {$$ = $1; } - -lock_set_name: T_IDENT {$$ = $1; } - -exception_name: T_IDENT {$$ = $1; } - -lock_mode: T_READ { $$ = CosConcurrencyControl::read; } - | T_IREAD { $$ = CosConcurrencyControl::intention_read; } - | T_UPGRADE { $$ = CosConcurrencyControl::upgrade; } - | T_WRITE { $$ = CosConcurrencyControl::write; } - | T_IWRITE { $$ = CosConcurrencyControl::intention_write; } - -%% - -void -yyerror (const char *s) -{ - ACE_OS::printf ("%d: %s at %s in:\n%s\n", - line_no, - s, - yytext, - line_buf); - ACE_OS::exit (-1); -} diff --git a/TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp b/TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp deleted file mode 100644 index f0d9a7ff46e..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp +++ /dev/null @@ -1,174 +0,0 @@ -// $Id - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Concurrency -// -// = FILENAME -// CC_naming_service.cpp -// -// = DESCRIPTION -// This class implements the naming services necessary to test the -// concurrency service -// -// = AUTHORS -// Torben Worm -// -// ============================================================================ - -#include "CC_naming_service.h" - -ACE_RCSID(Concurrency, CC_naming_service, "$Id$") - - CC_naming_service::CC_naming_service (CORBA::ORB_var orb, CORBA::Environment &TAO_IN_ENV) - : cc_factory_key_ (0), - orb_ (0), - factory_ (0) -{ - this->Init(orb, TAO_IN_ENV); - instance_ = this; -} - -CC_naming_service::CC_naming_service(void) - : cc_factory_key_ (0), - orb_ (0), - factory_ (0) -{ -} - -void -CC_naming_service::Init(CORBA::ORB_var orb, CORBA::Environment &TAO_IN_ENV) -{ - this->orb_ = orb; - - int success = init_naming_service (); - if(success<0) - TAO_THROW (CORBA::INTERNAL (CORBA::COMPLETED_NO)); -} - -CC_naming_service::~CC_naming_service (void) -{ - // if(instance_!=0) - // delete instance_; - // @TAO somthing went wrong when these lines were uncommented -} - -CC_naming_service * -CC_naming_service::Instance(void) -{ - if(instance_ == 0) - { - instance_ = new CC_naming_service(); - } - return instance_; -} - -CORBA::Object_var -CC_naming_service::get_obj_from_name (char *c_name, char *name, - CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, "C: %s, N: %s\n", c_name, name)); - CORBA::Object_var obj; - - TAO_TRY - { - if (ACE_OS::strlen (c_name) == 0) - { - CosNaming::Name ns_name (1); - ns_name.length (1); - ns_name[0].id = CORBA::string_dup (name); - obj = my_name_client_->resolve (ns_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - else - { - CosNaming::Name ns_name (2); - ns_name.length (2); - ns_name[0].id = CORBA::string_dup (c_name); - ns_name[1].id = CORBA::string_dup (name); - obj = my_name_client_->resolve (ns_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - if (CORBA::is_nil (obj.in ()) ) - ACE_DEBUG((LM_DEBUG, - "OBJ was nill (aieee)\n")); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_Client::get_obj_from_name (...)"); - return 0; - } - TAO_ENDTRY; - - return obj; -} - -void -CC_naming_service::bind_name (char *n, - CORBA::Object_ptr obj, - CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, "CC_Client::bind_name\n")); - - TAO_TRY - { - CosNaming::Name ns_name (1); - ns_name.length (1); - ns_name[0].id = CORBA::string_dup (n); - my_name_client_->bind (ns_name, - obj, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_Client::bind_name (...)"); - } - TAO_ENDTRY; -} - -CosConcurrencyControl::LockSetFactory_var -CC_naming_service::get_lock_set_factory (void) -{ - return this->factory_; -} - -int -CC_naming_service::init_naming_service (void) -{ - TAO_TRY - { - // Initialize the naming services - if (my_name_client_.init (orb_.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - CORBA::Object_var factory_obj = get_obj_from_name ("CosConcurrency", - "LockSetFactory", - TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->factory_ = - CosConcurrencyControl::LockSetFactory::_narrow - (factory_obj.in (),TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (this->factory_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " could not resolve lock set factory in Naming service\n"), - -1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_Client::init_naming_service"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -CC_naming_service* CC_naming_service::instance_ = 0; diff --git a/TAO/orbsvcs/tests/Concurrency/CC_naming_service.h b/TAO/orbsvcs/tests/Concurrency/CC_naming_service.h deleted file mode 100644 index 4f247f92c51..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_naming_service.h +++ /dev/null @@ -1,87 +0,0 @@ -// -*- c++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Concurrency -// -// = FILENAME -// CC_naming_service.h -// -// = DESCRIPTION -// This class implements the naming services necessary to test the -// concurrency service. -// -// = AUTHORS -// Torben Worm -// -// ============================================================================ - -#include "tao/corba.h" -#include "orbsvcs/CosConcurrencyControlC.h" -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -#ifndef _CC_NAMING_SERVICE_H_ -#define _CC_NAMING_SERVICE_H_ - -class CC_naming_service -{ - // = TITLE - // Defines a class that encapsulates the necessary naming service - // functions for the concurrency service. - // - // = DESCRIPTION - // This class declares an interface to the naming service for the - // concurrency service tests. -public: - CC_naming_service (); - // Default constructor - - CC_naming_service (CORBA::ORB_var orb_, CORBA::Environment &_env); - // Constructor - - ~CC_naming_service (void); - // Default destructor. - - void Init (CORBA::ORB_var orb_, CORBA::Environment &_env); - // Initialization method must be called after first call of Instance() - // in order to initialize the object correctly - - CORBA::Object_var get_obj_from_name (char *c_name, char *name, - CORBA::Environment &_env); - // Lookup a name in the naming service (context, name) - - void - bind_name (char *n, - CORBA::Object_ptr obj, - CORBA::Environment &_env); - // Bind a name in the concurrency context. - - CosConcurrencyControl::LockSetFactory_var get_lock_set_factory (void); - // Gets the cc lock set factory which is common for all tests. - - static CC_naming_service *Instance(void); - // The naming service object is a singleton - -private: - int init_naming_service (void); - // Function to initialize the naming service. - - char *cc_factory_key_; - // Key of factory obj ref. - - CORBA::ORB_var orb_; - // Remember our orb. - - TAO_Naming_Client my_name_client_; - // Name service wrapper class - - CosConcurrencyControl::LockSetFactory_var factory_; - // factory pointer for the lock set. - - static CC_naming_service *instance_; - // The instance of the naming service object -}; -#endif /* !defined (_CC_NAMING_SERVICE_H_) */ diff --git a/TAO/orbsvcs/tests/Concurrency/CC_test_utils.cpp b/TAO/orbsvcs/tests/Concurrency/CC_test_utils.cpp deleted file mode 100644 index 29945879d82..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_test_utils.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests -// -// = FILENAME -// CC_test_utils.cpp -// -// = DESCRIPTION -// This class provides a namespace for utility functions for the -// concurrency service test. -// -// = AUTHORS -// Torben Worm -// -// ============================================================================ - -#include "CC_test_utils.h" -#include "CC_naming_service.h" - -ACE_RCSID(Concurrency, CC_test_utils, "$Id$") - -char *CC_TestUtils::get_lock_mode_name (CosConcurrencyControl::lock_mode mode) -{ - if (mode==CosConcurrencyControl::read) - return "read"; - - if (mode==CosConcurrencyControl::write) - return "write"; - - if (mode==CosConcurrencyControl::upgrade) - return "upgrade"; - - if (mode==CosConcurrencyControl::intention_read) - return "intention_read"; - - if (mode==CosConcurrencyControl::intention_write) - return "intention_write"; - - return "unknown lock mode"; -} - -CosConcurrencyControl::LockSet_ptr -CC_TestUtils::create_lock_set (void) -{ - // Create the lock set and return an obj ref corresponding to the - // key. - CosConcurrencyControl::LockSet_ptr lock_set(0); - - TAO_TRY - { - lock_set = - CC_naming_service::Instance()->get_lock_set_factory ()->create (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (lock_set)) - ACE_ERROR_RETURN ((LM_ERROR, - "null lock set objref returned by factory\n"), - 0); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_Client::create_lock_set"); - return 0; - } - TAO_ENDTRY; - return lock_set; -} diff --git a/TAO/orbsvcs/tests/Concurrency/CC_test_utils.h b/TAO/orbsvcs/tests/Concurrency/CC_test_utils.h deleted file mode 100644 index 4c1a643f863..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_test_utils.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests -// -// = FILENAME -// CC_test_utils.h -// -// = DESCRIPTION -// This class provides a namespace for utility functions for the -// concurrency service test. -// -// = AUTHORS -// Torben Worm -// -// ============================================================================ - -#include "orbsvcs/CosConcurrencyControlC.h" - -#ifndef _CC_TEST_UTILS_H_ -#define _CC_TEST_UTILS_H_ - -class CC_TestUtils -{ - public: - static char *get_lock_mode_name (CosConcurrencyControl::lock_mode mode); - // Function to return a human readable string from a lock_mode enum. - - static CosConcurrencyControl::LockSet_ptr create_lock_set (void); - // Creates a lock set by means of th lock set factory in the concurrency - // service server. - private: -}; - -#endif /* _CC_TEST_UTILS_H_ */ diff --git a/TAO/orbsvcs/tests/Concurrency/CC_tests.cpp b/TAO/orbsvcs/tests/Concurrency/CC_tests.cpp deleted file mode 100644 index 51559e3e385..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_tests.cpp +++ /dev/null @@ -1,373 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Concurrency -// -// = FILENAME -// CC_tests.h -// -// = DESCRIPTION -// This class implements a number of test objects to test the -// concurrency service. -// -// = AUTHORS -// Torben Worm -// -// ============================================================================ - -#include "CC_tests.h" - -ACE_RCSID(Concurrency, CC_tests, "$Id$") - -CC_Test::CC_Test (CC_naming_service *ns) - : result (CC_FAIL), - naming_service_ (ns) -{ -} - -CC_Test::~CC_Test (void) -{ -} - -CosConcurrencyControl::LockSet_ptr -CC_Test::create_lock_set (void) -{ - // Create the lock set and return an obj ref corresponding to the - // key. - CosConcurrencyControl::LockSet_ptr lock_set(0); - - TAO_TRY - { - lock_set = - this->naming_service_->get_lock_set_factory ()->create (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (lock_set)) - ACE_ERROR_RETURN ((LM_ERROR, - "null lock set objref returned by factory\n"), - 0); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("CC_Client::create_lock_set"); - return 0; - } - TAO_ENDTRY; - return lock_set; -} - -char * -CC_Test::get_lock_mode_name (CosConcurrencyControl::lock_mode mode) -{ - if (mode==CosConcurrencyControl::read) - return "read"; - - if (mode==CosConcurrencyControl::write) - return "write"; - - if (mode==CosConcurrencyControl::upgrade) - return "upgrade"; - - if (mode==CosConcurrencyControl::intention_read) - return "intension_read"; - - if (mode==CosConcurrencyControl::intention_write) - return "intension_write"; - - return "unknown lock mode"; -} - -// ================================ -// Here the tests start. - -Test_Single_Lock_With_Mode::Test_Single_Lock_With_Mode (CC_naming_service *naming_service, - CosConcurrencyControl::lock_mode mode) - : CC_Test (naming_service), - mode_ (mode) -{ -} - -Test_Single_Lock_With_Mode::~Test_Single_Lock_With_Mode (void) -{ -} - -int -Test_Single_Lock_With_Mode::run (int /* times_to_run */) -{ - CORBA::Boolean lock_not_held; - - CosConcurrencyControl::LockSet_ptr cc_lock_set_ = create_lock_set (); - - TAO_TRY - { - cc_lock_set_->lock (mode_, TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, - "%s lock set\n", - get_lock_mode_name (mode_))); - - lock_not_held = cc_lock_set_->try_lock (mode_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (lock_not_held) - { - ACE_DEBUG ((LM_DEBUG, - "%s lock not held\n", - get_lock_mode_name (mode_))); - return CC_FAIL; - } - else - ACE_DEBUG ((LM_DEBUG, - "%s lock held\n", - get_lock_mode_name (mode_))); - - cc_lock_set_->unlock (mode_, - TAO_TRY_ENV); - ACE_DEBUG ((LM_DEBUG, - "%s lock released\n", - get_lock_mode_name (mode_))); - - lock_not_held = cc_lock_set_->try_lock (mode_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (lock_not_held) - ACE_DEBUG ((LM_DEBUG, - "%s lock not held\n", - get_lock_mode_name (mode_))); - else - { - ACE_DEBUG ((LM_DEBUG, - "%s lock held\n", - get_lock_mode_name (mode_))); - return CC_FAIL; - } - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Test_Single_Lock_With_Mode::run"); - return CC_FAIL; - } - TAO_ENDTRY; - - CORBA::release (cc_lock_set_); - - return CC_SUCCESS; -} - -// ================================ - -Test_Setup_LockSet::Test_Setup_LockSet (CC_naming_service *naming_service, - char *name) - : CC_Test (naming_service), - my_name_ (name) -{ -} - -Test_Setup_LockSet::~Test_Setup_LockSet (void) -{ -} - -int -Test_Setup_LockSet::run (int /* times_to_run */) -{ - TAO_TRY - { - CosConcurrencyControl::LockSet_ptr cc_lock_set_ = - create_lock_set (); - this->naming_service_->bind_name (my_name_, cc_lock_set_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, - "Name bound\n")); - - cc_lock_set_->lock (CosConcurrencyControl::read, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, - "Read lock set\n")); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Test_Against_Other_LockSet::run"); - return CC_FAIL; - } - TAO_ENDTRY; - - return CC_SUCCESS; -} - -// ================================ - -Test_Use_Already_Created_LockSet:: -Test_Use_Already_Created_LockSet (CC_naming_service *naming_service, - char *name) - : CC_Test (naming_service), - my_name_ (name) -{ -} - -Test_Use_Already_Created_LockSet::~Test_Use_Already_Created_LockSet (void) -{ -} - -int -Test_Use_Already_Created_LockSet::run (int /* times_to_run */) -{ - TAO_TRY - { - CORBA::Object_var ccls_obj = - this->naming_service_->get_obj_from_name ("", - my_name_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - CosConcurrencyControl::LockSet_var ccls = - CosConcurrencyControl::LockSet::_narrow (ccls_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ccls->lock (CosConcurrencyControl::read, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Test_Against_Other_LockSet::run"); - return CC_FAIL; - } - TAO_ENDTRY; - - return CC_SUCCESS; -} - -// ================================ - -Test_Unlock_Already_Created_LockSet:: -Test_Unlock_Already_Created_LockSet (CC_naming_service *naming_service, - char *name) - : CC_Test (naming_service), - my_name_ (name) -{ -} - -Test_Unlock_Already_Created_LockSet::~Test_Unlock_Already_Created_LockSet (void) -{ -} - -int -Test_Unlock_Already_Created_LockSet::run (int /* times_to_run */) -{ - TAO_TRY - { - CORBA::Object_var ccls_obj = - this->naming_service_->get_obj_from_name ("", my_name_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - CosConcurrencyControl::LockSet_var ccls = - CosConcurrencyControl::LockSet::_narrow (ccls_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ccls->unlock (CosConcurrencyControl::read, - TAO_TRY_ENV); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Test_Unlock_Already_Created_LockSet::run"); - return CC_FAIL; - } - TAO_ENDTRY; - - return CC_SUCCESS; -} - -// ================================ - -Test_Release_Not_Held_Lock::Test_Release_Not_Held_Lock (CC_naming_service *naming_service, - CosConcurrencyControl::lock_mode mode) - : CC_Test (naming_service), - mode_ (mode) -{ -} - -Test_Release_Not_Held_Lock::~Test_Release_Not_Held_Lock (void) -{ -} - -int -Test_Release_Not_Held_Lock::run (int /* times_to_run */) -{ - CORBA::Boolean lock_not_held; - - // Create the lock set - CosConcurrencyControl::LockSet_ptr cc_lock_set_ = create_lock_set (); - - TAO_TRY - { - // lock the lock - cc_lock_set_->lock (mode_, TAO_TRY_ENV); - ACE_DEBUG ((LM_DEBUG, - "%s lock set\n", - get_lock_mode_name (mode_))); - - // check to see if the lock is held - lock_not_held = cc_lock_set_->try_lock (mode_, - TAO_TRY_ENV); - - if (lock_not_held) - { - ACE_DEBUG ((LM_DEBUG, - "%s lock not held\n", - get_lock_mode_name (mode_))); - return CC_FAIL; - } - else - ACE_DEBUG ((LM_DEBUG, - "%s lock held\n", - get_lock_mode_name (mode_))); - - // release the lock - cc_lock_set_->unlock (mode_, - TAO_TRY_ENV); - ACE_DEBUG ((LM_DEBUG, - "%s lock released\n", - get_lock_mode_name (mode_))); - - // release the lock again. this should raise an exception - cc_lock_set_->unlock (mode_, - TAO_TRY_ENV); - - ACE_DEBUG ((LM_DEBUG, - "attemptet to release %s lock\n", - get_lock_mode_name (mode_))); - - TAO_CHECK_ENV; - } - TAO_CATCH(CosConcurrencyControl::LockNotHeld, userex) - { - // We should end here - ACE_UNUSED_ARG (userex); - ACE_DEBUG((LM_DEBUG, "CosConcurrencyControl::LockNotHeld\n")); - return CC_SUCCESS; - } - - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Test_Release_Not_Held_Lock::run"); - return CC_FAIL; - } - TAO_ENDTRY; - - CORBA::release (cc_lock_set_); - - return CC_FAIL; -} diff --git a/TAO/orbsvcs/tests/Concurrency/CC_tests.h b/TAO/orbsvcs/tests/Concurrency/CC_tests.h deleted file mode 100644 index 086ea0766b1..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/CC_tests.h +++ /dev/null @@ -1,184 +0,0 @@ -// -*- c++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/Concurrency -// -// = FILENAME -// CC_tests.h -// -// = DESCRIPTION -// This class implements a number of test objects to test the -// concurrency service. -// -// = AUTHORS -// Torben Worm -// -// ============================================================================ - -#include "tao/corba.h" -#include "orbsvcs/CosConcurrencyControlC.h" -#include "orbsvcs/CosNamingC.h" -#include "CC_naming_service.h" - -#ifndef _CC_TESTS_H_ -#define _CC_TESTS_H_ - -// Return codes for the tests -enum -{ - CC_FAIL, - CC_SUCCESS = 1 -}; - -class CC_Test -{ - // = TITLE - // Defines an abstract base class for a test - // - // = DESCRIPTION - // This class declares an interface to run the test of the - // concurrency service. -public: - CC_Test (CC_naming_service *ns); - // Default constructor - - virtual ~CC_Test (void); - // Destructor - - virtual int run (int times_to_run = 1) = 0; - // Run the test times_to_run number of times. Returns CC_SUCCESS on - // success CC_FAIL otherwise. - - CosConcurrencyControl::LockSet_ptr create_lock_set (void); - // Create a new lock set using the default global lock set factory - // from the naming service. - - char *get_lock_mode_name (CosConcurrencyControl::lock_mode mode); - // Returns a human readable string from the lock mode enum. - -protected: - int result; - // The result of the test being performed. - - CC_naming_service *naming_service_; - // The naming service beeing used to register and look up locks -}; - -class Test_Single_Lock_With_Mode : public CC_Test -{ - // = TITLE - // This is a simple test that checks that it is possible to set - // the lock in the desired mode, try it, and release it. -public: - Test_Single_Lock_With_Mode (CC_naming_service *naming_service, - CosConcurrencyControl::lock_mode mode); - // Default constructor. The naming service must be initialized - // before calling this method. The mode is the mode of the lock to - // be tested. - - virtual ~Test_Single_Lock_With_Mode (void); - // Destructor - - virtual int run (int times_to_run = 1); - // Runs the test the specified number of times. - -private: - CosConcurrencyControl::lock_mode mode_; - // The lock mode of the lock being tested -}; - -class Test_Setup_LockSet : public CC_Test -{ - // = TITLE - // This class creates a read lock, registeres it with the naming - // service and locks it. -public: - Test_Setup_LockSet (CC_naming_service *naming_service_, - char *name); - // Default constructor. The naming service must be initialized - // before calling this method. The name is the name the lock will be - // registered under in the naming service. - - virtual ~Test_Setup_LockSet (void); - // Destructor - - virtual int run (int times_to_run = 1); - // Runs the test the specified number of times. - -private: - char *my_name_; - // The name of the lock -}; - -class Test_Use_Already_Created_LockSet : public CC_Test -{ - // = TITLE - // This class looks up the lock in the naming service and locks - // it. -public: - Test_Use_Already_Created_LockSet (CC_naming_service *naming_service_, - char *name); - // Default constructor. The naming service must be initialized - // before calling this method. The name is the name the lock will be - // looked up under in the naming service. - - virtual ~Test_Use_Already_Created_LockSet (void); - // Destructor - - virtual int run (int times_to_run = 1); - // Runs the test the specified number of times. - -private: - char *my_name_; - // The name of the lock -}; - -class Test_Unlock_Already_Created_LockSet : public CC_Test -{ - // = TITLE - // This class looks up the lock in the naming service and unlocks - // it. -public: - Test_Unlock_Already_Created_LockSet (CC_naming_service *naming_service_, - char *name); - // Default constructor. The naming service must be initialized - // before calling this method. The name is the name the lock will be - // looked up under in the naming service. - - virtual ~Test_Unlock_Already_Created_LockSet (void); - // Destructor - - virtual int run (int times_to_run = 1); - // Runs the test the specified number of times. - -private: - char *my_name_; - // The name of the lock -}; - -class Test_Release_Not_Held_Lock : public CC_Test -{ - // = TITLE - // This class tests that the LockNotHeld exception is thrown if a - // not held lock is released. -public: - Test_Release_Not_Held_Lock (CC_naming_service *naming_service_, - CosConcurrencyControl::lock_mode mode_); - // Default constructor. The naming service must be initialized - // before calling this method. The mode is the mode of the lock - - virtual ~Test_Release_Not_Held_Lock (void); - // Destructor - - virtual int run (int times_to_run = 1); - // Runs the test the specified number of times. - -private: - CosConcurrencyControl::lock_mode mode_; - // The lock mode of the lock being tested -}; - -#endif /* !defined (_CC_TESTS_H_) */ diff --git a/TAO/orbsvcs/tests/Concurrency/Concurrency.dsw b/TAO/orbsvcs/tests/Concurrency/Concurrency.dsw deleted file mode 100644 index 1a17985ee1b..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/Concurrency.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "CC_client"=.\CC_client.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/Concurrency/Makefile b/TAO/orbsvcs/tests/Concurrency/Makefile deleted file mode 100644 index 012f78eb0ce..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/Makefile +++ /dev/null @@ -1,968 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -# Makefile for the concurrency service test. -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif # ! TAO_ROOT - -LDLIBS = -lorbsvcs -lTAO - -PROG_SRCS = CC_client.cpp CC_tests.cpp CC_naming_service.cpp \ - tmplinst.cpp CC_command.tab.cpp \ - lex.CC_command.cpp CC_command.cpp CC_test_utils.cpp - -LSRC = $(PROG_SRCS) - -CC_CLT_OBJS = CC_client.o CC_tests.o tmplinst.o CC_naming_service.o \ - CC_command.tab.o lex.CC_command.o \ - CC_command.o CC_test_utils.o - -BIN = CC_client -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) -VBIN = $(BIN:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -L$(TAO_ROOT)/orbsvcs/Naming_Service -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs - -lex.CC_command.cpp: CC_command.l CC_command.tab.h - @echo "WARNING: Potentially outdated lex.CC_command.cpp" - @echo " either touch(1) the file or explicitly" - @echo " generate it using:" - @echo " make lex.CC_comand.cpp.target" - -.PHONY: lex.CC_command.cpp.target - -lex.CC_command.cpp.target: - $(LEX) -t -I CC_command.l > /tmp/$(USER).CC_L1 - sed -e "s/unistd/stdio/g" \ - -e "s/yy/ace_cc_yy/g" \ - -e "s/YY/ACE_CC_YY/g" \ - -e "s/free( ptr );/free( ACE_MALLOC_T (ptr) );/g" \ - -e "s/realloc( ptr, size );/realloc( ACE_MALLOC_T (ptr), size );/g" \ - \ - -e "s@#include @#include \"ace/OS.h\"@" \ - -e "s@#include <@#include /**/ <@" \ - -e "s@ECHO@ACE_CC_ECHO@" < /tmp/$(USER).CC_L1 > /tmp/$(USER).CC_L2 - cp /tmp/$(USER).CC_L2 lex.CC_command.cpp - patch < lex.CC_command.cpp.diff - $(RM) -f /tmp/$(USER).CC_L1 /tmp/$(USER).CC_L2 - -CC_command.tab.cpp CC_command.tab.h: CC_command.y - @echo "WARNING: Potentially outdated CC_command.tab.cpp" - @echo " either touch(1) the file or explicitly " - @echo " generate it using:" - @echo " make CC_comand.tab" - -.PHONY: CC_command.tab - -CC_command.tab: CC_command.y - $(YACC) -d CC_command.y - sed -e "s/char \*getenv/char *ace_foo/g" \ - -e "s/= getenv/= ACE_OS::getenv/g" \ - -e "s/yynewerror://g" \ - -e "s/yy/ace_cc_yy/g" \ - -e "s/YY/ACE_CC_YY/g" \ - -e "s/y\.tab\.c/CC_command.tab.cpp/g" < y.tab.c > /tmp/$(USER).CC_Y - sed -e "s/yy/ace_cc_yy/g" \ - -e "s/YY/ACE_CC_YY/g" < y.tab.h > /tmp/$(USER).CC_YH - cp /tmp/$(USER).CC_Y CC_command.tab.cpp - cp /tmp/$(USER).CC_YH CC_command.tab.h - $(RM) -f /tmp/$(USER).CC_Y /tmp/$(USER).CC_YH y.tab.c y.tab.h - -CC_client: $(addprefix $(VDIR),$(CC_CLT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/CC_client.o .obj/CC_client.so .shobj/CC_client.o .shobj/CC_client.so: CC_client.cpp \ - $(ACE_ROOT)/ace/Read_Buffer.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Read_Buffer.i \ - CC_client.h $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/singletons.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/Servant_Base.i \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Pluggable.h \ - $(TAO_ROOT)/tao/MProfile.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/params.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(TAO_ROOT)/tao/IIOP_Connector.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/IIOP_Acceptor.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - CC_tests.h CC_naming_service.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ - CC_command.h CC_command.tab.h -.obj/CC_tests.o .obj/CC_tests.so .shobj/CC_tests.o .shobj/CC_tests.so: CC_tests.cpp CC_tests.h \ - $(TAO_ROOT)/tao/corba.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/singletons.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/Servant_Base.i \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Pluggable.h \ - $(TAO_ROOT)/tao/MProfile.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/params.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(TAO_ROOT)/tao/IIOP_Connector.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/IIOP_Acceptor.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - CC_naming_service.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h -.obj/CC_naming_service.o .obj/CC_naming_service.so .shobj/CC_naming_service.o .shobj/CC_naming_service.so: CC_naming_service.cpp CC_naming_service.h \ - $(TAO_ROOT)/tao/corba.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/singletons.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/Servant_Base.i \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Pluggable.h \ - $(TAO_ROOT)/tao/MProfile.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/params.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(TAO_ROOT)/tao/IIOP_Connector.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/IIOP_Acceptor.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h -.obj/tmplinst.o .obj/tmplinst.so .shobj/tmplinst.o .shobj/tmplinst.so: tmplinst.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.i -.obj/CC_command.tab.o .obj/CC_command.tab.so .shobj/CC_command.tab.o .shobj/CC_command.tab.so: CC_command.tab.cpp CC_command.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.i -.obj/lex.CC_command.o .obj/lex.CC_command.so .shobj/lex.CC_command.o .shobj/lex.CC_command.so: lex.CC_command.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - CC_command.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.i \ - CC_command.tab.h -.obj/CC_command.o .obj/CC_command.so .shobj/CC_command.o .shobj/CC_command.so: CC_command.cpp CC_command.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.i \ - CC_test_utils.h CC_naming_service.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i -.obj/CC_test_utils.o .obj/CC_test_utils.so .shobj/CC_test_utils.o .shobj/CC_test_utils.so: CC_test_utils.cpp CC_test_utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosConcurrencyControlC.i \ - CC_naming_service.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Concurrency/NS_client.cpp b/TAO/orbsvcs/tests/Concurrency/NS_client.cpp deleted file mode 100644 index 35a069f5781..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/NS_client.cpp +++ /dev/null @@ -1,213 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/bin/Naming_Service/TAO -// -// = FILENAME -// clnt.cpp -// -// = DESCRIPTION -// This class implements a simple CORBA client for the CosNaming -// example using stubs generated by the TAO ORB IDL compiler. -// -// = AUTHORS -// Sergio Flores-Gaitan -// Torben Worm -// -// ============================================================================ - -#include "NS_client.h" -#include "stdio.h" - -ACE_RCSID(Concurrency, NS_client, "$Id$") - -// constructor - -CosNaming_Client::CosNaming_Client (void) - : list_contents_ (0), - resolve_name_ (0), - name_to_resolve_ (0), - context_to_resolve_ (0), - argc_ (0), - argv_ (0), - exit_later_ (0) -{ -} - -// Parses the command line arguments and returns an error status. - -int -CosNaming_Client::parse_args (void) -{ - ACE_Get_Opt get_opts (argc_, argv_, "dxn:c:l"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; - break; - case 'l': - this->list_contents_ = 1; - break; - case 'x': - this->exit_later_++; - break; - case 'n': - this->resolve_name_ = 1; - this->name_to_resolve_ = get_opts.optarg; - break; - case 'c': - this->resolve_name_ = 1; - this->context_to_resolve_ = get_opts.optarg; - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-x]" - "\n", - this->argv_ [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - -// Execute client example code. - -int -CosNaming_Client::run (void) -{ - // @@ TODO, add some interesting test here, maybe creating some - // nested naming contexts and registering a number of objreferences - // in there. We could even use the iterators. - - if (this->resolve_name_) - resolve_name (this->context_to_resolve_, - this->name_to_resolve_); - - if (this->list_contents_) - list_contents (); - - return 0; -} - -CosNaming_Client::~CosNaming_Client (void) -{ -} - -int -CosNaming_Client::resolve_name (char *c, char *n) -{ - TAO_TRY - { - CosNaming::Name name (2); - name.length (2); - name[0].id = CORBA::string_dup (c); - name[1].id = CORBA::string_dup (n); - CORBA::Object_var obj = this->my_name_client_->resolve (name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "Could not resolve name in Naming service <%s>\n"), - -1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("init"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -void -CosNaming_Client::list_contents (void) -{ - CosNaming::BindingIterator_var bi; - CosNaming::BindingList_var li; - CORBA::ULong how_many = 0; - CosNaming::Binding_var b; - CosNaming::Name n; - CORBA::ULong names = 0; - - TAO_TRY - { - this->my_name_client_->list (how_many, li, bi, TAO_TRY_ENV); - - while (bi->next_one (b, TAO_TRY_ENV)) - { - n = b->binding_name; - names = n.length (); - ACE_DEBUG ((LM_DEBUG, - " (%i) Name: ", - names)); - - for (CORBA::ULong i = 0; i < names; i++) - ACE_DEBUG ((LM_DEBUG, - "%s ", - n[i].id._retn ())); - - ACE_DEBUG ((LM_DEBUG, "type: %s\n", - b->binding_type == CosNaming::ncontext ? "C" : "O")); - } - } - TAO_CATCHANY - { - } - TAO_ENDTRY; -} - -int -CosNaming_Client::init (int argc, char *argv[]) -{ - this->argc_ = argc; - this->argv_ = argv; - - TAO_TRY - { - // Initialize ORB. - this->orb_ = CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Initialize the naming services - if (my_name_client_.init (orb_) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("init"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -// This function runs the test. - -int -main (int argc, char **argv) -{ - CosNaming_Client cosnaming_client; - - if (cosnaming_client.init (argc, argv) == -1) - return 1; - - return cosnaming_client.run (); -} diff --git a/TAO/orbsvcs/tests/Concurrency/NS_client.h b/TAO/orbsvcs/tests/Concurrency/NS_client.h deleted file mode 100644 index 6c6407511e8..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/NS_client.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests -// -// = FILENAME -// NS_client.h -// -// = DESCRIPTION -// This class tests the facilities to connect to the naming -// service and to resolve the name for the concurrency service client. -// -// = AUTHORS -// Sergio Flores-Gaitan -// Torben Worm -// -// ============================================================================ - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/corba.h" -#include "orbsvcs/orbsvcs/CosNamingC.h" - -class CosNaming_Client -{ - // = TITLE - // Defines a class that encapsulates behaviour of the CosNaming - // client example. Provides a better understanding of the logic - // in an object oriented way. - // - // = DESCRIPTION - // This class declares an interface to run the example client for - // CosNaming CORBA server. All the complexity for initializing - // the server is hidden in the class. Just the run() interface - // is needed. -public: - // = Initialization and termination methods. - CosNaming_Client (void); - // Constructor. - - ~CosNaming_Client (void); - // Destructor. - - int run (void); - // Execute client example code. - - int init (int argc, char **argv); - // Initialize the client communication endpoint with server. - -private: - int parse_args (void); - // Parses the arguments passed on the command line. - - int resolve_name(char *c, char *n); - // Resolves the name given on the command-line (-n option). - - void list_contents(void); - // Lists the contents of the naming service. - - CORBA::ORB_var orb_; - // Our ORB. - - TAO_Naming_Client my_name_client_; - // And our Naming Client! - - int list_contents_; - // Iterate through the naming service and list the contents. - - int resolve_name_; - // Flag set by the -n option. - - char *name_to_resolve_; - // Parameter given to the -n option. - - char *context_to_resolve_; - // Parameter given to the -c option. - - int argc_; - // # of arguments on the command line. - - char **argv_; - // arguments from command line. - - int exit_later_; - // Flag to tell server to not exit immediately. -}; diff --git a/TAO/orbsvcs/tests/Concurrency/README b/TAO/orbsvcs/tests/Concurrency/README deleted file mode 100644 index 07fd0ced426..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/README +++ /dev/null @@ -1,111 +0,0 @@ -$Id$ - -This is the readme file for the tests of the concurrency service. - -The test program has been changed to use a configuration file instead of -hard coded test procedures. The old test procedures are left in the -program for backwards compatibility, but they will be removed at a later -point in time. - -The description of the old tests is in the readme file for the -concurrency service in the directory: - $TAO_ROOT/orbsvcs/Concurrency_Control -please consult this file for a decription of these tests. - -The new tests are described by this simle test language: - -start: /* empty */ - | cmd_list - ; - -cmd_list: cmd_list cmd - | cmd - ; - -cmd: start ; - | create ; - | create ; - | lock ; - | lock ; - | unlock ; - | unlock ; - | try_lock ; - | try_lock ; - | change_mode ; - | change_mode ; - | lookup ; - | sleep ; - | repeat ; - | wait ; - | wait ; - ; - -lock_mode: read | intention_read | upgrade | write | intention_write - -prompt: " string " - -If the lock set name is left out the default lock set is used. The -repeat command just sets a global variable in the test, i.e. the last -repeat command is the one that will take effect - the whole script is -run the specified number of times. - -An example of a script (assuming it's called 'test.cfg' - comments are -not supported): - - // Start a new CC_client with test.txt as script file - start test.txt; - // Create the lock set "ls1" and register it in the naming service - create ls1; - // Lock the read lock in the lock set - lock ls1 read; - // Try the read lock - try_lock ls1 read; - // sleep two seconds - sleep 2; - // Wait for the user to press enter - wait; - // Unlock the read lock in the ls1 lock set - unlock ls1 read; - // Change the mode of the read lock in the ls1 lock set to write mode - change_mode ls1 read write; - -The test can be run with the command ./CC_client -c test.cfg. - -There are currentlig the following tests in the - $TAO_ROOT/orbsvcs/tests/Concurrency -directory: - basic_tests.cfg The same as running ./CC_client -b - extended_tests.cfg The same as running ./CC_client -e '1;test' - ./CC_client -e '2;test' - ./CC_client -e '3;test' - test.dinphil Dining philosophers. Uses test.phil[1-5] - ----------------------------------------- - -THE IMPLEMENTATION - -The implementation of the concurrency service tests is located in -the $TAO_ROOT/orbsvcs/tests/Concurrency directory and consists of -the following files: - - CC_client.{h,cpp} contain initialization and the main function. - - CC_tests.{h,cpp} The old tests [-b] and [-e] options to CC_client - - CC_command.{h,cpp} The commands that can be used in the scripting - language are implemented in these files. The list of - commands to execute is also implemented here. - - CC_command.l The lex file for the script language. - - CC_command.y The yacc file for the script language. - - CC_command.tab.{h,cpp} and lex.CC_command.cpp Derived files from - the lex and yacc files. - - CC_naming_service.{h,cpp} A wrapper class around the necessary - naming service functinallity for the tests. - - CC_test_utils.{h,cpp} provides a namespace for utility functions. - - test.* Test scripts for the concurrency service. \ No newline at end of file diff --git a/TAO/orbsvcs/tests/Concurrency/lex.CC_command.cpp b/TAO/orbsvcs/tests/Concurrency/lex.CC_command.cpp deleted file mode 100644 index ccbf30b8145..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/lex.CC_command.cpp +++ /dev/null @@ -1,1726 +0,0 @@ -/* A lexical scanner generated by flex */ -// $Id$ -/* Scanner skeleton version: - * Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp - */ - -#define FLEX_SCANNER -#define ACE_CC_YY_FLEX_MAJOR_VERSION 2 -#define ACE_CC_YY_FLEX_MINOR_VERSION 5 - -#include "ace/OS.h" - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - -#include /**/ -#include "ace/OS.h" - -/* Use prototypes in function declarations. */ -#define ACE_CC_YY_USE_PROTOS - -/* The "const" storage-class-modifier is valid. */ -#define ACE_CC_YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define ACE_CC_YY_USE_PROTOS -#define ACE_CC_YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include /**/ -#include /**/ -#define ACE_CC_YY_USE_CONST -#define ACE_CC_YY_USE_PROTOS -#endif - -#ifdef ACE_CC_YY_USE_CONST -#define ace_cc_yyconst const -#else -#define ace_cc_yyconst -#endif - - -#ifdef ACE_CC_YY_USE_PROTOS -#define ACE_CC_YY_PROTO(proto) proto -#else -#define ACE_CC_YY_PROTO(proto) () -#endif - -/* Returned upon end-of-file. */ -#define ACE_CC_YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define ACE_CC_YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN ace_cc_yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The ACE_CC_YYSTATE alias is for lex - * compatibility. - */ -#define ACE_CC_YY_START ((ace_cc_yy_start - 1) / 2) -#define ACE_CC_YYSTATE ACE_CC_YY_START - -/* Action number for EOF rule of a given start state. */ -#define ACE_CC_YY_STATE_EOF(state) (ACE_CC_YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define ACE_CC_YY_NEW_FILE ace_cc_yyrestart( ace_cc_yyin ) - -#define ACE_CC_YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#define ACE_CC_YY_BUF_SIZE 16384 - -typedef struct ace_cc_yy_buffer_state *ACE_CC_YY_BUFFER_STATE; - -extern int ace_cc_yyleng; -extern FILE *ace_cc_yyin, *ace_cc_yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * ace_cc_yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the ace_cc_yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define ace_cc_yyless(n) \ - do \ - { \ - /* Undo effects of setting up ace_cc_yytext. */ \ - *ace_cc_yy_cp = ace_cc_yy_hold_char; \ - ACE_CC_YY_RESTORE_ACE_CC_YY_MORE_OFFSET \ - ace_cc_yy_c_buf_p = ace_cc_yy_cp = ace_cc_yy_bp + n - ACE_CC_YY_MORE_ADJ; \ - ACE_CC_YY_DO_BEFORE_ACTION; /* set up ace_cc_yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) ace_cc_yyunput( c, ace_cc_yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int ace_cc_yy_size_t; - - -struct ace_cc_yy_buffer_state - { - FILE *ace_cc_yy_input_file; - - char *ace_cc_yy_ch_buf; /* input buffer */ - char *ace_cc_yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - ace_cc_yy_size_t ace_cc_yy_buf_size; - - /* Number of characters read into ace_cc_yy_ch_buf, not including EOB - * characters. - */ - int ace_cc_yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int ace_cc_yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int ace_cc_yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int ace_cc_yy_at_bol; - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int ace_cc_yy_fill_buffer; - - int ace_cc_yy_buffer_status; -#define ACE_CC_YY_BUFFER_NEW 0 -#define ACE_CC_YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as ACE_CC_YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via ace_cc_yyrestart()), so that the user can continue scanning by - * just pointing ace_cc_yyin at a new input file. - */ -#define ACE_CC_YY_BUFFER_EOF_PENDING 2 - }; - -static ACE_CC_YY_BUFFER_STATE ace_cc_yy_current_buffer = 0; - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - */ -#define ACE_CC_YY_CURRENT_BUFFER ace_cc_yy_current_buffer - - -/* ace_cc_yy_hold_char holds the character lost when ace_cc_yytext is formed. */ -static char ace_cc_yy_hold_char; - -static int ace_cc_yy_n_chars; /* number of characters read into ace_cc_yy_ch_buf */ - - -int ace_cc_yyleng; - -/* Points to current character in buffer. */ -static char *ace_cc_yy_c_buf_p = (char *) 0; -static int ace_cc_yy_init = 1; /* whether we need to initialize */ -static int ace_cc_yy_start = 0; /* start state number */ - -/* Flag which is used to allow ace_cc_yywrap()'s to do buffer switches - * instead of setting up a fresh ace_cc_yyin. A bit of a hack ... - */ -static int ace_cc_yy_did_buffer_switch_on_eof; - -void ace_cc_yyrestart ACE_CC_YY_PROTO(( FILE *input_file )); - -void ace_cc_yy_switch_to_buffer ACE_CC_YY_PROTO(( ACE_CC_YY_BUFFER_STATE new_buffer )); -void ace_cc_yy_load_buffer_state ACE_CC_YY_PROTO(( void )); -ACE_CC_YY_BUFFER_STATE ace_cc_yy_create_buffer ACE_CC_YY_PROTO(( FILE *file, int size )); -void ace_cc_yy_delete_buffer ACE_CC_YY_PROTO(( ACE_CC_YY_BUFFER_STATE b )); -void ace_cc_yy_init_buffer ACE_CC_YY_PROTO(( ACE_CC_YY_BUFFER_STATE b, FILE *file )); -void ace_cc_yy_flush_buffer ACE_CC_YY_PROTO(( ACE_CC_YY_BUFFER_STATE b )); -#define ACE_CC_YY_FLUSH_BUFFER ace_cc_yy_flush_buffer( ace_cc_yy_current_buffer ) - -ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_buffer ACE_CC_YY_PROTO(( char *base, ace_cc_yy_size_t size )); -ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_string ACE_CC_YY_PROTO(( ace_cc_yyconst char *ace_cc_yy_str )); -ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_bytes ACE_CC_YY_PROTO(( ace_cc_yyconst char *bytes, int len )); - -static void *ace_cc_yy_flex_alloc ACE_CC_YY_PROTO(( ace_cc_yy_size_t )); -static void *ace_cc_yy_flex_realloc ACE_CC_YY_PROTO(( void *, ace_cc_yy_size_t )); -static void ace_cc_yy_flex_free ACE_CC_YY_PROTO(( void * )); - -#define ace_cc_yy_new_buffer ace_cc_yy_create_buffer - -#define ace_cc_yy_set_interactive(is_interactive) \ - { \ - if ( ! ace_cc_yy_current_buffer ) \ - ace_cc_yy_current_buffer = ace_cc_yy_create_buffer( ace_cc_yyin, ACE_CC_YY_BUF_SIZE ); \ - ace_cc_yy_current_buffer->ace_cc_yy_is_interactive = is_interactive; \ - } - -#define ace_cc_yy_set_bol(at_bol) \ - { \ - if ( ! ace_cc_yy_current_buffer ) \ - ace_cc_yy_current_buffer = ace_cc_yy_create_buffer( ace_cc_yyin, ACE_CC_YY_BUF_SIZE ); \ - ace_cc_yy_current_buffer->ace_cc_yy_at_bol = at_bol; \ - } - -#define ACE_CC_YY_AT_BOL() (ace_cc_yy_current_buffer->ace_cc_yy_at_bol) - - -#define ace_cc_yywrap() 1 -#define ACE_CC_YY_SKIP_ACE_CC_YYWRAP -typedef unsigned char ACE_CC_YY_CHAR; -FILE *ace_cc_yyin = (FILE *) 0, *ace_cc_yyout = (FILE *) 0; -typedef int ace_cc_yy_state_type; -extern char *ace_cc_yytext; -#define ace_cc_yytext_ptr ace_cc_yytext - -static ace_cc_yy_state_type ace_cc_yy_get_previous_state ACE_CC_YY_PROTO(( void )); -static ace_cc_yy_state_type ace_cc_yy_try_NUL_trans ACE_CC_YY_PROTO(( ace_cc_yy_state_type current_state )); -static int ace_cc_yy_get_next_buffer ACE_CC_YY_PROTO(( void )); -static void ace_cc_yy_fatal_error ACE_CC_YY_PROTO(( ace_cc_yyconst char msg[] )); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up ace_cc_yytext. - */ -#define ACE_CC_YY_DO_BEFORE_ACTION \ - ace_cc_yytext_ptr = ace_cc_yy_bp; \ - ace_cc_yyleng = (int) (ace_cc_yy_cp - ace_cc_yy_bp); \ - ace_cc_yy_hold_char = *ace_cc_yy_cp; \ - *ace_cc_yy_cp = '\0'; \ - ace_cc_yy_c_buf_p = ace_cc_yy_cp; - -#define ACE_CC_YY_NUM_RULES 25 -#define ACE_CC_YY_END_OF_BUFFER 26 -static ace_cc_yyconst short int ace_cc_yy_accept[124] = - { 0, - 0, 0, 26, 25, 24, 23, 25, 20, 1, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 25, 24, 23, 0, 19, 20, 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, 0, 22, - 21, 21, 21, 21, 4, 21, 21, 14, 21, 21, - 21, 21, 21, 21, 9, 21, 21, 21, 21, 21, - 21, 10, 21, 8, 2, 21, 21, 21, 17, 21, - 3, 21, 21, 13, 11, 21, 5, 21, 21, 21, - - 21, 21, 16, 21, 21, 21, 6, 21, 12, 21, - 21, 21, 7, 21, 21, 21, 21, 21, 21, 15, - 21, 18, 0 - } ; - -static ace_cc_yyconst int ace_cc_yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 4, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 5, 6, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 5, 8, 1, - 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 1, 1, 1, 1, 10, 1, 11, 9, 12, 13, - - 14, 9, 15, 16, 17, 9, 18, 19, 20, 21, - 22, 23, 9, 24, 25, 26, 27, 9, 28, 29, - 30, 9, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static ace_cc_yyconst int ace_cc_yy_meta[31] = - { 0, - 1, 2, 1, 1, 3, 3, 3, 1, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - } ; - -static ace_cc_yyconst short int ace_cc_yy_base[128] = - { 0, - 0, 136, 141, 143, 0, 137, 135, 131, 143, 0, - 15, 108, 115, 113, 110, 119, 14, 108, 11, 24, - 125, 0, 127, 125, 124, 120, 0, 115, 111, 112, - 97, 24, 105, 26, 107, 109, 89, 99, 102, 99, - 98, 112, 92, 101, 97, 96, 91, 90, 86, 93, - 91, 90, 79, 92, 79, 76, 73, 72, 95, 143, - 81, 69, 71, 72, 0, 65, 65, 0, 79, 66, - 62, 68, 74, 74, 0, 70, 69, 68, 55, 54, - 56, 0, 52, 0, 0, 55, 58, 62, 0, 64, - 0, 56, 55, 0, 0, 59, 0, 56, 49, 46, - - 45, 48, 0, 43, 43, 42, 0, 49, 0, 51, - 46, 14, 0, 45, 30, 40, 30, 32, 18, 0, - 29, 0, 143, 49, 52, 38, 55 - } ; - -static ace_cc_yyconst short int ace_cc_yy_def[128] = - { 0, - 123, 1, 123, 123, 124, 123, 125, 123, 123, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 123, 124, 123, 125, 125, 123, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 127, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 127, 123, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 0, 123, 123, 123, 123 - } ; - -static ace_cc_yyconst short int ace_cc_yy_nxt[174] = - { 0, - 4, 5, 6, 7, 4, 4, 8, 9, 10, 4, - 10, 11, 10, 12, 10, 10, 13, 10, 14, 10, - 10, 10, 15, 16, 17, 18, 19, 20, 10, 10, - 28, 38, 35, 39, 40, 47, 50, 114, 29, 36, - 27, 115, 122, 121, 120, 48, 119, 41, 51, 22, - 118, 22, 24, 117, 24, 59, 59, 59, 116, 113, - 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, - 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, - 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, - 82, 81, 80, 79, 78, 77, 60, 76, 75, 74, - - 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, - 63, 62, 61, 60, 58, 57, 56, 55, 54, 53, - 52, 49, 46, 45, 44, 43, 26, 25, 25, 23, - 42, 37, 34, 33, 32, 31, 30, 26, 25, 23, - 123, 21, 3, 123, 123, 123, 123, 123, 123, 123, - 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, - 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, - 123, 123, 123 - } ; - -static ace_cc_yyconst short int ace_cc_yy_chk[174] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 11, 19, 17, 19, 20, 32, 34, 112, 11, 17, - 126, 112, 121, 119, 118, 32, 117, 20, 34, 124, - 116, 124, 125, 115, 125, 127, 127, 127, 114, 111, - 110, 108, 106, 105, 104, 102, 101, 100, 99, 98, - 96, 93, 92, 90, 88, 87, 86, 83, 81, 80, - 79, 78, 77, 76, 74, 73, 72, 71, 70, 69, - 67, 66, 64, 63, 62, 61, 59, 58, 57, 56, - - 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, - 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, - 35, 33, 31, 30, 29, 28, 26, 25, 24, 23, - 21, 18, 16, 15, 14, 13, 12, 8, 7, 6, - 3, 2, 123, 123, 123, 123, 123, 123, 123, 123, - 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, - 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, - 123, 123, 123 - } ; - -static ace_cc_yy_state_type ace_cc_yy_last_accepting_state; -static char *ace_cc_yy_last_accepting_cpos; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define ace_cc_yymore() ace_cc_yymore_used_but_not_detected -#define ACE_CC_YY_MORE_ADJ 0 -#define ACE_CC_YY_RESTORE_ACE_CC_YY_MORE_OFFSET -char *ace_cc_yytext; -#line 1 "CC_command.l" -#define INITIAL 0 -/* $id$ - * ============================================================================ - * - * = LIBRARY - * TAO/orbsvcs/tests - * - * = FILENAME - * CC_command.l - * - * = DESCRIPTION - * This is the lex file for the concurrency service script language. - * - * = AUTHORS - * Torben Worm - * - * ============================================================================ - */ -#define ACE_CC_YY_NO_UNPUT 1 -#define ACE_CC_YY_NO_INPUT 1 -#define ACE_CC_YY_ALWAYS_INTERACTIVE 1 -#line 20 "CC_command.l" -#include "CC_command.h" -#include "CC_command.tab.h" -#include "ace/ACE.h" - -extern int line_no; -extern char line_buf[500]; - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef ACE_CC_YY_SKIP_ACE_CC_YYWRAP -#ifdef __cplusplus -extern "C" int ace_cc_yywrap ACE_CC_YY_PROTO(( void )); -#else -extern int ace_cc_yywrap ACE_CC_YY_PROTO(( void )); -#endif -#endif - -#ifndef ACE_CC_YY_NO_UNPUT -static void ace_cc_yyunput ACE_CC_YY_PROTO(( int c, char *buf_ptr )); -#endif - -#ifndef ace_cc_yytext_ptr -static void ace_cc_yy_flex_strncpy ACE_CC_YY_PROTO(( char *, ace_cc_yyconst char *, int )); -#endif - -#ifdef ACE_CC_YY_NEED_STRLEN -static int ace_cc_yy_flex_strlen ACE_CC_YY_PROTO(( ace_cc_yyconst char * )); -#endif - -#ifndef ACE_CC_YY_NO_INPUT -#ifdef __cplusplus -static int ace_cc_yyinput ACE_CC_YY_PROTO(( void )); -#else -static int input ACE_CC_YY_PROTO(( void )); -#endif -#endif - -#if ACE_CC_YY_STACK_USED -static int ace_cc_yy_start_stack_ptr = 0; -static int ace_cc_yy_start_stack_depth = 0; -static int *ace_cc_yy_start_stack = 0; -#ifndef ACE_CC_YY_NO_PUSH_STATE -static void ace_cc_yy_push_state ACE_CC_YY_PROTO(( int new_state )); -#endif -#ifndef ACE_CC_YY_NO_POP_STATE -static void ace_cc_yy_pop_state ACE_CC_YY_PROTO(( void )); -#endif -#ifndef ACE_CC_YY_NO_TOP_STATE -static int ace_cc_yy_top_state ACE_CC_YY_PROTO(( void )); -#endif - -#else -#define ACE_CC_YY_NO_PUSH_STATE 1 -#define ACE_CC_YY_NO_POP_STATE 1 -#define ACE_CC_YY_NO_TOP_STATE 1 -#endif - -#ifdef ACE_CC_YY_MALLOC_DECL -ACE_CC_YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include /**/ -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef ACE_CC_YY_READ_BUF_SIZE -#define ACE_CC_YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ - -#ifndef ACE_CC_ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ACE_CC_ECHO (void) fwrite( ace_cc_yytext, ace_cc_yyleng, 1, ace_cc_yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or ACE_CC_YY_NULL, - * is returned in "result". - */ -#ifndef ACE_CC_YY_INPUT -#define ACE_CC_YY_INPUT(buf,result,max_size) \ - if ( ace_cc_yy_current_buffer->ace_cc_yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( ace_cc_yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( ace_cc_yyin ) ) \ - ACE_CC_YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else if ( ((result = fread( buf, 1, max_size, ace_cc_yyin )) == 0) \ - && ferror( ace_cc_yyin ) ) \ - ACE_CC_YY_FATAL_ERROR( "input in flex scanner failed" ); -#endif - -/* No semi-colon after return; correct usage is to write "ace_cc_yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef ace_cc_yyterminate -#define ace_cc_yyterminate() return ACE_CC_YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef ACE_CC_YY_START_STACK_INCR -#define ACE_CC_YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef ACE_CC_YY_FATAL_ERROR -#define ACE_CC_YY_FATAL_ERROR(msg) ace_cc_yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef ACE_CC_YY_DECL -#define ACE_CC_YY_DECL int ace_cc_yylex ACE_CC_YY_PROTO(( void )) -#endif - -/* Code executed at the beginning of each rule, after ace_cc_yytext and ace_cc_yyleng - * have been set up. - */ -#ifndef ACE_CC_YY_USER_ACTION -#define ACE_CC_YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef ACE_CC_YY_BREAK -#define ACE_CC_YY_BREAK break; -#endif - -#define ACE_CC_YY_RULE_SETUP \ - if ( ace_cc_yyleng > 0 ) \ - ace_cc_yy_current_buffer->ace_cc_yy_at_bol = \ - (ace_cc_yytext[ace_cc_yyleng - 1] == '\n'); \ - ACE_CC_YY_USER_ACTION - -ACE_CC_YY_DECL - { - register ace_cc_yy_state_type ace_cc_yy_current_state; - register char *ace_cc_yy_cp, *ace_cc_yy_bp; - register int ace_cc_yy_act; - -#line 28 "CC_command.l" - - - - if ( ace_cc_yy_init ) - { - ace_cc_yy_init = 0; - -#ifdef ACE_CC_YY_USER_INIT - ACE_CC_YY_USER_INIT; -#endif - - if ( ! ace_cc_yy_start ) - ace_cc_yy_start = 1; /* first start state */ - - if ( ! ace_cc_yyin ) - ace_cc_yyin = stdin; - - if ( ! ace_cc_yyout ) - ace_cc_yyout = stdout; - - if ( ! ace_cc_yy_current_buffer ) - ace_cc_yy_current_buffer = - ace_cc_yy_create_buffer( ace_cc_yyin, ACE_CC_YY_BUF_SIZE ); - - ace_cc_yy_load_buffer_state(); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - ace_cc_yy_cp = ace_cc_yy_c_buf_p; - - /* Support of ace_cc_yytext. */ - *ace_cc_yy_cp = ace_cc_yy_hold_char; - - /* ace_cc_yy_bp points to the position in ace_cc_yy_ch_buf of the start of - * the current run. - */ - ace_cc_yy_bp = ace_cc_yy_cp; - - ace_cc_yy_current_state = ace_cc_yy_start; - ace_cc_yy_current_state += ACE_CC_YY_AT_BOL(); -ace_cc_yy_match: - do - { - register ACE_CC_YY_CHAR ace_cc_yy_c = ace_cc_yy_ec[ACE_CC_YY_SC_TO_UI(*ace_cc_yy_cp)]; - if ( ace_cc_yy_accept[ace_cc_yy_current_state] ) - { - ace_cc_yy_last_accepting_state = ace_cc_yy_current_state; - ace_cc_yy_last_accepting_cpos = ace_cc_yy_cp; - } - while ( ace_cc_yy_chk[ace_cc_yy_base[ace_cc_yy_current_state] + ace_cc_yy_c] != ace_cc_yy_current_state ) - { - ace_cc_yy_current_state = (int) ace_cc_yy_def[ace_cc_yy_current_state]; - if ( ace_cc_yy_current_state >= 124 ) - ace_cc_yy_c = ace_cc_yy_meta[(unsigned int) ace_cc_yy_c]; - } - ace_cc_yy_current_state = ace_cc_yy_nxt[ace_cc_yy_base[ace_cc_yy_current_state] + (unsigned int) ace_cc_yy_c]; - ++ace_cc_yy_cp; - } - while ( ace_cc_yy_base[ace_cc_yy_current_state] != 143 ); - -ace_cc_yy_find_action: - ace_cc_yy_act = ace_cc_yy_accept[ace_cc_yy_current_state]; - if ( ace_cc_yy_act == 0 ) - { /* have to back up */ - ace_cc_yy_cp = ace_cc_yy_last_accepting_cpos; - ace_cc_yy_current_state = ace_cc_yy_last_accepting_state; - ace_cc_yy_act = ace_cc_yy_accept[ace_cc_yy_current_state]; - } - - ACE_CC_YY_DO_BEFORE_ACTION; - - -do_action: /* This label is used only to access EOF actions. */ - - - switch ( ace_cc_yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of ACE_CC_YY_DO_BEFORE_ACTION */ - *ace_cc_yy_cp = ace_cc_yy_hold_char; - ace_cc_yy_cp = ace_cc_yy_last_accepting_cpos; - ace_cc_yy_current_state = ace_cc_yy_last_accepting_state; - goto ace_cc_yy_find_action; - -case 1: -ACE_CC_YY_RULE_SETUP -#line 30 "CC_command.l" -return T_TERM; - /* ACE_CC_YY_BREAK */ -case 2: -ACE_CC_YY_RULE_SETUP -#line 31 "CC_command.l" -return T_START_CMD; - /* ACE_CC_YY_BREAK */ -case 3: -ACE_CC_YY_RULE_SETUP -#line 32 "CC_command.l" -return T_CREATE_CMD; - /* ACE_CC_YY_BREAK */ -case 4: -ACE_CC_YY_RULE_SETUP -#line 33 "CC_command.l" -return T_LOCK_CMD; - /* ACE_CC_YY_BREAK */ -case 5: -ACE_CC_YY_RULE_SETUP -#line 34 "CC_command.l" -return T_UNLOCK_CMD; - /* ACE_CC_YY_BREAK */ -case 6: -ACE_CC_YY_RULE_SETUP -#line 35 "CC_command.l" -return T_TRYLOCK_CMD; - /* ACE_CC_YY_BREAK */ -case 7: -ACE_CC_YY_RULE_SETUP -#line 36 "CC_command.l" -return T_CHANGEMODE_CMD; - /* ACE_CC_YY_BREAK */ -case 8: -ACE_CC_YY_RULE_SETUP -#line 37 "CC_command.l" -return T_SLEEP_CMD; - /* ACE_CC_YY_BREAK */ -case 9: -ACE_CC_YY_RULE_SETUP -#line 38 "CC_command.l" -return T_WAIT_CMD; - /* ACE_CC_YY_BREAK */ -case 10: -ACE_CC_YY_RULE_SETUP -#line 39 "CC_command.l" -return T_PRINT_CMD; - /* ACE_CC_YY_BREAK */ -case 11: -ACE_CC_YY_RULE_SETUP -#line 40 "CC_command.l" -return T_REPEAT_CMD; - /* ACE_CC_YY_BREAK */ -case 12: -ACE_CC_YY_RULE_SETUP -#line 41 "CC_command.l" -return T_EXCEP_CMD; - /* ACE_CC_YY_BREAK */ -case 13: -ACE_CC_YY_RULE_SETUP -#line 42 "CC_command.l" -return T_LOOKUP_CMD; - /* ACE_CC_YY_BREAK */ -case 14: -ACE_CC_YY_RULE_SETUP -#line 43 "CC_command.l" -return T_READ; - /* ACE_CC_YY_BREAK */ -case 15: -ACE_CC_YY_RULE_SETUP -#line 44 "CC_command.l" -return T_IREAD; - /* ACE_CC_YY_BREAK */ -case 16: -ACE_CC_YY_RULE_SETUP -#line 45 "CC_command.l" -return T_UPGRADE; - /* ACE_CC_YY_BREAK */ -case 17: -ACE_CC_YY_RULE_SETUP -#line 46 "CC_command.l" -return T_WRITE; - /* ACE_CC_YY_BREAK */ -case 18: -ACE_CC_YY_RULE_SETUP -#line 47 "CC_command.l" -return T_IWRITE; - /* ACE_CC_YY_BREAK */ -case 19: -ACE_CC_YY_RULE_SETUP -#line 48 "CC_command.l" -{ ace_cc_yylval.id = ACE_OS::strdup(&ace_cc_yytext[1]); - ace_cc_yylval.id[ace_cc_yyleng-2]='\0'; - return Q_STRING; } - /* ACE_CC_YY_BREAK */ -case 20: -ACE_CC_YY_RULE_SETUP -#line 51 "CC_command.l" -{ ace_cc_yylval.num = atoi(ace_cc_yytext); return T_NUM; } - /* ACE_CC_YY_BREAK */ -case 21: -ACE_CC_YY_RULE_SETUP -#line 52 "CC_command.l" -{ ace_cc_yylval.id = ACE_OS::strdup(ace_cc_yytext); - return T_IDENT; } - /* ACE_CC_YY_BREAK */ -case 22: -ACE_CC_YY_RULE_SETUP -#line 54 "CC_command.l" -{ } - ACE_CC_YY_BREAK -case 23: -ACE_CC_YY_RULE_SETUP -#line 55 "CC_command.l" -{ } - ACE_CC_YY_BREAK -case 24: -ACE_CC_YY_RULE_SETUP -#line 56 "CC_command.l" -{ line_no ++; - ACE_OS::strcpy(line_buf, ace_cc_yytext+1); - ace_cc_yyless(1); } - ACE_CC_YY_BREAK -case 25: -ACE_CC_YY_RULE_SETUP -#line 59 "CC_command.l" -ACE_CC_ECHO; - ACE_CC_YY_BREAK -case ACE_CC_YY_STATE_EOF(INITIAL): - ace_cc_yyterminate(); - - case ACE_CC_YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int ace_cc_yy_amount_of_matched_text = (int) (ace_cc_yy_cp - ace_cc_yytext_ptr) - 1; - - /* Undo the effects of ACE_CC_YY_DO_BEFORE_ACTION. */ - *ace_cc_yy_cp = ace_cc_yy_hold_char; - ACE_CC_YY_RESTORE_ACE_CC_YY_MORE_OFFSET - - if ( ace_cc_yy_current_buffer->ace_cc_yy_buffer_status == ACE_CC_YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed ace_cc_yyin at a new source and called - * ace_cc_yylex(). If so, then we have to assure - * consistency between ace_cc_yy_current_buffer and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - ace_cc_yy_n_chars = ace_cc_yy_current_buffer->ace_cc_yy_n_chars; - ace_cc_yy_current_buffer->ace_cc_yy_input_file = ace_cc_yyin; - ace_cc_yy_current_buffer->ace_cc_yy_buffer_status = ACE_CC_YY_BUFFER_NORMAL; - } - - /* Note that here we test for ace_cc_yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since ace_cc_yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( ace_cc_yy_c_buf_p <= &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars] ) - { /* This was really a NUL. */ - ace_cc_yy_state_type ace_cc_yy_next_state; - - ace_cc_yy_c_buf_p = ace_cc_yytext_ptr + ace_cc_yy_amount_of_matched_text; - - ace_cc_yy_current_state = ace_cc_yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * ace_cc_yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - ace_cc_yy_next_state = ace_cc_yy_try_NUL_trans( ace_cc_yy_current_state ); - - ace_cc_yy_bp = ace_cc_yytext_ptr + ACE_CC_YY_MORE_ADJ; - - if ( ace_cc_yy_next_state ) - { - /* Consume the NUL. */ - ace_cc_yy_cp = ++ace_cc_yy_c_buf_p; - ace_cc_yy_current_state = ace_cc_yy_next_state; - goto ace_cc_yy_match; - } - - else - { - ace_cc_yy_cp = ace_cc_yy_c_buf_p; - goto ace_cc_yy_find_action; - } - } - - else switch ( ace_cc_yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - ace_cc_yy_did_buffer_switch_on_eof = 0; - - if ( ace_cc_yywrap() ) - { - /* Note: because we've taken care in - * ace_cc_yy_get_next_buffer() to have set up - * ace_cc_yytext, we can now set up - * ace_cc_yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * ACE_CC_YY_NULL, it'll still work - another - * ACE_CC_YY_NULL will get returned. - */ - ace_cc_yy_c_buf_p = ace_cc_yytext_ptr + ACE_CC_YY_MORE_ADJ; - - ace_cc_yy_act = ACE_CC_YY_STATE_EOF(ACE_CC_YY_START); - goto do_action; - } - - else - { - if ( ! ace_cc_yy_did_buffer_switch_on_eof ) - ACE_CC_YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - ace_cc_yy_c_buf_p = - ace_cc_yytext_ptr + ace_cc_yy_amount_of_matched_text; - - ace_cc_yy_current_state = ace_cc_yy_get_previous_state(); - - ace_cc_yy_cp = ace_cc_yy_c_buf_p; - ace_cc_yy_bp = ace_cc_yytext_ptr + ACE_CC_YY_MORE_ADJ; - goto ace_cc_yy_match; - - case EOB_ACT_LAST_MATCH: - ace_cc_yy_c_buf_p = - &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars]; - - ace_cc_yy_current_state = ace_cc_yy_get_previous_state(); - - ace_cc_yy_cp = ace_cc_yy_c_buf_p; - ace_cc_yy_bp = ace_cc_yytext_ptr + ACE_CC_YY_MORE_ADJ; - goto ace_cc_yy_find_action; - } - break; - } - - default: - ACE_CC_YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of ace_cc_yylex */ - - -/* ace_cc_yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ - -static int ace_cc_yy_get_next_buffer() - { - register char *dest = ace_cc_yy_current_buffer->ace_cc_yy_ch_buf; - register char *source = ace_cc_yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( ace_cc_yy_c_buf_p > &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars + 1] ) - ACE_CC_YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( ace_cc_yy_current_buffer->ace_cc_yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( ace_cc_yy_c_buf_p - ace_cc_yytext_ptr - ACE_CC_YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (ace_cc_yy_c_buf_p - ace_cc_yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( ace_cc_yy_current_buffer->ace_cc_yy_buffer_status == ACE_CC_YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - ace_cc_yy_current_buffer->ace_cc_yy_n_chars = ace_cc_yy_n_chars = 0; - - else - { - int num_to_read = - ace_cc_yy_current_buffer->ace_cc_yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -#ifdef ACE_CC_YY_USES_REJECT - ACE_CC_YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else - - /* just a shorter name for the current buffer */ - ACE_CC_YY_BUFFER_STATE b = ace_cc_yy_current_buffer; - - int ace_cc_yy_c_buf_p_offset = - (int) (ace_cc_yy_c_buf_p - b->ace_cc_yy_ch_buf); - - if ( b->ace_cc_yy_is_our_buffer ) - { - int new_size = b->ace_cc_yy_buf_size * 2; - - if ( new_size <= 0 ) - b->ace_cc_yy_buf_size += b->ace_cc_yy_buf_size / 8; - else - b->ace_cc_yy_buf_size *= 2; - - b->ace_cc_yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - ace_cc_yy_flex_realloc( (void *) b->ace_cc_yy_ch_buf, - b->ace_cc_yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->ace_cc_yy_ch_buf = 0; - - if ( ! b->ace_cc_yy_ch_buf ) - ACE_CC_YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - ace_cc_yy_c_buf_p = &b->ace_cc_yy_ch_buf[ace_cc_yy_c_buf_p_offset]; - - num_to_read = ace_cc_yy_current_buffer->ace_cc_yy_buf_size - - number_to_move - 1; -#endif - } - - if ( num_to_read > ACE_CC_YY_READ_BUF_SIZE ) - num_to_read = ACE_CC_YY_READ_BUF_SIZE; - - /* Read in more data. */ - ACE_CC_YY_INPUT( (&ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[number_to_move]), - ace_cc_yy_n_chars, num_to_read ); - - ace_cc_yy_current_buffer->ace_cc_yy_n_chars = ace_cc_yy_n_chars; - } - - if ( ace_cc_yy_n_chars == 0 ) - { - if ( number_to_move == ACE_CC_YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - ace_cc_yyrestart( ace_cc_yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - ace_cc_yy_current_buffer->ace_cc_yy_buffer_status = - ACE_CC_YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - ace_cc_yy_n_chars += number_to_move; - ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars] = ACE_CC_YY_END_OF_BUFFER_CHAR; - ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars + 1] = ACE_CC_YY_END_OF_BUFFER_CHAR; - - ace_cc_yytext_ptr = &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[0]; - - return ret_val; - } - - -/* ace_cc_yy_get_previous_state - get the state just before the EOB char was reached */ - -static ace_cc_yy_state_type ace_cc_yy_get_previous_state() - { - register ace_cc_yy_state_type ace_cc_yy_current_state; - register char *ace_cc_yy_cp; - - ace_cc_yy_current_state = ace_cc_yy_start; - ace_cc_yy_current_state += ACE_CC_YY_AT_BOL(); - - for ( ace_cc_yy_cp = ace_cc_yytext_ptr + ACE_CC_YY_MORE_ADJ; ace_cc_yy_cp < ace_cc_yy_c_buf_p; ++ace_cc_yy_cp ) - { - register ACE_CC_YY_CHAR ace_cc_yy_c = (*ace_cc_yy_cp ? ace_cc_yy_ec[ACE_CC_YY_SC_TO_UI(*ace_cc_yy_cp)] : 1); - if ( ace_cc_yy_accept[ace_cc_yy_current_state] ) - { - ace_cc_yy_last_accepting_state = ace_cc_yy_current_state; - ace_cc_yy_last_accepting_cpos = ace_cc_yy_cp; - } - while ( ace_cc_yy_chk[ace_cc_yy_base[ace_cc_yy_current_state] + ace_cc_yy_c] != ace_cc_yy_current_state ) - { - ace_cc_yy_current_state = (int) ace_cc_yy_def[ace_cc_yy_current_state]; - if ( ace_cc_yy_current_state >= 124 ) - ace_cc_yy_c = ace_cc_yy_meta[(unsigned int) ace_cc_yy_c]; - } - ace_cc_yy_current_state = ace_cc_yy_nxt[ace_cc_yy_base[ace_cc_yy_current_state] + (unsigned int) ace_cc_yy_c]; - } - - return ace_cc_yy_current_state; - } - - -/* ace_cc_yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = ace_cc_yy_try_NUL_trans( current_state ); - */ - -#ifdef ACE_CC_YY_USE_PROTOS -static ace_cc_yy_state_type ace_cc_yy_try_NUL_trans( ace_cc_yy_state_type ace_cc_yy_current_state ) -#else -static ace_cc_yy_state_type ace_cc_yy_try_NUL_trans( ace_cc_yy_current_state ) -ace_cc_yy_state_type ace_cc_yy_current_state; -#endif - { - register int ace_cc_yy_is_jam; - register char *ace_cc_yy_cp = ace_cc_yy_c_buf_p; - - register ACE_CC_YY_CHAR ace_cc_yy_c = 1; - if ( ace_cc_yy_accept[ace_cc_yy_current_state] ) - { - ace_cc_yy_last_accepting_state = ace_cc_yy_current_state; - ace_cc_yy_last_accepting_cpos = ace_cc_yy_cp; - } - while ( ace_cc_yy_chk[ace_cc_yy_base[ace_cc_yy_current_state] + ace_cc_yy_c] != ace_cc_yy_current_state ) - { - ace_cc_yy_current_state = (int) ace_cc_yy_def[ace_cc_yy_current_state]; - if ( ace_cc_yy_current_state >= 124 ) - ace_cc_yy_c = ace_cc_yy_meta[(unsigned int) ace_cc_yy_c]; - } - ace_cc_yy_current_state = ace_cc_yy_nxt[ace_cc_yy_base[ace_cc_yy_current_state] + (unsigned int) ace_cc_yy_c]; - ace_cc_yy_is_jam = (ace_cc_yy_current_state == 123); - - return ace_cc_yy_is_jam ? 0 : ace_cc_yy_current_state; - } - - -#ifndef ACE_CC_YY_NO_UNPUT -#ifdef ACE_CC_YY_USE_PROTOS -static void ace_cc_yyunput( int c, register char *ace_cc_yy_bp ) -#else -static void ace_cc_yyunput( c, ace_cc_yy_bp ) -int c; -register char *ace_cc_yy_bp; -#endif - { - register char *ace_cc_yy_cp = ace_cc_yy_c_buf_p; - - /* undo effects of setting up ace_cc_yytext */ - *ace_cc_yy_cp = ace_cc_yy_hold_char; - - if ( ace_cc_yy_cp < ace_cc_yy_current_buffer->ace_cc_yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = ace_cc_yy_n_chars + 2; - register char *dest = &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ - ace_cc_yy_current_buffer->ace_cc_yy_buf_size + 2]; - register char *source = - &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[number_to_move]; - - while ( source > ace_cc_yy_current_buffer->ace_cc_yy_ch_buf ) - *--dest = *--source; - - ace_cc_yy_cp += (int) (dest - source); - ace_cc_yy_bp += (int) (dest - source); - ace_cc_yy_current_buffer->ace_cc_yy_n_chars = - ace_cc_yy_n_chars = ace_cc_yy_current_buffer->ace_cc_yy_buf_size; - - if ( ace_cc_yy_cp < ace_cc_yy_current_buffer->ace_cc_yy_ch_buf + 2 ) - ACE_CC_YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--ace_cc_yy_cp = (char) c; - - - ace_cc_yytext_ptr = ace_cc_yy_bp; - ace_cc_yy_hold_char = *ace_cc_yy_cp; - ace_cc_yy_c_buf_p = ace_cc_yy_cp; - } -#endif /* ifndef ACE_CC_YY_NO_UNPUT */ - -#ifndef ACE_CC_YY_NO_INPUT -#ifdef __cplusplus -static int ace_cc_yyinput() -#else -static int input() -#endif - { - int c; - - *ace_cc_yy_c_buf_p = ace_cc_yy_hold_char; - - if ( *ace_cc_yy_c_buf_p == ACE_CC_YY_END_OF_BUFFER_CHAR ) - { - /* ace_cc_yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( ace_cc_yy_c_buf_p < &ace_cc_yy_current_buffer->ace_cc_yy_ch_buf[ace_cc_yy_n_chars] ) - /* This was really a NUL. */ - *ace_cc_yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = ace_cc_yy_c_buf_p - ace_cc_yytext_ptr; - ++ace_cc_yy_c_buf_p; - - switch ( ace_cc_yy_get_next_buffer() ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because ace_cc_yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - ace_cc_yyrestart( ace_cc_yyin ); - - /* fall through */ - - case EOB_ACT_END_OF_FILE: - { - if ( ace_cc_yywrap() ) - return EOF; - - /* if ( ! ace_cc_yy_did_buffer_switch_on_eof ) - ACE_CC_YY_NEW_FILE; -#ifdef __cplusplus - return ace_cc_yyinput(); -#else - return input(); - #endif */ - } - - case EOB_ACT_CONTINUE_SCAN: - ace_cc_yy_c_buf_p = ace_cc_yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) ace_cc_yy_c_buf_p; /* cast for 8-bit char's */ - *ace_cc_yy_c_buf_p = '\0'; /* preserve ace_cc_yytext */ - ace_cc_yy_hold_char = *++ace_cc_yy_c_buf_p; - - ace_cc_yy_current_buffer->ace_cc_yy_at_bol = (c == '\n'); - - return c; - } -#endif /* ! ACE_CC_YY_NO_INPUT */ - - -#ifdef ACE_CC_YY_USE_PROTOS -void ace_cc_yyrestart( FILE *input_file ) -#else -void ace_cc_yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! ace_cc_yy_current_buffer ) - ace_cc_yy_current_buffer = ace_cc_yy_create_buffer( ace_cc_yyin, ACE_CC_YY_BUF_SIZE ); - - ace_cc_yy_init_buffer( ace_cc_yy_current_buffer, input_file ); - ace_cc_yy_load_buffer_state(); - } - - -#ifdef ACE_CC_YY_USE_PROTOS -void ace_cc_yy_switch_to_buffer( ACE_CC_YY_BUFFER_STATE new_buffer ) -#else -void ace_cc_yy_switch_to_buffer( new_buffer ) -ACE_CC_YY_BUFFER_STATE new_buffer; -#endif - { - if ( ace_cc_yy_current_buffer == new_buffer ) - return; - - if ( ace_cc_yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *ace_cc_yy_c_buf_p = ace_cc_yy_hold_char; - ace_cc_yy_current_buffer->ace_cc_yy_buf_pos = ace_cc_yy_c_buf_p; - ace_cc_yy_current_buffer->ace_cc_yy_n_chars = ace_cc_yy_n_chars; - } - - ace_cc_yy_current_buffer = new_buffer; - ace_cc_yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (ace_cc_yywrap()) processing, but the only time this flag - * is looked at is after ace_cc_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - ace_cc_yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef ACE_CC_YY_USE_PROTOS -void ace_cc_yy_load_buffer_state( void ) -#else -void ace_cc_yy_load_buffer_state() -#endif - { - ace_cc_yy_n_chars = ace_cc_yy_current_buffer->ace_cc_yy_n_chars; - ace_cc_yytext_ptr = ace_cc_yy_c_buf_p = ace_cc_yy_current_buffer->ace_cc_yy_buf_pos; - ace_cc_yyin = ace_cc_yy_current_buffer->ace_cc_yy_input_file; - ace_cc_yy_hold_char = *ace_cc_yy_c_buf_p; - } - - -#ifdef ACE_CC_YY_USE_PROTOS -ACE_CC_YY_BUFFER_STATE ace_cc_yy_create_buffer( FILE *file, int size ) -#else -ACE_CC_YY_BUFFER_STATE ace_cc_yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { - ACE_CC_YY_BUFFER_STATE b; - - b = (ACE_CC_YY_BUFFER_STATE) ace_cc_yy_flex_alloc( sizeof( struct ace_cc_yy_buffer_state ) ); - if ( ! b ) - ACE_CC_YY_FATAL_ERROR( "out of dynamic memory in ace_cc_yy_create_buffer()" ); - - b->ace_cc_yy_buf_size = size; - - /* ace_cc_yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->ace_cc_yy_ch_buf = (char *) ace_cc_yy_flex_alloc( b->ace_cc_yy_buf_size + 2 ); - if ( ! b->ace_cc_yy_ch_buf ) - ACE_CC_YY_FATAL_ERROR( "out of dynamic memory in ace_cc_yy_create_buffer()" ); - - b->ace_cc_yy_is_our_buffer = 1; - - ace_cc_yy_init_buffer( b, file ); - - return b; - } - - -#ifdef ACE_CC_YY_USE_PROTOS -void ace_cc_yy_delete_buffer( ACE_CC_YY_BUFFER_STATE b ) -#else -void ace_cc_yy_delete_buffer( b ) -ACE_CC_YY_BUFFER_STATE b; -#endif - { - if ( ! b ) - return; - - if ( b == ace_cc_yy_current_buffer ) - ace_cc_yy_current_buffer = (ACE_CC_YY_BUFFER_STATE) 0; - - if ( b->ace_cc_yy_is_our_buffer ) - ace_cc_yy_flex_free( (void *) b->ace_cc_yy_ch_buf ); - - ace_cc_yy_flex_free( (void *) b ); - } - - -#ifndef ACE_CC_YY_ALWAYS_INTERACTIVE -#ifndef ACE_CC_YY_NEVER_INTERACTIVE -extern int isatty ACE_CC_YY_PROTO(( int )); -#endif -#endif - -#ifdef ACE_CC_YY_USE_PROTOS -void ace_cc_yy_init_buffer( ACE_CC_YY_BUFFER_STATE b, FILE *file ) -#else -void ace_cc_yy_init_buffer( b, file ) -ACE_CC_YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - ace_cc_yy_flush_buffer( b ); - - b->ace_cc_yy_input_file = file; - b->ace_cc_yy_fill_buffer = 1; - -#if ACE_CC_YY_ALWAYS_INTERACTIVE - b->ace_cc_yy_is_interactive = 1; -#else -#if ACE_CC_YY_NEVER_INTERACTIVE - b->ace_cc_yy_is_interactive = 0; -#else - b->ace_cc_yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - - -#ifdef ACE_CC_YY_USE_PROTOS -void ace_cc_yy_flush_buffer( ACE_CC_YY_BUFFER_STATE b ) -#else -void ace_cc_yy_flush_buffer( b ) -ACE_CC_YY_BUFFER_STATE b; -#endif - - { - if ( ! b ) - return; - - b->ace_cc_yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->ace_cc_yy_ch_buf[0] = ACE_CC_YY_END_OF_BUFFER_CHAR; - b->ace_cc_yy_ch_buf[1] = ACE_CC_YY_END_OF_BUFFER_CHAR; - - b->ace_cc_yy_buf_pos = &b->ace_cc_yy_ch_buf[0]; - - b->ace_cc_yy_at_bol = 1; - b->ace_cc_yy_buffer_status = ACE_CC_YY_BUFFER_NEW; - - if ( b == ace_cc_yy_current_buffer ) - ace_cc_yy_load_buffer_state(); - } - - -#ifndef ACE_CC_YY_NO_SCAN_BUFFER -#ifdef ACE_CC_YY_USE_PROTOS -ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_buffer( char *base, ace_cc_yy_size_t size ) -#else -ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_buffer( base, size ) -char *base; -ace_cc_yy_size_t size; -#endif - { - ACE_CC_YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != ACE_CC_YY_END_OF_BUFFER_CHAR || - base[size-1] != ACE_CC_YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (ACE_CC_YY_BUFFER_STATE) ace_cc_yy_flex_alloc( sizeof( struct ace_cc_yy_buffer_state ) ); - if ( ! b ) - ACE_CC_YY_FATAL_ERROR( "out of dynamic memory in ace_cc_yy_scan_buffer()" ); - - b->ace_cc_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->ace_cc_yy_buf_pos = b->ace_cc_yy_ch_buf = base; - b->ace_cc_yy_is_our_buffer = 0; - b->ace_cc_yy_input_file = 0; - b->ace_cc_yy_n_chars = b->ace_cc_yy_buf_size; - b->ace_cc_yy_is_interactive = 0; - b->ace_cc_yy_at_bol = 1; - b->ace_cc_yy_fill_buffer = 0; - b->ace_cc_yy_buffer_status = ACE_CC_YY_BUFFER_NEW; - - ace_cc_yy_switch_to_buffer( b ); - - return b; - } -#endif - - -#ifndef ACE_CC_YY_NO_SCAN_STRING -#ifdef ACE_CC_YY_USE_PROTOS -ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_string( ace_cc_yyconst char *ace_cc_yy_str ) -#else -ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_string( ace_cc_yy_str ) -ace_cc_yyconst char *ace_cc_yy_str; -#endif - { - int len; - for ( len = 0; ace_cc_yy_str[len]; ++len ) - ; - - return ace_cc_yy_scan_bytes( ace_cc_yy_str, len ); - } -#endif - - -#ifndef ACE_CC_YY_NO_SCAN_BYTES -#ifdef ACE_CC_YY_USE_PROTOS -ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_bytes( ace_cc_yyconst char *bytes, int len ) -#else -ACE_CC_YY_BUFFER_STATE ace_cc_yy_scan_bytes( bytes, len ) -ace_cc_yyconst char *bytes; -int len; -#endif - { - ACE_CC_YY_BUFFER_STATE b; - char *buf; - ace_cc_yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) ace_cc_yy_flex_alloc( n ); - if ( ! buf ) - ACE_CC_YY_FATAL_ERROR( "out of dynamic memory in ace_cc_yy_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = ACE_CC_YY_END_OF_BUFFER_CHAR; - - b = ace_cc_yy_scan_buffer( buf, n ); - if ( ! b ) - ACE_CC_YY_FATAL_ERROR( "bad buffer in ace_cc_yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->ace_cc_yy_is_our_buffer = 1; - - return b; - } -#endif - - -#ifndef ACE_CC_YY_NO_PUSH_STATE -#ifdef ACE_CC_YY_USE_PROTOS -static void ace_cc_yy_push_state( int new_state ) -#else -static void ace_cc_yy_push_state( new_state ) -int new_state; -#endif - { - if ( ace_cc_yy_start_stack_ptr >= ace_cc_yy_start_stack_depth ) - { - ace_cc_yy_size_t new_size; - - ace_cc_yy_start_stack_depth += ACE_CC_YY_START_STACK_INCR; - new_size = ace_cc_yy_start_stack_depth * sizeof( int ); - - if ( ! ace_cc_yy_start_stack ) - ace_cc_yy_start_stack = (int *) ace_cc_yy_flex_alloc( new_size ); - - else - ace_cc_yy_start_stack = (int *) ace_cc_yy_flex_realloc( - (void *) ace_cc_yy_start_stack, new_size ); - - if ( ! ace_cc_yy_start_stack ) - ACE_CC_YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - ace_cc_yy_start_stack[ace_cc_yy_start_stack_ptr++] = ACE_CC_YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef ACE_CC_YY_NO_POP_STATE -static void ace_cc_yy_pop_state() - { - if ( --ace_cc_yy_start_stack_ptr < 0 ) - ACE_CC_YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(ace_cc_yy_start_stack[ace_cc_yy_start_stack_ptr]); - } -#endif - - -#ifndef ACE_CC_YY_NO_TOP_STATE -static int ace_cc_yy_top_state() - { - return ace_cc_yy_start_stack[ace_cc_yy_start_stack_ptr - 1]; - } -#endif - -#ifndef ACE_CC_YY_EXIT_FAILURE -#define ACE_CC_YY_EXIT_FAILURE 2 -#endif - -#ifdef ACE_CC_YY_USE_PROTOS -static void ace_cc_yy_fatal_error( ace_cc_yyconst char msg[] ) -#else -static void ace_cc_yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( ACE_CC_YY_EXIT_FAILURE ); - } - - - -/* Redefine ace_cc_yyless() so it works in section 3 code. */ - -#undef ace_cc_yyless -#define ace_cc_yyless(n) \ - do \ - { \ - /* Undo effects of setting up ace_cc_yytext. */ \ - ace_cc_yytext[ace_cc_yyleng] = ace_cc_yy_hold_char; \ - ace_cc_yy_c_buf_p = ace_cc_yytext + n; \ - ace_cc_yy_hold_char = *ace_cc_yy_c_buf_p; \ - *ace_cc_yy_c_buf_p = '\0'; \ - ace_cc_yyleng = n; \ - } \ - while ( 0 ) - - -/* Internal utility routines. */ - -#ifndef ace_cc_yytext_ptr -#ifdef ACE_CC_YY_USE_PROTOS -static void ace_cc_yy_flex_strncpy( char *s1, ace_cc_yyconst char *s2, int n ) -#else -static void ace_cc_yy_flex_strncpy( s1, s2, n ) -char *s1; -ace_cc_yyconst char *s2; -int n; -#endif - { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } -#endif - -#ifdef ACE_CC_YY_NEED_STRLEN -#ifdef ACE_CC_YY_USE_PROTOS -static int ace_cc_yy_flex_strlen( ace_cc_yyconst char *s ) -#else -static int ace_cc_yy_flex_strlen( s ) -ace_cc_yyconst char *s; -#endif - { - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; - } -#endif - - -#ifdef ACE_CC_YY_USE_PROTOS -static void *ace_cc_yy_flex_alloc( ace_cc_yy_size_t size ) -#else -static void *ace_cc_yy_flex_alloc( size ) -ace_cc_yy_size_t size; -#endif - { - return (void *) malloc( size ); - } - -#ifdef ACE_CC_YY_USE_PROTOS -static void *ace_cc_yy_flex_realloc( void *ptr, ace_cc_yy_size_t size ) -#else -static void *ace_cc_yy_flex_realloc( ptr, size ) -void *ptr; -ace_cc_yy_size_t size; -#endif - { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); - } - -#ifdef ACE_CC_YY_USE_PROTOS -static void ace_cc_yy_flex_free( void *ptr ) -#else -static void ace_cc_yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ACE_MALLOC_T (ptr) ); - } - -#if ACE_CC_YY_MAIN -int main() - { - ace_cc_yylex(); - return 0; - } -#endif -#line 59 "CC_command.l" diff --git a/TAO/orbsvcs/tests/Concurrency/lex.CC_command.cpp.diff b/TAO/orbsvcs/tests/Concurrency/lex.CC_command.cpp.diff deleted file mode 100644 index b6693643ce7..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/lex.CC_command.cpp.diff +++ /dev/null @@ -1,167 +0,0 @@ ---- lex.CC_command.cpp.orig Fri Jun 19 16:04:06 1998 -+++ lex.CC_command.cpp Fri Jun 19 16:04:24 1998 -@@ -709,110 +709,110 @@ - ACE_CC_YY_RULE_SETUP - #line 30 "CC_command.l" - return T_TERM; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 2: - ACE_CC_YY_RULE_SETUP - #line 31 "CC_command.l" - return T_START_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 3: - ACE_CC_YY_RULE_SETUP - #line 32 "CC_command.l" - return T_CREATE_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 4: - ACE_CC_YY_RULE_SETUP - #line 33 "CC_command.l" - return T_LOCK_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 5: - ACE_CC_YY_RULE_SETUP - #line 34 "CC_command.l" - return T_UNLOCK_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 6: - ACE_CC_YY_RULE_SETUP - #line 35 "CC_command.l" - return T_TRYLOCK_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 7: - ACE_CC_YY_RULE_SETUP - #line 36 "CC_command.l" - return T_CHANGEMODE_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 8: - ACE_CC_YY_RULE_SETUP - #line 37 "CC_command.l" - return T_SLEEP_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 9: - ACE_CC_YY_RULE_SETUP - #line 38 "CC_command.l" - return T_WAIT_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 10: - ACE_CC_YY_RULE_SETUP - #line 39 "CC_command.l" - return T_PRINT_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 11: - ACE_CC_YY_RULE_SETUP - #line 40 "CC_command.l" - return T_REPEAT_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 12: - ACE_CC_YY_RULE_SETUP - #line 41 "CC_command.l" - return T_EXCEP_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 13: - ACE_CC_YY_RULE_SETUP - #line 42 "CC_command.l" - return T_LOOKUP_CMD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 14: - ACE_CC_YY_RULE_SETUP - #line 43 "CC_command.l" - return T_READ; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 15: - ACE_CC_YY_RULE_SETUP - #line 44 "CC_command.l" - return T_IREAD; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 16: - ACE_CC_YY_RULE_SETUP - #line 45 "CC_command.l" - return T_UPGRADE; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 17: - ACE_CC_YY_RULE_SETUP - #line 46 "CC_command.l" - return T_WRITE; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 18: - ACE_CC_YY_RULE_SETUP - #line 47 "CC_command.l" - return T_IWRITE; -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 19: - ACE_CC_YY_RULE_SETUP - #line 48 "CC_command.l" - { ace_cc_yylval.id = ACE_OS::strdup(&ace_cc_yytext[1]); - ace_cc_yylval.id[ace_cc_yyleng-2]='\0'; - return Q_STRING; } -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 20: - ACE_CC_YY_RULE_SETUP - #line 51 "CC_command.l" - { ace_cc_yylval.num = atoi(ace_cc_yytext); return T_NUM; } -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 21: - ACE_CC_YY_RULE_SETUP - #line 52 "CC_command.l" - { ace_cc_yylval.id = ACE_OS::strdup(ace_cc_yytext); - return T_IDENT; } -- ACE_CC_YY_BREAK -+ /* ACE_CC_YY_BREAK */ - case 22: - ACE_CC_YY_RULE_SETUP - #line 54 "CC_command.l" -@@ -1216,7 +1216,7 @@ - } - #endif /* ifndef ACE_CC_YY_NO_UNPUT */ - -- -+#ifndef ACE_CC_YY_NO_INPUT - #ifdef __cplusplus - static int ace_cc_yyinput() - #else -@@ -1265,13 +1265,13 @@ - if ( ace_cc_yywrap() ) - return EOF; - -- if ( ! ace_cc_yy_did_buffer_switch_on_eof ) -+ /* if ( ! ace_cc_yy_did_buffer_switch_on_eof ) - ACE_CC_YY_NEW_FILE; - #ifdef __cplusplus - return ace_cc_yyinput(); - #else - return input(); --#endif -+ #endif */ - } - - case EOB_ACT_CONTINUE_SCAN: -@@ -1289,6 +1289,7 @@ - - return c; - } -+#endif /* ! ACE_CC_YY_NO_INPUT */ - - - #ifdef ACE_CC_YY_USE_PROTOS diff --git a/TAO/orbsvcs/tests/Concurrency/test.basic b/TAO/orbsvcs/tests/Concurrency/test.basic deleted file mode 100644 index 3673cebe927..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/test.basic +++ /dev/null @@ -1,21 +0,0 @@ -create test; -lock test read; -try_lock test read; -unlock test read; -unlock test read; -lock test write; -try_lock test write; -unlock test write; -lock test upgrade; -try_lock test upgrade; -unlock test upgrade; -lock test intention_read; -try_lock test intention_read; -unlock test intention_read; -unlock test intention_read; -lock test intention_write; -try_lock test intention_write; -unlock test intention_write; -create ls2; -unlock ls2 write; -exception IDL:omg.org/CosConcurrencyControl/LockNotHeld:1.0; diff --git a/TAO/orbsvcs/tests/Concurrency/test.dinphil b/TAO/orbsvcs/tests/Concurrency/test.dinphil deleted file mode 100644 index 81b02f90ee7..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/test.dinphil +++ /dev/null @@ -1,12 +0,0 @@ -print "Creating lock sets"; -create fork1; -create fork2; -create fork3; -create fork4; -create fork5; -print "Running the tests"; -start test.phil1; -start test.phil2; -start test.phil3; -start test.phil4; -start test.phil5; diff --git a/TAO/orbsvcs/tests/Concurrency/test.e1 b/TAO/orbsvcs/tests/Concurrency/test.e1 deleted file mode 100644 index 1c1e4517680..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/test.e1 +++ /dev/null @@ -1,2 +0,0 @@ -wait "Press return"; -unlock ls1 write; diff --git a/TAO/orbsvcs/tests/Concurrency/test.extended b/TAO/orbsvcs/tests/Concurrency/test.extended deleted file mode 100644 index 330f03e39c5..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/test.extended +++ /dev/null @@ -1,4 +0,0 @@ -create ls1; -lock ls1 write; -wait "Run test.e1 - then press return"; -lock ls1 write; diff --git a/TAO/orbsvcs/tests/Concurrency/test.phil1 b/TAO/orbsvcs/tests/Concurrency/test.phil1 deleted file mode 100644 index 19d25e04ef9..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/test.phil1 +++ /dev/null @@ -1,6 +0,0 @@ -repeat 100; -lock fork2 write; -lock fork1 write; -print "Phil 1 eating"; -unlock fork2 write; -unlock fork1 write; diff --git a/TAO/orbsvcs/tests/Concurrency/test.phil2 b/TAO/orbsvcs/tests/Concurrency/test.phil2 deleted file mode 100644 index 7f02934cf4d..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/test.phil2 +++ /dev/null @@ -1,6 +0,0 @@ -repeat 100; -lock fork2 write; -lock fork3 write; -print "Phil 2 eating"; -unlock fork2 write; -unlock fork3 write; diff --git a/TAO/orbsvcs/tests/Concurrency/test.phil3 b/TAO/orbsvcs/tests/Concurrency/test.phil3 deleted file mode 100644 index 4d808e88ac7..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/test.phil3 +++ /dev/null @@ -1,6 +0,0 @@ -repeat 100; -lock fork3 write; -lock fork4 write; -print "Phil 3 eating"; -unlock fork3 write; -unlock fork4 write; diff --git a/TAO/orbsvcs/tests/Concurrency/test.phil4 b/TAO/orbsvcs/tests/Concurrency/test.phil4 deleted file mode 100644 index 36910b9a9aa..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/test.phil4 +++ /dev/null @@ -1,6 +0,0 @@ -repeat 100; -lock fork4 write; -lock fork5 write; -print "Phil 4 eating"; -unlock fork4 write; -unlock fork5 write; diff --git a/TAO/orbsvcs/tests/Concurrency/test.phil5 b/TAO/orbsvcs/tests/Concurrency/test.phil5 deleted file mode 100644 index b5f5058eac6..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/test.phil5 +++ /dev/null @@ -1,6 +0,0 @@ -repeat 100; -lock fork5 write; -lock fork1 write; -print "Phil 5 eating"; -unlock fork5 write; -unlock fork1 write; diff --git a/TAO/orbsvcs/tests/Concurrency/tmplinst.cpp b/TAO/orbsvcs/tests/Concurrency/tmplinst.cpp deleted file mode 100644 index 3c8d0dcdd5f..00000000000 --- a/TAO/orbsvcs/tests/Concurrency/tmplinst.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// -// $Id$ -// - -// The contents of this file REALLY should be generated by the IDL -// compiler, but that functionality isn't available yet. - -#include "orbsvcs/orbsvcs/CosConcurrencyControlC.h" - -ACE_RCSID(Concurrency, tmplinst, "$Id$") - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/CosEC_Basic/CosECConsumer.cpp b/TAO/orbsvcs/tests/CosEC_Basic/CosECConsumer.cpp deleted file mode 100644 index 175a5fda746..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Basic/CosECConsumer.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "CosECConsumer.h" - -void -CosECConsumer::open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::ORB_var orb, - CORBA::Environment& ACE_TRY_ENV) -{ - this->orb_ = orb; - - // = Connect as a consumer. - this->consumer_admin_ = - event_channel->for_consumers (ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECConsumer::close (CORBA::Environment &ACE_TRY_ENV) -{ - this->disconnect (ACE_TRY_ENV); - ACE_CHECK; - - this->consumer_admin_ = - CosEventChannelAdmin::ConsumerAdmin::_nil (); -} - -void -CosECConsumer::connect (CORBA::Environment &ACE_TRY_ENV) -{ - if (CORBA::is_nil (this->consumer_admin_.in ())) - return; - - CosEventComm::PushConsumer_var objref = - this->_this (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_ = - this->consumer_admin_->obtain_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_->connect_push_consumer (objref.in (), - ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECConsumer::disconnect (CORBA::Environment &ACE_TRY_ENV) -{ - if (CORBA::is_nil (this->supplier_proxy_.in ()) - || CORBA::is_nil (this->consumer_admin_.in ())) - return; - - this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_ = - CosEventChannelAdmin::ProxyPushSupplier::_nil (); -} - -void -CosECConsumer::push (const CORBA::Any &, - CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, - "in CosECConsumer::push\n")); - this->orb_->shutdown (); -} - -void -CosECConsumer::disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV) -{ - // Deactivate this object. - - PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::ObjectId_var id = - poa->servant_to_id (this, - ACE_TRY_ENV); - ACE_CHECK; - - poa->deactivate_object (id.in (), - ACE_TRY_ENV); - ACE_CHECK; -} diff --git a/TAO/orbsvcs/tests/CosEC_Basic/CosECConsumer.h b/TAO/orbsvcs/tests/CosEC_Basic/CosECConsumer.h deleted file mode 100644 index d7e76f1a4fd..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Basic/CosECConsumer.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = FILENAME -// CosECConsumer.h -// -// = AUTHOR -// Pradeep Gore -// -// = DESCRIPTION -// Defines a simple Push Consumer. -// -// ============================================================================ - -#ifndef COSECCONSUMER_H_ -#define COSECCONSUMER_H_ - -#include "orbsvcs/CosEventCommC.h" -#include "orbsvcs/CosEventChannelAdminC.h" -#include "orbsvcs/CosEventCommS.h" -#include "orbsvcs/CosEventChannelAdminS.h" - -class CosECConsumer : public POA_CosEventComm::PushConsumer -{ - // = TITLE - // CosECConsumer - // - // = DESCRIPTION - // The CosECConsumer is a simple PushConsumer that connects to the - // CosEC and receives events from it. - -public: - void open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::ORB_var orb, - CORBA::Environment& ACE_TRY_ENV); - // This method connects the consumer to the EC. - - void close (CORBA::Environment &ACE_TRY_ENV); - // Disconnect from the EC. - - void connect (CORBA::Environment &ACE_TRY_ENV); - // Connect the CosECConsumer to the EventChannel. - - void disconnect (CORBA::Environment &ACE_TRY_ENV); - // Disconnect from the supplier, but do not forget about it or close - // it. - - virtual void push (const CORBA::Any &data, - CORBA::Environment &ACE_TRY_ENV); - // push the event to the consumer. - - virtual void disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV); - // disconnect the consumer from the EC. - -private: - CORBA::ORB_var orb_; - // The orb that we as using. - - CosEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; - // We talk to the EC using this proxy. - - CosEventChannelAdmin::ConsumerAdmin_var consumer_admin_; - // We talk to the EC using this proxy. -}; - -#endif /* COSECCONSUMER_H_ */ diff --git a/TAO/orbsvcs/tests/CosEC_Basic/CosECSupplier.cpp b/TAO/orbsvcs/tests/CosEC_Basic/CosECSupplier.cpp deleted file mode 100644 index e85157ac68f..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Basic/CosECSupplier.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "CosECSupplier.h" - -void -CosECSupplier::open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment& ACE_TRY_ENV) -{ - // = Connect as a consumer. - this->supplier_admin_ = - event_channel->for_suppliers (ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECSupplier::close (CORBA::Environment &ACE_TRY_ENV) -{ - this->disconnect (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_admin_ = - CosEventChannelAdmin::SupplierAdmin::_nil (); -} - -void -CosECSupplier::connect (CORBA::Environment &ACE_TRY_ENV) -{ - if (CORBA::is_nil (this->supplier_admin_.in ())) - return; - - this->consumer_proxy_ = - this->supplier_admin_->obtain_push_consumer (ACE_TRY_ENV); - ACE_CHECK; - - CosEventComm::PushSupplier_var objref = this->_this (ACE_TRY_ENV); - ACE_CHECK; - - this->consumer_proxy_->connect_push_supplier (objref.in (), - ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECSupplier::disconnect (CORBA::Environment &ACE_TRY_ENV) -{ - if (CORBA::is_nil (this->consumer_proxy_.in ()) - || CORBA::is_nil (this->supplier_admin_.in ())) - return; - - this->consumer_proxy_->disconnect_push_consumer (ACE_TRY_ENV); - ACE_CHECK; - - this->consumer_proxy_ = - CosEventChannelAdmin::ProxyPushConsumer::_nil (); -} - -void -CosECSupplier::send_event (const CORBA::Any & data, - CORBA::Environment &ACE_TRY_ENV) -{ - this->consumer_proxy_->push (data, ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECSupplier::disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV) -{ - // Deactivate this object. - - PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::ObjectId_var id = - poa->servant_to_id (this, - ACE_TRY_ENV); - ACE_CHECK; - - poa->deactivate_object (id.in (), - ACE_TRY_ENV); - ACE_CHECK; -} diff --git a/TAO/orbsvcs/tests/CosEC_Basic/CosECSupplier.h b/TAO/orbsvcs/tests/CosEC_Basic/CosECSupplier.h deleted file mode 100644 index 620ae70c8bc..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Basic/CosECSupplier.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = FILENAME -// CosECSupplier.h -// -// = AUTHOR -// Pradeep Gore -// -// = DESCRIPTION -// Defines a simple Push Supplier. -// -// ============================================================================ - -#ifndef COSECSUPPLIER_H_ -#define COSECSUPPLIER_H_ - -#include "orbsvcs/CosEventCommC.h" -#include "orbsvcs/CosEventChannelAdminC.h" -#include "orbsvcs/CosEventCommS.h" -#include "orbsvcs/CosEventChannelAdminS.h" - -class CosECSupplier : public POA_CosEventComm::PushSupplier -{ - // = TITLE - // CosECSupplier - // - // = DESCRIPTION - // The CosECSupplier is a simple Push Supplier that connects to - // the CosEC and sends events to it. -public: - void open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment &ACE_TRY_ENV); - // This method connects the supplier to the EC. - - void close (CORBA::Environment &ACE_TRY_ENV); - // Disconnect from the EC. - - void connect (CORBA::Environment &ACE_TRY_ENV); - - void disconnect (CORBA::Environment &ACE_TRY_ENV); - // Disconnect from the EC, but do not forget about it or close it. - - void send_event (const CORBA::Any &data, - CORBA::Environment &ACE_TRY_ENV); - // Send one event. - - virtual void disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV); - // The POA_CosEventComm::PushSupplier method. - -private: - CosEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; - // We talk to the EC using this proxy. - - CosEventChannelAdmin::SupplierAdmin_var supplier_admin_; - // We talk to the EC using this proxy. -}; - -#endif /* COSECSUPPLIER_H_ */ diff --git a/TAO/orbsvcs/tests/CosEC_Basic/CosEC_Basic.cpp b/TAO/orbsvcs/tests/CosEC_Basic/CosEC_Basic.cpp deleted file mode 100644 index 859d16c938c..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Basic/CosEC_Basic.cpp +++ /dev/null @@ -1,263 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "CosEC_Basic.h" - -int -main (int argc, char *argv []) -{ - CosEC_Basic basic; - - if (basic.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) CosEC_Basic::init failed.\n"), - -1); - basic.run (); - basic.shutdown (); - return 0; -} - -CosEC_Basic::CosEC_Basic (void) - : ec_impl_ (0) -{ - // No-Op. -} - -CosEC_Basic::~CosEC_Basic (void) -{ - // No-Op. -} - -int -CosEC_Basic::init_ORB (int argc, char *argv []) -{ - ACE_DECLARE_NEW_CORBA_ENV - ACE_TRY - { - this->orb_ = CORBA::ORB_init (argc, - argv, - "", - ACE_TRY_ENV); - ACE_TRY_CHECK; - - CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA", - ACE_TRY_ENV); - ACE_TRY_CHECK; - - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - -1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_TRY_ENV); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_TRY_ENV); - ACE_TRY_CHECK; - - return 0; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception in CosEC_Basic::init_ORB"); - return -1; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); - - ACE_NOTREACHED (return 0;) -} - -int -CosEC_Basic::init_RtEC (void) -{ - ACE_DECLARE_NEW_CORBA_ENV - ACE_TRY - { - this->scheduler_ = - this->scheduler_impl_._this (ACE_TRY_ENV); - ACE_TRY_CHECK; - - CORBA::String_var str = - this->orb_->object_to_string (this->scheduler_.in (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: The (local) scheduler IOR is <%s>\n", - str.in ())); - - if (ACE_Scheduler_Factory::server (this->scheduler_.in ()) == -1) - return -1; - - ACE_NEW_RETURN(this->ec_impl_, ACE_EventChannel (0, - ACE_DEFAULT_EVENT_CHANNEL_TYPE, - &module_factory_), -1); - this->rtec_ = this->ec_impl_->_this (ACE_TRY_ENV); - ACE_TRY_CHECK; - - str = this->orb_->object_to_string (this->rtec_.in (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: The RTEC IOR is <%s>\n", - str.in ())); - - this->ec_impl_->activate (); - - return 0; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception in CosEC_Basic::init_RtEC"); - return -1; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); - - ACE_NOTREACHED (return 0;) -} - -int -CosEC_Basic::init_CosEC (void) -{ - ACE_DECLARE_NEW_CORBA_ENV - ACE_TRY - { - // Setup the QOS params.. - this->supplier_qos_.insert (1, - ACE_ES_EVENT_ANY, - this->scheduler_->create ("supplier", - ACE_TRY_ENV), - 1); - ACE_TRY_CHECK; - - this->consumer_qos_.start_disjunction_group (); - this->consumer_qos_.insert_source (1, - this->scheduler_->create ("consumer", - ACE_TRY_ENV)); - ACE_TRY_CHECK; - - const RtecEventChannelAdmin::ConsumerQOS &consumerqos = - this->consumer_qos_.get_ConsumerQOS (); - - const RtecEventChannelAdmin::SupplierQOS &supplierqos = - this->supplier_qos_.get_SupplierQOS (); - - if (this->ec_i_.init (consumerqos, - supplierqos, - this->rtec_.in (), - ACE_TRY_ENV) != 0) - return -1; - - ACE_TRY_CHECK; - - this->cos_ec_ = this->ec_i_._this (ACE_TRY_ENV); - ACE_TRY_CHECK; - - return 0; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception in CosEC_Basic::init_CosEC"); - return -1; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); - - ACE_NOTREACHED (return 0;) -} - -int -CosEC_Basic::init (int argc, char *argv []) -{ - if (init_ORB (argc, argv) == -1 - || init_RtEC () == -1 - || init_CosEC () == -1) - return -1; - else - return 0; -} - -void -CosEC_Basic::shutdown (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - this->supplier_.close (ACE_TRY_ENV); - ACE_TRY_CHECK; - - this->consumer_.close (ACE_TRY_ENV); - ACE_TRY_CHECK; - - this->cos_ec_->destroy (ACE_TRY_ENV); - ACE_TRY_CHECK; - - this->ec_impl_->shutdown (); - delete this->ec_impl_; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception in CosEC_Basic::shutdown"); - } - ACE_ENDTRY; - ACE_CHECK; -} - -void -CosEC_Basic::run (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - // Create an Any type to pass to the Cos EC. - CORBA_Any cany; - cany <<= CORBA::Long (50); - CORBA::Any any; - cany >>= any; - - this->consumer_.open (this->cos_ec_, - this->orb_, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - this->consumer_.connect (ACE_TRY_ENV); - ACE_TRY_CHECK; - - this->supplier_.open (this->cos_ec_, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - this->supplier_.connect (ACE_TRY_ENV); - ACE_TRY_CHECK; - - this->supplier_.send_event (any, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "exception in CosEC_Basic::runtest\n"); - } - ACE_ENDTRY; - ACE_CHECK; - - this->orb_->run (); - // wait here. - // When the consumer gets the event we pushed, it will shutdown the ORB. - // We will return from then. -} diff --git a/TAO/orbsvcs/tests/CosEC_Basic/CosEC_Basic.h b/TAO/orbsvcs/tests/CosEC_Basic/CosEC_Basic.h deleted file mode 100644 index a5b4e472bfc..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Basic/CosEC_Basic.h +++ /dev/null @@ -1,110 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = FILENAME -// CosEC_Basic.h -// -// = AUTHOR -// Pradeep Gore -// -// = DESCRIPTION -// This is a simple test class for the standard Cos Event Channel. -// -// ============================================================================ - -#ifndef COSECBASIC_H -#define COSECBASIC_H - -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Scheduler_Factory.h" -#include "orbsvcs/Time_Utilities.h" -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "orbsvcs/Sched/Config_Scheduler.h" -#include "orbsvcs/Runtime_Scheduler.h" -#include "orbsvcs/Event/Event_Channel.h" -#include "orbsvcs/Event/Module_Factory.h" -#include "orbsvcs/CosEvent/EventChannel_i.h" -#include "CosECConsumer.h" -#include "CosECSupplier.h" - -class CosEC_Basic -{ - // = TITLE - // class CosEC_Basic - // - // = DESCRIPTION - // Creates a CORBA Standard Event Channel (COSEC) implemented with - // TAO's Real-time Event Channel (RtEC) and sends an event across. -public: - // = Initialization and termination methods. - CosEC_Basic (void); - // Constructor. - - ~CosEC_Basic (void); - // Destructor. - - int init (int argc, char *argv[]); - // Starts up an ORB, a Rtec and the CosEC. - // Returns 0 on success, -1 on error. - - void run (void); - // Connects a consumer and a supplier to the CosEC and sends 1 event - // across. - - void shutdown (void); - // Closes down the Rtec and CosEC. - -private: - int init_ORB (int argc, char *argv[]); - // initializes the ORB. - // Returns 0 on success, -1 on error. - - int init_RtEC (void); - // initializes the Real Time EC. - // Returns 0 on success, -1 on error. - - int init_CosEC (void); - // initializes the COS EC. - // Returns 0 on success, -1 on error. - - CORBA::ORB_var orb_; - // The ORB that we use. - - TAO_Reactive_Module_Factory module_factory_; - // The Module_Factory required by the Rtec. - - ACE_Config_Scheduler scheduler_impl_; - // Scheduler used by the Rtec. - - RtecScheduler::Scheduler_var scheduler_; - // Reference to the Scheduler after activating it in the ORB. - - ACE_EventChannel *ec_impl_; - // The servant object of the Rtec. - - RtecEventChannelAdmin::EventChannel_var rtec_; - // Reference to the Rtec returned after activating it in the ORB. - - ACE_ConsumerQOS_Factory consumer_qos_; - // The Consumer QOS. - - ACE_SupplierQOS_Factory supplier_qos_; - // The Supplier QOS. - - TAO_CosEC_EventChannel_i ec_i_; - // The servant object of the COS Event Channel. - - CosEventChannelAdmin::EventChannel_ptr cos_ec_; - // Reference to the CosEC returned after activating it in the ORB. - - CosECConsumer consumer_; - // The Cos Consumer that will receive the event. - - CosECSupplier supplier_; - // The Cos Supplier that will supply the event. -}; - -#endif /* COSECBASIC_H */ diff --git a/TAO/orbsvcs/tests/CosEC_Basic/Makefile b/TAO/orbsvcs/tests/CosEC_Basic/Makefile deleted file mode 100644 index eb15b4ad283..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Basic/Makefile +++ /dev/null @@ -1,170 +0,0 @@ -# $Id$ - -BIN = CosEC_Basic - -SRC = $(BIN:%=%$(VAR).cpp) \ - CosECConsumer.cpp \ - CosECSupplier.cpp - -LDLIBS= -lorbsvcs -lTAO - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_ROOT) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU - -#### Local rules and variables... - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/CosEC_Basic.o .obj/CosEC_Basic.so .shobj/CosEC_Basic.o .shobj/CosEC_Basic.so: CosEC_Basic.cpp CosEC_Basic.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(ACE_ROOT)/ace/Timer_List.h \ - $(ACE_ROOT)/ace/Timer_List_T.h \ - $(ACE_ROOT)/ace/Timer_List_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Module_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEvent/EventChannel_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEvent/ConsumerAdmin_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEvent/ProxyPushSupplier_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEvent/SupplierAdmin_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEvent/ProxyPushConsumer_i.h \ - CosECConsumer.h CosECSupplier.h -.obj/CosECConsumer.o .obj/CosECConsumer.so .shobj/CosECConsumer.o .shobj/CosECConsumer.so: CosECConsumer.cpp CosECConsumer.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.i -.obj/CosECSupplier.o .obj/CosECSupplier.so .shobj/CosECSupplier.o .shobj/CosECSupplier.so: CosECSupplier.cpp CosECSupplier.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/CosEC_Basic/README b/TAO/orbsvcs/tests/CosEC_Basic/README deleted file mode 100644 index 291ec0fa208..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Basic/README +++ /dev/null @@ -1,26 +0,0 @@ -$Id$ - -The Cos_ECBasic test shows how to: - - . Create a standard Cos Event Channel, - . Write simple COS compliant consumers and suppliers, - . Connect consumers and suppliers to the COSEC, - . Send and receive events form the EC. - -For initialization, the CosEC_Basic test first creates and initializes -a TAO real-time EC (Rtec). Then, it initializes QOS parameters for -the Supplier and Consumers and then initializes a COSEC (Corba Object -Service compliant Event Channel). - -To test the COSEC the test initializes a Supplier and a Consumer , -connects them to the COSEC. The Supplier then sends an event to the -channel which is delivered to the Consumer via the method. -This method then prints a message to show that an event was delivered -to the Consumer. - -Finally the Rtec and COSEC are shutdown to finish the test. - -NOTE: please do not attempt to compile this test till I've integrated -the COSEC code into orbsvcs. - -- Pradeep diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/CosECConsumer.cpp b/TAO/orbsvcs/tests/CosEC_Multiple/CosECConsumer.cpp deleted file mode 100644 index b0d4451ea86..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Multiple/CosECConsumer.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "CosECConsumer.h" -#include - -CosECConsumer::CosECConsumer () - :event_count_ (1) -{ - // No-Op. -} - -int -CosECConsumer::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "n:c:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'n': - this->service_name = get_opt.optarg; - break; - - case 'c': - this->event_count_ = ACE_OS::atoi (get_opt.optarg); - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - " -n " - " -c event_count" - " \n", - argv[0])); - return -1; - } - } - - return 0; -} - -void -CosECConsumer::open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment& ACE_TRY_ENV) -{ - // = Connect as a consumer. - this->consumer_admin_ = - event_channel->for_consumers (ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECConsumer::close (CORBA::Environment &ACE_TRY_ENV) -{ - this->disconnect (ACE_TRY_ENV); - ACE_CHECK; - - this->consumer_admin_ = - CosEventChannelAdmin::ConsumerAdmin::_nil (); -} - -void -CosECConsumer::connect (CORBA::Environment &ACE_TRY_ENV) -{ - if (CORBA::is_nil (this->consumer_admin_.in ())) - return; - - CosEventComm::PushConsumer_var objref = - this->_this (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_ = - this->consumer_admin_->obtain_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_->connect_push_consumer (objref.in (), - ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECConsumer::disconnect (CORBA::Environment &ACE_TRY_ENV) -{ - if (CORBA::is_nil (this->supplier_proxy_.in ()) - || CORBA::is_nil (this->consumer_admin_.in ())) - return; - - this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_proxy_ = - CosEventChannelAdmin::ProxyPushSupplier::_nil (); -} - -void -CosECConsumer::push (const CORBA::Any &data, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P):%s\n", - " - In CosECConsumer::push")); - - ACE_DEBUG ((LM_DEBUG, - "Event count = %d\n", - this->event_count_)); - - if (--this->event_count_ == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%P):%s\n", - "exiting the consumer.")); - - this->close (ACE_TRY_ENV); - ACE_CHECK; - - this->shutdown (); - } -} - -void -CosECConsumer::disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV) -{ - // Deactivate this object. - - PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::ObjectId_var id = - poa->servant_to_id (this, - ACE_TRY_ENV); - ACE_CHECK; - - poa->deactivate_object (id.in (), - ACE_TRY_ENV); - ACE_CHECK; -} - -int -CosECConsumer::init_Consumer (void) -{ - ACE_DECLARE_NEW_CORBA_ENV - ACE_TRY - { - this->open (this->cos_ec_, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - this->connect (ACE_TRY_ENV); - ACE_TRY_CHECK; - - return 0; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception in CosECConsumer::connect (void)\n"); - return -1; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); - - ACE_NOTREACHED (return 0;) -} - -int -main (int argc, char *argv[]) -{ - CosECConsumer cons; - - if (cons.init (argc, argv) == -1) - return 1; - - if (cons.init_Consumer () == -1) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "(%P): %s\n", "Started the consumer..")); - - cons.runORB (); - - cons.shutdown (); - - return 0; -} diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/CosECConsumer.h b/TAO/orbsvcs/tests/CosEC_Multiple/CosECConsumer.h deleted file mode 100644 index a25d598be92..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Multiple/CosECConsumer.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = FILENAME -// CosECConsumer.h -// -// = AUTHOR -// Pradeep Gore -// -// = DESCRIPTION -// Defines a simple Push Consumer. -// -// ============================================================================ - -#ifndef COSECCONSUMER_H_ -#define COSECCONSUMER_H_ - -#include "orbsvcs/CosEventCommC.h" -#include "orbsvcs/CosEventChannelAdminC.h" -#include "orbsvcs/CosEventCommS.h" -#include "orbsvcs/CosEventChannelAdminS.h" -#include "CosEC_Multiple.h" - -class CosECConsumer : public POA_CosEventComm::PushConsumer, - public CosEC_Multiple -{ - // = TITLE - // CosECConsumer - // - // = DESCRIPTION - // The CosECConsumer is a simple PushConsumer that connects to the - // CosEC and receives events from it. - -public: - // = Initializatiopn and termination methods. - CosECConsumer (); - // Constructor. - - int init_Consumer (void); - // Initialize the Consumer. - - void open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment& ACE_TRY_ENV); - // This method connects the consumer to the EC. - - void close (CORBA::Environment &ACE_TRY_ENV); - // Disconnect from the EC. - - void connect (CORBA::Environment &ACE_TRY_ENV); - // Connect the CosECConsumer to the EventChannel. - - void disconnect (CORBA::Environment &ACE_TRY_ENV); - // Disconnect from the supplier, but do not forget about it or close - // it. - - virtual void push (const CORBA::Any &data, - CORBA::Environment &ACE_TRY_ENV); - // push the event to the consumer. - - virtual void disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV); - // disconnect the consumer from the EC. - - // = CosEC_Multiple methods. - virtual int parse_args (int argc, char *argv []); - // Parse the command line options. - -private: - CosEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; - // We talk to the EC using this proxy. - - CosEventChannelAdmin::ConsumerAdmin_var consumer_admin_; - // We talk to the EC using this proxy. - - int event_count_; - // The number of Events to receive before switching off. -}; - -#endif /* COSECCONSUMER_H_ */ diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/CosECSupplier.cpp b/TAO/orbsvcs/tests/CosEC_Multiple/CosECSupplier.cpp deleted file mode 100644 index 0a6f64f5b0c..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Multiple/CosECSupplier.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "CosECSupplier.h" -#include - -CosECSupplier::CosECSupplier () - : event_count_ (1) -{ - // No-Op. -} - -int -CosECSupplier::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "n:c:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'n': - this->service_name = get_opt.optarg; - break; - - case 'c': - this->event_count_ = ACE_OS::atoi (get_opt.optarg); - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - " -n " - " \n", - argv[0])); - return -1; - } - } - - return 0; -} - -void -CosECSupplier::open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment& ACE_TRY_ENV) -{ - // = Connect as a consumer. - this->supplier_admin_ = - event_channel->for_suppliers (ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECSupplier::close (CORBA::Environment &ACE_TRY_ENV) -{ - this->disconnect (ACE_TRY_ENV); - ACE_CHECK; - - this->supplier_admin_ = - CosEventChannelAdmin::SupplierAdmin::_nil (); -} - -void -CosECSupplier::connect (CORBA::Environment &ACE_TRY_ENV) -{ - if (CORBA::is_nil (this->supplier_admin_.in ())) - return; - - this->consumer_proxy_ = - this->supplier_admin_->obtain_push_consumer (ACE_TRY_ENV); - ACE_CHECK; - - CosEventComm::PushSupplier_var objref = this->_this (ACE_TRY_ENV); - ACE_CHECK; - - this->consumer_proxy_->connect_push_supplier (objref.in (), - ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECSupplier::disconnect (CORBA::Environment &ACE_TRY_ENV) -{ - if (CORBA::is_nil (this->consumer_proxy_.in ()) - || CORBA::is_nil (this->supplier_admin_.in ())) - return; - - this->consumer_proxy_->disconnect_push_consumer (ACE_TRY_ENV); - ACE_CHECK; - - this->consumer_proxy_ = - CosEventChannelAdmin::ProxyPushConsumer::_nil (); -} - -void -CosECSupplier::send_event (const CORBA::Any & data, - CORBA::Environment &ACE_TRY_ENV) -{ - this->consumer_proxy_->push (data, ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECSupplier::disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV) -{ - // Deactivate this object. - - PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); - ACE_CHECK; - - PortableServer::ObjectId_var id = - poa->servant_to_id (this, - ACE_TRY_ENV); - ACE_CHECK; - - poa->deactivate_object (id.in (), - ACE_TRY_ENV); - ACE_CHECK; -} - -void -CosECSupplier::run (void) -{ - ACE_DECLARE_NEW_CORBA_ENV - ACE_TRY - { - // Create an Any type to pass to the Cos EC. - CORBA_Any cany; - cany <<= CORBA::Long (50); - CORBA::Any any; - cany >>= any; - - this->open (this->cos_ec_, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - this->connect (ACE_TRY_ENV); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, - "(%P):sending %d events...\n", - this->event_count_)); - - for (int count = this->event_count_; - count != 0; - count--) - { - this->send_event (any, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - - ACE_DEBUG ((LM_DEBUG, - "(%P):Done!. exiting now..\n")); - - this->close (ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception in CosEC_Multiple::run\n"); - } - ACE_ENDTRY; - ACE_CHECK; -} - -int -main (int argc, char *argv[]) -{ - CosECSupplier supp; - - if (supp.init (argc, argv) == -1) - return 1; - - supp.run (); - - supp.shutdown (); - - return 0; -} diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/CosECSupplier.h b/TAO/orbsvcs/tests/CosEC_Multiple/CosECSupplier.h deleted file mode 100644 index 284b67e3b69..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Multiple/CosECSupplier.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = FILENAME -// CosECSupplier.h -// -// = AUTHOR -// Pradeep Gore -// -// = DESCRIPTION -// Defines a simple Push Supplier. -// -// ============================================================================ - -#ifndef COSECSUPPLIER_H_ -#define COSECSUPPLIER_H_ - -#include "orbsvcs/CosEventCommC.h" -#include "orbsvcs/CosEventChannelAdminC.h" -#include "orbsvcs/CosEventCommS.h" -#include "orbsvcs/CosEventChannelAdminS.h" -#include "CosEC_Multiple.h" - -class CosECSupplier : public POA_CosEventComm::PushSupplier, - public CosEC_Multiple -{ - // = TITLE - // CosECSupplier - // - // = DESCRIPTION - // The CosECSupplier is a simple Push Supplier that connects to - // the CosEC and sends events to it. -public: - // = Initializatiopn and termination methods. - CosECSupplier (); - // Constructor. - - void open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment &ACE_TRY_ENV); - // This method connects the supplier to the EC. - - void close (CORBA::Environment &ACE_TRY_ENV); - // Disconnect from the EC. - - void connect (CORBA::Environment &ACE_TRY_ENV); - - void disconnect (CORBA::Environment &ACE_TRY_ENV); - // Disconnect from the EC, but do not forget about it or close it. - - void send_event (const CORBA::Any &data, - CORBA::Environment &ACE_TRY_ENV); - // Send one event. - - virtual void disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV); - // The POA_CosEventComm::PushSupplier method. - - void run (void); - // Sends the events to the EC. - - // = CosEC_Multiple methods. - virtual int parse_args (int argc, char *argv []); - // Parses the command line arguments. -private: - CosEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; - // We talk to the EC using this proxy. - - CosEventChannelAdmin::SupplierAdmin_var supplier_admin_; - // We talk to the EC using this proxy. - - int event_count_; - // The number of Events to send to the EC. -}; - -#endif /* COSECSUPPLIER_H_ */ diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.cpp b/TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.cpp deleted file mode 100644 index aeb71c366be..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.cpp +++ /dev/null @@ -1,146 +0,0 @@ -// $Id$ - -#include "CosEC_Multiple.h" - -CosEC_Multiple::CosEC_Multiple (void) - : cos_ec_ (CosEventChannelAdmin::EventChannel::_nil ()), - service_name ("CosEventService"), - orb_ (CORBA::ORB::_nil ()) -{ - // No-Op. -} - - -CosEC_Multiple::~CosEC_Multiple (void) -{ - // No-Op. -} - -int -CosEC_Multiple::init (int argc, char *argv[]) -{ - if (this->parse_args (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "parse error returned error.\n"), - -1); - - if (init_ORB (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "init_ORB returned error.\n"), - -1); - - if (init_CosEC () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "init_CosEC returned error.\n"), - -1); - return 0; -} - -int -CosEC_Multiple::init_ORB (int argc, char *argv []) -{ - ACE_DECLARE_NEW_CORBA_ENV - ACE_TRY - { - this->orb_ = CORBA::ORB_init (argc, - argv, - "", - ACE_TRY_ENV); - ACE_TRY_CHECK; - - CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA", - ACE_TRY_ENV); - ACE_TRY_CHECK; - - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - -1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_TRY_ENV); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_TRY_ENV); - ACE_TRY_CHECK; - - return 0; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception in CosEC_Basic::init_ORB\n"); - return -1; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); - - ACE_NOTREACHED (return 0;) -} - -int -CosEC_Multiple::init_CosEC (void) -{ - ACE_DECLARE_NEW_CORBA_ENV - ACE_TRY - { - // Initialization of the naming service. - if (this->naming_client_.init (this->orb_.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - CosNaming::Name ec_ref_name (1); - ec_ref_name.length (1); - ec_ref_name[0].id = - CORBA::string_dup (this->service_name); - - CORBA::Object_var EC_obj = - this->naming_client_->resolve (ec_ref_name, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - // The CORBA::Object_var object is downcast to - // CosEventChannelAdmin::EventChannel - // using the <_narrow> method. - this->cos_ec_ = - CosEventChannelAdmin::EventChannel::_narrow (EC_obj.in (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - - return 0; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception in CosEC_Basic::init_ORB\n"); - return -1; - } - ACE_ENDTRY; - ACE_CHECK_RETURN (-1); - - ACE_NOTREACHED (return 0;) -} - -int -CosEC_Multiple::runORB (void) -{ - if (this->orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); - - return 0; -} - -void -CosEC_Multiple::shutdown (void) -{ - if (!this->orb_->_nil ()) - this->orb_->shutdown (); -} diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.h b/TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.h deleted file mode 100644 index 685b18ad3bb..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = FILENAME -// CosEC_Multiple.h -// -// = AUTHOR -// Pradeep Gore -// -// = DESCRIPTION -// This is a test class for the Cos Event Service. -// -// ============================================================================ - -#ifndef COSECMULTIPLE_H -#define COSECMULTIPLE_H - -#include "orbsvcs/Naming/Naming_Utils.h" -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/CosEventChannelAdminC.h" - -class CosEC_Multiple -{ - public: - // = TITLE - // class CosEC_Multiple - // - // = DESCRIPTION - // Base class for suppliers and consumers to send/receive events - // via the Cos Event Service. - public: - // = Initialization and termination methods. - CosEC_Multiple (void); - // Constructor. - - virtual ~CosEC_Multiple (void); - // Destructor. - - int init (int argc, char *argv[]); - // Calls parse_args, Starts up an ORB, gets hold of the Event Service. - // Returns 0 on success, -1 on error. - - int runORB (void); - // Calls the ORB's method. - - void shutdown (void); - // Closes down the ORB and exits. - - protected: - virtual int parse_args (int argc, char *argv []) = 0; - // Parse the command line arguments. - - CosEventChannelAdmin::EventChannel_ptr cos_ec_; - // Reference to a running Event Service. - - const char* service_name; -// The name with which to locate the Event Service. - - private: - int init_ORB (int argc, char *argv[]); - // initializes the ORB. - // Returns 0 on success, -1 on error. - - int init_CosEC (void); - // initializes the COS EC. - // Returns 0 on success, -1 on error. - - CORBA::ORB_var orb_; - // The ORB that we use. - - TAO_Naming_Client naming_client_; - // An instance of the name client used for resolving the factory - // objects. -}; - -#endif /* COSECMULTIPLE_H */ diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/Makefile b/TAO/orbsvcs/tests/CosEC_Multiple/Makefile deleted file mode 100644 index f7abcc798fb..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Multiple/Makefile +++ /dev/null @@ -1,392 +0,0 @@ -# $Id$ -# -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif # ! TAO_ROOT - -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_ROOT) - -LDLIBS = -lorbsvcs -lTAO - -PROG_SRCS = \ - CosEC_Multiple.cpp \ - CosECConsumer.cpp \ - CosECSupplier.cpp - -SRC = $(PROG_SRCS) - -SIMPLE_CON_OBJS = \ - CosEC_Multiple.o \ - CosECConsumer.o - -SIMPLE_SUP_OBJS = \ - CosEC_Multiple.o \ - CosECSupplier.o - -BIN = supplier \ - consumer -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) -VBIN = $(BIN:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -LDFLAGS += -L$(TAO_ROOT)/tao -CPPFLAGS += - -supplier:$(addprefix $(VDIR),$(SIMPLE_SUP_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -consumer:$(addprefix $(VDIR),$(SIMPLE_CON_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/CosEC_Multiple.o .obj/CosEC_Multiple.so .shobj/CosEC_Multiple.o .shobj/CosEC_Multiple.so: CosEC_Multiple.cpp CosEC_Multiple.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/tao/corba.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/Servant_Base.i \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Pluggable.h \ - $(TAO_ROOT)/tao/MProfile.h \ - $(TAO_ROOT)/tao/MProfile.i \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/params.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(TAO_ROOT)/tao/IIOP_Connector.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/IIOP_Acceptor.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.i -.obj/CosECConsumer.o .obj/CosECConsumer.so .shobj/CosECConsumer.o .shobj/CosECConsumer.so: CosECConsumer.cpp CosECConsumer.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.i \ - CosEC_Multiple.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h -.obj/CosECSupplier.o .obj/CosECSupplier.so .shobj/CosECSupplier.o .shobj/CosECSupplier.so: CosECSupplier.cpp CosECSupplier.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.i \ - CosEC_Multiple.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/README b/TAO/orbsvcs/tests/CosEC_Multiple/README deleted file mode 100644 index 6b6d90cb706..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Multiple/README +++ /dev/null @@ -1,77 +0,0 @@ - CosEC_Multiple ------------------------------------------------------------------------- -This test for the Cos Event Service has 2 executables - one for suppliers -and the other for consumers. -Both connect to a running Event Service. - -To run a test manually: -1. Start one or more consumers. -2. Run a Supplier, the consumer displays the data received. - -The command line parameters for the Supplier are: - -n ,the default name is "CosEventService" - - -c , number of events to send to the CosEC. - -The command line parameters for the Consumer are: - -n ,the default name is "CosEventService" - - -c , number of events to receive from the CosEC. - ------------------------------------------------------------------------- -Test Scripts: - -run_test.pl - Event filtering using the RtEC. - -This test starts up 2 CosEC's connected to one RtEC as shown.. - - --------- - | RtEC | - --------- - | - | - ________|____________ - | | - ____|____ ____|____ - | CosEC1 | | CosEC2 | - "cosec1" _________ _________ "cosec2" - | | - _____|________ _____|_______ - | | | | - consumerA supplierB consumerB supplierA - -The CosEC1 (see fig.) is setup with these parameters: -# cos event service name = "cosec1" -# for ConsumerQOS: EventID = 21, SourceID = 6 -# for SupplierQOS: EventID = 20, SourceID = 5 - -The CosEC2 (see fig.) is setup with these parameters: -# cos event service name = "cosec2" -# for ConsumerQOS: EventID = 20, SourceID = 5 -# for SupplierQOS: EventID = 21, SourceID = 6 - -This setup configures the CosEC's such that consumerA connected to CosEC1 receives events from supplierA connected to CosEC2. -similarly, consumerB and supplierB form the other pair. - -Parameters: - --e event_count, The number of events supplied by each supplier - and also the number of events that a consumer will count - before shutting down. - -To execute this test, run the run_test.pl script. - ------------------------------------------------------------------------- -run_test2.pl: demostrates multiple consumers and suppliers connected -to one CosEC. -This test has the following params - - --e event_count, The number of events supplied by each supplier - and also the number of events that a consumer will count - before shutting down. - --c consumers, The number of consumers to connect the Event service. - --s suppliers, The number of suppliers to connect the Event service. - ------------------------------------------------------------------------- diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/run_test.pl b/TAO/orbsvcs/tests/CosEC_Multiple/run_test.pl deleted file mode 100755 index 63a6701aa35..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Multiple/run_test.pl +++ /dev/null @@ -1,115 +0,0 @@ -#$Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -use lib "../../../../bin"; - -require ACEutils; - -#event count -$ev_count = 2; - -# setup CosEC params such that.. -# cos event service name = "cosec1" -# for ConsumerQOS: EventID = 21, SourceID = 6 -# for SupplierQOS: EventID = 20, SourceID = 5. -$CosEC1_params = "-n cosec1 -e 21 -o 6 -p \"5 20\""; - -# setup another CosEC params such that.. -# cos event service name = "cosec2" -# for ConsumerQOS: EventID = 20, SourceID = 5 -# for SupplierQOS: EventID = 21, SourceID = 6. -$CosEC2_params = "-n cosec2 -e 20 -o 5 -p \"6 21\""; - -sub cosec_multiple_test1 -{ - # first start the Naming service.. - $SV1 = Process::Create ($EXEPREFIX."../../Naming_Service/Naming_Service".$Process::EXE_EXT,""); - - sleep 10; - - # now start the Rt EC.. - $SV2 = Process::Create ($EXEPREFIX."../../Event_Service/Event_Service".$Process::EXE_EXT,""); - - sleep 10; - - # now start the CosEC1.. - $SV3 = Process::Create ($EXEPREFIX."../../CosEvent_Service/CosEvent_Service".$Process::EXE_EXT,$CosEC1_params); - - sleep 10; - - # now start the CosEC2.. - $SV4 = Process::Create ($EXEPREFIX."../../CosEvent_Service/CosEvent_Service".$Process::EXE_EXT,$CosEC2_params); - - sleep 10; - - #start 1 consumer that uses CosEC1 to receive events - $CONS = Process::Create ($EXEPREFIX."consumer".$Process::EXE_EXT,"-n cosec1 -c $ev_count"); - - sleep 10; - - #start 1 supplier that uses CosEC2 to send events - $SUPP = Process::Create ($EXEPREFIX."supplier".$Process::EXE_EXT,"-n cosec2 -c $ev_count"); - - sleep 10; - - #wait for the supplier to finish - $SUPP->Wait (); - - - #wait for the consumer to finish - $CONS->Wait (); - - #---------- - #start 1 consumer that uses CosEC1 to receive events - $CONS2 = Process::Create ($EXEPREFIX."consumer".$Process::EXE_EXT,"-n cosec2 -c $ev_count"); - - sleep 10; - - #start 1 supplier that uses CosEC2 to send events - $SUPP2 = Process::Create ($EXEPREFIX."supplier".$Process::EXE_EXT,"-n cosec1 -c $ev_count"); - - sleep 10; - - #wait for the supplier to finish - $SUPP2->Wait (); - - - #wait for the consumer to finish - $CONS2->Wait (); - #---------- - # cleanup.. - $SV1->Kill (); - $SV2->Kill (); - $SV3->Kill (); - $SV4->Kill (); - - $SV1->Wait (); - $SV2->Wait (); - $SV3->Wait (); - $SV4->Wait (); -} - -# Parse the arguments - -for ($i = 0; $i <= $#ARGV; $i++) -{ - SWITCH: - { - if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") - { - print "usage: run_test.pl -e event_count -h help\n"; - exit; - } - if ($ARGV[$i] eq "-e") - { - $ev_count = $ARGV[$i + 1]; - $i++; - last SWITCH; - } -} -} - -cosec_multiple_test1 (); diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/run_test2.pl b/TAO/orbsvcs/tests/CosEC_Multiple/run_test2.pl deleted file mode 100755 index a748182fe12..00000000000 --- a/TAO/orbsvcs/tests/CosEC_Multiple/run_test2.pl +++ /dev/null @@ -1,104 +0,0 @@ -#$Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -use lib "../../../../bin"; - -require ACEutils; - -$con_count = 10; -$sup_count = 10; -$ev_count = 8; - -sub cosec_multiple_test2 -{ - # first start the Naming service.. - $SV1 = Process::Create ($EXEPREFIX."../../Naming_Service/Naming_Service".$Process::EXE_EXT,""); - - sleep 10; - - # now start the Rt EC.. - $SV2 = Process::Create ($EXEPREFIX."../../Event_Service/Event_Service".$Process::EXE_EXT,""); - - sleep 10; - - # now start the CosEC1.. - $SV3 = Process::Create ($EXEPREFIX."../../CosEvent_Service/CosEvent_Service".$Process::EXE_EXT); - - sleep 10; - - # now start the consumers - for ($cntr1 = 0; $cntr1 < $con_count ; $cntr1+=1) - { - print "creating consumer# $cntr1\n"; - $CONS = Process::Create ($EXEPREFIX."consumer".$Process::EXE_EXT, - "-c $ev_count"); - sleep 10; - } - - - # now start the suppliers - for ($cntr2 = 0; $cntr2 < $con_count ; $cntr2+=1) - { - print "creating supplier# $cntr2\n"; - $SUPP = Process::Create ($EXEPREFIX."supplier".$Process::EXE_EXT, - "-c $ev_count"); - sleep 10; - } - - print "waiting for the last supplier to finish\n"; - $SUPP->Wait (); - - - print "waiting for the last consumer to finish\n"; - $CONS->Wait (); - - - print "cleanup...\n"; - $SV1->Kill (); - $SV2->Kill (); - $SV3->Kill (); - - $SV1->Wait (); - $SV2->Wait (); - $SV3->Wait (); - - print "done!.\n"; -} - -# Parse the arguments - -for ($i = 0; $i <= $#ARGV; $i++) -{ - SWITCH: - { - if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") - { - print "usage: run_test2.pl -e event_count -c consumers -s suppliers -h help\n"; - exit; - } - if ($ARGV[$i] eq "-e") - { - $ev_count = $ARGV[$i + 1]; - $i++; - last SWITCH; - } - if ($ARGV[$i] eq "-c") - { - $con_count = $ARGV[$i + 1]; - $i++; - last SWITCH; - } - if ($ARGV[$i] eq "-s") - { - $sup_count = $ARGV[$i + 1]; - $i++; - last SWITCH; - } -} -} - - -cosec_multiple_test2 (); diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp deleted file mode 100644 index 09696ba2c55..00000000000 --- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp +++ /dev/null @@ -1,1184 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/Sched_Params.h" - -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Time_Utilities.h" -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "orbsvcs/Sched/Config_Scheduler.h" -#include "orbsvcs/Runtime_Scheduler.h" -#include "orbsvcs/Event/Event_Channel.h" -#include "orbsvcs/Event/Module_Factory.h" -#include "EC_Basic.h" - -#if !defined (__ACE_INLINE__) -#include "EC_Basic.i" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID(EC_Basic, EC_Basic, "$Id$") - -// **************************************************************** - -int -main (int argc, char *argv []) -{ - ECB_Driver driver; - return driver.run (argc, argv); -} - -// **************************************************************** - -ECB_Driver::ECB_Driver (void) - : pid_filename_ (0) -{ -} - -int -ECB_Driver::run (int argc, char* argv[]) -{ - TAO_TRY - { - this->orb_ = - CORBA::ORB_init (argc, - argv, - "", - TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - this->orb_->resolve_initial_references ("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->parse_args (argc, argv)) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: Execution parameters:\n" - " pid file name = <%s>\n", - this->pid_filename_ ? this->pid_filename_ : "nil")); - - if (this->pid_filename_ != 0) - { - FILE *pid = ACE_OS::fopen (this->pid_filename_, - "w"); - if (pid != 0) - { - ACE_OS::fprintf (pid, - "%d\n", - ACE_OS::getpid ()); - ACE_OS::fclose (pid); - } - } - - ACE_Config_Scheduler scheduler_impl; - RtecScheduler::Scheduler_var scheduler = - scheduler_impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::String_var str = - this->orb_->object_to_string (scheduler.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: The (local) scheduler IOR is <%s>\n", - str.in ())); - - // Create the EventService implementation, but don't start its - // internal threads. - TAO_Reactive_Module_Factory module_factory; - ACE_EventChannel ec_impl (scheduler.in (), - 0, - ACE_DEFAULT_EVENT_CHANNEL_TYPE, - &module_factory); - - // Register Event_Service with the Naming Service. - RtecEventChannelAdmin::EventChannel_var ec = - ec_impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - str = this->orb_->object_to_string (ec.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: The (local) EC IOR is <%s>\n", - str.in ())); - - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventChannelAdmin::EventChannel_var local_ec = - ec_impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ec_impl.activate (); - - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: local EC objref ready\n")); - - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: start supplier_id_test\n")); - - ECB_SupplierID_Test supplier_id_test; - supplier_id_test.run (this->orb_.in (), - local_ec.in (), - scheduler.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (supplier_id_test.dump_results () != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "EC_Basic: supplier_id test failed\n"), - -1); - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: end supplier_id_test\n")); - - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: start correlation_test\n")); - - ECB_Correlation_Test correlation_test; - correlation_test.run (this->orb_.in (), - local_ec.in (), - scheduler.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (correlation_test.dump_results () != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "EC_Basic: correlation test failed\n"), - -1); - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: end correlation_test\n")); - - ACE_DEBUG ((LM_DEBUG, - "EC_Basic: shutdown the EC\n")); - ec_impl.shutdown (); - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -// **************************************************************** - -int -ECB_Driver::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "p:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'p': - this->pid_filename_ = get_opt.optarg; - break; - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "[ORB options] " - "-p " - "\n", - argv[0])); - return -1; - } - } - - return 0; -} - -// **************************************************************** - -ECB_Test::~ECB_Test (void) -{ -} - -// **************************************************************** - -ECB_Consumer::ECB_Consumer (ECB_Test *test, - int consumer_id) - : test_ (test), - consumer_id_ (consumer_id) -{ -} - -void -ECB_Consumer::open (const char* name, - RtecEventChannelAdmin::EventChannel_ptr ec, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& TAO_IN_ENV) -{ - this->rt_info_ = - scheduler->create (name, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID(TAO_IN_ENV); - - // The worst case execution time is far less than 2 - // milliseconds, but that is a safe estimate.... - ACE_Time_Value tv (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - scheduler->set (this->rt_info_, - RtecScheduler::VERY_HIGH_CRITICALITY, - time, time, time, - 0, - RtecScheduler::VERY_LOW_IMPORTANCE, - time, - 0, - RtecScheduler::OPERATION, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - // = Connect as a consumer. - this->consumer_admin_ = ec->for_consumers (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -ECB_Consumer::connect (const RtecEventChannelAdmin::ConsumerQOS& qos, - CORBA::Environment& TAO_IN_ENV) -{ - if (CORBA::is_nil (this->consumer_admin_.in ())) - return; - - RtecEventComm::PushConsumer_var objref = this->_this (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier_proxy_ = - this->consumer_admin_->obtain_push_supplier (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier_proxy_->connect_push_consumer (objref.in (), - qos, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -ECB_Consumer::disconnect (CORBA::Environment& TAO_IN_ENV) -{ - if (CORBA::is_nil (this->supplier_proxy_.in ()) - || CORBA::is_nil (this->consumer_admin_.in ())) - return; - - this->supplier_proxy_->disconnect_push_supplier (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier_proxy_ = - RtecEventChannelAdmin::ProxyPushSupplier::_nil (); -} - -void -ECB_Consumer::close (CORBA::Environment &TAO_IN_ENV) -{ - this->disconnect (TAO_IN_ENV); - this->consumer_admin_ = - RtecEventChannelAdmin::ConsumerAdmin::_nil (); -} - -void -ECB_Consumer::push (const RtecEventComm::EventSet& events, - CORBA::Environment &TAO_IN_ENV) -{ - this->test_->push (this->consumer_id_, - events, - TAO_IN_ENV); -} - -void -ECB_Consumer::disconnect_push_consumer (CORBA::Environment &) -{ -} - -// **************************************************************** - -ECB_Supplier::ECB_Supplier (ECB_Test *test, - int supplier_id) - : test_ (test), - supplier_id_ (supplier_id) -{ -} - -void -ECB_Supplier::open (const char* name, - RtecEventChannelAdmin::EventChannel_ptr ec, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment &TAO_IN_ENV) -{ - this->rt_info_ = - scheduler->create (name, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - // The execution times are set to reasonable values, but actually - // they are changed on the real execution, i.e. we lie to the - // scheduler to obtain right priorities; but we don't care if the - // set is schedulable. - ACE_Time_Value tv (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - - scheduler->set (this->rt_info_, - RtecScheduler::VERY_HIGH_CRITICALITY, - time, time, time, - 0, - RtecScheduler::VERY_LOW_IMPORTANCE, - time, - 1, - RtecScheduler::OPERATION, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - // = Connect as a consumer. - this->supplier_admin_ = ec->for_suppliers (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -ECB_Supplier::connect (const RtecEventChannelAdmin::SupplierQOS& qos, - CORBA::Environment& TAO_IN_ENV) -{ - if (CORBA::is_nil (this->supplier_admin_.in ())) - return; - - this->consumer_proxy_ = - this->supplier_admin_->obtain_push_consumer (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - RtecEventComm::PushSupplier_var objref = this->_this (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->consumer_proxy_->connect_push_supplier (objref.in (), - qos, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -ECB_Supplier::disconnect (CORBA::Environment& TAO_IN_ENV) -{ - if (CORBA::is_nil (this->consumer_proxy_.in ()) - || CORBA::is_nil (this->supplier_admin_.in ())) - return; - - this->consumer_proxy_->disconnect_push_consumer (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer_proxy_ = - RtecEventChannelAdmin::ProxyPushConsumer::_nil (); -} - -void -ECB_Supplier::close (CORBA::Environment &TAO_IN_ENV) -{ - this->disconnect (TAO_IN_ENV); - this->supplier_admin_ = - RtecEventChannelAdmin::SupplierAdmin::_nil (); -} - -void -ECB_Supplier::send_event (RtecEventComm::EventSet& events, - CORBA::Environment& TAO_IN_ENV) -{ - // RtecEventComm::EventSet copy = events; - this->consumer_proxy_->push (events, TAO_IN_ENV); -} - -void -ECB_Supplier::disconnect_push_supplier (CORBA::Environment& TAO_IN_ENV) -{ - ACE_UNUSED_ARG (TAO_IN_ENV); - // this->supplier_proxy_->disconnect_push_supplier (TAO_IN_ENV); -} - -// **************************************************************** - -ECB_SupplierID_Test::ECB_SupplierID_Test (void) - : consumer0_ (this, 0), - consumer1_ (this, 1), - supplier0_ (this, 0), - supplier1_ (this, 1) -{ -} - -void -ECB_SupplierID_Test::run (CORBA::ORB_ptr orb, - RtecEventChannelAdmin::EventChannel_ptr ec, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& TAO_IN_ENV) -{ - ACE_UNUSED_ARG (orb); - - int i; - - for (i = 0; i <= ECB_SupplierID_Test::PHASE_END; ++i) - { - this->event_count_[i] = 0; - this->error_count_[i] = 0; - } - - // Startup - this->consumer0_.open ("SupplierID/consumer0", - ec, - scheduler, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer1_.open ("SupplierID/consumer1", - ec, - scheduler, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.open ("SupplierID/supplier0", - ec, - scheduler, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.open ("SupplierID/supplier1", - ec, - scheduler, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - // Precompute the QoS for the consumers and suppliers. - ACE_ConsumerQOS_Factory consumer0_qos; - consumer0_qos.start_disjunction_group (); - consumer0_qos.insert_source (ECB_SupplierID_Test::SUPPLIER_ID, - this->consumer0_.rt_info ()); - - ACE_ConsumerQOS_Factory consumer1_qos; - consumer1_qos.start_disjunction_group (); - consumer1_qos.insert_source (ECB_SupplierID_Test::SUPPLIER_ID, - this->consumer1_.rt_info ()); - - ACE_SupplierQOS_Factory supplier0_qos; - supplier0_qos.insert (ECB_SupplierID_Test::SUPPLIER_ID, - ACE_ES_EVENT_UNDEFINED + 1, - this->supplier0_.rt_info (), - 1); - - ACE_SupplierQOS_Factory supplier1_qos; - supplier1_qos.insert (ECB_SupplierID_Test::SUPPLIER_ID, - ACE_ES_EVENT_UNDEFINED + 1, - this->supplier1_.rt_info (), - 1); - - // Precompute the event set - RtecEventComm::EventSet events (1); - events.length (1); - - RtecEventComm::Event& e = events[0]; - e.header.source = ECB_SupplierID_Test::SUPPLIER_ID; - e.header.ttl = 1; - e.header.type = ACE_ES_EVENT_UNDEFINED + 1; - - ACE_hrtime_t t = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t); - e.header.ec_recv_time = ORBSVCS_Time::zero; - e.header.ec_send_time = ORBSVCS_Time::zero; - - e.data.x = 0; - e.data.y = 0; - - // Start the real test. - - // PHASE 0, test filtering by supplier ID in the presence of - // multiple suppliers with the same ID... - this->phase_ = ECB_SupplierID_Test::PHASE_0; - - this->consumer0_.connect (consumer0_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer1_.connect (consumer1_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier0_.connect (supplier0_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.connect (supplier1_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 1, test disconnection of a single supplier. - this->phase_ = ECB_SupplierID_Test::PHASE_1; - this->supplier1_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 2, test reconnection of the supplier. - this->phase_ = ECB_SupplierID_Test::PHASE_2; - this->supplier1_.connect (supplier1_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 3, test disconnect of one consumer - this->phase_ = ECB_SupplierID_Test::PHASE_3; - this->consumer1_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 4, test reconnection of one consumer - this->phase_ = ECB_SupplierID_Test::PHASE_4; - this->consumer1_.connect (consumer1_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 5, test disconnection of two consumers. - this->phase_ = ECB_SupplierID_Test::PHASE_5; - this->consumer0_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer1_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 6, test reconnection of two consumers. - this->phase_ = ECB_SupplierID_Test::PHASE_6; - this->consumer0_.connect (consumer0_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer1_.connect (consumer1_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 7, test disconnect/reconnect of both suppliers. - this->phase_ = ECB_SupplierID_Test::PHASE_7; - this->supplier0_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.connect (supplier0_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.connect (supplier1_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (events, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE END, any events received after this are errors. - this->phase_ = ECB_SupplierID_Test::PHASE_END; - - // Finish - this->supplier1_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer1_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer0_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -int -ECB_SupplierID_Test::dump_results (void) -{ - static CORBA::ULong expected_count[PHASE_END]={ - 4 * ECB_SupplierID_Test::EVENTS_SENT, - 2 * ECB_SupplierID_Test::EVENTS_SENT, - 4 * ECB_SupplierID_Test::EVENTS_SENT, - 2 * ECB_SupplierID_Test::EVENTS_SENT, - 4 * ECB_SupplierID_Test::EVENTS_SENT, - 0, - 4 * ECB_SupplierID_Test::EVENTS_SENT, - 4 * ECB_SupplierID_Test::EVENTS_SENT - }; - - int result = 0; - - for (int i = 0; - i < ECB_SupplierID_Test::PHASE_END; - ++i) - { - if (this->error_count_[i] != 0) - { - ACE_ERROR ((LM_ERROR, - "SupplierID_Test: Error count for phase %d " - "is not zero\n", - i)); - result = -1; - } - if (this->event_count_[i] != expected_count[i]) - { - ACE_ERROR ((LM_ERROR, - "SupplierID_Test: Mismatched event count in phase %d, " - "expected %d, count is %d\n", - i, - expected_count[i], - this->event_count_[i])); - result = -1; - } - } - if (this->error_count_[ECB_SupplierID_Test::PHASE_END] != 0) - { - ACE_ERROR ((LM_ERROR, - "SupplierID_Test: Events received after final phase\n")); - result = -1; - } - if (result == 0) - ACE_DEBUG ((LM_DEBUG, - "SupplierID_Test: All phases successful\n")); - - return result; -} - -void -ECB_SupplierID_Test::push (int consumer_id, - const RtecEventComm::EventSet& events, - CORBA::Environment &TAO_IN_ENV) -{ - ACE_UNUSED_ARG (events); - ACE_UNUSED_ARG (TAO_IN_ENV); - - switch (this->phase_) - { - case ECB_SupplierID_Test::PHASE_END: - default: - this->error_count_[ECB_SupplierID_Test::PHASE_END]++; - break; - - case ECB_SupplierID_Test::PHASE_0: - this->event_count_[ECB_SupplierID_Test::PHASE_0]++; - break; - - case ECB_SupplierID_Test::PHASE_1: - this->event_count_[ECB_SupplierID_Test::PHASE_1]++; - break; - - case ECB_SupplierID_Test::PHASE_2: - this->event_count_[ECB_SupplierID_Test::PHASE_2]++; - break; - - case ECB_SupplierID_Test::PHASE_3: - if (consumer_id == 0) - this->event_count_[ECB_SupplierID_Test::PHASE_3]++; - else - this->error_count_[ECB_SupplierID_Test::PHASE_3]++; - break; - - case ECB_SupplierID_Test::PHASE_4: - this->event_count_[ECB_SupplierID_Test::PHASE_4]++; - break; - - case ECB_SupplierID_Test::PHASE_5: - this->error_count_[ECB_SupplierID_Test::PHASE_5]++; - break; - - case ECB_SupplierID_Test::PHASE_6: - this->event_count_[ECB_SupplierID_Test::PHASE_6]++; - break; - - case ECB_SupplierID_Test::PHASE_7: - this->event_count_[ECB_SupplierID_Test::PHASE_7]++; - break; - } -} - -// **************************************************************** - -ECB_Correlation_Test::ECB_Correlation_Test (void) - : consumer_ (this, 0), - supplier0_ (this, 0), - supplier1_ (this, 1) -{ -} - -void -ECB_Correlation_Test::run (CORBA::ORB_ptr orb, - RtecEventChannelAdmin::EventChannel_ptr ec, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& TAO_IN_ENV) -{ - ACE_UNUSED_ARG (orb); - - int i; - - for (i = 0; i <= ECB_Correlation_Test::PHASE_END; ++i) - { - this->event_count_[i] = 0; - this->error_count_[i] = 0; - } - - // Startup - this->consumer_.open ("Correlation/consumer", - ec, - scheduler, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.open ("Correlation/supplier0", - ec, - scheduler, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.open ("Correlation/supplier1", - ec, - scheduler, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - // Precompute the QoS for the consumers and suppliers. - ACE_ConsumerQOS_Factory consumer_qos; - consumer_qos.start_conjunction_group (); - consumer_qos.insert_type (ECB_Correlation_Test::EVENT_A, - this->consumer_.rt_info ()); - consumer_qos.insert_type (ECB_Correlation_Test::EVENT_B, - this->consumer_.rt_info ()); - - ACE_SupplierQOS_Factory supplier0_qos; - supplier0_qos.insert (ECB_Correlation_Test::SUPPLIER_ID_0, - ECB_Correlation_Test::EVENT_A, - this->supplier0_.rt_info (), - 1); - supplier0_qos.insert (ECB_Correlation_Test::SUPPLIER_ID_0, - ECB_Correlation_Test::EVENT_B, - this->supplier0_.rt_info (), - 1); - - ACE_SupplierQOS_Factory supplier1_qos; - supplier1_qos.insert (ECB_Correlation_Test::SUPPLIER_ID_1, - ECB_Correlation_Test::EVENT_A, - this->supplier1_.rt_info (), - 1); - supplier1_qos.insert (ECB_Correlation_Test::SUPPLIER_ID_1, - ECB_Correlation_Test::EVENT_B, - this->supplier1_.rt_info (), - 1); - - // Precompute the events - RtecEventComm::EventSet event_a (1); - event_a.length (1); - { - RtecEventComm::Event& e = event_a[0]; - e.header.source = ECB_Correlation_Test::SUPPLIER_ID_0; - e.header.ttl = 1; - e.header.type = ECB_Correlation_Test::EVENT_A; - - ACE_hrtime_t t = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t); - e.header.ec_recv_time = ORBSVCS_Time::zero; - e.header.ec_send_time = ORBSVCS_Time::zero; - - e.data.x = 0; - e.data.y = 0; - } - - RtecEventComm::EventSet event_b (1); - event_b.length (1); - { - RtecEventComm::Event& e = event_b[0]; - e.header.source = ECB_Correlation_Test::SUPPLIER_ID_0; - e.header.ttl = 1; - e.header.type = ECB_Correlation_Test::EVENT_B; - - ACE_hrtime_t t = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t); - e.header.ec_recv_time = ORBSVCS_Time::zero; - e.header.ec_send_time = ORBSVCS_Time::zero; - - e.data.x = 0; - e.data.y = 0; - } - - RtecEventComm::EventSet event_ab (2); - event_ab.length (2); - { - RtecEventComm::Event& e = event_ab[0]; - e.header.source = ECB_Correlation_Test::SUPPLIER_ID_0; - e.header.ttl = 1; - e.header.type = ECB_Correlation_Test::EVENT_A; - - ACE_hrtime_t t = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t); - e.header.ec_recv_time = ORBSVCS_Time::zero; - e.header.ec_send_time = ORBSVCS_Time::zero; - - e.data.x = 0; - e.data.y = 0; - } - { - RtecEventComm::Event& e = event_ab[1]; - e.header.source = ECB_Correlation_Test::SUPPLIER_ID_0; - e.header.ttl = 1; - e.header.type = ECB_Correlation_Test::EVENT_B; - - ACE_hrtime_t t = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t); - e.header.ec_recv_time = ORBSVCS_Time::zero; - e.header.ec_send_time = ORBSVCS_Time::zero; - - e.data.x = 0; - e.data.y = 0; - } - - // Start the real test. - - // PHASE 0 - this->phase_ = ECB_Correlation_Test::PHASE_0; - - this->consumer_.connect (consumer_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier0_.connect (supplier0_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.connect (supplier1_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (event_a, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (event_b, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 1, test disconnection of a single supplier. - this->phase_ = ECB_Correlation_Test::PHASE_1; - this->consumer_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer_.connect (consumer_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier0_.connect (supplier0_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.connect (supplier1_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (event_ab, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (event_ab, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 2, test reconnection of the supplier. - this->phase_ = ECB_Correlation_Test::PHASE_2; - this->consumer_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer_.connect (consumer_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier0_.connect (supplier0_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.connect (supplier1_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (event_a, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (event_b, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.send_event (event_b, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (event_a, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 3 - this->phase_ = ECB_Correlation_Test::PHASE_3; - this->consumer_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer_.connect (consumer_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier0_.connect (supplier0_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.connect (supplier1_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (event_a, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (event_ab, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 4 - this->phase_ = ECB_Correlation_Test::PHASE_4; - this->consumer_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer_.connect (consumer_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier0_.connect (supplier0_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.connect (supplier1_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (event_a, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (event_a, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (event_b, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE 5 - this->phase_ = ECB_Correlation_Test::PHASE_5; - this->consumer_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer_.connect (consumer_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier0_.connect (supplier0_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.connect (supplier1_qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i) - { - this->supplier0_.send_event (event_a, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier1_.send_event (event_a, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - - // PHASE END, any events received after this are errors. - this->phase_ = ECB_Correlation_Test::PHASE_END; - - // Finish - this->supplier1_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier0_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -int -ECB_Correlation_Test::dump_results (void) -{ - static CORBA::ULong expected_count[PHASE_END] = - { - 1 * ECB_Correlation_Test::EVENTS_SENT, - 2 * ECB_Correlation_Test::EVENTS_SENT, - 2 * ECB_Correlation_Test::EVENTS_SENT, - 1 * ECB_Correlation_Test::EVENTS_SENT, - 1 * ECB_Correlation_Test::EVENTS_SENT, - 0 - }; - - int result = 0; - - for (int i = 0; - i < ECB_Correlation_Test::PHASE_END; - ++i) - { - if (this->error_count_[i] != 0) - { - ACE_ERROR ((LM_ERROR, - "Correlation_Test: Error count for phase %d " - "is not zero\n", - i)); - result = -1; - } - if (this->event_count_[i] != expected_count[i]) - { - ACE_ERROR ((LM_ERROR, - "Correlation_Test: Mismatched event count in phase %d, " - "expected %d, count is %d\n", - i, - expected_count[i], - this->event_count_[i])); - result = -1; - } - } - if (this->error_count_[ECB_Correlation_Test::PHASE_END] != 0) - { - ACE_ERROR ((LM_ERROR, - "Correlation_Test: Events received after final phase\n")); - result = -1; - } - if (result == 0) - ACE_DEBUG ((LM_DEBUG, - "Correlation_Test: All phases successful\n")); - - return result; -} - -void -ECB_Correlation_Test::push (int consumer_id, - const RtecEventComm::EventSet& events, - CORBA::Environment &TAO_IN_ENV) -{ - ACE_UNUSED_ARG (consumer_id); - ACE_UNUSED_ARG (TAO_IN_ENV); - - if (events.length () != 2) - { - ACE_ERROR ((LM_ERROR, - "Correlation_Test::push - " - "event length (%d) in phase %d\n", - events.length (), this->phase_)); - this->error_count_[this->phase_]++; - return; - } - - // If the types do not match we have an error. - if (!((events[0].header.type == ECB_Correlation_Test::EVENT_A - && events[1].header.type == ECB_Correlation_Test::EVENT_B) - || (events[0].header.type == ECB_Correlation_Test::EVENT_B - && events[1].header.type == ECB_Correlation_Test::EVENT_A))) - { - ACE_ERROR ((LM_ERROR, - "Correlation_Test::push - event type\n")); - this->error_count_[this->phase_]++; - return; - } - - switch (this->phase_) - { - case ECB_Correlation_Test::PHASE_END: - default: - this->error_count_[ECB_Correlation_Test::PHASE_END]++; - break; - - case ECB_Correlation_Test::PHASE_0: - this->event_count_[ECB_Correlation_Test::PHASE_0]++; - break; - - case ECB_Correlation_Test::PHASE_1: - this->event_count_[ECB_Correlation_Test::PHASE_1]++; - break; - - case ECB_Correlation_Test::PHASE_2: - this->event_count_[ECB_Correlation_Test::PHASE_2]++; - break; - - case ECB_Correlation_Test::PHASE_3: - this->event_count_[ECB_Correlation_Test::PHASE_3]++; - break; - - case ECB_Correlation_Test::PHASE_4: - this->event_count_[ECB_Correlation_Test::PHASE_4]++; - break; - - case ECB_Correlation_Test::PHASE_5: - this->error_count_[ECB_Correlation_Test::PHASE_5]++; - break; - } -} - -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp deleted file mode 100644 index 1c4327fe178..00000000000 --- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp +++ /dev/null @@ -1,94 +0,0 @@ -# Microsoft Developer Studio Project File - Name="EC_Basic" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=EC_Basic - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "EC_Basic.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "EC_Basic.mak" CFG="EC_Basic - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "EC_Basic - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "EC_Basic - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "EC_Basic - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "EC_Basic - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "EC_Basic - Win32 Release" -# Name "EC_Basic - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\EC_Basic.cpp -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw deleted file mode 100644 index a9f492f94d6..00000000000 --- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "EC_Basic"=.\EC_Basic.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h deleted file mode 100644 index 5ffa770d18e..00000000000 --- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h +++ /dev/null @@ -1,354 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = TITLE -// A simple test for the Event Channel. -// -// = DESCRIPTION -// This test exercises the basic features of the EC, such as -// filtering, correlation, timeouts, etc. -// The test creates a colocated EC, some suppliers, some consumers -// and exercises each feature, one at a time. -// -// ============================================================================ - -#ifndef EC_BASIC_H -#define EC_BASIC_H - -#include "ace/SString.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/High_Res_Timer.h" -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "orbsvcs/RtecEventCommS.h" -#include "orbsvcs/Channel_Clients_T.h" - -class ECB_Driver -{ - // - // = TITLE - // A class to control the tests. - // - // = DESCRIPTION - // This class creates multiple tests and runs them in sequence, - // providing proper environment for each one (the event channel, - // the ORB configuration, etc. - // -public: - ECB_Driver (void); - - int run (int argc, char* argv[]); - // Run the test. - -private: - int shutdown (CORBA::Environment&); - // Called when the main thread is about to shutdown. - - int parse_args (int argc, char* argv[]); - // parse the command line arguments - - void dump_results (void); - // Dump the results to the standard output. - -private: - const char* pid_filename_; - // The name of a file where the process stores its pid - - ACE_hrtime_t test_start_; - ACE_hrtime_t test_stop_; - // Measure the test elapsed time as well as mark the beginning of - // the frames. - - CORBA::ORB_var orb_; - // The ORB, so we can shut it down. -}; - -// **************************************************************** - -class ECB_Test -{ - // = TITLE - // The base class for all the tests. - // - // = DESCRIPTION - // All the tests inherit from this class, it is used by the - // consumer and suppliers as callbacks. - // -public: - virtual ~ECB_Test (void); - // Destructor - - virtual void push (int consumer_number, - const RtecEventComm::EventSet& events, - CORBA::Environment &_env) = 0; - // The callback from the Consumer.... -}; - -class ECB_Consumer : public POA_RtecEventComm::PushConsumer -{ -public: - // = TITLE - // The consumers for all the tests. - // - // = DESCRIPTION - // To simplify each test implementation a generic consumer class - // is provided. - // It dispatches the events back to a Base_Test. - // - ECB_Consumer (ECB_Test* test, - int consumer_id); - - void open (const char* name, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& _env); - // This method connects the consumer to the EC. - - void close (CORBA::Environment &_env); - // Disconnect from the EC. - - RtecScheduler::handle_t rt_info (void) const; - // The RT_Info for this object - - void connect (const RtecEventChannelAdmin::ConsumerQOS& qos, - CORBA::Environment &_env); - void disconnect (CORBA::Environment &_env); - // Disconnect from the supplier, but do not forget about it or close - // it. - - // = The POA_RtecEventComm::PushComsumer methods. - virtual void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); - virtual void disconnect_push_consumer (CORBA::Environment &); - -private: - ECB_Test* test_; - // To callback. - - int consumer_id_; - // So we can give our identity back to the test. - - RtecScheduler::handle_t rt_info_; - // The handle for our RT_Info description. - - RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; - // We talk to the EC using this proxy. - - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_; - // We talk to the EC using this proxy. -}; - -class ECB_Supplier : public POA_RtecEventComm::PushSupplier -{ -public: - // = TITLE - // Implement one of the consumers in this test. - // - ECB_Supplier (ECB_Test* test, - int supplier_id); - // We generate an id based on the name.... - - void open (const char* name, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& _env); - // This method connects the supplier to the EC. - - void close (CORBA::Environment &_env); - // Disconnect from the EC. - - RtecScheduler::handle_t rt_info (void) const; - // The RT_Info for this object - - void connect (const RtecEventChannelAdmin::SupplierQOS& qos, - CORBA::Environment &_env); - void disconnect (CORBA::Environment &_env); - // Disconnect from the EC, but do not forget about it or close - // it. - - void send_event (RtecEventComm::EventSet& events, - CORBA::Environment &_env); - // Send one event, the supplier provides the SourceID - - // = The POA_RtecEventComm::PushSupplier methods. - virtual void disconnect_push_supplier (CORBA::Environment &); - -private: - ECB_Test* test_; - // To callback. - - int supplier_id_; - // This is NOT the supplier ID for the EC, just a number for the - - RtecScheduler::handle_t rt_info_; - // The handle for our RT_Info description. - - RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; - // We talk to the EC using this proxy. - - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin_; - // We talk to the EC using this proxy. -}; - -// **************************************************************** - -// @@ TODO WE may need to split each test to its own file, but only -// once the number of tests justifies that change. - -class ECB_SupplierID_Test : public ECB_Test -{ - // - // = TITLE - // Verifies that multiple suppliers can have the same ID. - // - // = DESCRIPTION - // This class creates two consumers and two suppliers, the - // suppliers connect with the same ID, but send out different - // events. The consumers subscribe by supplier ID. - // - // The test executes several phases (see the enum below). - // - // = TODO - // The test could be more flexible, but functionality is more - // important than flexiblitity. - // -public: - ECB_SupplierID_Test (void); - - enum - { - PHASE_0, // Verifies filtering for two suppliers with the same ID - PHASE_1, // Disconnect one of the suppliers - PHASE_2, // Reconnect the supplier - PHASE_3, // Disconnect a consumer - PHASE_4, // Reconnect the consumer - PHASE_5, // Disconnect both consumers - PHASE_6, // Reconnect both consumers - PHASE_7, // Disconnect both suppliers and reconnect them - PHASE_END // To check that no events are received after the test ends. - }; - - enum - { - EVENTS_SENT = 10, // How many events we send on each test - SUPPLIER_ID = 1 - }; - - void run (CORBA::ORB_ptr orb, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& _env); - // Start the test. - - int dump_results (void); - // Print out the results, returns -1 if an error was detected. - - virtual void push (int consumer_id, - const RtecEventComm::EventSet& events, - CORBA::Environment &_env); - // The callback from the Consumer.... - - -private: - ECB_Consumer consumer0_; - ECB_Consumer consumer1_; - // The consumers... - - ECB_Supplier supplier0_; - ECB_Supplier supplier1_; - // The suppliers... - - CORBA::ULong event_count_[ECB_SupplierID_Test::PHASE_END + 1]; - // Count the correctly received events. - - CORBA::ULong error_count_[ECB_SupplierID_Test::PHASE_END + 1]; - // Store the number of errors for each phase. - - int phase_; - // Keep track of the test we are running... -}; - -// **************************************************************** - -class ECB_Correlation_Test : public ECB_Test -{ - // - // = TITLE - // Verifies that correlation works. - // - // = DESCRIPTION - // This class creates one consumers and two suppliers, the - // consumer subscribe for several event correlations. - // The correlations are satisfied in several different ways by - // both suppliers (see below).by: - // - // = TODO - // -public: - ECB_Correlation_Test (void); - - enum - { - PHASE_0, // One supplier sends A the other sends B - PHASE_1, // Both suppliers send event A and B (in a single event) - PHASE_2, // Both suppliers alternate A and B - PHASE_3, // One supplier sends A the other sends A and B (in a - // single event) - PHASE_4, // One supplier sends A the other alternates A and B - PHASE_5, // Both suppliers send A - PHASE_END // To check that no events are received after the test ends. - }; - - enum - { - EVENTS_SENT = 10, // How many events we send on each test - EVENT_A = 100, // The event "A" - EVENT_B = 200, // The event "B" - SUPPLIER_ID_0 = 100, // The supplier ID for supplier0 - SUPPLIER_ID_1 = 200 // The supplier ID for supplier1 - }; - - void run (CORBA::ORB_ptr orb, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& _env); - // Start the test. - - int dump_results (void); - // Print out the results, returns -1 if an error was detected. - - virtual void push (int consumer_id, - const RtecEventComm::EventSet& events, - CORBA::Environment &_env); - // The callback from the Consumer.... - -private: - ECB_Consumer consumer_; - // The consumer... - - ECB_Supplier supplier0_; - ECB_Supplier supplier1_; - // The suppliers... - - CORBA::ULong event_count_[ECB_Correlation_Test::PHASE_END + 1]; - // Count the correctly received events. - - CORBA::ULong error_count_[ECB_Correlation_Test::PHASE_END + 1]; - // Store the number of errors for each phase. - - int phase_; - // Keep track of the test we are running... -}; - -// **************************************************************** - -#if defined (__ACE_INLINE__) -#include "EC_Basic.i" -#endif /* __ACE_INLINE__ */ - -#endif /* EC_BASIC_H */ diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.i b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.i deleted file mode 100644 index 1688f03c423..00000000000 --- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.i +++ /dev/null @@ -1,15 +0,0 @@ -// $Id$ - -RtecScheduler::handle_t -ECB_Consumer::rt_info (void) const -{ - return this->rt_info_; -} - -RtecScheduler::handle_t -ECB_Supplier::rt_info (void) const -{ - return this->rt_info_; -} - - diff --git a/TAO/orbsvcs/tests/EC_Basic/Makefile b/TAO/orbsvcs/tests/EC_Basic/Makefile deleted file mode 100644 index 14302e476fd..00000000000 --- a/TAO/orbsvcs/tests/EC_Basic/Makefile +++ /dev/null @@ -1,148 +0,0 @@ -# $Id$ - -BIN = EC_Basic - -SRC = $(BIN:%=%$(VAR).cpp) -LDLIBS= -lorbsvcs -lTAO - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_ROOT) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU - -#### Local rules and variables... - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/EC_Basic.o .obj/EC_Basic.so .shobj/EC_Basic.o .shobj/EC_Basic.so: EC_Basic.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(ACE_ROOT)/ace/Timer_List.h \ - $(ACE_ROOT)/ace/Timer_List_T.h \ - $(ACE_ROOT)/ace/Timer_List_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Module_Factory.h \ - EC_Basic.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp \ - EC_Basic.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/EC_Basic/README b/TAO/orbsvcs/tests/EC_Basic/README deleted file mode 100644 index 18159740f60..00000000000 --- a/TAO/orbsvcs/tests/EC_Basic/README +++ /dev/null @@ -1,12 +0,0 @@ -# $Id$ - -A regression test for TAO's Real-time Event Channel. - -This program will be used to test the basic features of the Event -Channel. The current tests are: - - + SupplierID_Test: verify that several suppliers can can the - same supplier ID. - - + Correlation_Test: verify that a consumer can subscribe to a - correlation. diff --git a/TAO/orbsvcs/tests/EC_Basic/run_test.pl b/TAO/orbsvcs/tests/EC_Basic/run_test.pl deleted file mode 100755 index 50a65b5d6e3..00000000000 --- a/TAO/orbsvcs/tests/EC_Basic/run_test.pl +++ /dev/null @@ -1,10 +0,0 @@ -# -*- perl -*- -# $Id$ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -$status = system ($EXEPREFIX."EC_Basic".$Process::EXE_EXT, ""); - -# @@ Capture any errors from the server too. -exit $status; diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Consumer.dsp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Consumer.dsp deleted file mode 100644 index dac04615a5c..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Consumer.dsp +++ /dev/null @@ -1,228 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ECCM_Consumer" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=ECCM_Consumer - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ECCM_Consumer.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ECCM_Consumer.mak" CFG="ECCM_Consumer - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ECCM_Consumer - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "ECCM_Consumer - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ECCM_Consumer - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\TAO" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "ECCM_Consumer - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib TAOd.lib orbsvcsd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\TAO" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "ECCM_Consumer - Win32 Release" -# Name "ECCM_Consumer - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\dataC.cpp -# End Source File -# Begin Source File - -SOURCE=.\dataS.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECM_Consumer.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECM_Data.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\dataC.h -# End Source File -# Begin Source File - -SOURCE=.\dataS.h -# End Source File -# Begin Source File - -SOURCE=.\dataS_T.h -# End Source File -# Begin Source File - -SOURCE=.\ECM_Consumer.h -# End Source File -# Begin Source File - -SOURCE=.\ECM_Data.h -# End Source File -# End Group -# Begin Group "IDL Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\data.idl - -!IF "$(CFG)" == "ECCM_Consumer - Win32 Release" - -USERDEP__DATA_="..\..\..\TAO_IDL\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\data.idl -InputName=data - -BuildCmds= \ - ..\..\..\TAO_IDL\tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ELSEIF "$(CFG)" == "ECCM_Consumer - Win32 Debug" - -USERDEP__DATA_="..\..\..\..\bin\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\data.idl -InputName=data - -BuildCmds= \ - ..\..\..\..\bin\tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ENDIF - -# End Source File -# End Group -# Begin Group "Template Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\dataS_T.cpp -# PROP Exclude_From_Build 1 -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Supplier.dsp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Supplier.dsp deleted file mode 100644 index 897d3f5b11b..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Supplier.dsp +++ /dev/null @@ -1,228 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ECCM_Supplier" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=ECCM_Supplier - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ECCM_Supplier.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ECCM_Supplier.mak" CFG="ECCM_Supplier - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ECCM_Supplier - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "ECCM_Supplier - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ECCM_Supplier - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\TAO" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "ECCM_Supplier - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib TAOd.lib orbsvcsd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\TAO" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "ECCM_Supplier - Win32 Release" -# Name "ECCM_Supplier - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\dataC.cpp -# End Source File -# Begin Source File - -SOURCE=.\dataS.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECM_Data.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECM_Supplier.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\dataC.h -# End Source File -# Begin Source File - -SOURCE=.\dataS.h -# End Source File -# Begin Source File - -SOURCE=.\dataS_T.h -# End Source File -# Begin Source File - -SOURCE=.\ECM_Data.h -# End Source File -# Begin Source File - -SOURCE=.\ECM_Supplier.h -# End Source File -# End Group -# Begin Group "IDL Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\data.idl - -!IF "$(CFG)" == "ECCM_Supplier - Win32 Release" - -USERDEP__DATA_="..\..\..\TAO_IDL\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\data.idl -InputName=data - -BuildCmds= \ - ..\..\..\TAO_IDL\tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ELSEIF "$(CFG)" == "ECCM_Supplier - Win32 Debug" - -USERDEP__DATA_="..\..\..\..\bin\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\data.idl -InputName=data - -BuildCmds= \ - ..\..\..\..\bin\tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ENDIF - -# End Source File -# End Group -# Begin Group "Template Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\dataS_T.cpp -# PROP Exclude_From_Build 1 -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.cpp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.cpp deleted file mode 100644 index e380b16a026..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.cpp +++ /dev/null @@ -1,457 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/Sched_Params.h" - -#include "tao/Timeprobe.h" -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Scheduler_Factory.h" -#include "orbsvcs/Time_Utilities.h" -#include "orbsvcs/Sched/Config_Scheduler.h" -#include "orbsvcs/Event/Event_Channel.h" -#include "ECM_Consumer.h" -#include "ECM_Data.h" - -ACE_RCSID(EC_Custom_Marshal, ECM_Consumer, "$Id$") - -int -main (int argc, char *argv []) -{ - Driver driver; - return driver.run (argc, argv); -} - -// **************************************************************** - -Driver::Driver (void) - : n_consumers_ (1), - event_count_ (100), - event_a_ (ACE_ES_EVENT_UNDEFINED), - event_b_ (ACE_ES_EVENT_UNDEFINED + 1), - pid_file_name_ (0), - recv_count_ (0) -{ -} - - - -int -Driver::run (int argc, char* argv[]) -{ - TAO_TRY - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->parse_args (argc, argv)) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " consumers = <%d>\n" - " event count = <%d>\n" - " supplier Event A = <%d>\n" - " supplier Event B = <%d>\n" - " pid file name = <%s>\n", - - this->n_consumers_, - this->event_count_, - this->event_a_, - this->event_b_, - - this->pid_file_name_?this->pid_file_name_:"nil") ); - - if (this->pid_file_name_ != 0) - { - FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); - if (pid != 0) - { - ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); - ACE_OS::fclose (pid); - } - } - - int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. - - if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, - min_priority, - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - ACE_DEBUG ((LM_DEBUG, - "%s: user is not superuser, " - "so remain in time-sharing class\n", argv[0])); - else - ACE_ERROR ((LM_ERROR, - "%s: ACE_OS::sched_params failed\n", argv[0])); - } - - if (ACE_OS::thr_setprio (min_priority) == -1) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed," - "no real-time features\n")); - } - - CORBA::Object_var naming_obj = - orb->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to get the Naming Service.\n"), - 1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (ACE_Scheduler_Factory::use_config (naming_context.in ()) == -1) - return -1; - - CosNaming::Name name (1); - name.length (1); - name[0].id = CORBA::string_dup ("EventService"); - - CORBA::Object_var ec_obj = - naming_context->resolve (name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventChannelAdmin::EventChannel_var channel; - if (CORBA::is_nil (ec_obj.in ())) - channel = RtecEventChannelAdmin::EventChannel::_nil (); - else - channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->connect_consumers (channel.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected consumer(s)\n")); - - ACE_DEBUG ((LM_DEBUG, "running the test\n")); - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - - this->disconnect_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - channel->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -void -Driver::push_consumer (void* /* consumer_cookie */, - ACE_hrtime_t /* arrival */, - const RtecEventComm::EventSet& events, - CORBA::Environment &TAO_IN_ENV) -{ - // int ID = - // (ACE_reinterpret_cast(Test_Consumer**,consumer_cookie) - // - this->consumers_); - // - // ACE_DEBUG ((LM_DEBUG, "(%t) events received by consumer %d\n", ID)); - - if (events.length () == 0) - { - // ACE_DEBUG ((LM_DEBUG, "no events\n")); - return; - } - - ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->recv_count_mutex_); - - this->recv_count_ += events.length (); - - int x = this->event_count_ / 10; - if (this->recv_count_ % x == 0) - { - ACE_DEBUG ((LM_DEBUG, - "ECM_Consumer (%P|%t): %d events received\n", - this->recv_count_)); - } - - if (this->recv_count_ >= this->event_count_) - { - TAO_ORB_Core_instance ()->orb ()->shutdown (); - } - - // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ())); - - for (u_int i = 0; i < events.length (); ++i) - { - const RtecEventComm::Event& e = events[i]; - - if (e.data.payload.mb () == 0) - { - ACE_DEBUG ((LM_DEBUG, "No data in event[%d]\n", i)); - continue; - } - - // @@ TODO this is a little messy, infortunately we have to - // extract the first byte to determine the byte order, the CDR - // cannot do it for us because in certain cases the byte order - // is not in the encapsulation. Maybe we need another - // constructor for the InputCDR streams (but there are too many - // already!)? - - // Note that there is no copying - int byte_order = e.data.payload[0]; - - ACE_Message_Block* mb = - ACE_Message_Block::duplicate (e.data.payload.mb ()); - mb->rd_ptr (1); // skip the byte order - - TAO_InputCDR cdr (mb, byte_order); - - ECM_IDLData::Info info; - cdr.decode (ECM_IDLData::_tc_Info, &info, 0, TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - - ECM_Data other; - cdr >> other; - - if (!cdr.good_bit ()) - ACE_ERROR ((LM_ERROR, "Problem demarshalling C++ data\n")); - - CORBA::ULong n = info.trajectory.length (); - // ACE_DEBUG ((LM_DEBUG, "Payload contains <%d> elements\n", n)); - // ACE_DEBUG ((LM_DEBUG, "Inventory <%s> contains <%d> elements\n", - // other.description.in (), - // other.inventory.current_size ())); - - for (CORBA::ULong j = 0; j < n; ++j) - { - ECM_IDLData::Point& p = info.trajectory[j]; - if (p.x != j || p.y != j*j) - { - ACE_DEBUG ((LM_DEBUG, - "invalid data in trajectory[%d] = (%f,%f)\n", - j, p.x, p.y)); - } - } - } -} - -void -Driver::connect_consumers (RtecEventChannelAdmin::EventChannel_ptr channel, - CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->n_consumers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "consumer_%02.2d", i); - - ACE_NEW (this->consumers_[i], - Test_Consumer (this, this->consumers_ + i)); - - this->consumers_[i]->connect (buf, - this->event_a_, - this->event_b_, - channel, - TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - } -} - -void -Driver::disconnect_consumers (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->n_consumers_; ++i) - { - this->consumers_[i]->disconnect (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - } -} - -int -Driver::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "dc:n:h:p:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'c': - this->n_consumers_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'n': - this->event_count_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'h': - { - char* aux; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - - this->event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - } - break; - - case 'p': - this->pid_file_name_ = get_opt.optarg; - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "[ORB options] " - "-s " - "-a (send data in events) " - "-h " - "-p " - "\n", - argv[0])); - return -1; - } - } - - if (this->event_count_ <= 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: event count (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->event_count_, - 100)); - this->event_count_ = 100; - } - - if (this->n_consumers_ <= 0) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: number of consumers or " - "suppliers out of range\n", argv[0]), -1); - } - - return 0; -} - -// **************************************************************** - -Test_Consumer::Test_Consumer (Driver *driver, void *cookie) - : driver_ (driver), - cookie_ (cookie) -{ -} - -void -Test_Consumer::connect (const char* name, - int event_a, int event_b, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& TAO_IN_ENV) -{ - RtecScheduler::Scheduler_ptr server = - ACE_Scheduler_Factory::server (); - - RtecScheduler::handle_t rt_info = - server->create (name, TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - - // The worst case execution time is far less than 2 - // milliseconds, but that is a safe estimate.... - ACE_Time_Value tv (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - server->set (rt_info, - RtecScheduler::VERY_HIGH_CRITICALITY, - time, time, time, - 0, - RtecScheduler::VERY_LOW_IMPORTANCE, - time, - 0, - RtecScheduler::OPERATION, - TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - - ACE_ConsumerQOS_Factory qos; - qos.start_disjunction_group (); - qos.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info); - qos.insert_type (event_a, rt_info); - qos.insert_type (event_b, rt_info); - - // = Connect as a consumer. - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->for_consumers (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - - this->supplier_proxy_ = - consumer_admin->obtain_push_supplier (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - - RtecEventComm::PushConsumer_var objref = this->_this (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - - this->supplier_proxy_->connect_push_consumer (objref.in (), - qos.get_ConsumerQOS (), - TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; -} - -void -Test_Consumer::disconnect (CORBA::Environment &TAO_IN_ENV) -{ - if (CORBA::is_nil (this->supplier_proxy_.in ())) - return; - - this->supplier_proxy_->disconnect_push_supplier (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - - this->supplier_proxy_ = 0; -} - -void -Test_Consumer::push (const RtecEventComm::EventSet& events, - CORBA::Environment &TAO_IN_ENV) -{ - ACE_hrtime_t arrival = ACE_OS::gethrtime (); - this->driver_->push_consumer (this->cookie_, arrival, events, TAO_IN_ENV); -} - -void -Test_Consumer::disconnect_push_consumer (CORBA::Environment &) -{ -} - -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h deleted file mode 100644 index 30cdaa86d40..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// An example on custom marshaling in TAO. -// -// ============================================================================ - -#ifndef ECM_CONSUMER_H -#define ECM_CONSUMER_H - -#include "ace/Task.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "orbsvcs/Channel_Clients_T.h" - -class Driver; - -class Test_Consumer : public POA_RtecEventComm::PushConsumer -{ - // - // = TITLE - // Receive the events. - // - // = DESCRIPTION -public: - Test_Consumer (Driver* driver, void* cookie); - - void connect (const char* name, - int event_a, - int event_b, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); - // This method connects the consumer to the EC. - - void disconnect (CORBA::Environment &_env); - // Disconnect from the EC. - - virtual void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); - virtual void disconnect_push_consumer (CORBA::Environment &); - // The skeleton methods. - -private: - Driver* driver_; - // The main driver for the test. - - void* cookie_; - // A magic cookie passed by the driver that we pass back in our - // callbacks. - - RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; - // We talk to the EC using this proxy. -}; - -class Driver -{ - // - // = TITLE - // - // = DESCRIPTION - // -public: - Driver (void); - - enum { - MAX_CONSUMERS = 16 - // Maximum number of consumers. - }; - - int run (int argc, char* argv[]); - // Execute the test. - - void push_consumer (void* consumer_cookie, - ACE_hrtime_t arrival, - const RtecEventComm::EventSet& events, - CORBA::Environment&); - // Callback method for consumers, if any of our consumers has - // received events it will invoke this method. - -private: - int parse_args (int argc, char* argv[]); - // parse the command line args - - void connect_consumers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - void disconnect_consumers (CORBA::Environment &_env); - // Connect and disconnect the consumers. - -private: - Test_Consumer* consumers_[Driver::MAX_CONSUMERS]; - // The consumer array. - - int n_consumers_; - // The number of consumers. - - int event_count_; - // How many messages we will send in the suppliers - - int event_a_; - int event_b_; - // We send two types of events, with different contents. - - const char* pid_file_name_; - // The name of a file where the process stores its pid - - ACE_SYNCH_MUTEX recv_count_mutex_; - int recv_count_; - // How many events we have received. -}; - -#endif /* ECM_CONSUMER_H */ diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.cpp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.cpp deleted file mode 100644 index facc56df6e9..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// $Id$ - -#include "ECM_Data.h" - -ACE_RCSID(EC_Custom_Marshal, ECM_Data, "$Id$") - -CORBA::Boolean -operator<< (TAO_OutputCDR& cdr, ECM_Data& x) -{ - // We are a little careless about error checking in this routine, - // because one the CDR gets the error bit on it is never disabled. - CORBA::ULong count = x.inventory.current_size (); - if (cdr << x.description.in () - && cdr << count ) - { - for (ECM_Data::Inventory::ITERATOR i = x.inventory.begin (); - i != x.inventory.end () && cdr.good_bit (); - ++i) - { - const ECM_Data::Inventory::ENTRY& v = *i; - cdr << v.ext_id_; - cdr << v.int_id_; - } - } - return cdr.good_bit (); -} - -CORBA::Boolean -operator>> (TAO_InputCDR& cdr, ECM_Data& x) -{ - // We are a little careless about error checking in this routine, - // because one the CDR gets the error bit on it is never disabled. - CORBA::ULong count; - if (cdr >> x.description.out () - && cdr >> count) - { - // ACE_DEBUG ((LM_DEBUG, "Decoding <%d> elements\n", count)); - - for (CORBA::ULong i = 0; i < count && cdr.good_bit (); ++i) - { - CORBA::ULong ext_id; - CORBA::Double int_id; - cdr >> ext_id; - cdr >> int_id; - if (cdr.good_bit ()) - x.inventory.bind (ext_id, int_id); - - // ACE_DEBUG ((LM_DEBUG, "Boung <%d,%f>\n", ext_id, int_id)); - } - } - return cdr.good_bit (); -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Map_Manager; -template class ACE_Map_Entry; -template class ACE_Map_Iterator_Base; -template class ACE_Map_Iterator; -template class ACE_Map_Reverse_Iterator; -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Map_Manager -#pragma instantiate ACE_Map_Entry -#pragma instantiate ACE_Map_Iterator_Base -#pragma instantiate ACE_Map_Iterator -#pragma instantiate ACE_Map_Reverse_Iterator -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.h b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.h deleted file mode 100644 index b690100fbce..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// Simple C++ data to show how custom marshalling can be used for -// non-IDL types. -// -// ============================================================================ - -#ifndef ECM_DATA_H -#define ECM_DATA_H - -#include "ace/Map_Manager.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "dataC.h" - -struct ECM_Data -{ - typedef ACE_Map_Manager Inventory; - // Yes, an STL type could be used here and yes, we could write - // generic algorithms for marshalling and demarshalling using - // iterators. - // But ACE (and TAO) must be ported to platforms whose C++ compilers - // will crash and burn when faced with an STL construct. - - CORBA::String_var description; - Inventory inventory; -}; - -extern CORBA::Boolean -operator<< (TAO_OutputCDR& cdr, ECM_Data& x); - -extern CORBA::Boolean -operator>> (TAO_InputCDR& cdr, ECM_Data& x); - -#endif /* ECM_SUPPLIER_H */ diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp deleted file mode 100644 index bab65ca9f33..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp +++ /dev/null @@ -1,546 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/Sched_Params.h" - -#include "tao/Timeprobe.h" -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Scheduler_Factory.h" -#include "orbsvcs/Time_Utilities.h" -#include "orbsvcs/Sched/Config_Scheduler.h" -#include "orbsvcs/Event/Event_Channel.h" -#include "ECM_Supplier.h" -#include "ECM_Data.h" - -ACE_RCSID(EC_Custom_Marshal, ECM_Supplier, "$Id$") - -int -main (int argc, char *argv []) -{ - ECMS_Driver driver; - return driver.run (argc, argv); -} - -// **************************************************************** - -ECMS_Driver::ECMS_Driver (void) - : n_suppliers_ (1), - event_count_ (100), - event_period_ (100), - event_size_ (32), - event_a_ (ACE_ES_EVENT_UNDEFINED), - event_b_ (ACE_ES_EVENT_UNDEFINED + 1), - pid_file_name_ (0) -{ -} - - - -int -ECMS_Driver::run (int argc, char* argv[]) -{ - TAO_TRY - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->parse_args (argc, argv)) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " suppliers = <%d>\n" - " event count = <%d>\n" - " event period = <%d>\n" - " event size = <%d>\n" - " supplier Event A = <%d>\n" - " supplier Event B = <%d>\n" - " pid file name = <%s>\n", - - this->n_suppliers_, - this->event_count_, - this->event_period_, - this->event_size_, - this->event_a_, - this->event_b_, - - this->pid_file_name_?this->pid_file_name_:"nil") ); - - if (this->pid_file_name_ != 0) - { - FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); - if (pid != 0) - { - ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); - ACE_OS::fclose (pid); - } - } - - int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. - - if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, - min_priority, - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - ACE_DEBUG ((LM_DEBUG, - "%s: user is not superuser, " - "so remain in time-sharing class\n", argv[0])); - else - ACE_ERROR ((LM_ERROR, - "%s: ACE_OS::sched_params failed\n", argv[0])); - } - - if (ACE_OS::thr_setprio (min_priority) == -1) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed," - "no real-time features\n")); - } - - CORBA::Object_var naming_obj = - orb->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to get the Naming Service.\n"), - 1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (ACE_Scheduler_Factory::use_config (naming_context.in ()) == -1) - return -1; - - CosNaming::Name name (1); - name.length (1); - name[0].id = CORBA::string_dup ("EventService"); - - CORBA::Object_var ec_obj = - naming_context->resolve (name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventChannelAdmin::EventChannel_var channel; - if (CORBA::is_nil (ec_obj.in ())) - channel = RtecEventChannelAdmin::EventChannel::_nil (); - else - channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->connect_suppliers (channel.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected supplier(s)\n")); - - this->activate_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "suppliers are active\n")); - - // Wait for the supplier threads... - if (ACE_Thread_Manager::instance ()->wait () == -1) - { - ACE_ERROR ((LM_ERROR, "Thread_Manager wait failed\n")); - return 1; - } - - ACE_DEBUG ((LM_DEBUG, "suppliers finished\n")); - - this->disconnect_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // @@ Deactivate the suppliers (as CORBA Objects?) - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -int -ECMS_Driver::supplier_task (Test_Supplier *supplier, - void* /* cookie */) -{ - TAO_TRY - { - ACE_Time_Value tv (0, this->event_period_); - - CORBA::ULong n = this->event_size_; - - ECM_IDLData::Info info; - info.mobile_name = CORBA::string_copy ("test"); - info.mobile_speed = 1; - info.trajectory.length (n); - - ECM_Data other; - other.description = CORBA::string_copy ("some data"); - - for (CORBA::ULong j = 0; j < n; ++j) - { - info.trajectory[j].x = j; - info.trajectory[j].y = j*j; - other.inventory.bind (j, j + 1); - } - - ACE_DEBUG ((LM_DEBUG, - "The inventory contains (%d) elements\n", - other.inventory.current_size ())); - - // We have to make it big enough so we get a contiguous block, - // otherwise the octet sequence will not work correctly. - // NOTE: we could pre-allocate enough memory in the CDR stream - // but we want to show that chaining works! - TAO_OutputCDR cdr; - - CORBA::Boolean byte_order = TAO_ENCAP_BYTE_ORDER; - cdr << CORBA::Any::from_boolean (byte_order); - - // The typecode name standard, the encode method is not (in - // general the CDR interface is not specified). - // @@ TODO once the compiled marshalling approach is in place - // this will read: cdr << info; - cdr.encode (ECM_IDLData::_tc_Info, &info, 0, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Here we marshall a non-IDL type. - cdr << other; - - if (!cdr.good_bit ()) - ACE_ERROR ((LM_ERROR, "Problem marshalling C++ data\n")); - - const ACE_Message_Block* mb = cdr.begin (); - // NOTE: total_length () return the length of the complete - // chain. - CORBA::ULong mblen = cdr.total_length (); - - for (CORBA::Long i = 0; i < this->event_count_; ++i) - { - RtecEventComm::EventSet event (1); - event.length (1); - event[0].header.source = supplier->supplier_id (); - event[0].header.ttl = 1; - - ACE_hrtime_t t = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, t); - event[0].header.ec_recv_time = ORBSVCS_Time::zero; - event[0].header.ec_send_time = ORBSVCS_Time::zero; - - if (i == ACE_static_cast (CORBA::Long, this->event_count_) - 1) - event[0].header.type = ACE_ES_EVENT_SHUTDOWN; - else if (i % 2 == 0) - event[0].header.type = this->event_a_; - else - event[0].header.type = this->event_b_; - - event[0].data.x = 0; - event[0].data.y = 0; - - // We use replace to minimize the copies, this should result - // in just one memory allocation; - event[0].data.payload.replace (mblen, mb); - - supplier->consumer_proxy ()->push(event, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // ACE_DEBUG ((LM_DEBUG, "(%t) supplier push event\n")); - - ACE_OS::sleep (tv); - } - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -void -ECMS_Driver::connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr channel, - CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "supplier_%02.2d", i); - - ACE_NEW (this->suppliers_[i], Test_Supplier (this)); - - this->suppliers_[i]->connect (buf, - this->event_a_, - this->event_b_, - this->event_period_, - channel, - TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - } -} - -void -ECMS_Driver::activate_suppliers (CORBA::Environment &) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - this->suppliers_[i]->activate (); - } -} - -void -ECMS_Driver::disconnect_suppliers (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - this->suppliers_[i]->disconnect (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - } -} - -int -ECMS_Driver::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "ds:n:t:h:p:b:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 's': - this->n_suppliers_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'n': - this->event_count_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 't': - this->event_period_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'b': - this->event_size_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'h': - { - char* aux; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - - this->event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - } - break; - - case 'p': - this->pid_file_name_ = get_opt.optarg; - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "[ORB options] " - "-s " - "-n " - "-t " - "-h " - "-p " - "\n", - argv[0])); - return -1; - } - } - - if (this->event_count_ <= 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: event count (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->event_count_, - 100)); - this->event_count_ = 100; - } - - if (this->event_size_ < 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: event size (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->event_size_, - 32)); - this->event_count_ = 32; - } - - if (this->n_suppliers_ <= 0) - { - this->n_suppliers_ = 1; - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: number of suppliers out of range, " - "reset to default (%d)\n", - argv[0], 1), -1); - } - - return 0; -} - -// **************************************************************** - -Test_Supplier::Test_Supplier (ECMS_Driver *driver) - : driver_ (driver), - supplier_ (this) -{ -} - -void -Test_Supplier::connect (const char* name, - int event_a, - int event_b, - int event_period, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - RtecScheduler::Scheduler_ptr server = - ACE_Scheduler_Factory::server (); - - RtecScheduler::handle_t rt_info = - server->create (name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_Time_Value tv (0, event_period); - RtecScheduler::Period_t rate = tv.usec () * 10; - - // The execution times are set to reasonable values, but - // actually they are changed on the real execution, i.e. we - // lie to the scheduler to obtain right priorities; but we - // don't care if the set is schedulable. - tv.set (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - server->set (rt_info, - RtecScheduler::VERY_HIGH_CRITICALITY, - time, time, time, - rate, - RtecScheduler::VERY_LOW_IMPORTANCE, - time, - 1, - RtecScheduler::OPERATION, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->supplier_id_ = ACE::crc32 (name); - ACE_DEBUG ((LM_DEBUG, "ID for <%s> is %04.4x\n", name, - this->supplier_id_)); - - ACE_SupplierQOS_Factory qos; - qos.insert (this->supplier_id_, - event_a, - rt_info, 1); - qos.insert (this->supplier_id_, - event_b, - rt_info, 1); - qos.insert (this->supplier_id_, - ACE_ES_EVENT_SHUTDOWN, - rt_info, 1); - - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - ec->for_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->consumer_proxy_ = - supplier_admin->obtain_push_consumer (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventComm::PushSupplier_var objref = - this->supplier_._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->consumer_proxy_->connect_push_supplier (objref.in (), - qos.get_SupplierQOS (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Test_Supplier::disconnect (CORBA::Environment &TAO_IN_ENV) -{ - if (CORBA::is_nil (this->consumer_proxy_.in ())) - return; - - this->consumer_proxy_->disconnect_push_consumer (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - - this->consumer_proxy_ = 0; -} - -int -Test_Supplier::svc () -{ - return this->driver_->supplier_task (this, this->cookie_); -} - -void -Test_Supplier::disconnect_push_supplier (CORBA::Environment &) -{ -} - -int Test_Supplier::supplier_id (void) const -{ - return this->supplier_id_; -} - -RtecEventChannelAdmin::ProxyPushConsumer_ptr -Test_Supplier::consumer_proxy (void) -{ - return this->consumer_proxy_.in (); -} - -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_PushSupplier_Adapter; -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_PushSupplier_Adapter -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h deleted file mode 100644 index e9e6c6459e6..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h +++ /dev/null @@ -1,145 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// An example on custom marshaling in TAO. -// -// ============================================================================ - -#ifndef ECM_SUPPLIER_H -#define ECM_SUPPLIER_H - -#include "ace/Task.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "orbsvcs/Channel_Clients_T.h" - -class ECMS_Driver; - -class Test_Supplier : public ACE_Task -{ - // - // = TITLE - // Simplifies the supplier task startup. - // - // = DESCRIPTION - // Runs the ECMS_Driver::supplier_task() method in another thread. - // -public: - Test_Supplier (ECMS_Driver *driver); - - int svc (void); - // Run the test, just forwards to the driver - - void connect (const char* name, - int event_a, - int event_b, - int event_period, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); - // This method connects the supplier to the EC. - - void disconnect (CORBA::Environment &_env); - // Disconnect from the EC. - - virtual void disconnect_push_supplier (CORBA::Environment &); - // The methods in the skeleton. - - RtecEventComm::EventSourceID supplier_id (void) const; - // The supplier ID. - - RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer_proxy (void); - // We talk to the EC (as a supplier) using this proxy, no duplicates - // are done here... - -private: - ECMS_Driver *driver_; - // Class we forward to. - - void *cookie_; - // The test provide us a cookie so we can give back our identity. - - RtecEventComm::EventSourceID supplier_id_; - // We generate an id based on the name.... - - RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; - // We talk to the EC (as a supplier) using this proxy. - - ACE_PushSupplier_Adapter supplier_; - // We also connect to the EC as a consumer so we can receive the - // timeout events. -}; - -class ECMS_Driver -{ - // - // = TITLE - // - // = DESCRIPTION - // -public: - ECMS_Driver (void); - - enum { - MAX_SUPPLIERS = 16 - // Maximum number of suppliers. - }; - - int run (int argc, char* argv[]); - // Execute the test. - - int supplier_task (Test_Supplier *supplier, - void *supplier_cookie); - // This method is run by the supplier task. - - void push_supplier (void* supplier_cookie, - RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer, - const RtecEventComm::EventSet &events, - CORBA::Environment &); - // Callback method for suppliers, we push for them to their - // consumers and take statistics on the way. - // It is possible that we ignore the parameter when - // testing the short-circuit case. - -private: - int parse_args (int argc, char* argv[]); - // parse the command line args - - void connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - void disconnect_suppliers (CORBA::Environment &_env); - // Connect the suppliers. - - void activate_suppliers (CORBA::Environment &_env); - // Activate the suppliers, i.e. they start generating events. - -private: - Test_Supplier* suppliers_[ECMS_Driver::MAX_SUPPLIERS]; - // The suppliers array. - - int n_suppliers_; - // The number of suppliers. - - int event_count_; - // How many messages we will send in each suppliers. - - int event_period_; - // The time between each event generation, in microseconds. - - int event_size_; - // The event size (number of elements in the payload). - - int event_a_; - int event_b_; - // We send two types of events, with different contents. - - const char* pid_file_name_; - // The name of a file where the process stores its pid -}; - -#endif /* ECM_SUPPLIER_H */ diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/EC_Custom_Marshal.dsw b/TAO/orbsvcs/tests/EC_Custom_Marshal/EC_Custom_Marshal.dsw deleted file mode 100644 index cbe7b999e70..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/EC_Custom_Marshal.dsw +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "ECCM_Consumer"=.\ECCM_Consumer.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "ECCM_Supplier"=.\ECCM_Supplier.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/Makefile b/TAO/orbsvcs/tests/EC_Custom_Marshal/Makefile deleted file mode 100644 index 7cd025f8b98..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/Makefile +++ /dev/null @@ -1,354 +0,0 @@ -# $Id$ - -BIN = ECM_Supplier ECM_Consumer - -LDLIBS= -lorbsvcs -lTAO - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_ROOT) - -IDL_HDR = dataC dataS -IDL_SRC = dataC dataS - -ECM_Supplier_OBJS=$(addsuffix .o,$(IDL_SRC) ECM_Supplier ECM_Data) -ECM_Consumer_OBJS=$(addsuffix .o,$(IDL_SRC) ECM_Consumer ECM_Data) - -SRC = $(addsuffix .cpp, $(BIN)) \ - $(addsuffix .cpp, $(IDL_SRC)) \ - ECM_Data.cpp - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU - -#### Local rules and variables... - -.PRECIOUS: $(addsuffix .h, $(IDL_SRC)) $(addsuffix .i, $(IDL_SRC)) $(addsuffix .cpp, $(IDL_SRC)) - -ECM_Supplier: $(addprefix $(VDIR),$(ECM_Supplier_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -ECM_Consumer: $(addprefix $(VDIR),$(ECM_Consumer_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -realclean: - $(RM) -f dataC.* dataS.* dataS_T.* - $(RM) -f $(BIN) - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/ECM_Supplier.o .obj/ECM_Supplier.so .shobj/ECM_Supplier.o .shobj/ECM_Supplier.so: ECM_Supplier.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(ACE_ROOT)/ace/Timer_List.h \ - $(ACE_ROOT)/ace/Timer_List_T.h \ - $(ACE_ROOT)/ace/Timer_List_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i \ - ECM_Supplier.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp \ - ECM_Data.h dataC.h dataC.i -.obj/ECM_Consumer.o .obj/ECM_Consumer.so .shobj/ECM_Consumer.o .shobj/ECM_Consumer.so: ECM_Consumer.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(ACE_ROOT)/ace/Timer_List.h \ - $(ACE_ROOT)/ace/Timer_List_T.h \ - $(ACE_ROOT)/ace/Timer_List_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i \ - ECM_Consumer.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp \ - ECM_Data.h dataC.h dataC.i -.obj/dataC.o .obj/dataC.so .shobj/dataC.o .shobj/dataC.so: dataC.cpp dataC.h dataC.i dataS.h dataS_T.h dataS_T.i \ - dataS_T.cpp dataS.i -.obj/dataS.o .obj/dataS.so .shobj/dataS.o .shobj/dataS.so: dataS.cpp dataS.h dataC.h dataC.i dataS_T.h dataS_T.i \ - dataS_T.cpp dataS.i -.obj/ECM_Data.o .obj/ECM_Data.so .shobj/ECM_Data.o .shobj/ECM_Data.so: ECM_Data.cpp ECM_Data.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - dataC.h dataC.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/README b/TAO/orbsvcs/tests/EC_Custom_Marshal/README deleted file mode 100644 index d7001b8a7d3..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/README +++ /dev/null @@ -1,19 +0,0 @@ -# $Id$ - - This example shows how to do custom marshaling of IDL and -non-IDL data structures in TAO, store the resulting CDR stream in an -octet sequence, send it to a remove server and then demarshal it. - The example emphasize the use of efficient, non-copy -mechanisms to achieve those goals. - -To run this test just start the Naming_Service, the Event_Service and then -start - -$ ./ECM_Consumer - -and after that - -$ ./ECM_Supplier - -you can vary the size of the payload (the number of elements in arrays -and sequences) using the -b option to the ECM_Supplier program. diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/data.idl b/TAO/orbsvcs/tests/EC_Custom_Marshal/data.idl deleted file mode 100644 index 871ff05f9df..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/data.idl +++ /dev/null @@ -1,21 +0,0 @@ -// -// $Id$ -// - -module ECM_IDLData -{ - // Some simple data types to show how the Events can carry its - // payload in the octet sequence. - - struct Point { - double x; - double y; - }; - typedef sequence Vector; - - struct Info { - string mobile_name; - double mobile_speed; - Vector trajectory; - }; -}; diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl b/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl deleted file mode 100755 index 130dcd43ac0..00000000000 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -unshift @INC, '../../../../bin'; -require Process; - -$NS_ior = "NameService.ior"; -$sleeptime = 5; - -$NS = Process::Create ("..".$DIR_SEPARATOR. - "..".$DIR_SEPARATOR. - "Naming_Service".$DIR_SEPARATOR. - "Naming_Service".$Process::EXE_EXT. - " -o $NS_ior "); -sleep $sleeptime; - -$ES = Process::Create ("..".$DIR_SEPARATOR. - "..".$DIR_SEPARATOR. - "Event_Service".$DIR_SEPARATOR. - "Event_Service".$Process::EXE_EXT); - -$C = Process::Create ($EXEPREFIX."ECM_Consumer".$Process::EXE_EXT); - -sleep $sleeptime; - -$S = Process::Create ($EXEPREFIX."ECM_Supplier".$Process::EXE_EXT); - -$C->Wait (); -$S->Wait (); - -$NS->Kill (); $NS->Wait (); -$ES->Kill (); $ES->Wait (); - -unlink $NS_ior; - -# @@ Capture the errors from the processes. -exit 0; diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp deleted file mode 100644 index 6eb3e052610..00000000000 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp +++ /dev/null @@ -1,1131 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/Sched_Params.h" -#include "ace/Read_Buffer.h" - -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Time_Utilities.h" - -#include "orbsvcs/Event/EC_Event_Channel.h" -#include "orbsvcs/Event/EC_Basic_Factory.h" - -#include "EC_Mcast.h" - -#if !defined (__ACE_INLINE__) -#include "EC_Mcast.i" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID(EC_Mcast, EC_Mcast, "$Id$") - -ECM_Driver::ECM_Driver (void) - : event_period_ (250000), - event_count_ (100), - config_filename_ (0), - pid_filename_ (0), - local_federations_count_ (0), - all_federations_count_ (0) -{ -} - -int -ECM_Driver::run (int argc, char* argv[]) -{ - TAO_TRY - { - this->orb_ = - CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->parse_args (argc, argv)) - return 1; - - if (this->parse_config_file ()) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " event period = <%d> (usecs)\n" - " event count = <%d>\n" - " config file name = <%s>\n" - " pid file name = <%s>\n", - - this->event_period_, - this->event_count_, - - this->config_filename_?this->config_filename_:"nil", - this->pid_filename_?this->pid_filename_:"nil") ); - - int i; - for (i = 0; i < this->local_federations_count_; ++i) - { - ACE_DEBUG ((LM_DEBUG, - " name = <%s>\n" - " port = <%d>\n" - " supplier types:\n", - this->local_federations_[i]->name ()?this->local_federations_[i]->name ():"nil", - this->local_federations_[i]->mcast_port ())); - int j; - for (j = 0; - j < this->local_federations_[i]->supplier_types (); - ++j) - { - - ACE_DEBUG ((LM_DEBUG, - " name = <%s>\n" - " ipadd = <%x>\n", - this->local_federations_[i]->supplier_name (j), - this->local_federations_[i]->supplier_ipaddr (j))); - } - ACE_DEBUG ((LM_DEBUG, - " consumer types:\n")); - for (j = 0; - j < this->local_federations_[i]->consumer_types (); - ++j) - { - ACE_DEBUG ((LM_DEBUG, - " name = <%s>\n" - " ipadd = <%x>\n", - this->local_federations_[i]->consumer_name (j), - this->local_federations_[i]->consumer_ipaddr (j))); - } - } - - if (this->pid_filename_ != 0) - { - FILE* pid = ACE_OS::fopen (this->pid_filename_, "w"); - if (pid != 0) - { - ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); - ACE_OS::fclose (pid); - } - } - - TAO_EC_Basic_Factory ec_factory (root_poa.in ()); - - TAO_EC_Event_Channel ec_impl (&ec_factory); - - // Register Event_Service with the Naming Service. - RtecEventChannelAdmin::EventChannel_var ec = - ec_impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::String_var str = - this->orb_->object_to_string (ec.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "The (local) EC IOR is <%s>\n", str.in ())); - - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ec_impl.activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "EC_Mcast: local EC objref ready\n")); - - this->open_federations (ec.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "EC_Mcast: open_federations done\n")); - - this->open_senders (ec.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "EC_Mcast: open_senders done\n")); - - this->open_receivers (ec.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "EC_Mcast: open_receivers done\n")); - - this->activate_federations (ec.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "EC_Mcast: activate_federations done\n")); - - ACE_DEBUG ((LM_DEBUG, "EC_Mcast: running the test\n")); - if (this->orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - - this->dump_results (); - - this->close_receivers (TAO_TRY_ENV); - TAO_CHECK_ENV; - this->close_senders (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->close_federations (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "EC_Mcast: shutdown the EC\n")); - - ec_impl.shutdown (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -void -ECM_Driver::federation_has_shutdown (ECM_Local_Federation *federation, - CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, "Federation <%s> shuting down\n", - federation->name ())); - this->federations_running_--; - if (this->federations_running_ <= 0) - this->orb_->shutdown (); -} - -void -ECM_Driver::open_federations (RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->local_federations_count_; ++i) - { - this->local_federations_[i]->open (this->event_count_, - ec, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECM_Driver::activate_federations (RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &TAO_IN_ENV) -{ - this->federations_running_ = this->local_federations_count_; - RtecEventComm::Time interval = this->event_period_; - interval *= 10; - for (int i = 0; i < this->local_federations_count_; ++i) - { - this->local_federations_[i]->activate (ec, - interval, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECM_Driver::close_federations (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->local_federations_count_; ++i) - { - this->local_federations_[i]->close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECM_Driver::open_senders (RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &TAO_IN_ENV) -{ - if (this->endpoint_.dgram ().open (ACE_Addr::sap_any) == -1) - { - // @@ TODO throw an application specific exception. - TAO_IN_ENV.exception (new CORBA::COMM_FAILURE (CORBA::COMPLETED_NO)); - return; - } - ACE_INET_Addr ignore_from; - this->endpoint_.dgram ().get_local_addr (ignore_from); - ACE_DEBUG ((LM_DEBUG, "ECM_Driver::open_senders - " - "local endpoint = (%u:%d)\n", - ignore_from.get_ip_address (), - ignore_from.get_port_number ())); - for (int i = 0; i < this->all_federations_count_; ++i) - { - this->all_federations_[i]->open (&this->endpoint_, - ec, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECM_Driver::close_senders (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->all_federations_count_; ++i) - { - this->all_federations_[i]->close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } - this->endpoint_.dgram ().close (); -} - -void -ECM_Driver::open_receivers (RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->local_federations_count_; ++i) - { - this->local_federations_[i]->open_receiver (ec, - &this->endpoint_, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECM_Driver::close_receivers (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->local_federations_count_; ++i) - { - this->local_federations_[i]->close_receiver (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECM_Driver::dump_results (void) -{ - for (int i = 0; i < this->local_federations_count_; ++i) - { - this->local_federations_[i]->dump_results (); - } -} - - -// **************************************************************** - -int -ECM_Driver::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "l:p:c:n:t:f:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'p': - this->pid_filename_ = get_opt.optarg; - break; - - case 'c': - this->config_filename_ = get_opt.optarg; - break; - - case 't': - this->event_period_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'n': - this->event_count_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'f': - { - char* aux; - int i = 0; - for (char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - arg != 0 && i < ECM_Driver::MAX_LOCAL_FEDERATIONS; - arg = ACE_OS::strtok_r (0, ",", &aux), ++i) - { - this->local_names_[i] = arg; - } - this->local_federations_count_ = i; - } - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "[ORB options] " - "-n " - "-t " - "-l " - "-p " - "-c " - "-f federation,federation,... " - "\n", - argv[0])); - return -1; - } - } - - if (this->event_count_ < 0 - || this->event_count_ >= ECM_Driver::MAX_EVENTS) - { - ACE_DEBUG ((LM_DEBUG, - "%s: event count (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->event_count_, - 100)); - this->event_count_ = 100; - } - - return 0; -} - -int -ECM_Driver::parse_config_file (void) -{ - FILE* cfg = 0; - if (this->config_filename_ != 0) - cfg = ACE_OS::fopen (this->config_filename_, "r"); - else - cfg = stdin; - - if (cfg == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, "cannot open config file <%s>\n", - this->config_filename_), -1); - } - - int s = fscanf (cfg, "%d", &this->all_federations_count_); - if (s == 0 || s == EOF) - { - ACE_ERROR_RETURN ((LM_ERROR, - "problem reading federation count\n"), -1); - } - // ACE_DEBUG ((LM_DEBUG, - // "total federations = %d\n", - // this->all_federations_count_)); - for (int i = 0; i < this->all_federations_count_; ++i) - { - if (this->skip_blanks (cfg, "reading federation name")) - return -1; - ACE_Read_Buffer reader(cfg); - char* buf = reader.read (' ', ' ', '\0'); - char* name = CORBA::string_dup (buf); - reader.alloc()->free (buf); - - - int port; - if (this->skip_blanks (cfg, "reading federation port number")) - return -1; - fscanf (cfg, "%d", &port); - CORBA::UShort mcast_port = ACE_static_cast(CORBA::UShort, port); - - int ns, nc; - if (this->skip_blanks (cfg, "reading supplier count")) - return -1; - s = fscanf (cfg, "%d", &ns); - if (s == 0 || s == EOF) - { - ACE_ERROR_RETURN ((LM_ERROR, - "problem reading supplier count (%d)\n", - i), -1); - } - if (this->skip_blanks (cfg, "reading constumer count")) - return -1; - s = fscanf (cfg, "%d", &nc); - if (s == 0 || s == EOF) - { - ACE_ERROR_RETURN ((LM_ERROR, - "problem reading consumer count (%d)\n", - i), -1); - } - // ACE_DEBUG ((LM_DEBUG, "i = %d <%s> <%d> <%d> <%d>\n", - // i, name, mcast_port, ns, nc)); - - char** supplier_names; - char** consumer_names; - ACE_NEW_RETURN (supplier_names, char*[ns], -1); - ACE_NEW_RETURN (consumer_names, char*[nc], -1); - - if (this->parse_name_list (cfg, ns, supplier_names, - "reading supplier list")) - { - ACE_ERROR_RETURN ((LM_ERROR, - "error parsing supplier list for <%s>\n", - name), -1); - } - - if (this->parse_name_list (cfg, nc, consumer_names, - "reading consumer list")) - { - ACE_ERROR_RETURN ((LM_ERROR, - "error parsing consumer list for <%s>\n", - name), -1); - } - - ACE_NEW_RETURN (this->all_federations_[i], - ECM_Federation (name, mcast_port, - ns, supplier_names, - nc, consumer_names), -1); - } - ACE_OS::fclose (cfg); - - for (int j = 0; j < this->local_federations_count_; ++j) - { - int k = 0; - for (; k < this->all_federations_count_; ++k) - { - if (ACE_OS::strcmp (this->local_names_[j], - this->all_federations_[k]->name ()) == 0) - { - ACE_NEW_RETURN (this->local_federations_[j], - ECM_Local_Federation (this->all_federations_[k], - this), - -1); - break; - } - } - if (k == this->all_federations_count_) - ACE_ERROR ((LM_ERROR, - "Cannot find federations <%s>\n", - this->local_names_[j])); - } - - return 0; -} - -int -ECM_Driver::parse_name_list (FILE* file, - int n, - char** names, - const char* error_msg) -{ - for (int i = 0; i < n; ++i) - { - if (this->skip_blanks (file, error_msg)) - { - ACE_ERROR_RETURN ((LM_ERROR, - "error on item %d while %s\n", - i, error_msg), -1); - } - ACE_Read_Buffer tmp(file); - char* buf = tmp.read ('\n', '\n', '\0'); - names[i] = CORBA::string_dup (buf); - tmp.alloc ()->free (buf); - } - return 0; -} - -int -ECM_Driver::skip_blanks (FILE* file, - const char* error_msg) -{ - int c; - // Consume all the blanks. - while (isspace (c = fgetc (file))); - if (c == EOF) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Unexpected EOF in config file while %s\n", - error_msg), - -1); - } - ungetc (c, file); - return 0; -} -// **************************************************************** - -ECM_Federation::ECM_Federation (char* name, - CORBA::UShort mcast_port, - int supplier_types, - char** supplier_names, - int consumer_types, - char** consumer_names) - : name_ (name), - mcast_port_ (mcast_port), - supplier_types_ (supplier_types), - supplier_names_ (supplier_names), - consumer_types_ (consumer_types), - consumer_names_ (consumer_names), - addr_server_ (mcast_port) -{ - ACE_NEW (this->supplier_ipaddr_, CORBA::ULong[this->supplier_types_]); - ACE_NEW (this->consumer_ipaddr_, CORBA::ULong[this->consumer_types_]); - - int i; - for (i = 0; i < this->supplier_types_; ++i) - { - ACE_INET_Addr addr (u_short(0), this->supplier_names_[i]); - this->supplier_ipaddr_[i] = addr.get_ip_address (); - } - for (i = 0; i < this->consumer_types_; ++i) - { - ACE_INET_Addr addr (u_short(0), this->consumer_names_[i]); - this->consumer_ipaddr_[i] = addr.get_ip_address (); - } -} - -void -ECM_Federation::open (TAO_ECG_UDP_Out_Endpoint *endpoint, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &TAO_IN_ENV) -{ - RtecUDPAdmin::AddrServer_var addr_server = - this->addr_server (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->sender_.init (ec, - addr_server.in (), - endpoint, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - // @@ TODO Make this a parameter.... - this->sender_.mtu (64); - - // The worst case execution time is far less than 2 - // milliseconds, but that is a safe estimate.... - ACE_Time_Value tv (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - - ACE_ConsumerQOS_Factory qos; - qos.start_disjunction_group (); - for (int i = 0; i < this->consumer_types (); ++i) - { - qos.insert_type (this->consumer_ipaddr (i), 0); - } - RtecEventChannelAdmin::ConsumerQOS qos_copy = qos.get_ConsumerQOS (); - this->sender_.open (qos_copy, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -ECM_Federation::close (CORBA::Environment &TAO_IN_ENV) -{ - this->sender_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->sender_.shutdown (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -RtecUDPAdmin::AddrServer_ptr -ECM_Federation::addr_server (CORBA::Environment &env) -{ - return this->addr_server_._this (env); -} - -// **************************************************************** - -ECM_Supplier::ECM_Supplier (ECM_Local_Federation* federation) - : federation_ (federation), - consumer_ (this) -{ -} - -void -ECM_Supplier::open (const char* name, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &TAO_IN_ENV) -{ - this->supplier_id_ = ACE::crc32 (name); - ACE_DEBUG ((LM_DEBUG, "ID for <%s> is %04.4x\n", name, - this->supplier_id_)); - - ACE_SupplierQOS_Factory qos; - for (int i = 0; i < this->federation_->supplier_types (); ++i) - { - qos.insert (this->supplier_id_, - this->federation_->supplier_ipaddr (i), - 0, 1); - } - qos.insert (this->supplier_id_, - ACE_ES_EVENT_SHUTDOWN, - 0, 1); - - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - ec->for_suppliers (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->consumer_proxy_ = - supplier_admin->obtain_push_consumer (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - RtecEventComm::PushSupplier_var objref = this->_this (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->consumer_proxy_->connect_push_supplier (objref.in (), - qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -ECM_Supplier::close (CORBA::Environment &TAO_IN_ENV) -{ - if (CORBA::is_nil (this->consumer_proxy_.in ())) - return; - - this->consumer_proxy_->disconnect_push_consumer (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->consumer_proxy_ = 0; -} - -void -ECM_Supplier::activate (RtecEventChannelAdmin::EventChannel_ptr ec, - RtecEventComm::Time interval, - CORBA::Environment &TAO_IN_ENV) -{ - ACE_ConsumerQOS_Factory consumer_qos; - consumer_qos.start_disjunction_group (); - consumer_qos.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT, - interval, - 0); - - // = Connect as a consumer. - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->for_consumers (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier_proxy_ = - consumer_admin->obtain_push_supplier (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - RtecEventComm::PushConsumer_var cref = - this->consumer_._this (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier_proxy_->connect_push_consumer (cref.in (), - consumer_qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -int -ECM_Supplier::supplier_id (void) const -{ - return this->supplier_id_; -} - -void -ECM_Supplier::push (const RtecEventComm::EventSet& events, - CORBA::Environment& TAO_IN_ENV) -{ - for (u_int i = 0; i < events.length (); ++i) - { - const RtecEventComm::Event& e = events[i]; - if (e.header.type != ACE_ES_EVENT_INTERVAL_TIMEOUT) - continue; - - this->federation_->supplier_timeout (this->consumer_proxy_.in (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECM_Supplier::disconnect_push_supplier (CORBA::Environment& TAO_IN_ENV) -{ - ACE_UNUSED_ARG (TAO_IN_ENV); - - // this->supplier_proxy_->disconnect_push_supplier (TAO_IN_ENV); -} - -void -ECM_Supplier::disconnect_push_consumer (CORBA::Environment &) -{ -} - -// **************************************************************** - -ECM_Consumer::ECM_Consumer (ECM_Local_Federation *federation) - : federation_ (federation), - supplier_proxy_ (0), - consumer_admin_ (0) -{ -} - -void -ECM_Consumer::open (const char*, - RtecEventChannelAdmin::EventChannel_ptr ec, - ACE_RANDR_TYPE &seed, - CORBA::Environment& TAO_IN_ENV) -{ - // The worst case execution time is far less than 2 - // milliseconds, but that is a safe estimate.... - ACE_Time_Value tv (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - - // = Connect as a consumer. - this->consumer_admin_ = ec->for_consumers (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->connect (seed, TAO_IN_ENV); -} - -void -ECM_Consumer::connect (ACE_RANDR_TYPE &seed, - CORBA::Environment& TAO_IN_ENV) -{ - if (CORBA::is_nil (this->consumer_admin_.in ())) - return; - - this->supplier_proxy_ = - this->consumer_admin_->obtain_push_supplier (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - ACE_ConsumerQOS_Factory qos; - qos.start_disjunction_group (); - qos.insert_type (ACE_ES_EVENT_SHUTDOWN, 0); - const ECM_Federation* federation = this->federation_->federation (); - for (int i = 0; i < federation->consumer_types (); ++i) - { - if (ACE_OS::rand_r (seed) < RAND_MAX / 2) - { - ACE_DEBUG ((LM_DEBUG, - "Federation %s leaves group %s\n", - federation->name (), - federation->consumer_name (i))); - this->federation_->subscribed_bit (i, 0); - continue; - } - ACE_DEBUG ((LM_DEBUG, - "Federation %s joins group %s\n", - federation->name (), - federation->consumer_name (i))); - this->federation_->subscribed_bit (i, 1); - qos.insert_type (federation->consumer_ipaddr (i), 0); - } - - RtecEventComm::PushConsumer_var objref = this->_this (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier_proxy_->connect_push_consumer (objref.in (), - qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -ECM_Consumer::disconnect (CORBA::Environment& TAO_IN_ENV) -{ - if (CORBA::is_nil (this->supplier_proxy_.in ()) - || CORBA::is_nil (this->consumer_admin_.in ())) - return; - - this->supplier_proxy_->disconnect_push_supplier (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->supplier_proxy_ = - RtecEventChannelAdmin::ProxyPushSupplier::_nil (); -} - -void -ECM_Consumer::close (CORBA::Environment &TAO_IN_ENV) -{ - this->disconnect (TAO_IN_ENV); - this->consumer_admin_ = - RtecEventChannelAdmin::ConsumerAdmin::_nil (); -} - -void -ECM_Consumer::push (const RtecEventComm::EventSet& events, - CORBA::Environment &TAO_IN_ENV) -{ - ACE_hrtime_t arrival = ACE_OS::gethrtime (); - this->federation_->consumer_push (arrival, events, TAO_IN_ENV); -} - -void -ECM_Consumer::disconnect_push_consumer (CORBA::Environment &) -{ -} - -// **************************************************************** - -ECM_Local_Federation::ECM_Local_Federation (ECM_Federation *federation, - ECM_Driver *driver) - : federation_ (federation), - driver_ (driver), - consumer_ (this), - supplier_ (this), - recv_count_ (0), - unfiltered_count_ (0), - invalid_count_ (0), - send_count_ (0), - event_count_ (0), - last_publication_change_ (0), - last_subscription_change_ (0), - mcast_eh_ (&receiver_), - seed_ (0), - subscription_change_period_ (10000), - publication_change_period_ (10000) -{ - ACE_NEW (this->subscription_subset_, - CORBA::Boolean[this->consumer_types ()]); -} - -ECM_Local_Federation::~ECM_Local_Federation (void) -{ - delete[] this->subscription_subset_; -} - -void -ECM_Local_Federation::open (int event_count, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& TAO_IN_ENV) -{ - this->event_count_ = event_count; - - const int bufsize = 512; - char buf[bufsize]; - ACE_OS::strcpy (buf, this->federation_->name ()); - ACE_OS::strcat (buf, "/supplier"); - - this->supplier_.open (buf, ec, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - ACE_OS::strcpy (buf, this->federation_->name ()); - ACE_OS::strcat (buf, "/consumer"); - this->consumer_.open (buf, ec, this->seed_, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->last_subscription_change_ = ACE_OS::gettimeofday (); -} - -void -ECM_Local_Federation::close (CORBA::Environment &TAO_IN_ENV) -{ - this->consumer_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -ECM_Local_Federation::activate (RtecEventChannelAdmin::EventChannel_ptr ec, - RtecEventComm::Time interval, - CORBA::Environment& TAO_IN_ENV) -{ - this->supplier_.activate (ec, interval, TAO_IN_ENV); -} - -void -ECM_Local_Federation::supplier_timeout (RtecEventComm::PushConsumer_ptr consumer, - CORBA::Environment &TAO_IN_ENV) -{ - RtecEventComm::EventSet sent (1); - sent.length (1); - - RtecEventComm::Event& s = sent[0]; - s.header.source = this->supplier_.supplier_id(); - s.header.ttl = 1; - - ACE_hrtime_t t = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (s.header.creation_time, t); - s.header.ec_recv_time = ORBSVCS_Time::zero; - s.header.ec_send_time = ORBSVCS_Time::zero; - - s.data.x = 0; - s.data.y = 0; - - this->event_count_--; - - // ACE_DEBUG ((LM_DEBUG, "Federation <%s> event count <%d>\n", - // this->name (), this->event_count_)); - - if (this->event_count_ < 0) - { - this->driver_->federation_has_shutdown (this, TAO_IN_ENV); - return; - } - int i = this->event_count_ % this->federation_->supplier_types (); - s.header.type = this->federation_->supplier_ipaddr (i); - - consumer->push (sent, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->send_count_++; - - ACE_Time_Value delta = ACE_OS::gettimeofday () - - this->last_subscription_change_; - - double p = double (ACE_OS::rand_r (this->seed_)) / RAND_MAX; - double maxp = double (delta.msec ()) / this->subscription_change_period_; - - if (4 * p < maxp) - { - ACE_DEBUG ((LM_DEBUG, - "Reconfiguring federation %s: %f %f\n", - this->name (), p, maxp)); - this->consumer_.disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->consumer_.connect (this->seed_, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->last_subscription_change_ = ACE_OS::gettimeofday (); - } -} - -void -ECM_Local_Federation::consumer_push (ACE_hrtime_t, - const RtecEventComm::EventSet &event, - CORBA::Environment &TAO_IN_ENV) -{ - ACE_UNUSED_ARG (TAO_IN_ENV); - - if (event.length () == 0) - { - return; - } - - for (CORBA::ULong i = 0; i < event.length (); ++i) - { - const RtecEventComm::Event& e = event[i]; - - this->recv_count_++; - - int j = 0; - for (; j < this->federation_->consumer_types (); ++j) - { - CORBA::ULong type = e.header.type; - if (type == this->federation_->consumer_ipaddr(j)) - { - if (this->subscribed_bit (j) == 0) - this->unfiltered_count_++; - break; - } - } - if (j == this->federation_->consumer_types ()) - this->invalid_count_++; - } -} - -void -ECM_Local_Federation::open_receiver (RtecEventChannelAdmin::EventChannel_ptr ec, - TAO_ECG_UDP_Out_Endpoint* ignore_from, - CORBA::Environment &TAO_IN_ENV) -{ - RtecUDPAdmin::AddrServer_var addr_server = - this->federation_->addr_server (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - ACE_Reactor* reactor = TAO_ORB_Core_instance ()->reactor (); - - // @@ This should be parameters... - ACE_Time_Value expire_interval (1, 0); - const int max_timeouts = 5; - this->receiver_.init (ec, - ignore_from, - addr_server.in (), - reactor, - expire_interval, - max_timeouts, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - const int bufsize = 512; - char buf[bufsize]; - ACE_OS::strcpy (buf, this->name ()); - ACE_OS::strcat (buf, "/receiver"); - - RtecEventComm::EventSourceID source = ACE::crc32 (buf); - - this->mcast_eh_.reactor (reactor); - - this->mcast_eh_.open (ec, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - ACE_SupplierQOS_Factory qos; - for (int i = 0; i < this->consumer_types (); ++i) - { - qos.insert (source, - this->consumer_ipaddr (i), - 0, 1); - } - - RtecEventChannelAdmin::SupplierQOS qos_copy = - qos.get_SupplierQOS (); - this->receiver_.open (qos_copy, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - -} - -void -ECM_Local_Federation::close_receiver (CORBA::Environment &TAO_IN_ENV) -{ - this->receiver_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->receiver_.shutdown (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - this->mcast_eh_.close (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -ECM_Local_Federation::dump_results (void) const -{ - double unfiltered_ratio = 0; - if (this->recv_count_ != 0) - unfiltered_ratio = double(this->unfiltered_count_)/this->recv_count_; - double invalid_ratio = 0; - if (this->recv_count_ != 0) - invalid_ratio = double(this->invalid_count_)/this->recv_count_; - - ACE_DEBUG ((LM_DEBUG, - "Federation: %s\n" - " events received: %d\n" - " unfiltered events received: %d\n" - " ratio: %f\n" - " invalid events received: %d\n" - " ratio: %f\n" - " events sent: %d\n", - this->name (), - this->recv_count_, - this->unfiltered_count_, - unfiltered_ratio, - this->invalid_count_, - invalid_ratio, - this->send_count_)); -} - -void -ECM_Local_Federation::subscribed_bit (int i, CORBA::Boolean x) -{ - if (i > this->consumer_types ()) - return; - this->subscription_subset_[i] = x; -} - -CORBA::Boolean -ECM_Local_Federation::subscribed_bit (int i) const -{ - if (i > this->consumer_types ()) - return 0; - return this->subscription_subset_[i]; -} - - -// **************************************************************** - -int -main (int argc, char *argv []) -{ - ECM_Driver driver; - return driver.run (argc, argv); -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_PushConsumer_Adapter; -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_PushConsumer_Adapter -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.dsp b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.dsp deleted file mode 100644 index 6702137dbec..00000000000 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.dsp +++ /dev/null @@ -1,96 +0,0 @@ -# Microsoft Developer Studio Project File - Name="EC_Mcast" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=EC_Mcast - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "EC_Mcast.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "EC_Mcast.mak" CFG="EC_Mcast - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "EC_Mcast - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "EC_Mcast - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "EC_Mcast - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\..\..\\" /I "..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" /libpath:"..\..\orbsvcs" - -!ELSEIF "$(CFG)" == "EC_Mcast - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" /libpath:"..\..\orbsvcs" - -!ENDIF - -# Begin Target - -# Name "EC_Mcast - Win32 Release" -# Name "EC_Mcast - Win32 Debug" -# Begin Source File - -SOURCE=.\EC_Mcast.cpp -# End Source File -# Begin Source File - -SOURCE=.\EC_Mcast.h -# End Source File -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.dsw b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.dsw deleted file mode 100644 index 5779b862297..00000000000 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "EC_Mcast"=.\EC_Mcast.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h deleted file mode 100644 index 8d021e57381..00000000000 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h +++ /dev/null @@ -1,517 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// This test attempts to communicate several Event Channels UDP -// using multicast. -// The test reads a configuration file that describe what events are -// received by each "Federation". The user must provide, on the -// command line, which federations are present on each process -// (these are called the "Local Federations"). -// The test also creates one supplier for each federation, the -// supplier can send an event of any possible type described in the -// file. - -// = HOW -// The test creates one UDP_Sender for each remote federation, -// this is a PushConsumer that sends the events using UDP -// multicast. -// Notice that there is still a win in using multicast because -// multiple copies of the federation may be present. -// To receive the event the test creates one UDP_Receiver for each -// local federation, it joins to the right multicast groups and -// pushes the events it receives, acting as a PushSupplier. -// -// The UDP_Receiversfederation suppliers Mcast packets as local events -// could observe the changes in the local subscriptions and use that -// to join or leave the multicast groups. -// To demostrate this the test will need to reconfigure its -// subscription list every so often (a few seconds seems like a good -// idea). -// -// = TODO -// -// It is unfortunate that the test must know before-hand the remote -// consumer interests. It would be really simple to use a better -// strategy: the test could "observe" changes in the remote EC -// subscription list, it could then modify its local consumers -// subscriptions. -// -// ============================================================================ - -#ifndef EC_MCAST_H -#define EC_MCAST_H - -#include "ace/SString.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/High_Res_Timer.h" -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "orbsvcs/RtecEventCommS.h" -#include "orbsvcs/Channel_Clients_T.h" -#include "orbsvcs/Event/EC_Gateway_UDP.h" -#include "orbsvcs/Event/EC_UDP_Admin.h" - -class ECM_Driver; - -class ECM_Federation -{ - // = DESCRIPTION - // The test reads a configuration file where it obtains the data - // about each "federation". A federation is some application, - // distributed over several processes. The potential set of - // publications and the potential set of subscriptions is known - // beforehand, but the actual publications (or subscriptions) may - // change dynamically. - // As stated above the federation may be present in more than one - // process, but also a process may participate in more than one - // federation. - // -public: - ECM_Federation (char* name, - CORBA::UShort mcast_port, - int supplier_types, - char** supplier_names, - int consumer_types, - char** consumer_names); - // Constructor, it assumes ownership of the buffers, strings must be - // allocated using CORBA::string_alloc(), buffers using operator new. - - ~ECM_Federation (void); - // Dtor - - const char* name (void) const; - // The name of the federation.... - - CORBA::UShort mcast_port (void) const; - // The port used by this federation to receive mcast messages. - - int supplier_types (void) const; - // The number of different event types published by this federation. - - const char* supplier_name (CORBA::ULong i) const; - // The name (mcast addr in A.B.C.D format) of the event type - - CORBA::ULong supplier_ipaddr (CORBA::ULong i) const; - // The ipaddr (in host byte order) of the event type - - int consumer_types (void) const; - // The number of different event types consumed by this federation. - - const char* consumer_name (CORBA::ULong i) const; - // The name (mcast addr in A.B.C.D format) of the event type - - CORBA::ULong consumer_ipaddr (CORBA::ULong i) const; - // The ipaddr (in host byte order) of the event type - - void open (TAO_ECG_UDP_Out_Endpoint *endoint, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &_env); - // Connect the UDP sender to the EC. - - void close (CORBA::Environment &_env); - // Close the UDP sender, disconnect from the EC - - int sender_local_addr (ACE_INET_Addr& addr); - // Return the sender local address - - RtecUDPAdmin::AddrServer_ptr addr_server (CORBA::Environment &env); - // This address server can be used to convert event headers - // (type,source) to UDP addresses (ipaddr,port) - -private: - char* name_; - CORBA::UShort mcast_port_; - - int supplier_types_; - char** supplier_names_; - CORBA::ULong* supplier_ipaddr_; - - int consumer_types_; - char** consumer_names_; - CORBA::ULong* consumer_ipaddr_; - - TAO_ECG_UDP_Sender sender_; - // The sender - - TAO_EC_Simple_AddrServer addr_server_; - // Resolve event headers (type,source) to UDP addresses - // (ipaddr,port) -}; - -class ECM_Local_Federation; - -class ECM_Supplier : public POA_RtecEventComm::PushSupplier -{ - // - // = TITLE - // Helper class to simulate an application acting as an event - // supplier. - // - // = DESCRIPTION - // This class connects as a consumer for timeouts in the EC. On - // every timeout it delegates on the ECM_Local_Federation class, - // usually this results in some reconfiguration and/or some events - // sent. - // -public: - ECM_Supplier (ECM_Local_Federation* federation); - - void open (const char* name, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment& _env); - // This method connects the supplier to the EC. - - void close (CORBA::Environment &_env); - // Disconnect from the EC. - - void activate (RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecEventComm::Time interval, - CORBA::Environment& _env); - // Connect as a consumer to start receiving events. - - RtecEventComm::EventSourceID supplier_id (void) const; - // The supplier ID. - - void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); - void disconnect_push_consumer (CORBA::Environment &); - // Implement the callbacks for our consumer personality. - - // = The POA_RtecEventComm::PushSupplier methods. - virtual void disconnect_push_supplier (CORBA::Environment &); - -private: - ECM_Local_Federation* federation_; - // To callback the federation. - - RtecEventComm::EventSourceID supplier_id_; - // We generate an id based on the name.... - - RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; - // We talk to the EC (as a supplier) using this proxy. - - ACE_PushConsumer_Adapter consumer_; - // We also connect to the EC as a consumer so we can receive the - // timeout events. - - RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; - // We talk to the EC (as a supplier) using this proxy. -}; - -class ECM_Consumer : public POA_RtecEventComm::PushConsumer -{ - // - // = TITLE - // Helper class to simulate an application acting as an event - // consumer. - // - // = DESCRIPTION - // This class connects as an event consumer to the EC. The events - // are actually handled by the ECM_Local_Federation. -public: - ECM_Consumer (ECM_Local_Federation* federation); - - void open (const char* name, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - ACE_RANDR_TYPE &seed, - CORBA::Environment& _env); - // This method connects the consumer to the EC. - - void close (CORBA::Environment &_env); - // Disconnect from the EC. - - void connect (ACE_RANDR_TYPE& seed, - CORBA::Environment &_env); - void disconnect (CORBA::Environment &_env); - // Disconnect from the supplier, but do not forget about it or close - // it. - - // = The POA_RtecEventComm::PushComsumer methods. - virtual void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); - virtual void disconnect_push_consumer (CORBA::Environment &); - -private: - ECM_Local_Federation* federation_; - // To callback. - - RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; - // We talk to the EC using this proxy. - - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_; - // We talk to the EC using this proxy. -}; - -class ECM_Local_Federation -{ - // = DESCRIPTION - // This class is used to represent a federation that is actually - // running in this process. - // -public: - ECM_Local_Federation (ECM_Federation *federation, - ECM_Driver *driver); - // Constructor. - ~ECM_Local_Federation (void); - // Destructor - - void open (int event_count, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment& _env); - // Connect both the supplier and the consumer. - - void close (CORBA::Environment& _env); - // Disconnect everybody from the EC - - void activate (RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecEventComm::Time interval, - CORBA::Environment& _env); - // Activate the supplier - - void supplier_timeout (RtecEventComm::PushConsumer_ptr consumer, - CORBA::Environment& _env); - // The supplier is ready to send a new event. - - void consumer_push (ACE_hrtime_t arrival, - const RtecEventComm::EventSet& event, - CORBA::Environment& _env); - // The consumer just received an event. - - const ECM_Federation *federation (void) const; - // The federation description. - - void open_receiver (RtecEventChannelAdmin::EventChannel_ptr ec, - TAO_ECG_UDP_Out_Endpoint* ignore_from, - CORBA::Environment &_env); - // Connect the UDP receiver to the EC. - - void close_receiver (CORBA::Environment &_env); - // Close the UDP receiver, disconnect from the EC - - void dump_results (void) const; - // Report the results back to the user... - - void subscribed_bit (int i, CORBA::Boolean x); - CORBA::Boolean subscribed_bit (int i) const; - // Set&Get the subscribed bit; this defines the subset of events - // that we actually publish. - - // = Delegate on the federation description - const char* name (void) const; - CORBA::UShort mcast_port (void) const; - int supplier_types (void) const; - const char* supplier_name (CORBA::ULong i) const; - CORBA::ULong supplier_ipaddr (CORBA::ULong i) const; - int consumer_types (void) const; - const char* consumer_name (CORBA::ULong i) const; - CORBA::ULong consumer_ipaddr (CORBA::ULong i) const; - -private: - ECM_Federation *federation_; - // The description of the events we send and receive. - - ECM_Driver *driver_; - // The test driver. - - ECM_Consumer consumer_; - ECM_Supplier supplier_; - // The supplier and consumer helper classes, other than - // initialization this classes only forward events to the - // Federation. - - // Collect statistics - - CORBA::ULong recv_count_; - // Messages received. - - CORBA::ULong unfiltered_count_; - // Messages received that were not properly filtered. - - CORBA::ULong invalid_count_; - // Message received that could *not* be destined to this federation, - // yet they were received. - - CORBA::ULong send_count_; - // Messages sent. - - int event_count_; - // How many messages will we send before stop the simulation. - - ACE_Time_Value last_publication_change_; - // The last time we changed our publication list, we don't change it - // too often. - - ACE_Time_Value last_subscription_change_; - // The last time we changed our publication, so we don't change too - // often. - - TAO_ECG_UDP_Receiver receiver_; - // This object reads the events and pushes them into the EC. Notice - // that it can receive events from multiple Event Handlers. - - TAO_ECG_Mcast_EH mcast_eh_; - // The event handler, it receives callbacks from the reactor - // whenever an event is available in some of the multicast groups, - // it then forwards to the object for processing and - // dispatching of the event. - // @@ TODO Eventually we may need several of this objects to handle - // OS limitations on the number of multicast groups per socket. - - ACE_RANDR_TYPE seed_; - // The seed for a random number generator. - - CORBA::ULong subscription_change_period_; - // The (average) period between subscription changes, in usecs - - CORBA::ULong publication_change_period_; - // The (average) period between publication changes, in usecs - - CORBA::Boolean* subscription_subset_; - // The events we are actually subscribed to. -}; - -class ECM_Driver -{ - // - // = TITLE - // Demonstrate the use of the UDP Gateways. - // - // = DESCRIPTION - // This class is design to exercise several features of the UDP - // Gateways and its companion classes. - // We create a set of processes, each running one EC, with - // multiple consumers and suppliers colocated with the EC. - // The ECs communicate among themselves using multicast. - // The test thus show how to use multicast, change the local - // ECG_UDP_Receiver and ECG_UDP_Sender QoS specifications - // dynamically, how to economically use the OS resources to - // receive and send multicast messages, etc. - // -public: - ECM_Driver (void); - - enum { - MAX_EVENTS = 1024, - // Maximum number of events to send on each Federation. - - MAX_LOCAL_FEDERATIONS = 16, - // Maximum number of federations running on a single process - - MAX_FEDERATIONS = 128 - // Maximum number of federations in the simulation - }; - - int run (int argc, char* argv[]); - // Run the test, read all the configuration files, etc. - - void federation_has_shutdown (ECM_Local_Federation *federation, - CORBA::Environment& _env); - // One of the federations has completed its simulation, once all of - // them finish the test exists. - - -private: - void open_federations (RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &_env); - // Connect the federations to the EC. - - void activate_federations (RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &_env); - // Activate all the federations - - void close_federations (CORBA::Environment &_env); - // Close the federations, i.e. disconnect from the EC, deactivate - // the objects, etc. - - void open_senders (RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &_env); - // Connect all the senders, so we can start multicasting events. - - void open_receivers (RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &_env); - // Connect all the receivers, thus we accept events arriving through - // multicast. - - void close_senders (CORBA::Environment &_env); - // Close all the senders to cleanup resources. - - void close_receivers (CORBA::Environment &_env); - // Close all the receivers to cleanup resources. - - int shutdown (CORBA::Environment&); - // Called when the main thread. - - int parse_args (int argc, char* argv[]); - // parse the command line arguments - - int parse_config_file (void); - // parse the command line arguments - - int parse_name_list (FILE* file, int n, char** names, - const char* error_msg); - // parse one of the lists of names in the federation definition. - - int skip_blanks (FILE* file, - const char* error_msg); - // skip the blanks in the file. - - void dump_results (void); - // Dump the results to the standard output. - -private: - int event_period_; - // The events are generated using this interval, in microseconds. - - int event_count_; - // How many events will the suppliers send - - char* config_filename_; - // The name of the file where we read the configuration. - - const char* pid_filename_; - // The name of a file where the process stores its pid - - int local_federations_count_; - // How many federations are running in this process (or, if you - // prefer, in how many federations does this process participate). - - ECM_Local_Federation* local_federations_[MAX_LOCAL_FEDERATIONS]; - // The local federations. - - char* local_names_[MAX_LOCAL_FEDERATIONS]; - // The names of the local federations. - - int all_federations_count_; - // The total number of federations we belong to. - - ECM_Federation* all_federations_[MAX_FEDERATIONS]; - // All the federations. - - ACE_Atomic_Op federations_running_; - // Keep track of how many federations are active so we can shutdown - // once they are all destroyed. - - ACE_hrtime_t test_start_; - ACE_hrtime_t test_stop_; - // Measure the test elapsed time as well as mark the beginning of - // the frames. - - CORBA::ORB_var orb_; - // The ORB, so we can shut it down. - - TAO_ECG_UDP_Out_Endpoint endpoint_; - // This socket is shared by all the federations to send the - // multicast events. -}; - -#if defined (__ACE_INLINE__) -#include "EC_Mcast.i" -#endif /* __ACE_INLINE__ */ - -#endif /* EC_MCAST_H */ diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.i b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.i deleted file mode 100644 index 50d00434a95..00000000000 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.i +++ /dev/null @@ -1,120 +0,0 @@ -// -// $Id$ -// - -ACE_INLINE int -ECM_Federation::sender_local_addr (ACE_INET_Addr& addr) -{ - return this->sender_.get_local_addr (addr); -} - - -ACE_INLINE const char* -ECM_Federation::name (void) const -{ - return this->name_; -} - -ACE_INLINE CORBA::UShort -ECM_Federation::mcast_port (void) const -{ - return this->mcast_port_; -} - -ACE_INLINE int -ECM_Federation::supplier_types (void) const -{ - return this->supplier_types_; -} - -ACE_INLINE const char* -ECM_Federation::supplier_name (CORBA::ULong i) const -{ - if (i < ACE_static_cast (ACE_CAST_CONST CORBA::ULong, this->supplier_types_)) - return this->supplier_names_[i]; - return 0; -} - -ACE_INLINE CORBA::ULong -ECM_Federation::supplier_ipaddr (CORBA::ULong i) const -{ - if (i < ACE_static_cast (ACE_CAST_CONST CORBA::ULong, this->supplier_types_)) - return this->supplier_ipaddr_[i]; - return 0; -} - -ACE_INLINE int -ECM_Federation::consumer_types (void) const -{ - return this->consumer_types_; -} - -ACE_INLINE const char* -ECM_Federation::consumer_name (CORBA::ULong i) const -{ - if (i < ACE_static_cast (ACE_CAST_CONST CORBA::ULong, this->consumer_types_)) - return this->consumer_names_[i]; - return 0; -} - -ACE_INLINE CORBA::ULong -ECM_Federation::consumer_ipaddr (CORBA::ULong i) const -{ - if (i < ACE_static_cast (ACE_CAST_CONST CORBA::ULong, this->consumer_types_)) - return this->consumer_ipaddr_[i]; - return 0; -} - -ACE_INLINE const ECM_Federation* -ECM_Local_Federation::federation (void) const -{ - return this->federation_; -} - -ACE_INLINE const char* -ECM_Local_Federation::name (void) const -{ - return this->federation_->name (); -} - -ACE_INLINE CORBA::UShort -ECM_Local_Federation::mcast_port (void) const -{ - return this->federation_->mcast_port (); -} - -ACE_INLINE int -ECM_Local_Federation::supplier_types (void) const -{ - return this->federation_->supplier_types (); -} - -ACE_INLINE const char* -ECM_Local_Federation::supplier_name (CORBA::ULong i) const -{ - return this->federation_->supplier_name (i); -} - -ACE_INLINE CORBA::ULong -ECM_Local_Federation::supplier_ipaddr (CORBA::ULong i) const -{ - return this->federation_->supplier_ipaddr (i); -} - -ACE_INLINE int -ECM_Local_Federation::consumer_types (void) const -{ - return this->federation_->consumer_types (); -} - -ACE_INLINE const char* -ECM_Local_Federation::consumer_name (CORBA::ULong i) const -{ - return this->federation_->consumer_name (i); -} - -ACE_INLINE CORBA::ULong -ECM_Local_Federation::consumer_ipaddr (CORBA::ULong i) const -{ - return this->federation_->consumer_ipaddr (i); -} diff --git a/TAO/orbsvcs/tests/EC_Mcast/Makefile b/TAO/orbsvcs/tests/EC_Mcast/Makefile deleted file mode 100644 index 20f30c3dbf9..00000000000 --- a/TAO/orbsvcs/tests/EC_Mcast/Makefile +++ /dev/null @@ -1,178 +0,0 @@ -# $Id$ - -BIN = EC_Mcast - -SRC = $(BIN:%=%$(VAR).cpp) -LDLIBS= -lorbsvcs -lTAO - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_ROOT) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU - -#### Local rules and variables... - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/EC_Mcast.o .obj/EC_Mcast.so .shobj/EC_Mcast.o .shobj/EC_Mcast.so: EC_Mcast.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(ACE_ROOT)/ace/Read_Buffer.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Read_Buffer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Event_Channel.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Event_Channel.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Basic_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Basic_Factory.i \ - EC_Mcast.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.h \ - $(ACE_ROOT)/ace/SOCK_CODgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_UDP_Admin.h \ - EC_Mcast.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/EC_Mcast/README b/TAO/orbsvcs/tests/EC_Mcast/README deleted file mode 100644 index 9f195081d11..00000000000 --- a/TAO/orbsvcs/tests/EC_Mcast/README +++ /dev/null @@ -1,21 +0,0 @@ -# $Id$ - -This test can be pretty complicated to run, a sample configuration file is -included to help you startup. - - The basic idea to remember is that a "Federation" is a logical -grouping of incoming and outgoing mcast addresses that share the same -multicast port. The test reads the configuration file to find out -which Federations are globally available defined, but the comand line -is used to specify the list of federations that are actually running -on each process. - - To make the test interesting you should run at least two -copies of the test, on different windows (to keep the output appart): - -$ ./EC_Mcast -p ECM1.pid -c sample.cfg -n 200 -t 500000 -f Set02 -$ ./EC_Mcast -p ECM2.pid -c sample.cfg -n 200 -t 500000 -f Set02 - - the test will report the number of events received, if you run -just one of the processes you will notice that this number is smaller, -this indicates that some events come from a "remote" event. diff --git a/TAO/orbsvcs/tests/EC_Mcast/sample.cfg b/TAO/orbsvcs/tests/EC_Mcast/sample.cfg deleted file mode 100644 index 060977e294f..00000000000 --- a/TAO/orbsvcs/tests/EC_Mcast/sample.cfg +++ /dev/null @@ -1,64 +0,0 @@ -6 -Set00 12000 5 3 - 224.100.0.1 - 224.100.0.2 - 224.100.0.3 - 224.100.0.4 - 224.100.0.5 - 224.100.5.1 - 224.100.5.2 - 224.100.5.3 -Set01 12001 4 4 - 224.100.1.1 - 224.100.1.2 - 224.100.1.3 - 224.100.1.4 - 224.100.2.1 - 224.100.2.2 - 224.100.2.4 - 224.100.0.1 -Set02 12002 3 5 - 224.100.2.1 - 224.100.2.2 - 224.100.2.3 - 224.100.2.1 - 224.100.2.2 - 224.100.2.3 - 224.100.1.1 - 224.100.1.3 -Set03 12003 4 4 - 224.100.3.1 - 224.100.3.2 - 224.100.3.3 - 224.100.3.4 - 224.100.2.1 - 224.100.2.2 - 224.100.2.3 - 224.100.2.4 -Set04 12004 4 4 - 224.100.4.1 - 224.100.4.2 - 224.100.4.3 - 224.100.4.4 - 224.100.5.1 - 224.100.5.2 - 224.100.4.3 - 224.100.4.4 -Set05 12005 4 4 - 224.100.5.1 - 224.100.5.2 - 224.100.5.3 - 224.100.5.4 - 224.100.4.1 - 224.100.4.2 - 224.100.5.3 - 224.100.5.4 -Set06 12006 4 4 - 224.100.0.1 - 224.100.0.2 - 224.100.2.1 - 224.100.2.2 - 224.100.0.3 - 224.100.0.4 - 224.100.2.3 - 224.100.2.4 diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp deleted file mode 100644 index da410dc5e04..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp +++ /dev/null @@ -1,1674 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/Sched_Params.h" - -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Scheduler_Factory.h" -#include "orbsvcs/Time_Utilities.h" -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "orbsvcs/Sched/Config_Scheduler.h" -#include "orbsvcs/Runtime_Scheduler.h" -#include "orbsvcs/Event/Event_Channel.h" -#include "EC_Multiple.h" - -#include "Scheduler_Runtime1.h" -#include "Scheduler_Runtime2.h" -#include "Scheduler_Runtime_Dynamic.h" /* infos_3 */ - -#if defined (sun) -# include /* for _lwp_self */ -#endif /* sun */ - -ACE_RCSID(EC_Multiple, EC_Multiple, "$Id$") - -Test_ECG::Test_ECG (void) - : lcl_name_ ("Test_ECG"), - rmt_name_ (0), - scheduling_type_ (Test_ECG::ss_runtime), - consumer_disconnects_ (0), - supplier_disconnects_ (0), - short_circuit_ (0), - hp_suppliers_ (1), - hp_consumers_ (1), - hp_workload_ (10), - hp_interval_ (25000), - hp_message_count_ (200), - hps_event_a_ (ACE_ES_EVENT_UNDEFINED), - hps_event_b_ (ACE_ES_EVENT_UNDEFINED + 1), - hpc_event_a_ (ACE_ES_EVENT_UNDEFINED), - hpc_event_b_ (ACE_ES_EVENT_UNDEFINED + 1), - lp_suppliers_ (0), - lp_consumers_ (0), - lp_workload_ (0), - lp_interval_ (100000), - lp_message_count_ (50), - lps_event_a_ (0), - lps_event_b_ (0), - lpc_event_a_ (0), - lpc_event_b_ (0), - schedule_file_ (0), - pid_file_name_ (0), - ready_ (0), - ready_cnd_ (ready_mtx_) -{ -} - - - -void -print_priority_info (const char *const name) -{ -#if defined (ACE_HAS_PTHREADS_STD) || defined (sun) -#if defined (ACE_HAS_PTHREADS_STD) - struct sched_param param; - int policy, status; - - if ((status = pthread_getschedparam (pthread_self (), &policy, - ¶m)) == 0) { -# ifdef sun - ACE_DEBUG ((LM_DEBUG, - "%s (%lu|%u); policy is %d, priority is %d\n", - name, - ACE_OS::getpid (), - _lwp_self (), - pthread_self (), - policy, param.sched_priority)); -# else /* ! sun */ - ACE_DEBUG ((LM_DEBUG, - "%s (%lu|%u); policy is %d, priority is %d\n", - name, - ACE_OS::getpid (), - 0, - pthread_self (), - policy, param.sched_priority )); -# endif /* ! sun */ - } else { - ACE_DEBUG ((LM_DEBUG,"pthread_getschedparam failed: %d\n", status)); - } -#endif /* ACE_HAS_PTHREADS_STD */ - -#ifdef sun - // Find what scheduling class the thread's LWP is in. - ACE_Sched_Params sched_params (ACE_SCHED_OTHER, 0); - if (ACE_OS::lwp_getparams (sched_params) == -1) - { - ACE_OS::perror ("ACE_OS::lwp_getparams"); - return; - } - else if (sched_params.policy () == ACE_SCHED_FIFO || - sched_params.policy () == ACE_SCHED_RR) - { - // This thread's LWP is in the RT class. - ACE_DEBUG ((LM_DEBUG, - "RT class; priority: %d, quantum: %u msec\n", - sched_params.priority (), - sched_params.quantum ().msec ())); - } - else - { - ACE_DEBUG ((LM_DEBUG, - "TS class; priority: %d\n", - sched_params.priority ())); - } -#endif /* sun */ -#else - ACE_UNUSED_ARG (name); -#endif /* ACE_HAS_PTHREADS_STD */ -} - -int -Test_ECG::run (int argc, char* argv[]) -{ - TAO_TRY - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->parse_args (argc, argv)) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " lcl name = <%s>\n" - " rmt name = <%s>\n" - " scheduler type = <%d>\n" - " consumer disconnects = <%d>\n" - " supplier disconnects = <%d>\n" - " short circuit EC = <%d>\n" - " HP suppliers = <%d>\n" - " HP consumers = <%d>\n" - " HP workload = <%d> (iterations)\n" - " HP interval between events = <%d> (usecs)\n" - " HP message count = <%d>\n" - " HP supplier Event A = <%d>\n" - " HP supplier Event B = <%d>\n" - " HP consumer Event A = <%d>\n" - " HP consumer Event B = <%d>\n" - " LP suppliers = <%d>\n" - " LP consumers = <%d>\n" - " LP workload = <%d> (iterations)\n" - " LP interval between events = <%d> (usecs)\n" - " LP message count = <%d>\n" - " LP supplier Event A = <%d>\n" - " LP supplier Event B = <%d>\n" - " LP consumer Event A = <%d>\n" - " LP consumer Event B = <%d>\n" - " schedule_file = <%s>\n" - " pid file name = <%s>\n", - this->lcl_name_?this->lcl_name_:"nil", - this->rmt_name_?this->rmt_name_:"nil", - this->scheduling_type_, - this->consumer_disconnects_, - this->supplier_disconnects_, - this->short_circuit_, - - this->hp_suppliers_, - this->hp_consumers_, - this->hp_workload_, - this->hp_interval_, - this->hp_message_count_, - this->hps_event_a_, - this->hps_event_b_, - this->hpc_event_a_, - this->hpc_event_b_, - - this->lp_suppliers_, - this->lp_consumers_, - this->lp_workload_, - this->lp_interval_, - this->lp_message_count_, - this->lps_event_a_, - this->lps_event_b_, - this->lpc_event_a_, - this->lpc_event_b_, - - this->schedule_file_?this->schedule_file_:"nil", - this->pid_file_name_?this->pid_file_name_:"nil") ); - - print_priority_info ("Test_ECG::run (Main)"); - - if (this->pid_file_name_ != 0) - { - FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); - if (pid != 0) - { - ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); - ACE_OS::fclose (pid); - } - } - - int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. - - if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, - min_priority, - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - ACE_DEBUG ((LM_DEBUG, - "%s: user is not superuser, " - "so remain in time-sharing class\n", argv[0])); - else - ACE_ERROR ((LM_ERROR, - "%s: ACE_OS::sched_params failed\n", argv[0])); - } - - if (ACE_OS::thr_setprio (min_priority) == -1) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed\n")); - } - - print_priority_info ("Test_ECG::run (Main after thr_setprio)"); - - CORBA::Object_var naming_obj = - orb->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to get the Naming Service.\n"), - 1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - auto_ptr scheduler_impl; - RtecScheduler::Scheduler_var scheduler; - - switch (this->scheduling_type_) - { - default: - ACE_ERROR ((LM_WARNING, "Unknown scheduling type %d\n", - this->scheduling_type_)); - /*FALLTHROUGH*/ - case Test_ECG::ss_global: - break; - - case Test_ECG::ss_local: - scheduler_impl = - auto_ptr(new ACE_Config_Scheduler); - if (scheduler_impl.get () == 0) - return -1; - scheduler = scheduler_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - break; - - case Test_ECG::ss_runtime: - if (ACE_OS::strcmp (this->lcl_name_, "ECM1") == 0) - { - // This setups Scheduler_Factory to use the runtime version - ACE_Scheduler_Factory::use_runtime ( - sizeof (runtime_configs_1)/sizeof (runtime_configs_1[0]), - runtime_configs_1, - sizeof (runtime_infos_1)/sizeof (runtime_infos_1[0]), - runtime_infos_1); - - scheduler_impl = - auto_ptr - (new ACE_Runtime_Scheduler (runtime_configs_1_size, - runtime_configs_1, - runtime_infos_1_size, - runtime_infos_1)); - if (scheduler_impl.get () == 0) - return -1; - scheduler = scheduler_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - else if (ACE_OS::strcmp (this->lcl_name_, "ECM2") == 0) - { - // This setups Scheduler_Factory to use the runtime version - ACE_Scheduler_Factory::use_runtime ( - sizeof (runtime_configs_2)/sizeof (runtime_configs_2[0]), - runtime_configs_2, - sizeof (runtime_infos_2)/sizeof (runtime_infos_2[0]), - runtime_infos_2); - - scheduler_impl = - auto_ptr - (new ACE_Runtime_Scheduler (runtime_configs_2_size, - runtime_configs_2, - runtime_infos_2_size, - runtime_infos_2)); - if (scheduler_impl.get () == 0) - return -1; - scheduler = scheduler_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - else if (ACE_OS::strcmp (this->lcl_name_, "ECM3") == 0) - { - // This setups Scheduler_Factory to use the runtime version - ACE_Scheduler_Factory::use_runtime ( - sizeof (runtime_configs_3)/sizeof (runtime_configs_3[0]), - runtime_configs_3, - sizeof (runtime_infos_3)/sizeof (runtime_infos_3[0]), - runtime_infos_3); - - scheduler_impl = - auto_ptr - (new ACE_Runtime_Scheduler (runtime_configs_3_size, - runtime_configs_3, - runtime_infos_3_size, - runtime_infos_3)); - if (scheduler_impl.get () == 0) - return -1; - scheduler = scheduler_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - else - { - ACE_ERROR ((LM_WARNING, - "Unknown name <%s> defaulting to " - "config scheduler\n", this->lcl_name_)); - scheduler_impl = - auto_ptr(new ACE_Config_Scheduler); - if (scheduler_impl.get () == 0) - return -1; - scheduler = scheduler_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - break; - - } - - // We use this buffer to generate the names of the local - // services. - const int bufsize = 512; - char buf[bufsize]; - - // Register the scheduler with the naming service. - switch (this->scheduling_type_) - { - default: - case Test_ECG::ss_global: - break; - - case Test_ECG::ss_local: - case Test_ECG::ss_runtime: - { - CORBA::String_var str = - orb->object_to_string (scheduler.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, "The (local) scheduler IOR is <%s>\n", - str.in ())); - - ACE_OS::strcpy (buf, "ScheduleService@"); - ACE_OS::strcat (buf, this->lcl_name_); - - // Register the servant with the Naming Context.... - CosNaming::Name schedule_name (1); - schedule_name.length (1); - schedule_name[0].id = CORBA::string_dup (buf); - naming_context->bind (schedule_name, scheduler.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (ACE_Scheduler_Factory::use_config (naming_context.in (), - buf) == -1) - return -1; - } - break; - } - - // Create the EventService implementation, but don't start its - // internal threads. - // Explicit cat to CORBA::Boolean to disambiguate call. - ACE_EventChannel ec_impl (CORBA::Boolean(0)); - - // Register Event_Service with the Naming Service. - RtecEventChannelAdmin::EventChannel_var ec = - ec_impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::String_var str = - orb->object_to_string (ec.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_OS::sleep (5); - ACE_DEBUG ((LM_DEBUG, "The (local) EC IOR is <%s>\n", str.in ())); - - ACE_OS::strcpy (buf, "EventChannel@"); - ACE_OS::strcat (buf, this->lcl_name_); - - CosNaming::Name channel_name (1); - channel_name.length (1); - channel_name[0].id = CORBA::string_dup (buf); - naming_context->bind (channel_name, ec.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "waiting to start\n")); - - ACE_Time_Value tv (15, 0); - - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->rmt_name_ != 0) - { - if (orb->run (&tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - } - - ACE_DEBUG ((LM_DEBUG, "starting....\n")); - - RtecEventChannelAdmin::EventChannel_var local_ec = - this->get_ec (naming_context.in (), - this->lcl_name_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "located local EC\n")); - - for (int sd = 0; sd < this->supplier_disconnects_; ++sd) - { - this->connect_suppliers (local_ec.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - this->disconnect_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_OS::sleep (5); - ACE_DEBUG ((LM_DEBUG, "Supplier disconnection %d\n", sd)); - } - - this->connect_suppliers (local_ec.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected supplier\n")); - - RtecEventChannelAdmin::Observer_Handle observer_handle = 0; - if (this->rmt_name_ != 0) - { - tv.set (5, 0); - if (orb->run (&tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - - RtecEventChannelAdmin::EventChannel_var remote_ec = - this->get_ec (naming_context.in (), - this->rmt_name_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, "located remote EC\n")); - - CosNaming::Name rsch_name (1); - rsch_name.length (1); - ACE_OS::strcpy (buf, "ScheduleService"); - if (this->scheduling_type_ != Test_ECG::ss_global) - { - ACE_OS::strcat (buf, "@"); - ACE_OS::strcat (buf, this->rmt_name_); - } - rsch_name[0].id = CORBA::string_dup (buf); - CORBA::Object_var tmpobj = - naming_context->resolve (rsch_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecScheduler::Scheduler_var remote_sch = - RtecScheduler::Scheduler::_narrow (tmpobj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->connect_ecg (local_ec.in (), - remote_ec.in (), - remote_sch.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected proxy\n")); - - tv.set (5, 0); - if (orb->run (&tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - - RtecEventChannelAdmin::Observer_ptr observer = - this->ecg_._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - observer_handle = ec_impl.append_observer (observer, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - for (int cd = 0; cd < this->consumer_disconnects_; ++cd) - { - this->connect_consumers (local_ec.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - this->disconnect_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_OS::sleep (5); - ACE_DEBUG ((LM_DEBUG, "Consumer disconnection %d\n", cd)); - } - this->connect_consumers (local_ec.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected consumer\n")); - - this->activate_suppliers (local_ec.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "suppliers are active\n")); - - this->running_suppliers_ = this->hp_suppliers_ + this->lp_suppliers_; - - // Acquire the mutex for the ready mutex, blocking any supplier - // that may start after this point. - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ready_mon, this->ready_mtx_, 1); - this->ready_ = 1; - this->test_start_ = ACE_OS::gethrtime (); - this->ready_cnd_.broadcast (); - ready_mon.release (); - - ACE_DEBUG ((LM_DEBUG, "activate the EC\n")); - - if (this->rmt_name_ != 0) - { - ec_impl.remove_observer (observer_handle, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - // Create the EC internal threads - ec_impl.activate (); - - ACE_DEBUG ((LM_DEBUG, "running the test\n")); - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - - this->test_stop_ = ACE_OS::gethrtime (); - - ACE_DEBUG ((LM_DEBUG, "shutdown the EC\n")); - ec_impl.shutdown (); - - this->dump_results (); - - if (this->schedule_file_ != 0) - { - RtecScheduler::RT_Info_Set_var infos; - RtecScheduler::Config_Info_Set_var configs; - RtecScheduler::Scheduling_Anomaly_Set_var anomalies; - -#if defined (__SUNPRO_CC) - // Sun C++ 4.2 warns with the code below: - // Warning (Anachronism): Temporary used for non-const - // reference, now obsolete. - // Note: Type "CC -migration" for more on anachronisms. - // Warning (Anachronism): The copy constructor for argument - // infos of type RtecScheduler::RT_Info_Set_out should take - // const RtecScheduler::RT_Info_Set_out&. - // But, this code is not CORBA conformant, because users should - // not define instances of _out types. - - RtecScheduler::RT_Info_Set_out infos_out (infos); - RtecScheduler::Config_Info_Set_out configs_out (configs); - RtecScheduler::Scheduling_Anomaly_Set_out anomalies_out (anomalies); - ACE_Scheduler_Factory::server ()->compute_scheduling - (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - infos_out, configs_out, anomalies_out, TAO_TRY_ENV); -#else /* ! __SUNPRO_CC */ - ACE_Scheduler_Factory::server ()->compute_scheduling - (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - infos.out (), configs.out (), anomalies.out (), TAO_TRY_ENV); -#endif /* ! __SUNPRO_CC */ - - TAO_CHECK_ENV; - ACE_Scheduler_Factory::dump_schedule (infos.in (), - configs.in (), - anomalies.in (), - this->schedule_file_); - } - - naming_context->unbind (channel_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->rmt_name_ != 0) - { - this->ecg_.close (TAO_TRY_ENV); - TAO_CHECK_ENV; - this->ecg_.shutdown (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - this->disconnect_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - this->disconnect_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "shutdown grace period\n")); - tv.set (5, 0); - if (orb->run (&tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -RtecEventChannelAdmin::EventChannel_ptr -Test_ECG::get_ec (CosNaming::NamingContext_ptr naming_context, - const char* process_name, - CORBA::Environment &TAO_IN_ENV) -{ - const int bufsize = 512; - char buf[bufsize]; - ACE_OS::strcpy (buf, "EventChannel@"); - ACE_OS::strcat (buf, process_name); - - CosNaming::Name channel_name (1); - channel_name.length (1); - channel_name[0].id = CORBA::string_dup (buf); - - CORBA::Object_var ec_ptr = - naming_context->resolve (channel_name, TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0 || CORBA::is_nil (ec_ptr.in ())) - return RtecEventChannelAdmin::EventChannel::_nil (); - - return RtecEventChannelAdmin::EventChannel::_narrow (ec_ptr.in (), - TAO_IN_ENV); -} - -void -Test_ECG::disconnect_suppliers (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->hp_suppliers_ + this->lp_suppliers_; ++i) - { - this->suppliers_[i]->close (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - } -} - -void -Test_ECG::connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - int i; - for (i = 0; i < this->hp_suppliers_; ++i) - { - // Limit the number of messages sent by each supplier - int mc = this->hp_message_count_ / this->hp_suppliers_; - if (mc == 0) - mc = 1; - - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "hp_supplier_%02.2d@%s", i, this->lcl_name_); - - ACE_NEW (this->suppliers_[i], - Test_Supplier (this, this->suppliers_ + i)); - - this->suppliers_[i]->open (buf, - this->hps_event_a_, - this->hps_event_b_, - mc, - this->hp_interval_ * 10, - local_ec, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - for (; i < this->hp_suppliers_ + this->lp_suppliers_; ++i) - { - // Limit the number of messages sent by each supplier - int mc = this->lp_message_count_ / this->lp_suppliers_; - if (mc == 0) - mc = 1; - - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "lp_supplier_%02.2d@%s", - i - this->hp_suppliers_, this->lcl_name_); - - ACE_NEW (this->suppliers_[i], - Test_Supplier (this, this->suppliers_ + i)); - - this->suppliers_[i]->open (buf, - this->lps_event_a_, - this->lps_event_b_, - mc, - this->lp_interval_ * 10, - local_ec, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Test_ECG::disconnect_consumers (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->hp_consumers_ + this->lp_consumers_; ++i) - { - this->consumers_[i]->close (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - } -} - -void -Test_ECG::activate_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - int i; - for (i = 0; i < this->hp_suppliers_; ++i) - { - // Limit the number of messages sent by each supplier - int mc = this->hp_message_count_ / this->hp_suppliers_; - if (mc == 0) - mc = 1; - - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "hp_supplier_%02.2d@%s", i, this->lcl_name_); - - this->suppliers_[i]->activate (buf, - this->hp_interval_ * 10, - local_ec, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - for (; i < this->hp_suppliers_ + this->lp_suppliers_; ++i) - { - // Limit the number of messages sent by each supplier - int mc = this->lp_message_count_ / this->lp_suppliers_; - if (mc == 0) - mc = 1; - - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "lp_supplier_%02.2d@%s", - i - this->hp_suppliers_, this->lcl_name_); - - this->suppliers_[i]->activate (buf, - this->lp_interval_ * 10, - local_ec, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Test_ECG::connect_consumers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - int i; - for (i = 0; i < this->hp_consumers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "hp_consumer_%02.2d@%s", i, this->lcl_name_); - - ACE_NEW (this->consumers_[i], - Test_Consumer (this, this->consumers_ + i)); - - this->consumers_[i]->open (buf, - this->hpc_event_a_, - this->hpc_event_b_, - local_ec, - TAO_TRY_ENV); - TAO_CHECK_ENV; - this->stats_[i].total_time_ = 0; - this->stats_[i].lcl_count_ = 0; - this->stats_[i].rmt_count_ = 0; - } - - for (; i < this->hp_consumers_ + this->lp_consumers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "lp_consumer_%02.2d@%s", - i - this->hp_consumers_, this->lcl_name_); - - ACE_NEW (this->consumers_[i], - Test_Consumer (this, this->consumers_ + i)); - - this->consumers_[i]->open (buf, - this->lpc_event_a_, - this->lpc_event_b_, - local_ec, - TAO_TRY_ENV); - TAO_CHECK_ENV; - this->stats_[i].total_time_ = 0; - this->stats_[i].lcl_count_ = 0; - this->stats_[i].rmt_count_ = 0; - } - this->running_consumers_ = this->hp_consumers_ + this->lp_consumers_; - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Test_ECG::connect_ecg (RtecEventChannelAdmin::EventChannel_ptr local_ec, - RtecEventChannelAdmin::EventChannel_ptr remote_ec, - RtecScheduler::Scheduler_ptr remote_sch, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - RtecScheduler::Scheduler_ptr local_sch = - ACE_Scheduler_Factory::server (); - - // ECG name. - const int bufsize = 512; - char ecg_name[bufsize]; - ACE_OS::strcpy (ecg_name, "ecg_"); - ACE_OS::strcat (ecg_name, this->lcl_name_); - - // We could use the same name on the local and remote scheduler, - // but that fails when using a global scheduler. - char rmt[BUFSIZ]; - ACE_OS::strcpy (rmt, ecg_name); - ACE_OS::strcat (rmt, "@"); - ACE_OS::strcat (rmt, this->rmt_name_); - - // We could use the same name on the local and remote scheduler, - // but that fails when using a global scheduler. - char lcl[bufsize]; - ACE_OS::strcpy (lcl, ecg_name); - ACE_OS::strcat (lcl, "@"); - ACE_OS::strcat (lcl, this->lcl_name_); - - this->ecg_.init (remote_ec, local_ec, remote_sch, local_sch, - rmt, lcl, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Test_ECG::push_supplier (void * /* cookie */, - RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer, - const RtecEventComm::EventSet &events, - CORBA::Environment & TAO_IN_ENV) -{ - this->wait_until_ready (); - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) events sent by supplier\n")); - // @@ TODO we could keep somekind of stats here... - if (!this->short_circuit_) - { - consumer->push (events, TAO_IN_ENV); - } - else - { - int i = 0; - for (; i < this->hp_consumers_ && !TAO_IN_ENV.exception (); ++i) - { - this->consumers_[i]->push (events, TAO_IN_ENV); - } - for (; i < this->hp_consumers_ + this->lp_consumers_ && !TAO_IN_ENV.exception (); ++i) - { - this->consumers_[i]->push (events, TAO_IN_ENV); - } - } -} - -void -Test_ECG::push_consumer (void *consumer_cookie, - ACE_hrtime_t arrival, - const RtecEventComm::EventSet &events, - CORBA::Environment &) -{ - int ID = - (ACE_reinterpret_cast(Test_Consumer**,consumer_cookie) - - this->consumers_); - - // ACE_DEBUG ((LM_DEBUG, "(%P|%t) events received by consumer %d\n", ID)); - - if (events.length () == 0) - { - // ACE_DEBUG ((LM_DEBUG, "no events\n")); - return; - } - - // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ())); - -#if 0 - const int bufsize = 128; - char buf[bufsize]; - ACE_OS::sprintf (buf, "Consumer %d receives event in thread: ", ID); - print_priority_info (buf); -#endif - - for (u_int i = 0; i < events.length (); ++i) - { - const RtecEventComm::Event& e = events[i]; - - if (e.header.type == ACE_ES_EVENT_SHUTDOWN) - { - this->shutdown_consumer (ID); - continue; - } - - ACE_hrtime_t s; - ORBSVCS_Time::TimeT_to_hrtime (s, e.header.creation_time); - ACE_hrtime_t nsec = arrival - s; - if (this->local_source (e.header.source)) - { - int& count = this->stats_[ID].lcl_count_; - - this->stats_[ID].lcl_latency_[count] = nsec; - int workload = this->hp_workload_; - int interval = this->hp_interval_; - if (ID >= this->hp_consumers_) - { - workload = this->lp_workload_; - interval = this->lp_interval_; - } - - for (int j = 0; j < workload; ++j) - { - // Eat a little CPU so the Utilization test can measure the - // consumed time.... - /* takes about 40.2 usecs on a 167 MHz Ultra2 */ - u_long n = 1279UL; - ACE::is_prime (n, 2, n / 2); - } - // Increment the elapsed time on this consumer. - ACE_hrtime_t now = ACE_OS::gethrtime (); - this->stats_[ID].total_time_ += now - arrival; - this->stats_[ID].end_[count] = now; - - // We estimate our laxity based on the event creation - // time... it may not be very precise, but will do; other - // strategies include: - // + Keep track of the "current frame", then then deadline - // is the end of the frame. - // + Use the start of the test to keep the current frame. - // + Use the last execution. - - CORBA::ULong tmp = ACE_U64_TO_U32 (s - now); - this->stats_[ID].laxity_[count] = 1 + tmp/1000.0F/interval; - count++; - } - else - { - int& count = this->stats_[ID].rmt_count_; - this->stats_[ID].rmt_latency_[count] = nsec; - count++; - } - } -} - -void -Test_ECG::wait_until_ready (void) -{ - ACE_GUARD (ACE_SYNCH_MUTEX, ready_mon, this->ready_mtx_); - while (!this->ready_) - this->ready_cnd_.wait (); -} - -void -Test_ECG::shutdown_supplier (void* /* supplier_cookie */, - RtecEventComm::PushConsumer_ptr consumer, - CORBA::Environment& TAO_IN_ENV) -{ - - this->running_suppliers_--; - if (this->running_suppliers_ == 0) - { - // We propagate a shutdown event through the system... - RtecEventComm::EventSet shutdown (1); - shutdown.length (1); - RtecEventComm::Event& s = shutdown[0]; - - s.header.source = 0; - s.header.ttl = 1; - - ACE_hrtime_t t = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (s.header.creation_time, t); - s.header.ec_recv_time = ORBSVCS_Time::zero; - s.header.ec_send_time = ORBSVCS_Time::zero; - s.header.type = ACE_ES_EVENT_SHUTDOWN; - consumer->push (shutdown, TAO_IN_ENV); - } -} - -void -Test_ECG::shutdown_consumer (int id) -{ - ACE_DEBUG ((LM_DEBUG, "Shutdown consumer %d\n", id)); - this->running_consumers_--; - if (this->running_consumers_ == 0) - if (TAO_ORB_Core_instance ()->orb () == 0) - { - ACE_ERROR ((LM_ERROR, - "(%P|%t) Test_ECG::shutdown_consumer, " - "ORB instance is 0\n")); - - } - else - TAO_ORB_Core_instance ()->orb ()->shutdown (); -} - -int -Test_ECG::shutdown (CORBA::Environment& TAO_IN_ENV) -{ - ACE_DEBUG ((LM_DEBUG, "Shutting down the multiple EC test\n")); - - if (this->rmt_name_ != 0) - { - this->ecg_.shutdown (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return -1; - } - - TAO_ORB_Core_instance ()->orb ()->shutdown (); - return 0; -} - -void -Test_ECG::dump_results (void) -{ - const int bufsize = 512; - char buf[bufsize]; - - int i; - for (i = 0; i < this->hp_consumers_; ++i) - { - ACE_OS::sprintf (buf, "HP%02.2d", i); - this->dump_results (buf, this->stats_[i]); - } - for (i = 0; i < this->lp_consumers_; ++i) - { - ACE_OS::sprintf (buf, "LP%02.2d", i); - this->dump_results (buf, this->stats_[i + this->hp_consumers_]); - } - CORBA::ULong tmp = ACE_U64_TO_U32 (this->test_stop_ - this->test_start_); - double usec = tmp / 1000.0; - ACE_DEBUG ((LM_DEBUG, "Time[TOTAL]: %.3f\n", usec)); -} - -void -Test_ECG::dump_results (const char* name, Stats& stats) -{ - // @@ We are reporting the information without specifics about - double usec = ACE_U64_TO_U32 (stats.total_time_) / 1000.0; - ACE_DEBUG ((LM_DEBUG, "Time[LCL,%s]: %.3f\n", name, usec)); - int i; - for (i = 1; i < stats.lcl_count_ - 1; ++i) - { - usec = ACE_U64_TO_U32 (stats.lcl_latency_[i]) / 1000.0; - ACE_DEBUG ((LM_DEBUG, "Latency[LCL,%s]: %.3f\n", name, usec)); - - double percent = stats.laxity_[i] * 100.0; - ACE_DEBUG ((LM_DEBUG, "Laxity[LCL,%s]: %.3f\n", name, percent)); - - usec = ACE_U64_TO_U32 (stats.end_[i] - this->test_start_) / 1000.0; - ACE_DEBUG ((LM_DEBUG, "Completion[LCL,%s]: %.3f\n", name, usec)); - } - for (i = 1; i < stats.rmt_count_ - 1; ++i) - { - double usec = ACE_U64_TO_U32 (stats.rmt_latency_[i]) / 1000.0; - ACE_DEBUG ((LM_DEBUG, "Latency[RMT,%s]: %.3f\n", name, usec)); - } -} - -int -Test_ECG::local_source (RtecEventComm::EventSourceID id) const -{ - for (int i = 0; i < this->hp_suppliers_ + this->lp_suppliers_; ++i) - { - if (this->suppliers_[i]->supplier_id () == id) - return 1; - } - return 0; -} - -int -Test_ECG::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "l:r:s:i:xh:w:p:d:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'l': - this->lcl_name_ = get_opt.optarg; - break; - - case 'r': - this->rmt_name_ = get_opt.optarg; - break; - - case 's': - if (ACE_OS::strcasecmp (get_opt.optarg, "global") == 0) - { - this->scheduling_type_ = Test_ECG::ss_global; - } - else if (ACE_OS::strcasecmp (get_opt.optarg, "local") == 0) - { - this->scheduling_type_ = Test_ECG::ss_local; - } - else if (ACE_OS::strcasecmp (get_opt.optarg, "runtime") == 0) - { - this->scheduling_type_ = Test_ECG::ss_runtime; - } - else - { - ACE_DEBUG ((LM_DEBUG, - "Unknown scheduling type <%s> " - "defaulting to local\n", - get_opt.optarg)); - this->scheduling_type_ = Test_ECG::ss_local; - } - break; - - case 'x': - this->short_circuit_ = 1; - break; - - case 'i': - { - char* aux = 0; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - this->consumer_disconnects_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->supplier_disconnects_ = ACE_OS::atoi (arg); - } - break; - - case 'h': - { - char* aux = 0; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - - this->hp_suppliers_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->hp_consumers_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->hp_workload_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->hp_interval_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->hp_message_count_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->hps_event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->hps_event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->hpc_event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->hpc_event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - } - break; - - case 'w': - { - char* aux = 0; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - - this->lp_suppliers_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->lp_consumers_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->lp_workload_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->lp_interval_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->lp_message_count_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->lps_event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->lps_event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->lpc_event_a_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->lpc_event_b_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - } - break; - - case 'p': - this->pid_file_name_ = get_opt.optarg; - break; - case 'd': - this->schedule_file_ = get_opt.optarg; - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "[ORB options] " - "-l " - "-r " - "-s " - "-i " - "-x (short circuit EC) " - "-h " - "-w " - "-p " - "-d " - "\n", - argv[0])); - return -1; - } - } - - if (this->hp_message_count_ < 0 - || this->hp_message_count_ >= Test_ECG::MAX_EVENTS) - { - ACE_DEBUG ((LM_DEBUG, - "%s: HP event count (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->lp_message_count_, - 160)); - this->hp_message_count_ = 160; - } - - if (this->lp_message_count_ < 0 - || this->lp_message_count_ >= Test_ECG::MAX_EVENTS) - { - ACE_DEBUG ((LM_DEBUG, - "%s: LP event count (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->lp_message_count_, - 4)); - this->lp_message_count_ = 4; - } - - if (this->hp_consumers_ <= 0 - || this->lp_consumers_ < 0 - || this->hp_consumers_ + this->lp_consumers_ >= Test_ECG::MAX_CONSUMERS - || this->hp_suppliers_ <= 0 - || this->lp_suppliers_ < 0 - || this->hp_suppliers_ + this->lp_suppliers_ >= Test_ECG::MAX_SUPPLIERS) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: number of consumers (low: %d, high: %d) or " - "suppliers (low: %d, high: %d) out of range\n", - argv[0], - lp_consumers_, hp_consumers_, - lp_suppliers_, lp_suppliers_), -1); - } - - return 0; -} - -// **************************************************************** - -Test_Supplier::Test_Supplier (Test_ECG *test, - void *cookie) - : test_ (test), - cookie_ (cookie), - consumer_ (this) -{ -} - -void -Test_Supplier::open (const char* name, - int event_a, - int event_b, - int message_count, - const RtecScheduler::Period_t& rate, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &TAO_IN_ENV) -{ - this->event_a_ = event_a; - this->event_b_ = event_b; - this->message_count_ = message_count; - - TAO_TRY - { - RtecScheduler::Scheduler_ptr server = - ACE_Scheduler_Factory::server (); - - RtecScheduler::handle_t rt_info = - server->create (name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // The execution times are set to reasonable values, but - // actually they are changed on the real execution, i.e. we - // lie to the scheduler to obtain right priorities; but we - // don't care if the set is schedulable. - ACE_Time_Value tv (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - ACE_DEBUG ((LM_DEBUG, "register supplier \"%s\"\n", name)); - server->set (rt_info, - RtecScheduler::VERY_HIGH_CRITICALITY, - time, time, time, - rate, - RtecScheduler::VERY_LOW_IMPORTANCE, - time, - 1, - RtecScheduler::OPERATION, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->supplier_id_ = ACE::crc32 (name); - ACE_DEBUG ((LM_DEBUG, "ID for <%s> is %04.4x\n", name, - this->supplier_id_)); - - ACE_SupplierQOS_Factory qos; - qos.insert (this->supplier_id_, - this->event_a_, - rt_info, 1); - qos.insert (this->supplier_id_, - this->event_b_, - rt_info, 1); - qos.insert (this->supplier_id_, - ACE_ES_EVENT_SHUTDOWN, - rt_info, 1); - - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - ec->for_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->consumer_proxy_ = - supplier_admin->obtain_push_consumer (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventComm::PushSupplier_var objref = this->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->consumer_proxy_->connect_push_supplier (objref.in (), - qos.get_SupplierQOS (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Test_Supplier::close (CORBA::Environment &TAO_IN_ENV) -{ - if (CORBA::is_nil (this->consumer_proxy_.in ())) - return; - - this->consumer_proxy_->disconnect_push_consumer (TAO_IN_ENV); - this->consumer_proxy_ = - RtecEventChannelAdmin::ProxyPushConsumer::_nil (); -} - -void -Test_Supplier::activate (const char* name, - const RtecScheduler::Period_t& rate, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - RtecScheduler::Scheduler_ptr server = - ACE_Scheduler_Factory::server (); - - const int bufsize = 512; - char buf[bufsize]; - ACE_OS::strcpy (buf, "consumer_"); - ACE_OS::strcat (buf, name); - RtecScheduler::handle_t rt_info = - server->create (buf, TAO_TRY_ENV); - TAO_CHECK_ENV; - - - // The execution times are set to reasonable values, but - // actually they are changed on the real execution, i.e. we - // lie to the scheduler to obtain right priorities; but we - // don't care if the set is schedulable. - ACE_Time_Value tv (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - ACE_DEBUG ((LM_DEBUG, "activate \"%s\"\n", buf)); - server->set (rt_info, - RtecScheduler::VERY_HIGH_CRITICALITY, - time, time, time, - rate, - RtecScheduler::VERY_LOW_IMPORTANCE, - time, - 1, - RtecScheduler::OPERATION, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Also connect our consumer for timeout events from the EC. - int interval = rate / 10; - ACE_Time_Value tv_timeout (interval / ACE_ONE_SECOND_IN_USECS, - interval % ACE_ONE_SECOND_IN_USECS); - TimeBase::TimeT timeout; - ORBSVCS_Time::Time_Value_to_TimeT (timeout, tv_timeout); - - ACE_ConsumerQOS_Factory consumer_qos; - consumer_qos.start_disjunction_group (); - consumer_qos.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT, - timeout, - rt_info); - - // = Connect as a consumer. - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->for_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->supplier_proxy_ = - consumer_admin->obtain_push_supplier (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventComm::PushConsumer_var cref = - this->consumer_._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->supplier_proxy_->connect_push_consumer (cref.in (), - consumer_qos.get_ConsumerQOS (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Test_Supplier::push (const RtecEventComm::EventSet& events, - CORBA::Environment& TAO_IN_ENV) -{ -#if 0 - const int bufsize = 128; - char buf[bufsize]; - ACE_OS::sprintf (buf, "Supplier %d receives event in thread: ", - this->supplier_id_); - print_priority_info (buf); -#endif - - if (events.length () == 0 || this->message_count_ < 0) - { - // ACE_DEBUG ((LM_DEBUG, "no events\n")); - return; - } - - RtecEventComm::EventSet sent (events.length ()); - sent.length (events.length ()); - - for (u_int i = 0; i < events.length (); ++i) - { - const RtecEventComm::Event& e = events[i]; - if (e.header.type != ACE_ES_EVENT_INTERVAL_TIMEOUT) - continue; - - // ACE_DEBUG ((LM_DEBUG, "Test_Supplier - timeout (%t)\n")); - - RtecEventComm::Event& s = sent[i]; - s.header.source = this->supplier_id_; - s.header.ttl = 1; - - ACE_hrtime_t t = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (s.header.creation_time, t); - s.header.ec_recv_time = ORBSVCS_Time::zero; - s.header.ec_send_time = ORBSVCS_Time::zero; - - s.data.x = 0; - s.data.y = 0; - - this->message_count_--; - - if (this->message_count_ < 0) - { - //this->supplier_proxy_->disconnect_push_supplier (TAO_IN_ENV); - //if (TAO_IN_ENV.exception () != 0) return; - this->test_->shutdown_supplier (this->cookie_, - this->consumer_proxy_.in (), - TAO_IN_ENV); - } - if (this->message_count_ % 2 == 0) - { - // Generate an A event... - s.header.type = this->event_a_; - } - else - { - s.header.type = this->event_b_; - } - } - this->test_->push_supplier (this->cookie_, - this->consumer_proxy_.in (), - sent, - TAO_IN_ENV); -} - -void -Test_Supplier::disconnect_push_supplier (CORBA::Environment& TAO_IN_ENV) -{ - if (CORBA::is_nil (this->supplier_proxy_.in ())) - return; - - this->supplier_proxy_->disconnect_push_supplier (TAO_IN_ENV); -} - -void -Test_Supplier::disconnect_push_consumer (CORBA::Environment &) -{ -} - -int Test_Supplier::supplier_id (void) const -{ - return this->supplier_id_; -} - -// **************************************************************** - -Test_Consumer::Test_Consumer (Test_ECG *test, - void *cookie) - : test_ (test), - cookie_ (cookie) -{ -} - -void -Test_Consumer::open (const char* name, - int event_a, int event_b, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& TAO_IN_ENV) -{ - TAO_TRY - { - RtecScheduler::Scheduler_ptr server = - ACE_Scheduler_Factory::server (); - - RtecScheduler::handle_t rt_info = - server->create (name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // The worst case execution time is far less than 2 - // milliseconds, but that is a safe estimate.... - ACE_Time_Value tv (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - ACE_DEBUG ((LM_DEBUG, "register consumer \"%s\"\n", name)); - server->set (rt_info, - RtecScheduler::VERY_HIGH_CRITICALITY, - time, time, time, - 0, - RtecScheduler::VERY_LOW_IMPORTANCE, - time, - 0, - RtecScheduler::OPERATION, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_ConsumerQOS_Factory qos; - qos.start_disjunction_group (); - qos.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info); - qos.insert_type (event_a, rt_info); - qos.insert_type (event_b, rt_info); - - // = Connect as a consumer. - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->for_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->supplier_proxy_ = - consumer_admin->obtain_push_supplier (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventComm::PushConsumer_var objref = this->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->supplier_proxy_->connect_push_consumer (objref.in (), - qos.get_ConsumerQOS (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Test_Consumer::close (CORBA::Environment &TAO_IN_ENV) -{ - if (CORBA::is_nil (this->supplier_proxy_.in ())) - return; - - this->supplier_proxy_->disconnect_push_supplier (TAO_IN_ENV); - this->supplier_proxy_ = - RtecEventChannelAdmin::ProxyPushSupplier::_nil (); -} - -void -Test_Consumer::push (const RtecEventComm::EventSet& events, - CORBA::Environment &TAO_IN_ENV) -{ - ACE_hrtime_t arrival = ACE_OS::gethrtime (); - this->test_->push_consumer (this->cookie_, arrival, events, TAO_IN_ENV); -} - -void -Test_Consumer::disconnect_push_consumer (CORBA::Environment &) -{ -} - -// **************************************************************** - -int -main (int argc, char *argv []) -{ - Test_ECG *test; - // Dynamically allocate the Test_ECG instance so that we don't have - // to worry about running out of stack space if it's large. - ACE_NEW_RETURN (test, Test_ECG, -1); - - const int status = test->run (argc, argv); - - delete test; - return status; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Auto_Basic_Ptr; -template class ACE_PushConsumer_Adapter; -template class auto_ptr; -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate ACE_PushConsumer_Adapter -#pragma instantiate auto_ptr -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.dsp b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.dsp deleted file mode 100644 index e2e9c42fe0f..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.dsp +++ /dev/null @@ -1,111 +0,0 @@ -# Microsoft Developer Studio Project File - Name="EC_Multiple" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=EC_Multiple - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "EC_Multiple.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "EC_Multiple.mak" CFG="EC_Multiple - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "EC_Multiple - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "EC_Multiple - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "EC_Multiple - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "EC_Multiple - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "EC_Multiple - Win32 Release" -# Name "EC_Multiple - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\EC_Multiple.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\EC_Multiple.h -# End Source File -# Begin Source File - -SOURCE=.\Scheduler_Runtime1.h -# End Source File -# Begin Source File - -SOURCE=.\Scheduler_Runtime2.h -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.dsw b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.dsw deleted file mode 100644 index 3a38e52cdef..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "EC_Multiple"=.\EC_Multiple.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h deleted file mode 100644 index 766cc3f3372..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h +++ /dev/null @@ -1,382 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// This test attempts to communicate several Event Channels. -// The test hardcodes all the objects involved (consumers, -// suppliers, proxies, etc.); the objective is to gain understanding -// on the architecture needed to exploit locality in the Event -// cycle, not to provide a definite solution. -// -// ============================================================================ - -#ifndef EC_MULTIPLE_H -#define EC_MULTIPLE_H - -#include "ace/SString.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/High_Res_Timer.h" -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "orbsvcs/RtecEventCommS.h" -#include "orbsvcs/Channel_Clients_T.h" -#include "orbsvcs/Event/EC_Gateway.h" - -class Test_ECG; - -class Test_Supplier : public POA_RtecEventComm::PushSupplier -{ - // - // = TITLE - // Helper class to implement the different tests within Test_ECG. - // - // = DESCRIPTION - // Test_ECG can be configured to have a single or multiple - // suppliers, to use the EC or short-circuit it, to use the - // Gateway or not; this class connects as a consumer for timeouts - // in the EC, at each timeout it delegates on the Test_ECG class - // to execute the proper test. -public: - Test_Supplier (Test_ECG* test, void* cookie); - - void open (const char* name, - int event_a, int event_b, - int message_count, - const RtecScheduler::Period_t& rate, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); - // This method connects the supplier to the EC. - - void close (CORBA::Environment &_env); - // Disconnect from the EC. - - void activate (const char* name, - const RtecScheduler::Period_t& rate, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); - - void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); - void disconnect_push_consumer (CORBA::Environment &); - // Implement the callbacks for our consumer personality. - - - virtual void disconnect_push_supplier (CORBA::Environment &); - // The methods in the skeleton. - - RtecEventComm::EventSourceID supplier_id (void) const; - // The supplier ID. - -private: - Test_ECG* test_; - - void *cookie_; - // The test provide us a cookie so we can give back our identity. - - RtecEventComm::EventSourceID supplier_id_; - // We generate an id based on the name.... - - int event_a_; - int event_b_; - // The two types of events we may generate... - - int message_count_; - // The number of events sent by this supplier. - - RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; - // We talk to the EC (as a supplier) using this proxy. - - ACE_PushConsumer_Adapter consumer_; - // We also connect to the EC as a consumer so we can receive the - // timeout events. - - RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; - // We talk to the EC (as a supplier) using this proxy. - -}; - -class Test_Consumer : public POA_RtecEventComm::PushConsumer -{ - // - // = TITLE - // Helper class to implement the different tests within Test_ECG. - // - // = DESCRIPTION - // Test_ECG must collect events destined to many consumers, but - // needs to distinguish through which consumer it is receiving the - // event. The easiest way is to create a shallow class that - // forwards the events to the EC, but passing back some cookie to - // identify the consumer. -public: - Test_Consumer (Test_ECG* test, void *cookie); - - void open (const char* name, - int event_a, int event_b, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); - // This method connects the consumer to the EC. - - void close (CORBA::Environment &_env); - // Disconnect from the EC. - - virtual void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); - virtual void disconnect_push_consumer (CORBA::Environment &); - // The skeleton methods. - -private: - Test_ECG* test_; - // The test class. - - void *cookie_; - // The magic cookie that serves as our ID. - - RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; - // We talk to the EC using this proxy. -}; - -class Test_ECG -{ - // - // = TITLE - // Test and demonstrate the use of TAO_EC_Gateway. - // - // = DESCRIPTION - // This class is design to exercise several features of the EC_Gateway - // class and the multiple EC architecture. - // We want to create two EC, each one having a single supplier and a - // single consumer. - // + To test the remote facilities the consumer register for both a - // local event and a remote one. - // + To test the remote filtering features the remote consumer only - // wants one of the local events, and this event is generated less - // frequently. - // - // This class creates the local EC_Gateway a consumer and a - // supplier, it uses the command line to figure the subscriptions - // and publications list. - // -public: - Test_ECG (void); - - enum { - MAX_EVENTS = 1024, - // Maximum number of events to send... - - MAX_CONSUMERS = 1024, - // Maximum number of consumers. - - MAX_SUPPLIERS = 1024 - // Maximum number of suppliers. - }; - - int run (int argc, char* argv[]); - // Execute the test. - - void push_supplier (void* supplier_cookie, - RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer, - const RtecEventComm::EventSet &events, - CORBA::Environment &); - // Callback method for suppliers, we push for them to their - // consumers and take statistics on the way. - // It is possible that we ignore the parameter when - // testing the short-circuit case. - - void push_consumer (void* consumer_cookie, - ACE_hrtime_t arrival, - const RtecEventComm::EventSet& events, - CORBA::Environment&); - // Callback method for consumers, if any of our consumers has - // received events it will invoke this method. - - void shutdown_supplier (void* supplier_cookie, - RtecEventComm::PushConsumer_ptr consumer, - CORBA::Environment& _env); - // One of the suppliers has completed its work. - -private: - RtecEventChannelAdmin::EventChannel_ptr - get_ec (CosNaming::NamingContext_ptr naming_context, - const char* ec_name, - CORBA::Environment &_env); - // Helper routine to obtain an EC given its name. - - void connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - void disconnect_suppliers (CORBA::Environment &_env); - // Connect the suppliers. - - void activate_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - // Activate the suppliers, i.e. they start generating events. - - void connect_ecg (RtecEventChannelAdmin::EventChannel_ptr local_ec, - RtecEventChannelAdmin::EventChannel_ptr remote_ec, - RtecScheduler::Scheduler_ptr remote_sch, - CORBA::Environment &_env); - // Connect the EC gateway, it builds the Subscriptions and the - // Publications list. - - void connect_consumers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - void disconnect_consumers (CORBA::Environment &_env); - // Connect and disconnect the consumers. - - int shutdown (CORBA::Environment&); - // Called when the main thread (i.e. not the scavenger thread) is - // shutting down. - - int parse_args (int argc, char* argv[]); - // parse the command line args - - void dump_results (void); - // Dump the results to the standard output. - - void wait_until_ready (void); - // Block event delivery until all the consumers are ready. - - struct Stats; - void dump_results (const char* name, Stats& stats); - // Dump the results for a particular consumer. - - int local_source (RtecEventComm::EventSourceID id) const; - // Check if correspond to a local supplier. - - void shutdown_consumer (int id); - // One of the consumers has completed its work. - -private: - char* lcl_name_; - // The name of the "local" EC. - - char* rmt_name_; - // The name of the "remote" EC. - - TAO_EC_Gateway_IIOP ecg_; - // The proxy used to connect both event channels. - - enum { - ss_global, - ss_local, - ss_runtime - }; - int scheduling_type_; - // The type of scheduling service to use: - // "global" is a remote scheduling service, usually to perform - // simultaneous scheduling across all the processes. - // "local" instantiate a local config time scheduling service. - // "runtime" instantiates a local rumtime scheduling service. - - int consumer_disconnects_; - int supplier_disconnects_; - // How many times to disconnect the consumers (and suppliers) before - // the final connection. This is useful to test the disconnection in - // the EC. - - int short_circuit_; - // Don't send the messages through the EC. This is needed to measure - // the overhead introduced by the EC. - - Test_Supplier* suppliers_[Test_ECG::MAX_SUPPLIERS]; - Test_Consumer* consumers_[Test_ECG::MAX_CONSUMERS]; - // The suppliers and consumer arrays, the sizes are controlled using - // {lp,hp}_{suppliers,consumers}_ - - // @@ TODO it looks like the HP and LP data could be encapsulated. - - int hp_suppliers_; - // The number of high priority suppliers in this test. - - int hp_consumers_; - // The number of high priority consumers. - - int hp_workload_; - // The number of iterations of ACE::is_prime() to execute in high - // priority consumers. - - int hp_interval_; - // The high priority events are generated using this interval. - - int hp_message_count_; - // How many messages we will send in the HP suppliers - - int hps_event_a_; - int hps_event_b_; - int hpc_event_a_; - int hpc_event_b_; - // Each supplier send two types of events, each consumer receives - // two other types. The types for high-priority clients can be - // different from the types to low priority clients. - - int lp_suppliers_; - // The number of low priority suppliers in this test. - - int lp_consumers_; - // The number of low priority consumers. - - int lp_workload_; - // The number of iterations of ACE::is_prime() to execute in low - // priority consumers. - - int lp_interval_; - // The low priority events are generated using this interval. - - int lp_message_count_; - // How many messages we will send in the LP suppliers - - int lps_event_a_; - int lps_event_b_; - int lpc_event_a_; - int lpc_event_b_; - // Each supplier send two types of events, each consumer receives - // two other types. The types for high-priority clients can be - // different from the types to low priority clients. - - const char* schedule_file_; - // Ask the schedule to compute and dump its schedule after the test - // execution. - - const char* pid_file_name_; - // The name of a file where the process stores its pid - - struct Stats { - ACE_hrtime_t total_time_; - float laxity_[MAX_EVENTS]; - ACE_hrtime_t lcl_latency_[MAX_EVENTS]; - ACE_hrtime_t end_[MAX_EVENTS]; - int lcl_count_; - // We keep laxity and total_time stats only for the local events. - - ACE_hrtime_t rmt_latency_[MAX_EVENTS]; - int rmt_count_; - }; - Stats stats_[Test_ECG::MAX_CONSUMERS]; - // Store the measurements for local and remote events.. - - int ready_; - ACE_SYNCH_MUTEX ready_mtx_; - ACE_SYNCH_CONDITION ready_cnd_; - // Before accepting any events the suppliers must wait for the test - // to setup all the consumers. - // The suppliers wait on the condition variable. - - ACE_Atomic_Op running_suppliers_; - // keep track of how many suppliers are still running so we shutdown - // at the right moment. - - ACE_Atomic_Op running_consumers_; - // keep track of how many consumers are still running so we shutdown - // at the right moment. - - ACE_hrtime_t test_start_; - ACE_hrtime_t test_stop_; - // Measure the test elapsed time as well as mark the beginning of - // the frames. -}; - -#endif /* EC_MULTIPLE_H */ diff --git a/TAO/orbsvcs/tests/EC_Multiple/Makefile b/TAO/orbsvcs/tests/EC_Multiple/Makefile deleted file mode 100644 index e305c8bae33..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/Makefile +++ /dev/null @@ -1,148 +0,0 @@ -# $Id$ - -BIN = EC_Multiple - -SRC = $(BIN:%=%$(VAR).cpp) -LDLIBS= -lorbsvcs -lTAO - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif - -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_ROOT) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU - -#### Local rules and variables... - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/EC_Multiple.o .obj/EC_Multiple.so .shobj/EC_Multiple.o .shobj/EC_Multiple.so: EC_Multiple.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(ACE_ROOT)/ace/Timer_List.h \ - $(ACE_ROOT)/ace/Timer_List_T.h \ - $(ACE_ROOT)/ace/Timer_List_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i \ - EC_Multiple.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Gateway.h \ - Scheduler_Runtime1.h Scheduler_Runtime2.h Scheduler_Runtime_Dynamic.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/EC_Multiple/README b/TAO/orbsvcs/tests/EC_Multiple/README deleted file mode 100644 index 1d18fa5275c..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/README +++ /dev/null @@ -1,34 +0,0 @@ -# $Id$ - - This test ilustrates how to connect multiple ECs; it has many -options and can be configured to run a single EC, two ECs connected -through a Gateway, short-circuit the EC, use a global, local or -precomputed schedule, etc. - - Please see the scripts for typical configurations. - - A simple test is that uses a pre-computed schedule would be: - -# Run the Naming Service -$ ../../Naming_Service/Naming_Service -ORBport 0 - -p NameService.pid -o NameService.ior -# If the multicast location does not work for your use: -# -# NameService=`cat NameService.ior` -# export NameService -# -# or other commands that suit your shell. -# - -# Run the first EC, supplier generates events <1> and <2> consumer -# subscribes to events <1> and <3> -$ ./EC_Multiple -ORBport 0 -l ECM1 -r ECM2 -s runtime -p ECM1.pid \ - -h 1,1,1,250000,100,1,2,1,3 - -# Run the second EC, supplier generates events <4> and <3> consumer -# subscribes to events <4> and <2> -$ ./EC_Multiple -ORBport 0 -l ECM2 -r ECM1 -s runtime -p ECM2.pid \ - -h 1,1,1,250000,100,4,3,4,2 - -# Notice how the consumer receives both local and remote events, but -# not all the local neither all the remote events. diff --git a/TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime1.h b/TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime1.h deleted file mode 100644 index fc6dd8f71b3..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime1.h +++ /dev/null @@ -1,162 +0,0 @@ -// This file was automatically generated by Scheduler_Factory -// before editing the file please consider generating it again -// $Id$ - -#include "orbsvcs/Scheduler_Factory.h" - -static ACE_Scheduler_Factory::POD_RT_Info runtime_infos_1[] = { -{ "Reactor_Task-25000.us", 1, 0, 0, 0, 250000, - 4, 0, 0, 1, 4, 0, 0, 0 }, -{ "Reactor_Task-50000.us", 2, 0, 0, 0, 500000, - 4, 0, 0, 1, 3, 0, 0, 0 }, -{ "Reactor_Task-100000.us", 3, 0, 0, 0, 1000000, - 4, 0, 0, 1, 2, 0, 0, 0 }, -{ "Reactor_Task-200000.us", 4, 0, 0, 0, 2000000, - 4, 0, 0, 1, 1, 0, 0, 0 }, -{ "Reactor_Task-1000000.us", 5, 0, 0, 0, 10000000, - 4, 0, 0, 1, 0, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-25000.us", 6, 0, 0, 0, 0, - 4, 0, 0, 1, 4, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-50000.us", 7, 0, 0, 0, 0, - 4, 0, 0, 1, 3, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-100000.us", 8, 0, 0, 0, 0, - 4, 0, 0, 1, 2, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-200000.us", 9, 0, 0, 0, 0, - 4, 0, 0, 1, 1, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-1000000.us", 10, 0, 0, 0, 0, - 4, 0, 0, 1, 0, 0, 0, 0 }, -{ "hp_supplier_00@ECM1", 11, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_01@ECM1", 12, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_02@ECM1", 13, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_03@ECM1", 14, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_04@ECM1", 15, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_05@ECM1", 16, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_06@ECM1", 17, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_07@ECM1", 18, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_08@ECM1", 19, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_09@ECM1", 20, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "lp_supplier_00@ECM1", 21, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "lp_supplier_01@ECM1", 22, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "lp_supplier_02@ECM1", 23, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "lp_supplier_03@ECM1", 24, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "lp_supplier_04@ECM1", 25, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "ecg_ECM2@ECM1", 26, 5000, 5000, 5000, 250000, - 4, 0, 5000, 0, 4, 0, 0, 0 }, -{ "ecg_ECM1@ECM1", 27, 5000, 5000, 5000, 250000, - 4, 0, 5000, 1, 4, 0, 0, 0 }, -{ "hp_consumer_00@ECM1", 28, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_01@ECM1", 29, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_02@ECM1", 30, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_03@ECM1", 31, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_04@ECM1", 32, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_05@ECM1", 33, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_06@ECM1", 34, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_07@ECM1", 35, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_08@ECM1", 36, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_09@ECM1", 37, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_10@ECM1", 38, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_11@ECM1", 39, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_12@ECM1", 40, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_13@ECM1", 41, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_14@ECM1", 42, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_15@ECM1", 43, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_16@ECM1", 44, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_17@ECM1", 45, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_18@ECM1", 46, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_19@ECM1", 47, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_20@ECM1", 48, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_21@ECM1", 49, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_22@ECM1", 50, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_23@ECM1", 51, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_24@ECM1", 52, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "lp_consumer_00@ECM1", 53, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 0, 0, 0, 0 }, -{ "lp_consumer_01@ECM1", 54, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 0, 0, 0, 0 }, -{ "lp_consumer_02@ECM1", 55, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 0, 0, 0, 0 }, -{ "lp_consumer_03@ECM1", 56, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 0, 0, 0, 0 }, -{ "lp_consumer_04@ECM1", 57, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 0, 0, 0, 0 }, -{ "consumer_hp_supplier_00@ECM1", 58, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_01@ECM1", 59, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_02@ECM1", 60, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_03@ECM1", 61, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_04@ECM1", 62, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_05@ECM1", 63, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_06@ECM1", 64, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_07@ECM1", 65, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_08@ECM1", 66, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_09@ECM1", 67, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_lp_supplier_00@ECM1", 68, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "consumer_lp_supplier_01@ECM1", 69, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "consumer_lp_supplier_02@ECM1", 70, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "consumer_lp_supplier_03@ECM1", 71, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "consumer_lp_supplier_04@ECM1", 72, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 } -}; - -static int runtime_infos_1_size = sizeof(runtime_infos_1)/sizeof(runtime_infos_1[0]); - -static ACE_Scheduler_Factory::POD_Config_Info runtime_configs_1[] = { -{ 0, 59, (RtecScheduler::Dispatching_Type_t) 0 } -}; -static int runtime_configs_1_size = sizeof(runtime_configs_1)/sizeof(runtime_configs_1[0]); - -// EOF - diff --git a/TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime2.h b/TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime2.h deleted file mode 100644 index 7b636968f54..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime2.h +++ /dev/null @@ -1,160 +0,0 @@ -// This file was automatically generated by Scheduler_Factory -// before editing the file please consider generating it again -// $Id$ - -#include "orbsvcs/Scheduler_Factory.h" - -static ACE_Scheduler_Factory::POD_RT_Info runtime_infos_2[] = { -{ "Reactor_Task-25000.us", 1, 0, 0, 0, 250000, - 4, 0, 0, 1, 4, 0, 0, 0 }, -{ "Reactor_Task-50000.us", 2, 0, 0, 0, 500000, - 4, 0, 0, 1, 3, 0, 0, 0 }, -{ "Reactor_Task-100000.us", 3, 0, 0, 0, 1000000, - 4, 0, 0, 1, 2, 0, 0, 0 }, -{ "Reactor_Task-200000.us", 4, 0, 0, 0, 2000000, - 4, 0, 0, 1, 1, 0, 0, 0 }, -{ "Reactor_Task-1000000.us", 5, 0, 0, 0, 10000000, - 4, 0, 0, 1, 0, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-25000.us", 6, 0, 0, 0, 0, - 4, 0, 0, 1, 4, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-50000.us", 7, 0, 0, 0, 0, - 4, 0, 0, 1, 3, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-100000.us", 8, 0, 0, 0, 0, - 4, 0, 0, 1, 2, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-200000.us", 9, 0, 0, 0, 0, - 4, 0, 0, 1, 1, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-1000000.us", 10, 0, 0, 0, 0, - 4, 0, 0, 1, 0, 0, 0, 0 }, -{ "hp_supplier_00@ECM2", 11, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_01@ECM2", 12, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_02@ECM2", 13, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_03@ECM2", 14, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_04@ECM2", 15, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_05@ECM2", 16, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_06@ECM2", 17, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_07@ECM2", 18, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_08@ECM2", 19, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "hp_supplier_09@ECM2", 20, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "lp_supplier_00@ECM2", 21, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "lp_supplier_01@ECM2", 22, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "lp_supplier_02@ECM2", 23, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "lp_supplier_03@ECM2", 24, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "lp_supplier_04@ECM2", 25, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "ecg_ECM2@ECM2", 26, 5000, 5000, 5000, 250000, - 4, 0, 5000, 1, 4, 0, 0, 0 }, -{ "ecg_ECM1@ECM2", 27, 5000, 5000, 5000, 250000, - 4, 0, 5000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_00@ECM2", 28, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_01@ECM2", 29, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_02@ECM2", 30, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_03@ECM2", 31, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_04@ECM2", 32, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_05@ECM2", 33, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_06@ECM2", 34, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_07@ECM2", 35, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_08@ECM2", 36, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_09@ECM2", 37, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_10@ECM2", 38, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_11@ECM2", 39, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_12@ECM2", 40, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_13@ECM2", 41, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_14@ECM2", 42, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_15@ECM2", 43, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_16@ECM2", 44, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_17@ECM2", 45, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_18@ECM2", 46, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_19@ECM2", 47, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_20@ECM2", 48, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_21@ECM2", 49, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_22@ECM2", 50, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_23@ECM2", 51, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "hp_consumer_24@ECM2", 52, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 4, 0, 0, 0 }, -{ "lp_consumer_00@ECM2", 53, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 0, 0, 0, 0 }, -{ "lp_consumer_01@ECM2", 54, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 0, 0, 0, 0 }, -{ "lp_consumer_02@ECM2", 55, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 0, 0, 0, 0 }, -{ "lp_consumer_03@ECM2", 56, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 0, 0, 0, 0 }, -{ "lp_consumer_04@ECM2", 57, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 0, 0, 0, 0 }, -{ "consumer_hp_supplier_00@ECM2", 58, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_01@ECM2", 59, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_02@ECM2", 60, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_03@ECM2", 61, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_04@ECM2", 62, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_05@ECM2", 63, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_06@ECM2", 64, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_07@ECM2", 65, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_08@ECM2", 66, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_hp_supplier_09@ECM2", 67, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 4, 0, 0, 0 }, -{ "consumer_lp_supplier_00@ECM2", 68, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "consumer_lp_supplier_01@ECM2", 69, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "consumer_lp_supplier_02@ECM2", 70, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "consumer_lp_supplier_03@ECM2", 71, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 }, -{ "consumer_lp_supplier_04@ECM2", 72, 20000, 20000, 20000, 10000000, - 4, 0, 20000, 1, 0, 0, 0, 0 } -}; -static int runtime_infos_2_size = sizeof(runtime_infos_2)/sizeof(runtime_infos_2[0]); - -static ACE_Scheduler_Factory::POD_Config_Info runtime_configs_2[] = { -{ 0, 59, (RtecScheduler::Dispatching_Type_t) 0 } -}; -static int runtime_configs_2_size = sizeof(runtime_configs_2)/sizeof(runtime_configs_2[0]); - -// EOF diff --git a/TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime_Dynamic.h b/TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime_Dynamic.h deleted file mode 100644 index d4ae4f1d0cd..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/Scheduler_Runtime_Dynamic.h +++ /dev/null @@ -1,1032 +0,0 @@ -// This file was automatically generated by Scheduler_Factory -// before editing the file please consider generating it again -// $Id$ - -#include "orbsvcs/Scheduler_Factory.h" - -static ACE_Scheduler_Factory::POD_RT_Info runtime_infos_3[] = { -{ "Reactor_Task-25000.us", 1, 0, 0, 0, 250000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 0, 1, 59, 1022, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "Reactor_Task-50000.us", 2, 0, 0, 0, 500000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 0, 1, 59, 1020, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "Reactor_Task-100000.us", 3, 0, 0, 0, 1000000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 0, 1, 59, 1018, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "Reactor_Task-200000.us", 4, 0, 0, 0, 2000000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 0, 1, 59, 1016, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "Reactor_Task-1000000.us", 5, 0, 0, 0, 10000000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 0, 1, 59, 1, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "hp_supplier_00@ECM3", 6, 20000, 20000, 20000, 2500000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 1, 59, 10, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_supplier_00@ECM3", 7, 20000, 20000, 20000, 2500000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 1, 59, 9, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "hp_consumer_00@ECM3", 8, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1012, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_00@ECM3", 9, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1011, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_01@ECM3", 10, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1010, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_02@ECM3", 11, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1009, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_03@ECM3", 12, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1008, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_04@ECM3", 13, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1007, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_05@ECM3", 14, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1006, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_06@ECM3", 15, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1005, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_07@ECM3", 16, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1004, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_08@ECM3", 17, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1003, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_09@ECM3", 18, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1002, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_10@ECM3", 19, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1001, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_11@ECM3", 20, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 1000, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_12@ECM3", 21, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 999, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_13@ECM3", 22, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 998, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_14@ECM3", 23, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 997, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_15@ECM3", 24, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 996, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_16@ECM3", 25, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 995, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_17@ECM3", 26, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 994, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_18@ECM3", 27, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 993, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_19@ECM3", 28, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 992, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_20@ECM3", 29, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 991, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_21@ECM3", 30, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 990, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_22@ECM3", 31, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 989, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_23@ECM3", 32, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 988, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_24@ECM3", 33, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 987, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_25@ECM3", 34, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 986, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_26@ECM3", 35, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 985, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_27@ECM3", 36, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 984, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_28@ECM3", 37, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 983, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_29@ECM3", 38, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 982, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_30@ECM3", 39, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 981, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_31@ECM3", 40, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 980, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_32@ECM3", 41, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 979, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_33@ECM3", 42, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 978, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_34@ECM3", 43, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 977, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_35@ECM3", 44, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 976, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_36@ECM3", 45, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 975, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_37@ECM3", 46, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 974, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_38@ECM3", 47, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 973, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_39@ECM3", 48, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 972, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_40@ECM3", 49, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 971, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_41@ECM3", 50, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 970, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_42@ECM3", 51, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 969, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_43@ECM3", 52, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 968, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_44@ECM3", 53, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 967, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_45@ECM3", 54, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 966, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_46@ECM3", 55, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 965, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_47@ECM3", 56, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 964, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_48@ECM3", 57, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 963, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_49@ECM3", 58, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 962, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_50@ECM3", 59, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 961, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_51@ECM3", 60, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 960, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_52@ECM3", 61, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 959, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_53@ECM3", 62, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 958, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_54@ECM3", 63, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 957, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_55@ECM3", 64, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 956, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_56@ECM3", 65, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 955, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_57@ECM3", 66, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 954, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_58@ECM3", 67, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 953, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_59@ECM3", 68, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 952, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_60@ECM3", 69, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 951, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_61@ECM3", 70, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 950, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_62@ECM3", 71, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 949, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_63@ECM3", 72, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 948, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_64@ECM3", 73, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 947, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_65@ECM3", 74, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 946, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_66@ECM3", 75, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 945, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_67@ECM3", 76, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 944, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_68@ECM3", 77, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 943, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_69@ECM3", 78, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 942, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_70@ECM3", 79, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 941, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_71@ECM3", 80, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 940, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_72@ECM3", 81, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 939, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_73@ECM3", 82, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 938, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_74@ECM3", 83, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 937, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_75@ECM3", 84, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 936, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_76@ECM3", 85, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 935, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_77@ECM3", 86, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 934, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_78@ECM3", 87, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 933, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_79@ECM3", 88, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 932, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_80@ECM3", 89, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 931, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_81@ECM3", 90, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 930, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_82@ECM3", 91, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 929, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_83@ECM3", 92, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 928, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_84@ECM3", 93, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 927, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_85@ECM3", 94, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 926, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_86@ECM3", 95, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 925, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_87@ECM3", 96, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 924, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_88@ECM3", 97, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 923, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_89@ECM3", 98, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 922, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_90@ECM3", 99, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 921, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_91@ECM3", 100, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 920, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_92@ECM3", 101, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 919, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_93@ECM3", 102, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 918, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_94@ECM3", 103, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 917, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_95@ECM3", 104, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 916, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_96@ECM3", 105, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 915, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_97@ECM3", 106, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 914, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_98@ECM3", 107, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 913, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_99@ECM3", 108, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 912, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_100@ECM3", 109, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 911, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_101@ECM3", 110, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 910, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_102@ECM3", 111, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 909, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_103@ECM3", 112, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 908, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_104@ECM3", 113, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 907, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_105@ECM3", 114, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 906, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_106@ECM3", 115, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 905, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_107@ECM3", 116, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 904, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_108@ECM3", 117, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 903, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_109@ECM3", 118, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 902, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_110@ECM3", 119, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 901, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_111@ECM3", 120, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 900, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_112@ECM3", 121, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 899, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_113@ECM3", 122, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 898, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_114@ECM3", 123, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 897, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_115@ECM3", 124, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 896, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_116@ECM3", 125, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 895, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_117@ECM3", 126, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 894, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_118@ECM3", 127, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 893, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_119@ECM3", 128, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 892, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_120@ECM3", 129, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 891, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_121@ECM3", 130, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 890, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_122@ECM3", 131, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 889, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_123@ECM3", 132, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 888, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_124@ECM3", 133, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 887, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_125@ECM3", 134, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 886, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_126@ECM3", 135, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 885, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_127@ECM3", 136, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 884, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_128@ECM3", 137, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 883, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_129@ECM3", 138, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 882, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_130@ECM3", 139, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 881, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_131@ECM3", 140, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 880, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_132@ECM3", 141, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 879, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_133@ECM3", 142, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 878, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_134@ECM3", 143, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 877, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_135@ECM3", 144, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 876, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_136@ECM3", 145, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 875, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_137@ECM3", 146, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 874, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_138@ECM3", 147, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 873, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_139@ECM3", 148, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 872, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_140@ECM3", 149, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 871, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_141@ECM3", 150, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 870, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_142@ECM3", 151, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 869, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_143@ECM3", 152, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 868, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_144@ECM3", 153, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 867, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_145@ECM3", 154, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 866, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_146@ECM3", 155, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 865, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_147@ECM3", 156, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 864, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_148@ECM3", 157, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 863, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_149@ECM3", 158, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 862, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_150@ECM3", 159, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 861, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_151@ECM3", 160, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 860, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_152@ECM3", 161, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 859, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_153@ECM3", 162, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 858, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_154@ECM3", 163, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 857, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_155@ECM3", 164, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 856, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_156@ECM3", 165, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 855, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_157@ECM3", 166, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 854, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_158@ECM3", 167, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 853, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_159@ECM3", 168, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 852, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_160@ECM3", 169, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 851, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_161@ECM3", 170, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 850, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_162@ECM3", 171, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 849, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_163@ECM3", 172, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 848, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_164@ECM3", 173, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 847, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_165@ECM3", 174, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 846, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_166@ECM3", 175, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 845, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_167@ECM3", 176, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 844, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_168@ECM3", 177, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 843, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_169@ECM3", 178, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 842, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_170@ECM3", 179, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 841, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_171@ECM3", 180, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 840, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_172@ECM3", 181, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 839, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_173@ECM3", 182, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 838, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_174@ECM3", 183, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 837, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_175@ECM3", 184, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 836, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_176@ECM3", 185, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 835, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_177@ECM3", 186, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 834, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_178@ECM3", 187, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 833, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_179@ECM3", 188, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 832, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_180@ECM3", 189, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 831, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_181@ECM3", 190, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 830, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_182@ECM3", 191, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 829, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_183@ECM3", 192, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 828, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_184@ECM3", 193, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 827, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_185@ECM3", 194, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 826, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_186@ECM3", 195, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 825, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_187@ECM3", 196, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 824, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_188@ECM3", 197, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 823, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_189@ECM3", 198, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 822, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_190@ECM3", 199, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 821, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_191@ECM3", 200, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 820, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_192@ECM3", 201, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 819, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_193@ECM3", 202, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 818, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_194@ECM3", 203, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 817, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_195@ECM3", 204, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 816, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_196@ECM3", 205, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 815, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_197@ECM3", 206, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 814, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_198@ECM3", 207, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 813, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_199@ECM3", 208, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 812, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_200@ECM3", 209, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 811, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_201@ECM3", 210, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 810, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_202@ECM3", 211, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 809, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_203@ECM3", 212, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 808, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_204@ECM3", 213, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 807, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_205@ECM3", 214, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 806, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_206@ECM3", 215, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 805, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_207@ECM3", 216, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 804, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_208@ECM3", 217, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 803, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_209@ECM3", 218, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 802, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_210@ECM3", 219, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 801, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_211@ECM3", 220, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 800, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_212@ECM3", 221, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 799, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_213@ECM3", 222, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 798, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_214@ECM3", 223, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 797, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_215@ECM3", 224, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 796, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_216@ECM3", 225, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 795, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_217@ECM3", 226, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 794, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_218@ECM3", 227, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 793, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_219@ECM3", 228, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 792, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_220@ECM3", 229, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 791, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_221@ECM3", 230, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 790, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_222@ECM3", 231, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 789, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_223@ECM3", 232, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 788, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_224@ECM3", 233, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 787, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_225@ECM3", 234, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 786, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_226@ECM3", 235, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 785, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_227@ECM3", 236, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 784, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_228@ECM3", 237, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 783, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_229@ECM3", 238, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 782, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_230@ECM3", 239, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 781, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_231@ECM3", 240, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 780, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_232@ECM3", 241, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 779, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_233@ECM3", 242, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 778, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_234@ECM3", 243, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 777, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_235@ECM3", 244, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 776, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_236@ECM3", 245, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 775, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_237@ECM3", 246, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 774, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_238@ECM3", 247, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 773, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_239@ECM3", 248, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 772, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_240@ECM3", 249, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 771, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_241@ECM3", 250, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 770, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_242@ECM3", 251, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 769, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_243@ECM3", 252, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 768, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_244@ECM3", 253, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 767, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_245@ECM3", 254, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 766, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_246@ECM3", 255, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 765, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_247@ECM3", 256, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 764, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_248@ECM3", 257, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 763, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_249@ECM3", 258, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 762, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_250@ECM3", 259, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 761, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_251@ECM3", 260, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 760, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_252@ECM3", 261, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 759, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_253@ECM3", 262, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 758, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_254@ECM3", 263, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 757, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_255@ECM3", 264, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 756, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_256@ECM3", 265, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 755, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_257@ECM3", 266, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 754, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_258@ECM3", 267, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 753, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_259@ECM3", 268, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 752, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_260@ECM3", 269, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 751, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_261@ECM3", 270, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 750, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_262@ECM3", 271, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 749, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_263@ECM3", 272, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 748, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_264@ECM3", 273, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 747, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_265@ECM3", 274, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 746, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_266@ECM3", 275, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 745, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_267@ECM3", 276, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 744, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_268@ECM3", 277, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 743, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_269@ECM3", 278, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 742, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_270@ECM3", 279, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 741, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_271@ECM3", 280, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 740, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_272@ECM3", 281, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 739, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_273@ECM3", 282, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 738, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_274@ECM3", 283, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 737, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_275@ECM3", 284, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 736, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_276@ECM3", 285, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 735, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_277@ECM3", 286, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 734, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_278@ECM3", 287, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 733, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_279@ECM3", 288, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 732, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_280@ECM3", 289, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 731, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_281@ECM3", 290, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 730, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_282@ECM3", 291, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 729, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_283@ECM3", 292, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 728, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_284@ECM3", 293, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 727, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_285@ECM3", 294, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 726, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_286@ECM3", 295, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 725, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_287@ECM3", 296, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 724, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_288@ECM3", 297, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 723, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_289@ECM3", 298, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 722, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_290@ECM3", 299, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 721, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_291@ECM3", 300, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 720, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_292@ECM3", 301, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 719, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_293@ECM3", 302, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 718, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_294@ECM3", 303, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 717, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_295@ECM3", 304, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 716, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_296@ECM3", 305, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 715, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_297@ECM3", 306, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 714, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_298@ECM3", 307, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 713, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_299@ECM3", 308, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 712, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_300@ECM3", 309, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 711, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_301@ECM3", 310, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 710, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_302@ECM3", 311, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 709, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_303@ECM3", 312, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 708, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_304@ECM3", 313, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 707, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_305@ECM3", 314, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 706, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_306@ECM3", 315, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 705, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_307@ECM3", 316, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 704, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_308@ECM3", 317, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 703, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_309@ECM3", 318, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 702, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_310@ECM3", 319, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 701, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_311@ECM3", 320, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 700, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_312@ECM3", 321, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 699, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_313@ECM3", 322, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 698, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_314@ECM3", 323, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 697, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_315@ECM3", 324, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 696, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_316@ECM3", 325, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 695, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_317@ECM3", 326, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 694, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_318@ECM3", 327, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 693, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_319@ECM3", 328, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 692, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_320@ECM3", 329, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 691, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_321@ECM3", 330, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 690, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_322@ECM3", 331, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 689, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_323@ECM3", 332, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 688, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_324@ECM3", 333, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 687, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_325@ECM3", 334, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 686, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_326@ECM3", 335, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 685, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_327@ECM3", 336, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 684, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_328@ECM3", 337, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 683, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_329@ECM3", 338, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 682, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_330@ECM3", 339, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 681, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_331@ECM3", 340, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 680, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_332@ECM3", 341, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 679, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_333@ECM3", 342, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 678, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_334@ECM3", 343, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 677, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_335@ECM3", 344, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 676, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_336@ECM3", 345, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 675, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_337@ECM3", 346, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 674, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_338@ECM3", 347, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 673, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_339@ECM3", 348, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 672, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_340@ECM3", 349, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 671, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_341@ECM3", 350, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 670, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_342@ECM3", 351, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 669, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_343@ECM3", 352, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 668, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_344@ECM3", 353, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 667, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_345@ECM3", 354, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 666, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_346@ECM3", 355, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 665, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_347@ECM3", 356, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 664, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_348@ECM3", 357, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 663, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_349@ECM3", 358, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 662, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_350@ECM3", 359, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 661, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_351@ECM3", 360, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 660, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_352@ECM3", 361, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 659, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_353@ECM3", 362, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 658, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_354@ECM3", 363, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 657, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_355@ECM3", 364, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 656, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_356@ECM3", 365, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 655, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_357@ECM3", 366, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 654, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_358@ECM3", 367, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 653, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_359@ECM3", 368, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 652, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_360@ECM3", 369, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 651, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_361@ECM3", 370, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 650, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_362@ECM3", 371, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 649, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_363@ECM3", 372, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 648, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_364@ECM3", 373, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 647, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_365@ECM3", 374, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 646, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_366@ECM3", 375, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 645, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_367@ECM3", 376, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 644, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_368@ECM3", 377, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 643, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_369@ECM3", 378, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 642, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_370@ECM3", 379, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 641, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_371@ECM3", 380, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 640, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_372@ECM3", 381, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 639, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_373@ECM3", 382, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 638, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_374@ECM3", 383, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 637, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_375@ECM3", 384, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 636, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_376@ECM3", 385, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 635, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_377@ECM3", 386, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 634, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_378@ECM3", 387, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 633, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_379@ECM3", 388, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 632, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_380@ECM3", 389, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 631, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_381@ECM3", 390, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 630, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_382@ECM3", 391, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 629, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_383@ECM3", 392, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 628, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_384@ECM3", 393, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 627, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_385@ECM3", 394, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 626, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_386@ECM3", 395, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 625, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_387@ECM3", 396, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 624, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_388@ECM3", 397, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 623, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_389@ECM3", 398, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 622, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_390@ECM3", 399, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 621, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_391@ECM3", 400, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 620, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_392@ECM3", 401, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 619, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_393@ECM3", 402, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 618, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_394@ECM3", 403, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 617, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_395@ECM3", 404, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 616, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_396@ECM3", 405, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 615, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_397@ECM3", 406, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 614, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_398@ECM3", 407, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 613, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_399@ECM3", 408, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 612, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_400@ECM3", 409, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 611, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_401@ECM3", 410, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 610, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_402@ECM3", 411, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 609, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_403@ECM3", 412, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 608, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_404@ECM3", 413, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 607, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_405@ECM3", 414, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 606, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_406@ECM3", 415, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 605, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_407@ECM3", 416, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 604, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_408@ECM3", 417, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 603, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_409@ECM3", 418, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 602, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_410@ECM3", 419, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 601, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_411@ECM3", 420, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 600, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_412@ECM3", 421, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 599, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_413@ECM3", 422, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 598, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_414@ECM3", 423, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 597, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_415@ECM3", 424, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 596, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_416@ECM3", 425, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 595, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_417@ECM3", 426, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 594, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_418@ECM3", 427, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 593, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_419@ECM3", 428, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 592, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_420@ECM3", 429, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 591, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_421@ECM3", 430, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 590, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_422@ECM3", 431, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 589, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_423@ECM3", 432, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 588, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_424@ECM3", 433, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 587, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_425@ECM3", 434, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 586, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_426@ECM3", 435, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 585, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_427@ECM3", 436, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 584, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_428@ECM3", 437, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 583, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_429@ECM3", 438, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 582, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_430@ECM3", 439, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 581, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_431@ECM3", 440, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 580, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_432@ECM3", 441, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 579, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_433@ECM3", 442, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 578, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_434@ECM3", 443, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 577, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_435@ECM3", 444, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 576, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_436@ECM3", 445, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 575, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_437@ECM3", 446, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 574, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_438@ECM3", 447, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 573, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_439@ECM3", 448, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 572, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_440@ECM3", 449, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 571, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_441@ECM3", 450, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 570, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_442@ECM3", 451, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 569, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_443@ECM3", 452, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 568, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_444@ECM3", 453, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 567, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_445@ECM3", 454, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 566, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_446@ECM3", 455, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 565, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_447@ECM3", 456, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 564, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_448@ECM3", 457, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 563, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_449@ECM3", 458, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 562, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_450@ECM3", 459, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 561, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_451@ECM3", 460, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 560, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_452@ECM3", 461, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 559, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_453@ECM3", 462, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 558, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_454@ECM3", 463, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 557, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_455@ECM3", 464, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 556, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_456@ECM3", 465, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 555, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_457@ECM3", 466, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 554, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_458@ECM3", 467, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 553, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_459@ECM3", 468, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 552, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_460@ECM3", 469, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 551, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_461@ECM3", 470, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 550, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_462@ECM3", 471, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 549, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_463@ECM3", 472, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 548, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_464@ECM3", 473, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 547, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_465@ECM3", 474, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 546, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_466@ECM3", 475, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 545, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_467@ECM3", 476, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 544, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_468@ECM3", 477, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 543, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_469@ECM3", 478, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 542, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_470@ECM3", 479, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 541, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_471@ECM3", 480, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 540, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_472@ECM3", 481, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 539, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_473@ECM3", 482, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 538, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_474@ECM3", 483, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 537, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_475@ECM3", 484, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 536, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_476@ECM3", 485, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 535, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_477@ECM3", 486, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 534, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_478@ECM3", 487, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 533, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_479@ECM3", 488, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 532, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_480@ECM3", 489, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 531, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_481@ECM3", 490, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 530, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_482@ECM3", 491, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 529, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_483@ECM3", 492, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 528, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_484@ECM3", 493, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 527, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_485@ECM3", 494, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 526, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_486@ECM3", 495, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 525, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_487@ECM3", 496, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 524, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_488@ECM3", 497, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 523, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_489@ECM3", 498, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 522, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_490@ECM3", 499, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 521, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_491@ECM3", 500, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 520, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_492@ECM3", 501, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 519, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_493@ECM3", 502, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 518, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_494@ECM3", 503, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 517, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_495@ECM3", 504, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 516, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_496@ECM3", 505, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 515, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_497@ECM3", 506, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 514, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_498@ECM3", 507, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 513, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_499@ECM3", 508, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 512, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_500@ECM3", 509, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 511, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_501@ECM3", 510, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 510, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_502@ECM3", 511, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 509, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_503@ECM3", 512, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 508, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_504@ECM3", 513, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 507, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_505@ECM3", 514, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 506, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_506@ECM3", 515, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 505, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_507@ECM3", 516, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 504, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_508@ECM3", 517, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 503, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_509@ECM3", 518, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 502, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_510@ECM3", 519, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 501, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_511@ECM3", 520, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 500, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_512@ECM3", 521, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 499, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_513@ECM3", 522, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 498, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_514@ECM3", 523, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 497, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_515@ECM3", 524, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 496, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_516@ECM3", 525, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 495, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_517@ECM3", 526, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 494, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_518@ECM3", 527, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 493, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_519@ECM3", 528, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 492, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_520@ECM3", 529, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 491, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_521@ECM3", 530, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 490, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_522@ECM3", 531, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 489, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_523@ECM3", 532, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 488, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_524@ECM3", 533, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 487, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_525@ECM3", 534, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 486, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_526@ECM3", 535, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 485, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_527@ECM3", 536, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 484, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_528@ECM3", 537, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 483, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_529@ECM3", 538, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 482, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_530@ECM3", 539, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 481, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_531@ECM3", 540, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 480, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_532@ECM3", 541, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 479, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_533@ECM3", 542, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 478, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_534@ECM3", 543, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 477, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_535@ECM3", 544, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 476, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_536@ECM3", 545, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 475, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_537@ECM3", 546, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 474, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_538@ECM3", 547, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 473, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_539@ECM3", 548, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 472, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_540@ECM3", 549, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 471, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_541@ECM3", 550, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 470, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_542@ECM3", 551, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 469, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_543@ECM3", 552, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 468, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_544@ECM3", 553, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 467, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_545@ECM3", 554, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 466, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_546@ECM3", 555, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 465, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_547@ECM3", 556, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 464, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_548@ECM3", 557, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 463, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_549@ECM3", 558, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 462, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_550@ECM3", 559, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 461, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_551@ECM3", 560, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 460, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_552@ECM3", 561, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 459, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_553@ECM3", 562, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 458, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_554@ECM3", 563, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 457, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_555@ECM3", 564, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 456, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_556@ECM3", 565, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 455, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_557@ECM3", 566, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 454, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_558@ECM3", 567, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 453, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_559@ECM3", 568, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 452, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_560@ECM3", 569, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 451, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_561@ECM3", 570, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 450, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_562@ECM3", 571, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 449, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_563@ECM3", 572, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 448, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_564@ECM3", 573, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 447, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_565@ECM3", 574, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 446, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_566@ECM3", 575, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 445, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_567@ECM3", 576, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 444, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_568@ECM3", 577, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 443, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_569@ECM3", 578, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 442, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_570@ECM3", 579, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 441, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_571@ECM3", 580, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 440, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_572@ECM3", 581, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 439, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_573@ECM3", 582, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 438, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_574@ECM3", 583, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 437, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_575@ECM3", 584, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 436, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_576@ECM3", 585, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 435, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_577@ECM3", 586, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 434, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_578@ECM3", 587, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 433, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_579@ECM3", 588, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 432, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_580@ECM3", 589, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 431, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_581@ECM3", 590, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 430, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_582@ECM3", 591, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 429, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_583@ECM3", 592, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 428, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_584@ECM3", 593, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 427, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_585@ECM3", 594, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 426, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_586@ECM3", 595, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 425, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_587@ECM3", 596, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 424, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_588@ECM3", 597, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 423, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_589@ECM3", 598, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 422, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_590@ECM3", 599, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 421, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_591@ECM3", 600, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 420, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_592@ECM3", 601, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 419, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_593@ECM3", 602, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 418, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_594@ECM3", 603, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 417, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_595@ECM3", 604, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 416, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_596@ECM3", 605, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 415, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_597@ECM3", 606, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 414, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_598@ECM3", 607, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 413, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_599@ECM3", 608, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 412, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_600@ECM3", 609, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 411, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_601@ECM3", 610, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 410, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_602@ECM3", 611, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 409, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_603@ECM3", 612, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 408, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_604@ECM3", 613, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 407, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_605@ECM3", 614, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 406, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_606@ECM3", 615, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 405, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_607@ECM3", 616, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 404, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_608@ECM3", 617, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 403, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_609@ECM3", 618, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 402, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_610@ECM3", 619, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 401, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_611@ECM3", 620, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 400, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_612@ECM3", 621, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 399, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_613@ECM3", 622, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 398, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_614@ECM3", 623, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 397, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_615@ECM3", 624, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 396, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_616@ECM3", 625, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 395, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_617@ECM3", 626, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 394, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_618@ECM3", 627, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 393, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_619@ECM3", 628, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 392, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_620@ECM3", 629, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 391, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_621@ECM3", 630, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 390, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_622@ECM3", 631, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 389, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_623@ECM3", 632, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 388, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_624@ECM3", 633, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 387, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_625@ECM3", 634, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 386, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_626@ECM3", 635, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 385, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_627@ECM3", 636, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 384, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_628@ECM3", 637, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 383, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_629@ECM3", 638, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 382, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_630@ECM3", 639, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 381, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_631@ECM3", 640, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 380, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_632@ECM3", 641, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 379, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_633@ECM3", 642, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 378, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_634@ECM3", 643, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 377, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_635@ECM3", 644, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 376, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_636@ECM3", 645, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 375, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_637@ECM3", 646, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 374, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_638@ECM3", 647, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 373, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_639@ECM3", 648, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 372, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_640@ECM3", 649, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 371, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_641@ECM3", 650, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 370, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_642@ECM3", 651, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 369, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_643@ECM3", 652, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 368, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_644@ECM3", 653, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 367, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_645@ECM3", 654, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 366, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_646@ECM3", 655, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 365, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_647@ECM3", 656, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 364, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_648@ECM3", 657, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 363, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_649@ECM3", 658, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 362, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_650@ECM3", 659, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 361, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_651@ECM3", 660, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 360, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_652@ECM3", 661, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 359, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_653@ECM3", 662, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 358, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_654@ECM3", 663, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 357, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_655@ECM3", 664, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 356, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_656@ECM3", 665, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 355, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_657@ECM3", 666, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 354, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_658@ECM3", 667, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 353, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_659@ECM3", 668, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 352, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_660@ECM3", 669, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 351, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_661@ECM3", 670, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 350, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_662@ECM3", 671, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 349, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_663@ECM3", 672, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 348, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_664@ECM3", 673, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 347, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_665@ECM3", 674, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 346, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_666@ECM3", 675, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 345, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_667@ECM3", 676, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 344, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_668@ECM3", 677, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 343, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_669@ECM3", 678, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 342, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_670@ECM3", 679, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 341, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_671@ECM3", 680, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 340, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_672@ECM3", 681, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 339, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_673@ECM3", 682, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 338, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_674@ECM3", 683, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 337, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_675@ECM3", 684, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 336, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_676@ECM3", 685, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 335, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_677@ECM3", 686, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 334, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_678@ECM3", 687, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 333, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_679@ECM3", 688, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 332, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_680@ECM3", 689, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 331, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_681@ECM3", 690, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 330, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_682@ECM3", 691, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 329, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_683@ECM3", 692, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 328, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_684@ECM3", 693, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 327, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_685@ECM3", 694, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 326, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_686@ECM3", 695, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 325, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_687@ECM3", 696, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 324, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_688@ECM3", 697, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 323, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_689@ECM3", 698, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 322, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_690@ECM3", 699, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 321, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_691@ECM3", 700, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 320, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_692@ECM3", 701, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 319, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_693@ECM3", 702, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 318, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_694@ECM3", 703, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 317, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_695@ECM3", 704, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 316, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_696@ECM3", 705, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 315, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_697@ECM3", 706, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 314, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_698@ECM3", 707, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 313, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_699@ECM3", 708, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 312, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_700@ECM3", 709, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 311, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_701@ECM3", 710, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 310, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_702@ECM3", 711, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 309, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_703@ECM3", 712, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 308, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_704@ECM3", 713, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 307, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_705@ECM3", 714, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 306, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_706@ECM3", 715, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 305, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_707@ECM3", 716, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 304, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_708@ECM3", 717, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 303, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_709@ECM3", 718, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 302, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_710@ECM3", 719, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 301, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_711@ECM3", 720, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 300, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_712@ECM3", 721, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 299, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_713@ECM3", 722, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 298, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_714@ECM3", 723, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 297, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_715@ECM3", 724, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 296, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_716@ECM3", 725, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 295, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_717@ECM3", 726, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 294, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_718@ECM3", 727, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 293, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_719@ECM3", 728, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 292, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_720@ECM3", 729, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 291, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_721@ECM3", 730, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 290, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_722@ECM3", 731, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 289, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_723@ECM3", 732, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 288, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_724@ECM3", 733, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 287, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_725@ECM3", 734, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 286, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_726@ECM3", 735, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 285, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_727@ECM3", 736, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 284, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_728@ECM3", 737, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 283, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_729@ECM3", 738, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 282, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_730@ECM3", 739, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 281, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_731@ECM3", 740, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 280, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_732@ECM3", 741, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 279, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_733@ECM3", 742, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 278, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_734@ECM3", 743, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 277, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_735@ECM3", 744, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 276, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_736@ECM3", 745, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 275, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_737@ECM3", 746, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 274, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_738@ECM3", 747, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 273, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_739@ECM3", 748, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 272, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_740@ECM3", 749, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 271, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_741@ECM3", 750, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 270, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_742@ECM3", 751, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 269, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_743@ECM3", 752, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 268, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_744@ECM3", 753, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 267, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_745@ECM3", 754, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 266, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_746@ECM3", 755, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 265, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_747@ECM3", 756, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 264, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_748@ECM3", 757, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 263, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_749@ECM3", 758, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 262, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_750@ECM3", 759, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 261, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_751@ECM3", 760, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 260, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_752@ECM3", 761, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 259, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_753@ECM3", 762, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 258, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_754@ECM3", 763, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 257, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_755@ECM3", 764, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 256, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_756@ECM3", 765, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 255, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_757@ECM3", 766, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 254, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_758@ECM3", 767, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 253, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_759@ECM3", 768, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 252, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_760@ECM3", 769, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 251, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_761@ECM3", 770, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 250, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_762@ECM3", 771, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 249, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_763@ECM3", 772, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 248, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_764@ECM3", 773, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 247, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_765@ECM3", 774, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 246, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_766@ECM3", 775, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 245, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_767@ECM3", 776, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 244, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_768@ECM3", 777, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 243, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_769@ECM3", 778, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 242, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_770@ECM3", 779, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 241, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_771@ECM3", 780, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 240, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_772@ECM3", 781, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 239, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_773@ECM3", 782, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 238, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_774@ECM3", 783, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 237, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_775@ECM3", 784, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 236, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_776@ECM3", 785, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 235, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_777@ECM3", 786, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 234, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_778@ECM3", 787, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 233, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_779@ECM3", 788, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 232, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_780@ECM3", 789, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 231, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_781@ECM3", 790, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 230, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_782@ECM3", 791, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 229, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_783@ECM3", 792, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 228, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_784@ECM3", 793, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 227, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_785@ECM3", 794, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 226, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_786@ECM3", 795, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 225, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_787@ECM3", 796, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 224, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_788@ECM3", 797, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 223, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_789@ECM3", 798, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 222, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_790@ECM3", 799, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 221, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_791@ECM3", 800, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 220, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_792@ECM3", 801, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 219, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_793@ECM3", 802, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 218, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_794@ECM3", 803, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 217, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_795@ECM3", 804, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 216, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_796@ECM3", 805, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 215, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_797@ECM3", 806, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 214, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_798@ECM3", 807, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 213, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_799@ECM3", 808, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 212, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_800@ECM3", 809, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 211, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_801@ECM3", 810, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 210, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_802@ECM3", 811, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 209, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_803@ECM3", 812, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 208, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_804@ECM3", 813, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 207, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_805@ECM3", 814, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 206, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_806@ECM3", 815, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 205, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_807@ECM3", 816, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 204, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_808@ECM3", 817, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 203, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_809@ECM3", 818, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 202, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_810@ECM3", 819, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 201, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_811@ECM3", 820, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 200, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_812@ECM3", 821, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 199, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_813@ECM3", 822, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 198, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_814@ECM3", 823, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 197, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_815@ECM3", 824, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 196, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_816@ECM3", 825, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 195, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_817@ECM3", 826, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 194, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_818@ECM3", 827, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 193, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_819@ECM3", 828, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 192, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_820@ECM3", 829, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 191, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_821@ECM3", 830, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 190, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_822@ECM3", 831, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 189, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_823@ECM3", 832, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 188, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_824@ECM3", 833, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 187, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_825@ECM3", 834, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 186, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_826@ECM3", 835, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 185, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_827@ECM3", 836, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 184, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_828@ECM3", 837, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 183, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_829@ECM3", 838, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 182, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_830@ECM3", 839, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 181, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_831@ECM3", 840, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 180, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_832@ECM3", 841, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 179, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_833@ECM3", 842, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 178, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_834@ECM3", 843, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 177, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_835@ECM3", 844, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 176, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_836@ECM3", 845, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 175, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_837@ECM3", 846, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 174, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_838@ECM3", 847, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 173, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_839@ECM3", 848, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 172, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_840@ECM3", 849, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 171, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_841@ECM3", 850, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 170, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_842@ECM3", 851, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 169, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_843@ECM3", 852, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 168, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_844@ECM3", 853, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 167, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_845@ECM3", 854, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 166, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_846@ECM3", 855, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 165, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_847@ECM3", 856, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 164, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_848@ECM3", 857, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 163, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_849@ECM3", 858, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 162, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_850@ECM3", 859, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 161, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_851@ECM3", 860, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 160, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_852@ECM3", 861, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 159, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_853@ECM3", 862, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 158, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_854@ECM3", 863, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 157, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_855@ECM3", 864, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 156, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_856@ECM3", 865, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 155, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_857@ECM3", 866, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 154, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_858@ECM3", 867, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 153, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_859@ECM3", 868, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 152, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_860@ECM3", 869, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 151, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_861@ECM3", 870, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 150, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_862@ECM3", 871, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 149, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_863@ECM3", 872, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 148, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_864@ECM3", 873, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 147, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_865@ECM3", 874, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 146, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_866@ECM3", 875, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 145, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_867@ECM3", 876, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 144, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_868@ECM3", 877, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 143, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_869@ECM3", 878, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 142, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_870@ECM3", 879, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 141, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_871@ECM3", 880, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 140, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_872@ECM3", 881, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 139, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_873@ECM3", 882, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 138, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_874@ECM3", 883, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 137, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_875@ECM3", 884, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 136, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_876@ECM3", 885, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 135, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_877@ECM3", 886, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 134, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_878@ECM3", 887, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 133, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_879@ECM3", 888, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 132, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_880@ECM3", 889, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 131, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_881@ECM3", 890, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 130, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_882@ECM3", 891, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 129, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_883@ECM3", 892, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 128, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_884@ECM3", 893, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 127, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_885@ECM3", 894, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 126, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_886@ECM3", 895, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 125, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_887@ECM3", 896, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 124, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_888@ECM3", 897, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 123, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_889@ECM3", 898, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 122, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_890@ECM3", 899, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 121, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_891@ECM3", 900, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 120, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_892@ECM3", 901, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 119, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_893@ECM3", 902, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 118, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_894@ECM3", 903, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 117, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_895@ECM3", 904, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 116, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_896@ECM3", 905, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 115, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_897@ECM3", 906, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 114, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_898@ECM3", 907, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 113, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_899@ECM3", 908, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 112, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_900@ECM3", 909, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 111, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_901@ECM3", 910, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 110, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_902@ECM3", 911, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 109, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_903@ECM3", 912, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 108, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_904@ECM3", 913, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 107, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_905@ECM3", 914, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 106, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_906@ECM3", 915, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 105, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_907@ECM3", 916, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 104, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_908@ECM3", 917, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 103, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_909@ECM3", 918, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 102, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_910@ECM3", 919, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 101, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_911@ECM3", 920, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 100, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_912@ECM3", 921, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 99, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_913@ECM3", 922, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 98, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_914@ECM3", 923, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 97, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_915@ECM3", 924, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 96, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_916@ECM3", 925, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 95, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_917@ECM3", 926, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 94, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_918@ECM3", 927, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 93, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_919@ECM3", 928, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 92, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_920@ECM3", 929, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 91, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_921@ECM3", 930, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 90, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_922@ECM3", 931, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 89, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_923@ECM3", 932, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 88, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_924@ECM3", 933, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 87, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_925@ECM3", 934, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 86, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_926@ECM3", 935, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 85, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_927@ECM3", 936, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 84, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_928@ECM3", 937, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 83, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_929@ECM3", 938, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 82, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_930@ECM3", 939, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 81, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_931@ECM3", 940, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 80, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_932@ECM3", 941, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 79, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_933@ECM3", 942, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 78, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_934@ECM3", 943, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 77, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_935@ECM3", 944, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 76, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_936@ECM3", 945, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 75, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_937@ECM3", 946, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 74, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_938@ECM3", 947, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 73, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_939@ECM3", 948, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 72, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_940@ECM3", 949, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 71, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_941@ECM3", 950, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 70, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_942@ECM3", 951, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 69, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_943@ECM3", 952, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 68, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_944@ECM3", 953, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 67, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_945@ECM3", 954, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 66, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_946@ECM3", 955, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 65, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_947@ECM3", 956, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 64, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_948@ECM3", 957, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 63, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_949@ECM3", 958, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 62, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_950@ECM3", 959, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 61, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_951@ECM3", 960, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 60, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_952@ECM3", 961, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 59, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_953@ECM3", 962, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 58, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_954@ECM3", 963, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 57, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_955@ECM3", 964, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 56, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_956@ECM3", 965, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 55, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_957@ECM3", 966, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 54, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_958@ECM3", 967, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 53, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_959@ECM3", 968, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 52, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_960@ECM3", 969, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 51, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_961@ECM3", 970, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 50, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_962@ECM3", 971, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 49, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_963@ECM3", 972, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 48, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_964@ECM3", 973, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 47, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_965@ECM3", 974, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 46, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_966@ECM3", 975, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 45, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_967@ECM3", 976, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 44, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_968@ECM3", 977, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 43, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_969@ECM3", 978, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 42, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_970@ECM3", 979, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 41, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_971@ECM3", 980, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 40, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_972@ECM3", 981, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 39, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_973@ECM3", 982, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 38, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_974@ECM3", 983, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 37, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_975@ECM3", 984, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 36, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_976@ECM3", 985, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 35, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_977@ECM3", 986, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 34, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_978@ECM3", 987, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 33, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_979@ECM3", 988, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 32, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_980@ECM3", 989, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 31, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_981@ECM3", 990, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 30, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_982@ECM3", 991, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 29, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_983@ECM3", 992, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 28, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_984@ECM3", 993, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 27, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_985@ECM3", 994, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 26, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_986@ECM3", 995, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 25, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_987@ECM3", 996, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 24, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_988@ECM3", 997, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 23, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_989@ECM3", 998, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 22, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_990@ECM3", 999, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 21, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_991@ECM3", 1000, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 20, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_992@ECM3", 1001, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 19, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_993@ECM3", 1002, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 18, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_994@ECM3", 1003, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 17, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_995@ECM3", 1004, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 16, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_996@ECM3", 1005, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 15, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_997@ECM3", 1006, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 14, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_998@ECM3", 1007, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 13, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "lp_consumer_999@ECM3", 1008, 20000, 20000, 20000, 0, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 0, 59, 12, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "consumer_hp_supplier_00@ECM3", 1009, 20000, 20000, 20000, 2500000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 1, 59, 3, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "consumer_lp_supplier_00@ECM3", 1010, 20000, 20000, 20000, 2500000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 20000, 1, 59, 2, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "ACE_ES_Dispatch_Queue-25000.us", 1011, 0, 0, 0, 250000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 0, 1, 59, 1021, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "ACE_ES_Dispatch_Queue-50000.us", 1012, 0, 0, 0, 500000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 0, 1, 59, 1019, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "ACE_ES_Dispatch_Queue-100000.us", 1013, 0, 0, 0, 1000000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 0, 1, 59, 1017, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "ACE_ES_Dispatch_Queue-200000.us", 1014, 0, 0, 0, 2000000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 0, 1, 59, 1015, 0, (RtecScheduler::Info_Type_t) 0 }, -{ "ACE_ES_Dispatch_Queue-1000000.us", 1015, 0, 0, 0, 10000000, (RtecScheduler::Criticality_t) 4, (RtecScheduler::Importance_t) 0, 0, 1, 59, 0, 0, (RtecScheduler::Info_Type_t) 0 } -}; -static int runtime_infos_3_size = sizeof(runtime_infos_3)/sizeof(runtime_infos_3[0]); - -static ACE_Scheduler_Factory::POD_Config_Info runtime_configs_3[] = { -{ 0, 59, (RtecScheduler::Dispatching_Type_t) 2 } -}; -static int runtime_configs_3_size = sizeof(runtime_configs_3)/sizeof(runtime_configs_3[0]); - - -// EOF diff --git a/TAO/orbsvcs/tests/EC_Multiple/dyn_plot b/TAO/orbsvcs/tests/EC_Multiple/dyn_plot deleted file mode 100755 index ee3c5450ad0..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/dyn_plot +++ /dev/null @@ -1,77 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -# Plots two lines, with min-max ranges, from two DYN.LCL.tbl files. -# -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -$usage="usage: $0 \n"; - -######## -######## Process command line args. -######## -while ( $#ARGV >= $[ && $ARGV[0] =~ /^-/ ) { - if ( $ARGV[0] eq '-?' ) { - print "$usage"; - exit; - } else { - print STDERR "$0: unknown option $ARGV[0]\n"; - die $usage; - } - shift; -} - -die "$usage" unless $#ARGV == 1; -$tbl1 = $ARGV[0]; -$tbl2 = $ARGV[1]; - -######## -######## Plot separately for each number of suppliers. -######## -&plot (1); - - -sub extract { - my ($input, $suppliers, $output) = (@_); - - open (INPUT, "$input") || die "$0: unable to open $input\n"; - open (OUTPUT, "> $output") || die "$0: unable to open $output\n"; - - while () { - if (/^$suppliers (\d+) ([\d.]+) ([\d.]+) (\d+) (\d+)/) { - print OUTPUT "$1 $4 $2 $3\n"; - } - } - - close OUTPUT; - close INPUT; -} - - -sub plot { - my ($suppliers) = (@_); - - &extract ("$tbl1", $suppliers, "tmpS$suppliers-rms"); - &extract ("$tbl2", $suppliers, "tmpS$suppliers-muf"); - - open (GNUPLOT, "| gnuplot") || die "$0: unable to open gnuplot\n"; - print GNUPLOT "set xlabel 'Number of Consumers'\n"; - print GNUPLOT "set ylabel 'Latency, usec'\n"; - print GNUPLOT "set terminal postscript eps color\n"; - print GNUPLOT "set output 'DYN.plot-S$suppliers.eps'\n"; - print GNUPLOT "plot " . - "'tmpS$suppliers-rms' title 'RMS' w lines, " . - "'tmpS$suppliers-rms' using (\$1-0.05):2:3:4 " . - "notitle w errorbars, " . - "'tmpS$suppliers-muf' title 'MUF' w lines, " . - "'tmpS$suppliers-muf' using (\$1+0.05):2:3:4 " . - "notitle w errorbars\n"; - close GNUPLOT; - - unlink "tmpS$suppliers-rms", "tmpS$suppliers-muf"; -} diff --git a/TAO/orbsvcs/tests/EC_Multiple/gen_dynamic b/TAO/orbsvcs/tests/EC_Multiple/gen_dynamic deleted file mode 100755 index a1b80e258e6..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/gen_dynamic +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -# -# $Id$ -# - -HP_SUPPLIERS="1" -LP_CONSUMERS="1 10 100 200 300 500 1000" - -for s in $HP_SUPPLIERS; do - echo Supplier = $s - - for c in $LP_CONSUMERS; do - x=`expr $c - 1` - l=`printf %02.2d $x` - echo Consumer = $c, LAST = $l - - echo DYN.LCL.S${s}.C${c}.log - - ./histo.pl -k 'Latency\[LCL,HP00' DYN.LCL.S${s}.C${c}.log >DYN.LCL.S${s}.C${c}.FIRST.histo - ./histo.pl -k "Latency\[LCL,HP${l}" DYN.LCL.S${s}.C${c}.log >DYN.LCL.S${s}.C${c}.LAST.histo - ./histo.pl -k "Latency\[LCL,HP" DYN.LCL.S${s}.C${c}.log >DYN.LCL.S${s}.C${c}.histo - done -done - -for f in DYN.*.histo; do - b=`basename $f .histo` - tail +3 $f | sort -n > ${b}.data -done - -for i in LCL; do - grep Min DYN.${i}.*.FIRST.histo | - sed -e "s/DYN.$i.S//" -e 's/\.C/ /' -e 's/.FIRST.histo:/ /' -e 's/\,/ /g' | - awk '{print $1, $2, $4, $6, $8, $10}' | - sort -k 1n -k 2n > DYN.${i}.FIRST.tbl - grep Min DYN.${i}.*.LAST.histo | - sed -e "s/DYN.$i.S//" -e 's/\.C/ /' -e 's/.LAST.histo:/ /' -e 's/\,/ /g' | - awk '{print $1, $2, $4, $6, $8, $10}' | - sort -k 1n -k 2n > DYN.${i}.LAST.tbl - paste DYN.${i}.FIRST.tbl DYN.${i}.LAST.tbl | - awk '{print $1, $2, $3, $4, $5, $6, $9, $10, $11, $12}' > DYN.${i}.tbl -done - -for i in LCL; do - grep Min `ls DYN.${i}.*.histo | grep -v FIRST | grep -v LAST` | - sed -e "s/DYN.$i.S//" -e 's/\.C/ /' -e 's/.histo:/ /' -e 's/\,/ /g' | - awk '{print $1, $2, $4, $6, $8, $10}' | - sort -k 1n -k 2n > DYN.${i}.tbl -done - -for s in $HP_SUPPLIERS; do - gnuplot <<_EOF_ - set grid xtics ytics - set ylabel "Relative frequency" - set xlabel "Latency (usecs) [$s suppliers, local events]" - set terminal postscript eps color - set output "DYN.LCL.S${s}.eps" - plot 'DYN.LCL.S${s}.C1.data' w i - set terminal x11 - plot 'DYN.LCL.S${s}.C1.data' w i - pause 2 -_EOF_ -done - -for i in DYN.*.eps; do - b=`basename $i .eps` - gs -sDEVICE=jpeg -g640x480 -r110x110 -sNOPAUSE \ - -sOutputFile="${b}.jpg" ${b}.eps quit.ps -done diff --git a/TAO/orbsvcs/tests/EC_Multiple/gen_latency b/TAO/orbsvcs/tests/EC_Multiple/gen_latency deleted file mode 100755 index 4d79000e45d..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/gen_latency +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/sh -# -# $Id$ -# - -HP_SUPPLIERS="1 2 10" -HP_CONSUMERS="1 5 10 20" - -for s in $HP_SUPPLIERS; do - echo Supplier = $s - ./histo.pl -k 'Latency\[LCL' LTC.ECM1.S${s}.*.log LTC.ECM2.S${s}.*.log >LTC.LCL.S${s}.histo - ./histo.pl -k 'Latency\[RMT' LTC.ECM1.S${s}.*.log LTC.ECM2.S${s}.*.log >LTC.RMT.S${s}.histo - - for c in $HP_CONSUMERS; do - x=`expr $c - 1` - l=`printf %02.2d $x` - echo Consumer = $c, LAST = $l - ./histo.pl -k 'Latency\[LCL,HP00' LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.LCL.S${s}.C${c}.FIRST.histo - ./histo.pl -k 'Latency\[RMT,HP00' LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.RMT.S${s}.C${c}.FIRST.histo - ./histo.pl -k "Latency\[LCL,HP${l}" LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.LCL.S${s}.C${c}.LAST.histo - ./histo.pl -k "Latency\[RMT,HP${l}" LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.RMT.S${s}.C${c}.LAST.histo - - ./histo.pl -k "Latency\[LCL,HP" LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.LCL.S${s}.C${c}.histo - ./histo.pl -k "Latency\[RMT,HP" LTC.ECM1.S${s}.C${c}.log LTC.ECM2.S${s}.C${c}.log >LTC.RMT.S${s}.C${c}.histo - - ./histo.pl -k 'Latency\[LCL,HP00' LTC.LCL.S${s}.C${c}.log >LTC.XLCL.S${s}.C${c}.FIRST.histo - ./histo.pl -k "Latency\[LCL,HP${l}" LTC.LCL.S${s}.C${c}.log >LTC.XLCL.S${s}.C${c}.LAST.histo - ./histo.pl -k "Latency\[LCL,HP" LTC.LCL.S${s}.C${c}.log >LTC.XLCL.S${s}.C${c}.histo - done -done - -for f in LTC.*.histo; do - b=`basename $f .histo` - tail +3 $f | sort -n > ${b}.data -done - -for i in XLCL; do - grep Min LTC.${i}.*.FIRST.histo | - sed -e "s/LTC.$i.S//" -e 's/\.C/ /' -e 's/.FIRST.histo:/ /' -e 's/\,/ /g' | - awk '{print $1, $2, $4, $6, $8, $10}' | - sort -k 1n -k 2n > LTC.${i}.FIRST.tbl - grep Min LTC.${i}.*.LAST.histo | - sed -e "s/LTC.$i.S//" -e 's/\.C/ /' -e 's/.LAST.histo:/ /' -e 's/\,/ /g' | - awk '{print $1, $2, $4, $6, $8, $10}' | - sort -k 1n -k 2n > LTC.${i}.LAST.tbl - paste LTC.${i}.FIRST.tbl LTC.${i}.LAST.tbl | - awk '{print $1, $2, $3, $4, $5, $6, $9, $10, $11, $12}' > LTC.${i}.tbl -done - -for i in LCL RMT; do - grep Min `ls LTC.${i}.*.histo | grep -v FIRST | grep -v LAST` | - sed -e "s/LTC.$i.S//" -e 's/\.C/ /' -e 's/.histo:/ /' -e 's/\,/ /g' | - awk '{print $1, $2, $4, $6, $8, $10}' | - sort -k 1n -k 2n > LTC.${i}.tbl -done - -paste LTC.LCL.tbl LTC.RMT.tbl | - awk '{print $1, $2, $3, $4, $5, $6, $9, $10, $11, $12}' > LTC.LCLRMT.tbl - -exit 0 - -for s in $HP_SUPPLIERS; do - gnuplot <<_EOF_ -set grid xtics ytics -set ylabel "Relative frequency" - -set xlabel "Latency (usecs) [$s suppliers, local events]" -set terminal postscript eps color -set output "LTC.LCL.S${s}.eps" -plot 'LTC.LCL.S${s}.data' w i -#set terminal x11 -#plot 'LTC.LCL.S${s}.data' w i -#pause 2 - -set xlabel "Time (usecs) [$s suppliers, remote events]" -set terminal postscript eps -set output "LTC.RMT.S${s}.eps" -plot 'LTC.RMT.S${s}.data' w i -#set terminal x11 -#plot 'LTC.RMT.S${s}.data' w i -#pause 2 - -_EOF_ -done - -for i in LTC.*.eps; do - b=`basename $i .eps` - gs -sDEVICE=jpeg -g640x480 -r110x110 -sNOPAUSE \ - -sOutputFile="${b}.jpg" ${b}.eps quit.ps -done diff --git a/TAO/orbsvcs/tests/EC_Multiple/gen_overhead b/TAO/orbsvcs/tests/EC_Multiple/gen_overhead deleted file mode 100755 index 3f6cf50acd5..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/gen_overhead +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh -# -# $Id$ -# - -#TESTS_SOURCES="X LCL RMT1 RMT2 RPT.X RPT.LCL RPT.RMT1 RPT.RMT2" -TESTS_SOURCES="RPT.X RPT.LCL RPT.RMT1 RPT.RMT2" - -#TESTS="$TEST_SOURCES RPT.RMT RMT" -TESTS="$TEST_SOURCES RPT.RMT" - -for i in $TESTS_SOURCES; do - grep "Scavenger time" OVH.${i}.*.log | - sed -e "s/^OVH\.${i}\.//" -e 's/\.log:Scavenger time://' | - sort -n > OVH.${i}.scav.data - grep "Push time" OVH.${i}.*.log | - sed -e "s/^OVH\.${i}\.//" -e 's/\.log:Push time://' | - sort -n > OVH.${i}.push.data -# | awk '{printf ("%d %.3f\n", $1, $2/$1);}' -done - -paste scav.RMT1.data scav.RMT2.data | - awk '{printf("%d %.3f\n", $1, ($2 + $4)/2);}' > OVH.RMT.scav.data -paste push.RMT1.data push.RMT2.data | - awk '{printf("%d %.3f\n", $1, ($2 + $4)/2);}' > OVH.RMT.push.data - -paste scav.RPT.RMT1.data scav.RPT.RMT2.data | - awk '{printf("%d %.3f\n", $1, ($2 + $4)/2);}' > OVH.RPT.RMT.scav.data -paste push.RPT.RMT1.data push.RPT.RMT2.data | - awk '{printf("%d %.3f\n", $1, ($2 + $4)/2);}' > OVH.RPT.RMT.push.data - -for i in X LCL RMT RMT1 RMT2; do - paste OVH.${i}.scav.data OVH.${i}.push.data | - awk '{ - if (NR == 1) { - b = $2; - } else { - printf ("%d %.3f\n", $1, ($2 - $4 - b) / $1); - }}' > OVH.${i}.over.data -done - -for i in RPT.X RPT.LCL RPT.RMT RPT.RMT1 RPT.RMT2; do - paste OVH.${i}.scav.data OVH.${i}.push.data | - awk '{ - printf ("%d %.3f\n", $1, ($2 - $4)); - }' > OVH.${i}.over.data -done - -for i in $TESTS; do - case $i in - X) LABEL="Number of Messages [short circuit test]" - ;; - LCL) LABEL="Number of Messages [local EC test]" - ;; - RMT) LABEL="Number of Messages [remote EC test]" - ;; - RMT1) LABEL="Number of Messages [remote EC test 1]" - ;; - RMT2) LABEL="Number of Messages [remote EC test 2]" - ;; - RPT.X) LABEL="Test Number [short circuit test]" - ;; - RPT.LCL) LABEL="Test Number [local EC test]" - ;; - RPT.RMT) LABEL="Test Number [remote EC test]" - ;; - RPT.RMT1) LABEL="Test Number [remote EC test 1]" - ;; - RPT.RMT2) LABEL="Test Number [remote EC test 2]" - ;; - - *) LABEL="Test Number [unknown test]" - ;; - esac - - gnuplot <<_EOF_ -set grid xtics ytics -set xlabel "$LABEL" - -set terminal postscript eps color -set ylabel "Time in scavenger (usecs)" -set output "OVH.${i}.scav.eps" -plot 'OVH.${i}.scav.data' w l -set terminal x11 -plot 'OVH.${i}.scav.data' w l -pause 2 - -set terminal postscript eps -set ylabel "Time in push (usecs)" -set output "OVH.${i}.push.eps" -plot 'OVH.${i}.push.data' w l -set terminal x11 -plot 'OVH.${i}.push.data' w l -pause 2 - -set terminal postscript eps -set ylabel "Overhead (usecs)" -set output "OVH.${i}.over.eps" -plot 'OVH.${i}.over.data' w l -set terminal x11 -plot 'OVH.${i}.over.data' w l -pause 2 -_EOF_ -done - -for i in OVH.push OVH.scav OVH.over; do - for j in $TESTS; do - gs -sDEVICE=jpeg -g640x480 -r110x110 -sNOPAUSE \ - -sOutputFile="${i}.${j}.jpg" ${i}.${j}.eps quit.ps - done -done - -exit 0 - diff --git a/TAO/orbsvcs/tests/EC_Multiple/gen_throughput b/TAO/orbsvcs/tests/EC_Multiple/gen_throughput deleted file mode 100755 index 6dce32939d0..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/gen_throughput +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# -# $Id$ -# - -HP_CONSUMERS="1 5 10 20" -# The number of high priority consumers. - -HP_SUPPLIERS="1 2 10" -# The number of high priority suppliers - -for s in $HP_SUPPLIERS; do - for c in $HP_CONSUMERS; do - grep TOTAL THR.LCL.S${s}.C${c}.*.log | - sed -e "s/THR.LCL.S${s}.C${c}.I//" -e 's/\.log:Time\[TOTAL\]://' | - nawk -v f=$s '{print 1000000 / $1, $2 * f / 500 / $1}' | - sort -n > THR.LCL.S${s}.C${c}.data - done -done - -cat >/tmp/genthr.$$ <>/tmp/genthr.$$ < UTL.XLCL.${w}.LP.histo - ./histo.pl -k 'Laxity\[LCL,HP' UTL.LCL.${w}.log > UTL.XLCL.${w}.HP.histo - ./histo.pl -k 'Laxity\[LCL,LP' UTL.ECM1.${w}.log UTL.ECM2.${w}.log > UTL.LCL.${w}.LP.histo - ./histo.pl -k 'Laxity\[LCL,HP' UTL.ECM1.${w}.log UTL.ECM2.${w}.log > UTL.LCL.${w}.HP.histo -done - -HP_MSGS=200 -HP_CONSUMERS=1 - -LP_WORKLOAD=500 -LP_MSGS=50 -LP_CONSUMERS=1 - -WORK_USEC=118 - -# awk '{print $1, 100 * ($1 * 200 + 500 * 50) * 118 / $2}' | - -grep 'Min' UTL.XLCL.*.LP.histo | - sed -e 's/UTL.XLCL.//' -e s'/.LP.histo:Min://' -e 's/,//g' | - awk '{print $1, $6, $2, $4}' | - sort -n > UTL.XLCL.LP.LAX.data - -grep 'Min' UTL.XLCL.*.HP.histo | - sed -e 's/UTL.XLCL.//' -e s'/.HP.histo:Min://' -e 's/,//g' | - awk '{print $1, $6, $2, $4}' | - sort -n > UTL.XLCL.HP.LAX.data - -grep 'Min' UTL.LCL.*.LP.histo | - sed -e 's/UTL.LCL.//' -e s'/.LP.histo:Min://' -e 's/,//g' | - awk '{print $1, $6, $2, $4}' | - sort -n > UTL.LCL.LP.LAX.data - -grep 'Min' UTL.LCL.*.HP.histo | - sed -e 's/UTL.LCL.//' -e s'/.HP.histo:Min://' -e 's/,//g' | - awk '{print $1, $6, $2, $4}' | - sort -n > UTL.LCL.HP.LAX.data - -cat UTL.LCL.LP.LAX.data | - awk '{print ($1 * 4 + 500) * 118 / 1000, $2, $3, $4}' > UTL.LCL.LP.data -cat UTL.XLCL.LP.LAX.data | - awk '{print ($1 * 4 + 500) * 118 / 1000, $2, $3, $4}' > UTL.XLCL.LP.data -cat UTL.LCL.HP.LAX.data | - awk '{print ($1 * 4 + 500) * 118 / 1000, $2, $3, $4}' > UTL.LCL.HP.data -cat UTL.XLCL.HP.LAX.data | - awk '{print ($1 * 4 + 500) * 118 / 1000, $2, $3, $4}' > UTL.XLCL.HP.data - -exit 0 - -gnuplot <<_EOF_ -set grid xtics ytics -set terminal postscript eps color -set xlabel "CPU Utilization (percentage)" - -set ylabel "Minimum laxity for low-priority task" -set output "UTL.LCL.eps" -plot 'UTL.LCL.data' w l -#set terminal x11 -#plot 'UTL.LCL.data' w l -#pause 2 - -_EOF_ - -for i in UTL.*.eps; do - b=`basename $i .eps` - gs -sDEVICE=jpeg -g640x480 -r110x110 -sNOPAUSE \ - -sOutputFile="${b}.jpg" ${b}.eps quit.ps -done - -grep 'Time\[LCL,HP' UTL.LCL.*.log | sed -e 's/UTL.LCL.//' -e s'/.log:Time\[.*\]://' | awk '{if ($1 != 0) {print $2 / $1 / 200}}' - diff --git a/TAO/orbsvcs/tests/EC_Multiple/histo.pl b/TAO/orbsvcs/tests/EC_Multiple/histo.pl deleted file mode 100755 index dcd13f27320..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/histo.pl +++ /dev/null @@ -1,76 +0,0 @@ -# -# $Id$ -# -# Extract a histogram, minimum, maximum and average from a file, -# filtering by a given RE. -# - -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# The first three lines above let this script run without specifying the -# full path to perl, as long as it is in the user's PATH. -# Taken from perlrun man page. - -use Getopt::Std; - -$opt_k = 'Latency\[LCL,[A-Z]*\]'; -$opt_r = 1; - -getopts ('k:r:'); - -$max = 0; -$min = 0; -$sum = 0; -$sum2 = 0; -$n = 0; -%histo = (); - -while (<>) { - if (!m/^$opt_k/) { - next; - } - chop; - @f = split(/:/, $_); - if ($n == 0) { - $min = $f[1]; - $max = $f[1]; - $sum = $f[1]; - $sum2 = $f[1] * $f[1]; - $n = 1; - } else { - if ($min > $f[1]) { - $min = $f[1]; - } - if ($max < $f[1]) { - $max = $f[1]; - } - $sum += $f[1]; - $sum2 += $f[1] * $f[1]; - $n++; - } - $i = int ($f[1] * $opt_r); - $histo{"$i"}++; -} - -print "Latency results for $opt_k:\n"; -$s2 = $sum2 / ($n - 1) - $sum / $n * $sum / ($n - 1); -if ($s2 >= 0) { - $sigma = int(sqrt ( $s2 )); -} else { - print "Error: $sum, $sum2, $n\n"; - $sigma = $sum2; -} - -print "Min: $min,", - " Max: $max,", - " Avg: ", int($sum / $n), - " Dev: ", $sigma, - "\n"; - -while ( ($key,$value) = each %histo ) { - $t = ($key / $opt_r); - print $t, " ", 100 * $value / $n, "\n"; -} - diff --git a/TAO/orbsvcs/tests/EC_Multiple/run_dynamic b/TAO/orbsvcs/tests/EC_Multiple/run_dynamic deleted file mode 100755 index 7d2a0c94a99..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/run_dynamic +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# -# $Id$ -# - -if [ -z "$NameServicePort" ]; then - NameServicePort=0 - export NameServicePort -fi - -# The number of messages to send. -MSG_COUNT=100 - -# The number of high-priority consumers. -HP_CONSUMERS="1" - -# The number of high-priority suppliers -HP_SUPPLIERS="1" - -# The number of low-priority consumers -# LP_CONSUMERS="1 5 10 20" -LP_CONSUMERS="1 10 100 200 300 500 1000" - -HP_INTERVAL=250000 -LP_INTERVAL=250000 - -######## -######## Enable signal handler. -######## -done=0 -trap 'done=1; \ - if [ "$NameServicePID" ]; then \ - kill -1 $NameServicePID; NameServicePID=; \ - fi; \ - /bin/rm -f NameService.ior' 0 1 2 3 15 - - -for s in $HP_SUPPLIERS; do - for c in $LP_CONSUMERS; do - ../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -ORBobjrefstyle url -o NameService.ior >/dev/null 2>&1 & - NameServicePID=$! - sleep 2 - while [ ! -f NameService.ior -a $done -eq 0 ]; do - echo waiting for NameService.ior; sleep 2 - done - NameService=`cat NameService.ior` - export NameService - - echo Consumers = $c Suppliers = $s -# ./EC_Multiple -ORBport 0 -l ECM3 -s local -d sched \ -# -h ${s},${s},0,${HP_INTERVAL},${MSG_COUNT},1,2,1,2 \ -# -w 1,${c},0,${LP_INTERVAL},${MSG_COUNT},3,4,3,4 > \ -# DYN.LCL.S${s}.C${c}.log 2>&1 - ./EC_Multiple -ORBport 0 -l ECM3 -s runtime \ - -h ${s},${s},0,${HP_INTERVAL},${MSG_COUNT},1,2,1,2 \ - -w 1,${c},0,${LP_INTERVAL},${MSG_COUNT},3,4,3,4 > \ - DYN.LCL.S${s}.C${c}.log 2>&1 - - if [ $done -eq 1 ]; then exit 1; fi - - kill -1 $NameServicePID; NameServicePID= - done -done diff --git a/TAO/orbsvcs/tests/EC_Multiple/run_latency b/TAO/orbsvcs/tests/EC_Multiple/run_latency deleted file mode 100755 index 70fe09d3446..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/run_latency +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -# -# $Id$ -# - -if [ -z "$NameServicePort" ]; then - NameServicePort=0 - export NameServicePort -fi - -# The number of messages to send. -MSG_COUNT=100 - -# The number of high-priority consumers. -HP_CONSUMERS="1 5 10 20" - -# The number of high-priority suppliers -HP_SUPPLIERS="1 2 10" - -HP_INTERVAL=250000 - -/bin/rm -f NameService.ior NameService.pid EC1.pid EC2.pid EC.pid - -for s in $HP_SUPPLIERS; do - for c in $HP_CONSUMERS; do - ../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -o NameService.ior -p NameService.pid >/dev/null 2>&1 & - sleep 2 - NameService=`cat NameService.ior` - export NameService - - echo Consumers = $c Suppliers = $s - ./EC_Multiple -ORBport 0 -l ECM1 -p ECM1.pid -s runtime \ - -h ${s},${c},0,${HP_INTERVAL},${MSG_COUNT},1,2,1,2 > \ - LTC.LCL.S${s}.C${c}.log 2>&1 - kill `cat NameService.pid` - - ../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -o NameService.ior -p NameService.pid >/dev/null 2>&1 & - sleep 2 - NameService=`cat NameService.ior` - export NameService - - ./EC_Multiple -ORBport 0 -l ECM1 -r ECM2 -p ECM1.pid -s runtime \ - -h ${s},${c},0,${HP_INTERVAL},${MSG_COUNT},1,2,1,3 > \ - LTC.ECM1.S${s}.C${c}.log 2>&1 & - ./EC_Multiple -ORBport 0 -l ECM2 -r ECM1 -p ECM2.pid -s runtime \ - -h ${s},${c},0,${HP_INTERVAL},${MSG_COUNT},4,3,4,2 > \ - LTC.ECM2.S${s}.C${c}.log 2>&1 & - sleep 2 - wait `cat ECM1.pid` - wait `cat ECM2.pid` - kill `cat NameService.pid` - done -done diff --git a/TAO/orbsvcs/tests/EC_Multiple/run_overhead b/TAO/orbsvcs/tests/EC_Multiple/run_overhead deleted file mode 100755 index fb77d3d7b93..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/run_overhead +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -# -# $Id$ -# - -if [ -z "$NameServicePort" ]; then - NameServicePort=0 - export NameServicePort -fi - -MSG_INTERVAL=5000 # 50000 -# The interval between the messages, in usecs - -UTL_COUNT=50000 # 500000 -# The number of iterations in the scavenger thread; each iteration is -# (roughly) 20 usecs (On a Sparc Ultra 30); and the number of -# iterations must be high enough so all the messages are sent while -# the scavenger is still running. - -MSG_COUNTS="1 50 100 150 200 250 300 350 400 450 500 550 600 650 700 " -"750 800 850 900 950 1000" -# The number of messages sent on each test... - -RPT_ITER="01 02 03 04 05 06 07 08 09 10" -# The iterations for the final test. - -RPT_MSGS=1000 -# The number of messages in the final test. - -/bin/rm -f NameService.ior NameService.pid EC1.pid EC2.pid EC.pid - -for i in $RPT_ITER; do - echo Short circuit RPT test $i - sleep 1 - ./EC_Multiple -ORBport 0 -l EC1 -s RUNTIME1 \ - -a 1 -b 2 -c 2 -p EC1.pid -m $RPT_MSGS -u $UTL_COUNT \ - -i $MSG_INTERVAL -x > OVH.RPT.X.${i}.log 2>&1 - - echo Local RPT EC test $i - ../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -o NameService.ior -p NameService.pid >/dev/null 2>&1 & - sleep 2 - NameService=`cat NameService.ior` - export NameService - ./EC_Multiple -ORBport 0 -l EC1 -s RUNTIME1 \ - -a 1 -b 2 -c 2 -p EC1.pid -m $RPT_MSGS -u $UTL_COUNT \ - -i $MSG_INTERVAL > OVH.RPT.LCL.${i}.log 2>&1 - kill `cat NameService.pid` - - echo Remote RPT EC test $i - ../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -o NameService.ior -p NameService.pid >/dev/null 2>&1 & - sleep 2 - NameService=`cat NameService.ior` - export NameService - ./EC_Multiple -ORBport 0 -l EC1 -r EC2 -s RUNTIME1 -o RUNTIME2 \ - -a 1 -b 2 -c 3 -p EC1.pid -m $RPT_MSGS -u $UTL_COUNT \ - -i $MSG_INTERVAL > OVH.RPT.RMT1.${i}.log 2>&1 & - ./EC_Multiple -ORBport 0 -l EC2 -r EC1 -s RUNTIME2 -o RUNTIME1 \ - -a 4 -b 3 -c 2 -p EC2.pid -m $RPT_MSGS -u $UTL_COUNT \ - -i $MSG_INTERVAL > OVH.RPT.RMT2.${i}.log 2>&1 & - sleep 2 - wait `cat EC1.pid` - wait `cat EC2.pid` - kill `cat NameService.pid` - wait -done - -exit 0 - -# This tests prove that the overhead is linear on the number of -# messages... - -# Generate the baseline data, i.e. shortcircuit the EC. - -for i in $MSG_COUNTS; do - echo Short circuit test $i - sleep 1 - ./EC_Multiple -ORBport 0 -l EC1 -s RUNTIME1 \ - -a 1 -b 2 -c 2 -m $i -u $UTL_COUNT \ - -i $MSG_INTERVAL -x > OVH.X.${i}.log 2>&1 -done - -# Generate the local data, i.e. what is the overhead of using the local EC. -for i in $MSG_COUNTS; do - echo Local EC test $i - ../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -o NameService.ior -p NameService.pid >/dev/null 2>&1 & - sleep 2 - NameService=`cat NameService.ior` - export NameService - ./EC_Multiple -ORBport 0 -l EC1 -s RUNTIME1 \ - -a 1 -b 2 -c 2 -m $i -u $UTL_COUNT \ - -i $MSG_INTERVAL -p EC1.pid > OVH.LCL.${i}.log 2>&1 - kill `cat NameService.pid` -done - -# Generate the remote data, this test is much slower since the latency -# can be as high as 2 msec -for i in $MSG_COUNTS; do - echo Remote EC test $i - ../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -o NameService.ior -p NameService.pid >/dev/null 2>&1 & - sleep 2 - NameService=`cat NameService.ior` - export NameService - ./EC_Multiple -ORBport 0 -l EC1 -r EC2 -s RUNTIME1 -o RUNTIME2 \ - -a 1 -b 2 -c 3 -p EC1.pid -m $i -u $UTL_COUNT \ - -i $MSG_INTERVAL > OVH.RMT1.${i}.log 2>&1 & - ./EC_Multiple -ORBport 0 -l EC2 -r EC1 -s RUNTIME2 -o RUNTIME1 \ - -a 4 -b 3 -c 2 -p EC2.pid -m $i -u $UTL_COUNT \ - -i $MSG_INTERVAL > OVH.RMT2.${i}.log 2>&1 & - sleep 2 - wait `cat EC1.pid` - wait `cat EC2.pid` - kill `cat NameService.pid` - wait -done diff --git a/TAO/orbsvcs/tests/EC_Multiple/run_schedule b/TAO/orbsvcs/tests/EC_Multiple/run_schedule deleted file mode 100755 index 310f36b567a..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/run_schedule +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# $Id$ -# - -if [ -z "$NameServicePort" ]; then - NameServicePort=0 - export NameServicePort -fi - -# The number of high-priority messages to send. -HP_MSG_COUNT=400 - -# The number of high-priority consumers. -HP_CONSUMERS=25 - -# The number of high-priority suppliers -HP_SUPPLIERS=10 - -# The number of low-priority messages to send. -LP_MSG_COUNT=10 - -# The number of low-priority consumers. -LP_CONSUMERS=5 - -# The number of low-priority suppliers -LP_SUPPLIERS=5 - -/bin/rm -f NameService.ior NameService.pid EC1.pid EC2.pid EC.pid - -../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -o NameService.ior -p NameService.pid >/dev/null 2>&1 & -sleep 2 -NameService=`cat NameService.ior` -export NameService - -./EC_Multiple -ORBport 0 -l ECM1 -r ECM2 -p ECM1.pid \ - -h ${HP_SUPPLIERS},${HP_CONSUMERS},1,${HP_MSG_COUNT},1,2,1,3 \ - -w ${LP_SUPPLIERS},${LP_CONSUMERS},1,${LP_MSG_COUNT},4,5,4,5 \ - -d SCHED_ECM1.cpp > SCH1.log 2>&1 & -./EC_Multiple -ORBport 0 -l ECM2 -r ECM1 -p ECM2.pid \ - -h ${HP_SUPPLIERS},${HP_CONSUMERS},1,${HP_MSG_COUNT},6,3,6,2 \ - -w ${LP_SUPPLIERS},${LP_CONSUMERS},1,${LP_MSG_COUNT},7,8,7,8 \ - -d SCHED_ECM2.cpp > SCH2.log 2>&1 & -sleep 2 -wait `cat ECM1.pid` -wait `cat ECM2.pid` -kill `cat NameService.pid` diff --git a/TAO/orbsvcs/tests/EC_Multiple/run_test.pl b/TAO/orbsvcs/tests/EC_Multiple/run_test.pl deleted file mode 100755 index df3183f0c3f..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/run_test.pl +++ /dev/null @@ -1,27 +0,0 @@ -# $Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -unshift @INC, '../../../../bin'; -require Process; - -$NS_ior = "NameService.ior"; -$sleeptime = 3; - -$NS = Process::Create ("../../Naming_Service/Naming_Service". - $Process::EXE_EXT." -o $NS_ior "); - -sleep $sleeptime; - -# This is a very simple test, no multiple consumers and no gateways. -$status = system ($EXEPREFIX."EC_Multiple".$Process::EXE_EXT. - " -s local"); - -$NS->Kill (); - -unlink $NS_ior; - -# @@ Capture any errors from the server too. -exit $status; diff --git a/TAO/orbsvcs/tests/EC_Multiple/run_throughput b/TAO/orbsvcs/tests/EC_Multiple/run_throughput deleted file mode 100755 index 256d6796c00..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/run_throughput +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# $Id$ -# - -if [ -z "$NameServicePort" ]; then - NameServicePort=0 - export NameServicePort -fi - -MSG_COUNT=500 -# The number of messages to send. - -HP_CONSUMERS="1 5 10 20" -# The number of high priority consumers. - -HP_SUPPLIERS="1 2 10" -# The number of high priority suppliers - -HP_INTERVALS="30000 25000 20000 19000 18000 17000 16000 15000 12000 10000" - -/bin/rm -f NameService.ior NameService.pid EC1.pid EC2.pid EC.pid - -for s in $HP_SUPPLIERS; do - for c in $HP_CONSUMERS; do - for i in $HP_INTERVALS; do - echo echo Supplier = $s Consumer = $c Interval = $i - ../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -o NameService.ior -p NameService.pid >/dev/null 2>&1 & - sleep 2 - NameService=`cat NameService.ior` - export NameService - - ./EC_Multiple -ORBport 0 -l ECM1 -p ECM1.pid -s runtime \ - -h ${s},${c},0,${i},${MSG_COUNT},1,2,1,2 > \ - THR.LCL.S${s}.C${c}.I${i}.log 2>&1 - kill `cat NameService.pid` - done - done -done diff --git a/TAO/orbsvcs/tests/EC_Multiple/run_utilization b/TAO/orbsvcs/tests/EC_Multiple/run_utilization deleted file mode 100755 index d92d9e5431e..00000000000 --- a/TAO/orbsvcs/tests/EC_Multiple/run_utilization +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# -# $Id$ - -if [ -z "$NameServicePort" ]; then - NameServicePort=0 - export NameServicePort -fi - -HP_WORKLOADS="0 60 65 70 72 74 76 78 80 81 82 83 84 85 86 87 88 89 90" -HP_MSGS=200 -HP_CONSUMERS=1 -HP_INTERVAL=25000 - -LP_WORKLOAD=500 -LP_MSGS=50 -LP_CONSUMERS=1 -LP_INTERVAL=100000 - -/bin/rm -f NameService.ior NameService.pid EC1.pid EC2.pid EC.pid - -# Generate the baseline data, i.e. shortcircuit the EC. - -for w in $HP_WORKLOADS; do - echo Local EC test $w - ../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -o NameService.ior -p NameService.pid >/dev/null 2>&1 & - sleep 2 - NameService=`cat NameService.ior` - export NameService - ./EC_Multiple -ORBport 0 -l ECM1 -s runtime -p ECM1.pid \ - -w 1,${LP_CONSUMERS},${LP_WORKLOAD},${LP_INTERVAL},${LP_MSGS},3,4,3,4 \ - -h 1,${HP_CONSUMERS},${w},${HP_INTERVAL},${HP_MSGS},1,2,1,2 > \ - UTL.LCL.${w}.log 2>&1 - - kill `cat NameService.pid` - - ../../Naming_Service/Naming_Service -ORBport $NameServicePort \ - -o NameService.ior -p NameService.pid >/dev/null 2>&1 & - sleep 2 - NameService=`cat NameService.ior` - export NameService - - ./EC_Multiple -ORBport 0 -l ECM1 -r ECM2 -s runtime -p ECM1.pid \ - -w 1,${LP_CONSUMERS},${LP_WORKLOAD},${LP_INTERVAL},${LP_MSGS},1,2,1,3 \ - -h 1,${HP_CONSUMERS},${w},${HP_INTERVAL},${HP_MSGS},4,5,4,6 > \ - UTL.ECM1.${w}.log 2>&1 & - ./EC_Multiple -ORBport 0 -l ECM2 -r ECM1 -s runtime -p ECM2.pid \ - -w 1,${LP_CONSUMERS},${LP_WORKLOAD},${LP_INTERVAL},${LP_MSGS},7,3,7,2 \ - -h 1,${HP_CONSUMERS},${w},${HP_INTERVAL},${HP_MSGS},8,6,8,5 > \ - UTL.ECM2.${w}.log 2>&1 & - - sleep 2 - wait `cat ECM1.pid` - wait `cat ECM2.pid` - kill `cat NameService.pid` - -done - -exit 0 diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp deleted file mode 100644 index 946d4cde39a..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp +++ /dev/null @@ -1,198 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/Sched_Params.h" - -#include "tao/Timeprobe.h" -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Time_Utilities.h" -#include "ECT_Consumer.h" - -ACE_RCSID(EC_Throughput, ECT_Consumer, "$Id$") - -Test_Consumer::Test_Consumer (ECT_Driver *driver, - void *cookie, - int n_suppliers) - : driver_ (driver), - cookie_ (cookie), - n_suppliers_ (n_suppliers), - recv_count_ (0), - shutdown_count_ (0) -{ -} - -void -Test_Consumer::connect (RtecScheduler::Scheduler_ptr scheduler, - const char* name, - int type_start, - int type_count, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& TAO_IN_ENV) -{ - RtecScheduler::handle_t rt_info = - scheduler->create (name, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - // The worst case execution time is far less than 2 - // milliseconds, but that is a safe estimate.... - ACE_Time_Value tv (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - scheduler->set (rt_info, - RtecScheduler::VERY_HIGH_CRITICALITY, - time, time, time, - 0, - RtecScheduler::VERY_LOW_IMPORTANCE, - time, - 0, - RtecScheduler::OPERATION, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - ACE_ConsumerQOS_Factory qos; - qos.start_disjunction_group (); - qos.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info); - for (int i = 0; i != type_count; ++i) - { - qos.insert_type (type_start + i, rt_info); - } - - // = Connect as a consumer. - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->for_consumers (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier_proxy_ = - consumer_admin->obtain_push_supplier (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - RtecEventComm::PushConsumer_var objref = this->_this (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier_proxy_->connect_push_consumer (objref.in (), - qos.get_ConsumerQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -Test_Consumer::disconnect (CORBA::Environment &TAO_IN_ENV) -{ - if (CORBA::is_nil (this->supplier_proxy_.in ())) - return; - - this->supplier_proxy_->disconnect_push_supplier (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier_proxy_ = - RtecEventChannelAdmin::ProxyPushSupplier::_nil (); - - // Deactivate the servant - PortableServer::POA_var poa = - this->_default_POA (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - PortableServer::ObjectId_var id = - poa->servant_to_id (this, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - poa->deactivate_object (id.in (), TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -Test_Consumer::dump_results (const char* name) -{ - ACE_Time_Value tv; - this->timer_.elapsed_time (tv); - double f = 1.0 / (tv.sec () + tv.usec () / 1000000.0); - double eps = this->recv_count_ * f; - - ACE_DEBUG ((LM_DEBUG, - "ECT_Consumer (%s):\n" - " Total time: %d.%08.8d (secs.usecs)\n" - " Total events: %d\n" - " Events per second: %.3f\n", - name, - tv.sec (), tv.usec (), - this->recv_count_, - eps)); -} - -void -Test_Consumer::push (const RtecEventComm::EventSet& events, - CORBA::Environment &TAO_IN_ENV) -{ - if (events.length () == 0) - { - // ACE_DEBUG ((LM_DEBUG, "no events\n")); - return; - } - - ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); - - // We start the timer as soon as we receive the first event... - if (this->recv_count_ == 0) - this->timer_.start (); - - this->recv_count_ += events.length (); - - if (TAO_debug_level > 0 - && this->recv_count_ % 1000 == 0) - { - ACE_DEBUG ((LM_DEBUG, - "ECT_Consumer (%P|%t): %d events received\n", - this->recv_count_)); - } - - // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ())); - - for (u_int i = 0; i < events.length (); ++i) - { - const RtecEventComm::Event& e = events[i]; - - if (e.header.type == ACE_ES_EVENT_SHUTDOWN) - { - this->shutdown_count_++; - if (this->shutdown_count_ >= this->n_suppliers_) - { - // We stop the timer as soon as we realize it is time to - // do so. - this->timer_.stop (); - this->driver_->shutdown_consumer (this->cookie_, TAO_IN_ENV); - } - } - else - { - ACE_hrtime_t creation; - ORBSVCS_Time::TimeT_to_hrtime (creation, - e.header.creation_time); - - ACE_hrtime_t ec_recv; - ORBSVCS_Time::TimeT_to_hrtime (ec_recv, - e.header.ec_recv_time); - - ACE_hrtime_t ec_send; - ORBSVCS_Time::TimeT_to_hrtime (ec_send, - e.header.ec_send_time); - - const ACE_hrtime_t now = ACE_OS::gethrtime (); - const ACE_hrtime_t elapsed = now - creation; - this->driver_->end_to_end (elapsed); - this->driver_->supplier_to_ec (ec_recv - creation); - this->driver_->inside_ec (ec_send - ec_recv); - this->driver_->ec_to_consumer (now - ec_send); - } - } -} - -void -Test_Consumer::disconnect_push_consumer (CORBA::Environment &) -{ -} - -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.dsp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.dsp deleted file mode 100644 index 9f5513e2610..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.dsp +++ /dev/null @@ -1,120 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ECT_Consumer" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=ECT_Consumer - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ECT_Consumer.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ECT_Consumer.mak" CFG="ECT_Consumer - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ECT_Consumer - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "ECT_Consumer - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ECT_Consumer - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 TAO.lib orbsvcs.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "ECT_Consumer - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "ECT_Consumer - Win32 Release" -# Name "ECT_Consumer - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter ".cpp" -# Begin Source File - -SOURCE=.\ECT_Consumer.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECT_Consumer_Driver.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECT_Driver.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter ".h" -# Begin Source File - -SOURCE=.\ECT_Consumer.h -# End Source File -# Begin Source File - -SOURCE=.\ECT_Consumer_Driver.h -# End Source File -# Begin Source File - -SOURCE=.\ECT_Driver.h -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h deleted file mode 100644 index 8b33409dd5b..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// This test to measure how many events per minute can the EC -// process, it also serves as an example how how to encode complex -// data types in a octet sequence. -// -// ============================================================================ - -#ifndef ECT_CONSUMER_H -#define ECT_CONSUMER_H - -#include "ace/Task.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/High_Res_Timer.h" -#include "orbsvcs/Channel_Clients_T.h" - -#include "ECT_Driver.h" - -class Test_Consumer : public POA_RtecEventComm::PushConsumer -{ - // = TITLE - // Receive the events. - // - // = DESCRIPTION - // This class is a consumer of events. It subscribes for a - // continous ranges of event types, this permits studying the - // effect of the number of subscriptions for each particular kind - // of event on the EC. - // -public: - Test_Consumer (ECT_Driver* driver, - void* cookie, - int n_suppliers); - - void connect (RtecScheduler::Scheduler_ptr scheduler, - const char* name, - int type_start, - int type_count, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); - // This method connects the consumer to the EC. - - void disconnect (CORBA::Environment &_env); - // Disconnect from the EC. - - void dump_results (const char* name); - // Print out the results - - virtual void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); - virtual void disconnect_push_consumer (CORBA::Environment &); - // The skeleton methods. - -private: - ECT_Driver* driver_; - // The main driver for the test. - - void* cookie_; - // A magic cookie passed by the driver that we pass back in our - // callbacks. - - int n_suppliers_; - // The number of suppliers that are feeding this consumer, we - // terminate once we receive a shutdown event from each supplier. - - RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; - // We talk to the EC using this proxy. - - ACE_SYNCH_MUTEX lock_; - int recv_count_; - ACE_High_Res_Timer timer_; - // How many events we have received. - - int shutdown_count_; - // How many shutdown events we have received. -}; - -#endif /* ECT_CONSUMER_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp deleted file mode 100644 index 79854c466af..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp +++ /dev/null @@ -1,332 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/Sched_Params.h" - -#include "tao/Timeprobe.h" -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Time_Utilities.h" -#include "ECT_Consumer_Driver.h" - -ACE_RCSID(EC_Throughput, ECT_Consumer_Driver, "$Id$") - -int -main (int argc, char *argv []) -{ - ECT_Consumer_Driver driver; - return driver.run (argc, argv); -} - -// **************************************************************** - -ECT_Consumer_Driver::ECT_Consumer_Driver (void) - : n_consumers_ (1), - n_suppliers_ (1), - type_start_ (ACE_ES_EVENT_UNDEFINED), - type_count_ (1), - pid_file_name_ (0), - active_count_ (0) -{ -} - -ECT_Consumer_Driver::~ECT_Consumer_Driver (void) -{ -} - -int -ECT_Consumer_Driver::run (int argc, char* argv[]) -{ - TAO_TRY - { - this->orb_ = - CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->parse_args (argc, argv)) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " consumers = <%d>\n" - " suppliers = <%d>\n" - " type_start = <%d>\n" - " type count = <%d>\n" - " pid file name = <%s>\n", - - this->n_consumers_, - this->n_suppliers_, - this->type_start_, - this->type_start_, - - this->pid_file_name_?this->pid_file_name_:"nil") ); - - if (this->pid_file_name_ != 0) - { - FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); - if (pid != 0) - { - ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); - ACE_OS::fclose (pid); - } - } - - int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. - - if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, - min_priority, - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - ACE_DEBUG ((LM_DEBUG, - "%s: user is not superuser, " - "so remain in time-sharing class\n", argv[0])); - else - ACE_ERROR ((LM_ERROR, - "%s: ACE_OS::sched_params failed\n", argv[0])); - } - - if (ACE_OS::thr_setprio (min_priority) == -1) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed," - "no real-time features\n")); - } - - CORBA::Object_var naming_obj = - this->orb_->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to get the Naming Service.\n"), - 1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - CosNaming::Name schedule_name (1); - schedule_name.length (1); - schedule_name[0].id = CORBA::string_dup ("ScheduleService"); - - CORBA::Object_var sched_obj = - naming_context->resolve (schedule_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - if (CORBA::is_nil (sched_obj.in ())) - return 1; - RtecScheduler::Scheduler_var scheduler = - RtecScheduler::Scheduler::_narrow (sched_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - CosNaming::Name name (1); - name.length (1); - name[0].id = CORBA::string_dup ("EventService"); - - CORBA::Object_var ec_obj = - naming_context->resolve (name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventChannelAdmin::EventChannel_var channel; - if (CORBA::is_nil (ec_obj.in ())) - channel = RtecEventChannelAdmin::EventChannel::_nil (); - else - channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->connect_consumers (scheduler.in (), channel.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected consumer(s)\n")); - - ACE_DEBUG ((LM_DEBUG, "running the test\n")); - if (this->orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - - this->dump_results (); - - this->disconnect_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - channel->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -void -ECT_Consumer_Driver::shutdown_consumer (void*, - CORBA::Environment &) -{ - // int ID = - // (ACE_reinterpret_cast(Test_Consumer**,consumer_cookie) - // - this->consumers_); - // - // ACE_DEBUG ((LM_DEBUG, "(%t) events received by consumer %d\n", ID)); - - ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); - this->active_count_--; - if (this->active_count_ <= 0) - this->orb_->shutdown (); -} - -void -ECT_Consumer_Driver::connect_consumers - (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr channel, - CORBA::Environment &TAO_IN_ENV) -{ - { - ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); - this->active_count_ = this->n_consumers_; - } - for (int i = 0; i < this->n_consumers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "consumer_%02.2d", i); - - ACE_NEW (this->consumers_[i], - Test_Consumer (this, - this->consumers_ + i, - this->n_suppliers_)); - - this->consumers_[i]->connect (scheduler, - buf, - this->type_start_, - this->type_count_, - channel, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECT_Consumer_Driver::dump_results (void) -{ - for (int i = 0; i < this->n_consumers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "consumer_%02.2d", i); - - this->consumers_[i]->dump_results (buf); - } - this->dump_latency_results ("Latency"); -} - -void -ECT_Consumer_Driver::disconnect_consumers (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->n_consumers_; ++i) - { - this->consumers_[i]->disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -int -ECT_Consumer_Driver::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "dc:s:h:p:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'c': - this->n_consumers_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 's': - this->n_suppliers_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'h': - { - char* aux; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - - this->type_start_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->type_count_ = ACE_OS::atoi (arg); - } - break; - - case 'p': - this->pid_file_name_ = get_opt.optarg; - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "[ORB options] " - "-c " - "-s " - "-h " - "-p " - "\n", - argv[0])); - return -1; - } - } - - if (this->n_suppliers_ <= 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: number of suppliers (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->n_suppliers_, - 1)); - this->n_suppliers_ = 1; - } - - if (this->n_consumers_ <= 0) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: number of consumers or " - "suppliers out of range\n", argv[0]), -1); - } - - if (this->type_count_ <= 0) - { - this->type_count_ = 1; - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: number of event types " - "suppliers out of range, reset to default (1)\n", - argv[0]), -1); - } - - return 0; -} diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h deleted file mode 100644 index 4eaf51054c6..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// This test to measure how many events per minute can the EC -// process, it also serves as an example how how to encode complex -// data types in a octet sequence. -// -// ============================================================================ - -#ifndef ECT_CONSUMER_DRIVER_H -#define ECT_CONSUMER_DRIVER_H - -#include "ace/Task.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/High_Res_Timer.h" -#include "orbsvcs/Channel_Clients_T.h" -#include "ECT_Driver.h" -#include "ECT_Consumer.h" - -class ECT_Consumer_Driver : public ECT_Driver -{ - // - // = TITLE - // - // = DESCRIPTION - // -public: - ECT_Consumer_Driver (void); - virtual ~ECT_Consumer_Driver (void); - - enum { - MAX_CONSUMERS = 16 - // Maximum number of consumers. - }; - - int run (int argc, char* argv[]); - // Execute the test. - - virtual void shutdown_consumer (void* consumer_cookie, - CORBA::Environment&); - // Callback method for consumers, each consumer will call this - // method once it receives all the shutdown events from the - // suppliers. - -private: - int parse_args (int argc, char* argv[]); - // parse the command line args - - void connect_consumers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - void disconnect_consumers (CORBA::Environment &_env); - // Connect and disconnect the consumers. - - void dump_results (void); - // Print out the results - -private: - Test_Consumer* consumers_[ECT_Consumer_Driver::MAX_CONSUMERS]; - // The consumer array. - - int n_consumers_; - // The number of consumers. - - int n_suppliers_; - // How many suppliers are sending events, used for shutdown, each - // supplier sends a shutdown message after it finishes, the consumer - // finishes when all the suppliers do. - - int type_start_; - int type_count_; - // We receive the events whose type is in the range - // [type_start,type_start+type_count) - - const char* pid_file_name_; - // The name of a file where the process stores its pid - - CORBA::ORB_var orb_; - // A reference to the ORB, to shut it down properly. - - ACE_SYNCH_MUTEX lock_; - int active_count_; - // How many consumers are still receiving events. -}; - -#endif /* ECT_CONSUMER_DRIVER_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp deleted file mode 100644 index 8f4b7103195..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// $Id$ - -#include "ECT_Driver.h" - -#if !defined (__ACE_INLINE__) -#include "ECT_Driver.i" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID(EC_Throughput, ECT_Driver, "$Id$") - -ECT_Driver::~ECT_Driver (void) -{ -} - -void -ECT_Driver::dump_latency_results (const char* d) -{ - this->end_to_end_.dump_results (d, "end to end"); - this->supplier_to_ec_.dump_results (d, "supplier to ec"); - this->inside_ec_.dump_results (d, "inside ec"); - this->ec_to_consumer_.dump_results (d, "ec to consumer"); -} - -// **************************************************************** - -void -ECT_Driver::Latency_Stats::dump_results (const char *description, - const char *desc2) -{ - if (this->n_ <= 1) - return; - - ACE_hrtime_t avg = this->sum_ / this->n_; - ACE_hrtime_t dev = - this->sum2_ / (this->n_ - 1) - - (this->sum_ / this->n_) * (this->sum_ / (this->n_ - 1)); - - double min_usec = ACE_CU64_TO_CU32 (this->min_) / 1000.0; - double max_usec = ACE_CU64_TO_CU32 (this->max_) / 1000.0; - double avg_usec = ACE_CU64_TO_CU32 (avg) / 1000.0; - double dev_usec = ACE_CU64_TO_CU32 (dev) / 1000.0; - ACE_DEBUG ((LM_DEBUG, - "%s (%s): %.2f/%.2f/%.2f/%.2f (min/avg/max/dev2) [usecs]\n", - description, desc2, - min_usec, avg_usec, max_usec, dev_usec)); -} diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h deleted file mode 100644 index 0124a535ba1..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// Abstract base class for the test driver, this let us implement a -// collocated and a non-collocated test. -// -// ============================================================================ - -#ifndef ECT_DRIVER_H -#define ECT_DRIVER_H - -#include "tao/corba.h" - -class ECT_Driver -{ - // - // = TITLE - // - // = DESCRIPTION - // -public: - virtual ~ECT_Driver (void); - - virtual void shutdown_consumer (void* consumer_cookie, - CORBA::Environment&) = 0; - // Callback method for consumers, each consumer will call this - // method once it receives all the shutdown events from the - // suppliers. - - void end_to_end (ACE_hrtime_t sample); - void supplier_to_ec (ACE_hrtime_t sample); - void inside_ec (ACE_hrtime_t sample); - void ec_to_consumer (ACE_hrtime_t sample); - - void dump_latency_results (const char* description); - - class Latency_Stats - { - // = TITLE - // Maintains latency statistics. - // - // = DESCRIPTION - // This class is used to keep latency statistics of the Event - // Channel, in the future we could keep a histogram, but at the - // moment we just keep track of minimum, maximum, average and - // variance. - // The data should be collected using the High Resolution - // timers. - public: - Latency_Stats (void); - - void dump_results (const char* description, - const char* description2); - - void sample (ACE_hrtime_t sample); - - private: - u_long n_; - ACE_hrtime_t sum_; - ACE_hrtime_t sum2_; - ACE_hrtime_t min_; - ACE_hrtime_t max_; - }; - -private: - Latency_Stats end_to_end_; - Latency_Stats supplier_to_ec_; - Latency_Stats inside_ec_; - Latency_Stats ec_to_consumer_; -}; - -#if defined (__ACE_INLINE__) -#include "ECT_Driver.i" -#endif /* __ACE_INLINE__ */ - -#endif /* ECT_CONSUMER_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.i b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.i deleted file mode 100644 index a0fabf450c8..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.i +++ /dev/null @@ -1,56 +0,0 @@ -// -// $Id$ -// - -ACE_INLINE -ECT_Driver::Latency_Stats::Latency_Stats (void) - : n_ (0), - sum_ (0), - sum2_ (0), - min_ (0), - max_ (0) -{ -} - -ACE_INLINE -void ECT_Driver::Latency_Stats::sample (ACE_hrtime_t sample) -{ - this->sum_ += sample; - this->sum2_ += sample * sample; - if (this->n_ == 0) - { - this->min_ = sample; - this->max_ = sample; - } - else if (this->min_ > sample) - this->min_ = sample; - else if (this->max_ < sample) - this->max_ = sample; - this->n_++; -} - -// **************************************************************** - -ACE_INLINE -void ECT_Driver::end_to_end (ACE_hrtime_t sample) -{ - this->end_to_end_.sample (sample); -} - -ACE_INLINE -void ECT_Driver::supplier_to_ec (ACE_hrtime_t sample) -{ - this->supplier_to_ec_.sample (sample); -} - -ACE_INLINE -void ECT_Driver::inside_ec (ACE_hrtime_t sample) -{ - this->inside_ec_.sample (sample); -} - -ACE_INLINE -void ECT_Driver::ec_to_consumer (ACE_hrtime_t sample) -{ - this->ec_to_consumer_.sample (sample); -} diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Scheduler_Info.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Scheduler_Info.h deleted file mode 100644 index 93b22e16916..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Scheduler_Info.h +++ /dev/null @@ -1,80 +0,0 @@ -// This file was automatically generated by Scheduler_Factory -// before editing the file please consider generating it again -// $Id$ - -#include "orbsvcs/Scheduler_Factory.h" - -static ACE_Scheduler_Factory::POD_RT_Info runtime_infos[] = { -{ "Reactor_Task-25000.us", 1, 0, 0, 0, 250000, - 4, 0, 0, 1, 8, 0, 0, 0 }, -{ "Reactor_Task-50000.us", 2, 0, 0, 0, 500000, - 4, 0, 0, 1, 6, 0, 0, 0 }, -{ "Reactor_Task-100000.us", 3, 0, 0, 0, 1000000, - 4, 0, 0, 1, 4, 0, 0, 0 }, -{ "Reactor_Task-200000.us", 4, 0, 0, 0, 2000000, - 4, 0, 0, 1, 2, 0, 0, 0 }, -{ "Reactor_Task-1000000.us", 5, 0, 0, 0, 10000000, - 4, 0, 0, 1, 0, 0, 0, 0 }, - -{ "ACE_ES_Dispatch_Queue-25000.us", 6, 0, 0, 0, 0, - 4, 0, 0, 1, 9, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-50000.us", 7, 0, 0, 0, 0, - 4, 0, 0, 1, 7, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-100000.us", 8, 0, 0, 0, 0, - 4, 0, 0, 1, 5, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-200000.us", 9, 0, 0, 0, 0, - 4, 0, 0, 1, 3, 0, 0, 0 }, -{ "ACE_ES_Dispatch_Queue-1000000.us", 10, 0, 0, 0, 0, - 4, 0, 0, 1, 1, 0, 0, 0 }, - -{ "supplier_00", 11, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 8, 0, 0, 0 }, -{ "supplier_01", 12, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 8, 0, 0, 0 }, -{ "supplier_02", 13, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 8, 0, 0, 0 }, -{ "supplier_03", 14, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 8, 0, 0, 0 }, -{ "supplier_04", 15, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 8, 0, 0, 0 }, -{ "supplier_05", 16, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 8, 0, 0, 0 }, -{ "supplier_06", 17, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 8, 0, 0, 0 }, -{ "supplier_07", 18, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 8, 0, 0, 0 }, -{ "supplier_08", 19, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 8, 0, 0, 0 }, -{ "supplier_09", 20, 20000, 20000, 20000, 250000, - 4, 0, 20000, 1, 8, 0, 0, 0 }, - -{ "consumer_00", 28, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 9, 0, 0, 0 }, -{ "consumer_01", 29, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 9, 0, 0, 0 }, -{ "consumer_02", 30, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 9, 0, 0, 0 }, -{ "consumer_03", 31, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 9, 0, 0, 0 }, -{ "consumer_04", 32, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 9, 0, 0, 0 }, -{ "consumer_05", 33, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 9, 0, 0, 0 }, -{ "consumer_06", 34, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 9, 0, 0, 0 }, -{ "consumer_07", 35, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 9, 0, 0, 0 }, -{ "consumer_08", 36, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 9, 0, 0, 0 }, -{ "consumer_09", 37, 20000, 20000, 20000, 0, - 4, 0, 20000, 0, 9, 0, 0, 0 } -}; - -static int runtime_infos_size = sizeof(runtime_infos)/sizeof(runtime_infos[0]); - -static ACE_Scheduler_Factory::POD_Config_Info runtime_configs[] = { -{ 0, 59, (RtecScheduler::Dispatching_Type_t) 0 } -}; -static int runtime_configs_size = sizeof(runtime_configs)/sizeof(runtime_configs[0]); - -// EOF diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp deleted file mode 100644 index ea94d0c59e2..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp +++ /dev/null @@ -1,247 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/Sched_Params.h" - -#include "tao/Timeprobe.h" -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Time_Utilities.h" -#include "ECT_Supplier.h" - -ACE_RCSID(EC_Throughput, ECT_Supplier, "$Id$") - -Test_Supplier::Test_Supplier (ECT_Driver *driver) - : driver_ (driver), - supplier_ (this), - burst_count_ (0), - burst_size_ (0), - event_size_ (0), - burst_pause_ (0), - type_start_ (ACE_ES_EVENT_UNDEFINED), - type_count_ (1) -{ -} - -void -Test_Supplier::connect (RtecScheduler::Scheduler_ptr scheduler, - const char* name, - int burst_count, - int burst_size, - int event_size, - int burst_pause, - int type_start, - int type_count, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment &TAO_IN_ENV) -{ - this->burst_count_ = burst_count; - this->burst_size_ = burst_size; - this->event_size_ = event_size; - this->burst_pause_ = burst_pause; - this->type_start_ = type_start; - this->type_count_ = type_count; - - RtecScheduler::handle_t rt_info = - scheduler->create (name, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - ACE_Time_Value tv (0, burst_pause); - RtecScheduler::Period_t rate = tv.usec () * 10; - - // The execution times are set to reasonable values, but - // actually they are changed on the real execution, i.e. we - // lie to the scheduler to obtain right priorities; but we - // don't care if the set is schedulable. - tv.set (0, 2000); - TimeBase::TimeT time; - ORBSVCS_Time::Time_Value_to_TimeT (time, tv); - scheduler->set (rt_info, - RtecScheduler::VERY_HIGH_CRITICALITY, - time, time, time, - rate, - RtecScheduler::VERY_LOW_IMPORTANCE, - time, - 1, - RtecScheduler::OPERATION, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->supplier_id_ = ACE::crc32 (name); - ACE_DEBUG ((LM_DEBUG, "ID for <%s> is %04.4x\n", name, - this->supplier_id_)); - - ACE_SupplierQOS_Factory qos; - for (int i = 0; i != type_count; ++i) - { - qos.insert (this->supplier_id_, - type_start + i, - rt_info, 1); - } - qos.insert (this->supplier_id_, - ACE_ES_EVENT_SHUTDOWN, - rt_info, 1); - - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - ec->for_suppliers (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->consumer_proxy_ = - supplier_admin->obtain_push_consumer (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - RtecEventComm::PushSupplier_var objref = - this->supplier_._this (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->consumer_proxy_->connect_push_supplier (objref.in (), - qos.get_SupplierQOS (), - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); -} - -void -Test_Supplier::disconnect (CORBA::Environment &TAO_IN_ENV) -{ - if (CORBA::is_nil (this->consumer_proxy_.in ())) - return; - - this->consumer_proxy_->disconnect_push_consumer (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - - this->consumer_proxy_ = - RtecEventChannelAdmin::ProxyPushConsumer::_nil (); - - // Deactivate the servant - PortableServer::POA_var poa = - this->supplier_._default_POA (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - PortableServer::ObjectId_var id = - poa->servant_to_id (&this->supplier_, TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - poa->deactivate_object (id.in (), TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - RtecEventChannelAdmin::ProxyPushConsumer::_nil (); -} - -int -Test_Supplier::svc () -{ - int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. - - if (ACE_OS::thr_setprio (min_priority) == -1) - { - ACE_ERROR ((LM_ERROR, "Test_Supplier::svc (%P|%t) " - "thr_setprio failed\n")); - } - - TAO_TRY - { - ACE_Time_Value tv (0, this->burst_pause_); - - ACE_Message_Block mb (this->event_size_); - mb.wr_ptr (this->event_size_); - - RtecEventComm::EventSet event (1); - event.length (1); - event[0].header.source = this->supplier_id (); - event[0].header.ttl = 1; - - ACE_hrtime_t t = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, t); - event[0].header.ec_recv_time = ORBSVCS_Time::zero; - event[0].header.ec_send_time = ORBSVCS_Time::zero; - - event[0].data.x = 0; - event[0].data.y = 0; - - // We use replace to minimize the copies, this should result - // in just one memory allocation; - event[0].data.payload.replace (this->event_size_, - &mb); - - this->timer_.start (); - for (int i = 0; i < this->burst_count_; ++i) - { - for (int j = 0; j < this->burst_size_; ++j) - { - event[0].header.type = - this->type_start_ + j % this->type_count_; - - ACE_hrtime_t now = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, - now); - // ACE_DEBUG ((LM_DEBUG, "(%t) supplier push event\n")); - this->consumer_proxy ()->push (event, TAO_TRY_ENV); - - TAO_CHECK_ENV; - } - ACE_OS::sleep (tv); - } - - // Send one event shutdown from each supplier - event[0].header.type = ACE_ES_EVENT_SHUTDOWN; - this->consumer_proxy ()->push(event, TAO_TRY_ENV); - TAO_CHECK_ENV; - this->timer_.stop (); - - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -void -Test_Supplier::disconnect_push_supplier (CORBA::Environment &) -{ -} - -int Test_Supplier::supplier_id (void) const -{ - return this->supplier_id_; -} - -RtecEventChannelAdmin::ProxyPushConsumer_ptr -Test_Supplier::consumer_proxy (void) -{ - return this->consumer_proxy_.in (); -} - -void -Test_Supplier::dump_results (const char* name) -{ - ACE_Time_Value tv; - this->timer_.elapsed_time (tv); - - int event_count = this->burst_count_ * this->burst_size_ + 1; - double f = 1.0 / (tv.sec () + tv.usec () / 1000000.0); - double eps = event_count * f; - - ACE_DEBUG ((LM_DEBUG, - "ECT_Supplier (%s):\n" - " Total time: %d.%08.8d (secs.usecs)\n" - " Total events: %d\n" - " Events per second: %.3f\n", - name, - tv.sec (), tv.usec (), - event_count, - eps)); -} - -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_PushSupplier_Adapter; -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_PushSupplier_Adapter -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.dsp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.dsp deleted file mode 100644 index 335541b26c2..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.dsp +++ /dev/null @@ -1,120 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ECT_Supplier" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=ECT_Supplier - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ECT_Supplier.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ECT_Supplier.mak" CFG="ECT_Supplier - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ECT_Supplier - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "ECT_Supplier - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ECT_Supplier - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 TAO.lib orbsvcs.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "ECT_Supplier - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "ECT_Supplier - Win32 Release" -# Name "ECT_Supplier - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter ".cpp" -# Begin Source File - -SOURCE=.\ECT_Driver.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECT_Supplier.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECT_Supplier_Driver.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter ".h" -# Begin Source File - -SOURCE=.\ECT_Driver.h -# End Source File -# Begin Source File - -SOURCE=.\ECT_Supplier.h -# End Source File -# Begin Source File - -SOURCE=.\ECT_Supplier_Driver.h -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h deleted file mode 100644 index 233e270f3d7..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// This is a helper class for the throughput tests of the Event -// Channel. -// -// ============================================================================ - -#ifndef ECT_SUPPLIER_H -#define ECT_SUPPLIER_H - -#include "ace/Task.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/High_Res_Timer.h" -#include "orbsvcs/Channel_Clients_T.h" -#include "ECT_Driver.h" - -class Test_Supplier : public ACE_Task -{ - // - // = TITLE - // Simplifies the supplier task startup. - // - // = DESCRIPTION - // -public: - Test_Supplier (ECT_Driver *driver); - - int svc (void); - // Run the test, just forwards to the driver - - void connect (RtecScheduler::Scheduler_ptr scheduler, - const char* name, - int burst_count, - int burst_size, - int event_size, - int burst_pause, - int type_start, - int type_count, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); - // This method connects the supplier to the EC. - - void disconnect (CORBA::Environment &_env); - // Disconnect from the EC. - - virtual void disconnect_push_supplier (CORBA::Environment &); - // The methods in the skeleton. - - RtecEventComm::EventSourceID supplier_id (void) const; - // The supplier ID. - - RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer_proxy (void); - // We talk to the EC (as a supplier) using this proxy, no duplicates - // are done here... - - void dump_results (const char* name); - // Dump the results... - -private: - ECT_Driver *driver_; - // Class we forward to. - - void *cookie_; - // The test provide us a cookie so we can give back our identity. - - RtecEventComm::EventSourceID supplier_id_; - // We generate an id based on the name.... - - RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; - // We talk to the EC (as a supplier) using this proxy. - - ACE_PushSupplier_Adapter supplier_; - // We also connect to the EC as a consumer so we can receive the - // timeout events. - - ACE_High_Res_Timer timer_; - // Measure the elapsed time spent while sending the events. - - int burst_count_; - int burst_size_; - int event_size_; - int burst_pause_; - int type_start_; - int type_count_; - // The test data. -}; - -#endif /* ECT_SUPPLIER_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp deleted file mode 100644 index a0aa22447ab..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp +++ /dev/null @@ -1,372 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/Sched_Params.h" - -#include "tao/Timeprobe.h" -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Time_Utilities.h" -#include "ECT_Supplier_Driver.h" - -ACE_RCSID(EC_Throughput, ECT_Supplier_Driver, "$Id$") - -int -main (int argc, char *argv []) -{ - ECT_Supplier_Driver driver; - return driver.run (argc, argv); -} - -// **************************************************************** - -ECT_Supplier_Driver::ECT_Supplier_Driver (void) - : n_suppliers_ (1), - burst_count_ (10), - burst_size_ (100), - event_size_ (128), - burst_pause_ (100), - type_start_ (ACE_ES_EVENT_UNDEFINED), - type_count_ (1), - pid_file_name_ (0) -{ -} - -ECT_Supplier_Driver::~ECT_Supplier_Driver (void) -{ -} - -void -ECT_Supplier_Driver::shutdown_consumer (void*, - CORBA::Environment &) -{ -} - -int -ECT_Supplier_Driver::run (int argc, char* argv[]) -{ - TAO_TRY - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->parse_args (argc, argv)) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " suppliers = <%d>\n" - " burst count = <%d>\n" - " burst size = <%d>\n" - " event size = <%d>\n" - " burst size = <%d>\n" - " type start = <%d>\n" - " type count = <%d>\n" - " pid file name = <%s>\n", - - this->n_suppliers_, - this->burst_count_, - this->burst_size_, - this->event_size_, - this->burst_pause_, - this->type_start_, - this->type_count_, - - this->pid_file_name_?this->pid_file_name_:"nil") ); - - if (this->pid_file_name_ != 0) - { - FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); - if (pid != 0) - { - ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); - ACE_OS::fclose (pid); - } - } - - int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. - - if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, - min_priority, - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - ACE_DEBUG ((LM_DEBUG, - "%s: user is not superuser, " - "so remain in time-sharing class\n", argv[0])); - else - ACE_ERROR ((LM_ERROR, - "%s: ACE_OS::sched_params failed\n", argv[0])); - } - - if (ACE_OS::thr_setprio (min_priority) == -1) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed," - "no real-time features\n")); - } - - CORBA::Object_var naming_obj = - orb->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to get the Naming Service.\n"), - 1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - CosNaming::Name schedule_name (1); - schedule_name.length (1); - schedule_name[0].id = CORBA::string_dup ("ScheduleService"); - - CORBA::Object_var sched_obj = - naming_context->resolve (schedule_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - if (CORBA::is_nil (sched_obj.in ())) - return 1; - RtecScheduler::Scheduler_var scheduler = - RtecScheduler::Scheduler::_narrow (sched_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - CosNaming::Name name (1); - name.length (1); - name[0].id = CORBA::string_dup ("EventService"); - - CORBA::Object_var ec_obj = - naming_context->resolve (name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventChannelAdmin::EventChannel_var channel; - if (CORBA::is_nil (ec_obj.in ())) - channel = RtecEventChannelAdmin::EventChannel::_nil (); - else - channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->connect_suppliers (scheduler.in (), - channel.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected supplier(s)\n")); - - this->activate_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "suppliers are active\n")); - - // Wait for the supplier threads... - if (ACE_Thread_Manager::instance ()->wait () == -1) - { - ACE_ERROR ((LM_ERROR, "Thread_Manager wait failed\n")); - return 1; - } - - ACE_DEBUG ((LM_DEBUG, "suppliers finished\n")); - - this->dump_results (); - - this->disconnect_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // @@ Deactivate the suppliers (as CORBA Objects?) - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("NON SYS EX"); - } - TAO_ENDTRY; - return 0; -} - -void -ECT_Supplier_Driver::connect_suppliers - (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr channel, - CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "supplier_%02.2d", i); - - ACE_NEW (this->suppliers_[i], Test_Supplier (this)); - - this->suppliers_[i]->connect (scheduler, - buf, - this->burst_count_, - this->burst_size_, - this->event_size_, - this->burst_pause_, - this->type_start_, - this->type_count_, - channel, - TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECT_Supplier_Driver::activate_suppliers (CORBA::Environment &) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - this->suppliers_[i]->activate (); - } -} - -void -ECT_Supplier_Driver::disconnect_suppliers (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - this->suppliers_[i]->disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECT_Supplier_Driver::dump_results (void) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "supplier_%02.2d", i); - - this->suppliers_[i]->dump_results (buf); - } -} - -int -ECT_Supplier_Driver::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "ds:u:n:t:b:h:p:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 's': - this->n_suppliers_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'u': - this->burst_count_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'n': - this->burst_size_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'b': - this->event_size_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 't': - this->burst_pause_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'h': - { - char* aux; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - - this->type_start_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->type_count_ = ACE_OS::atoi (arg); - } - break; - - case 'p': - this->pid_file_name_ = get_opt.optarg; - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "[ORB options] " - "-s " - "-u " - "-n " - "-b " - "-T " - "-h " - "-p " - "\n", - argv[0])); - return -1; - } - } - - if (this->burst_count_ <= 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: burst count (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->burst_count_, - 100)); - this->burst_count_ = 100; - } - - if (this->burst_size_ <= 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: burst size (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->burst_size_, - 10)); - this->burst_size_ = 10; - } - - if (this->event_size_ < 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: event size (%d) is out of range, " - "reseting to default (%d)\n", - argv[0], this->event_size_, - 128)); - this->event_size_ = 128; - } - - if (this->n_suppliers_ <= 0) - { - this->n_suppliers_ = 1; - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: number of suppliers out of range, " - "reset to default (%d)\n", - argv[0], 1), -1); - } - - return 0; -} diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h deleted file mode 100644 index a4294e0e929..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h +++ /dev/null @@ -1,92 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// This is a helper class for the throughput tests of the Event -// Channel. -// -// ============================================================================ - -#ifndef ECT_SUPPLIER_DRIVER_H -#define ECT_SUPPLIER_DRIVER_H - -#include "ace/Task.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/High_Res_Timer.h" -#include "orbsvcs/Channel_Clients_T.h" -#include "ECT_Driver.h" -#include "ECT_Supplier.h" - -class ECT_Supplier_Driver : public ECT_Driver -{ - // - // = TITLE - // - // = DESCRIPTION - // -public: - ECT_Supplier_Driver (void); - virtual ~ECT_Supplier_Driver (void); - - virtual void shutdown_consumer (void* consumer_cookie, - CORBA::Environment&); - // Not used.... - - enum { - MAX_SUPPLIERS = 16 - // Maximum number of suppliers. - }; - - int run (int argc, char* argv[]); - // Execute the test. - -private: - int parse_args (int argc, char* argv[]); - // parse the command line args - - void connect_suppliers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - void disconnect_suppliers (CORBA::Environment &_env); - // Connect the suppliers. - - void activate_suppliers (CORBA::Environment &_env); - // Activate the suppliers, i.e. they start generating events. - - void dump_results (void); - // Dump the results for each supplier. - -private: - Test_Supplier* suppliers_[ECT_Supplier_Driver::MAX_SUPPLIERS]; - // The suppliers array. - - int n_suppliers_; - // The number of suppliers. - - int burst_count_; - // How many bursts we will send from each supplier. - - int burst_size_; - // The number of events - - int event_size_; - // The size of the payload on each event. - - int burst_pause_; - // The time between each event burst, in microseconds. - - int type_start_; - int type_count_; - // We send two types of events, with different contents. - - const char* pid_file_name_; - // The name of a file where the process stores its pid -}; - -#endif /* ECT_SUPPLIER_DRIVER_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp deleted file mode 100644 index 7c76c40aca1..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp +++ /dev/null @@ -1,676 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" -#include "ace/Sched_Params.h" - -#include "tao/Timeprobe.h" -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Scheduler_Factory.h" -#include "orbsvcs/Time_Utilities.h" -#include "orbsvcs/Sched/Config_Scheduler.h" -#include "orbsvcs/Runtime_Scheduler.h" -#include "orbsvcs/Event/Event_Channel.h" -#include "orbsvcs/Event/Module_Factory.h" -#include "orbsvcs/Event/EC_Event_Channel.h" -#include "orbsvcs/Event/EC_Basic_Factory.h" -#include "orbsvcs/Event/EC_ConsumerAdmin.h" -#include "ECT_Throughput.h" - -ACE_RCSID(EC_Throughput, ECT_Throughput, "$Id$") - -int -main (int argc, char *argv []) -{ - ECT_Throughput driver; - return driver.run (argc, argv); -} - -// **************************************************************** - -ECT_Throughput::ECT_Throughput (void) - : n_consumers_ (1), - n_suppliers_ (1), - burst_count_ (10), - burst_size_ (100), - event_size_ (128), - burst_pause_ (100), - consumer_type_start_ (ACE_ES_EVENT_UNDEFINED), - consumer_type_count_ (1), - consumer_type_shift_ (0), - supplier_type_start_ (ACE_ES_EVENT_UNDEFINED), - supplier_type_count_ (1), - supplier_type_shift_ (0), - pid_file_name_ (0), - active_count_ (0), - reactive_ec_ (0), - new_ec_ (0), - ec_concurrency_hwm_ (1) -{ -} - -ECT_Throughput::~ECT_Throughput (void) -{ -} - -int -ECT_Throughput::run (int argc, char* argv[]) -{ - TAO_TRY - { - this->orb_ = - CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->parse_args (argc, argv)) - return 1; - - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " consumers = <%d>\n" - " suppliers = <%d>\n" - " burst count = <%d>\n" - " burst size = <%d>\n" - " event size = <%d>\n" - " burst size = <%d>\n" - " consumer type start = <%d>\n" - " consumer type count = <%d>\n" - " consumer type shift = <%d>\n" - " supplier type start = <%d>\n" - " supplier type count = <%d>\n" - " supplier type shift = <%d>\n" - " pid file name = <%s>\n" - " remote EC = <%d>\n" - " new EC = <%d>\n" - " concurrency HWM = <%d>\n", - - this->n_consumers_, - this->n_suppliers_, - this->burst_count_, - this->burst_size_, - this->event_size_, - this->burst_pause_, - this->consumer_type_start_, - this->consumer_type_count_, - this->consumer_type_shift_, - this->supplier_type_start_, - this->supplier_type_count_, - this->supplier_type_shift_, - - this->pid_file_name_?this->pid_file_name_:"nil", - this->reactive_ec_, - this->new_ec_, - this->ec_concurrency_hwm_ - ) ); - - if (this->pid_file_name_ != 0) - { - FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); - if (pid != 0) - { - ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); - ACE_OS::fclose (pid); - } - } - - int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. - - if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, - min_priority, - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - ACE_DEBUG ((LM_DEBUG, - "%s: user is not superuser, " - "so remain in time-sharing class\n", argv[0])); - else - ACE_ERROR ((LM_ERROR, - "%s: ACE_OS::sched_params failed\n", argv[0])); - } - - if (ACE_OS::thr_setprio (min_priority) == -1) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed," - "no real-time features\n")); - } - - CORBA::Object_var naming_obj = - this->orb_->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to get the Naming Service.\n"), - 1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - // This is the name we (potentially) register the Scheduling - // Service in the Naming Service. - CosNaming::Name schedule_name (1); - schedule_name.length (1); - schedule_name[0].id = CORBA::string_dup ("ScheduleService"); - -#if 1 - ACE_Config_Scheduler scheduler_impl; -#else -#include "ECT_Scheduler_Info.h" - ACE_Runtime_Scheduler scheduler_impl ( - runtime_configs_size, - runtime_configs, - runtime_infos_size, - runtime_infos); -#endif - RtecScheduler::Scheduler_var scheduler = - scheduler_impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - -#if 0 - CORBA::String_var str = - this->orb_->object_to_string (scheduler.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, "The (local) scheduler IOR is <%s>\n", - str.in ())); - - // Register the servant with the Naming Context.... - naming_context->rebind (schedule_name, scheduler.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_Scheduler_Factory::use_config (naming_context.in ()); -#endif /* 0 */ - - // The factories must be destroyed *after* the EC, hence the - // auto_ptr declarations must go first.... - auto_ptr module_factory; - auto_ptr ec_factory; - - auto_ptr ec_impl; - if (this->new_ec_ == 0) - { - - if (this->reactive_ec_ == 1) - { - module_factory = - auto_ptr (new TAO_Reactive_Module_Factory); - } - else - { - module_factory = - auto_ptr (new TAO_Default_Module_Factory); - } - - // Create the EC - ec_impl = - auto_ptr - (new ACE_EventChannel (scheduler.in (), - 1, - ACE_DEFAULT_EVENT_CHANNEL_TYPE, - module_factory.get ())); - } - else - { - ec_factory = - auto_ptr(new TAO_EC_Basic_Factory (root_poa.in ())); - - TAO_EC_Event_Channel* ec = - new TAO_EC_Event_Channel (ec_factory.get ()); - ec->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - ec->consumer_admin ()->busy_hwm (this->ec_concurrency_hwm_); - - ec_impl = - auto_ptr (ec); - } - - RtecEventChannelAdmin::EventChannel_var channel = - ec_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - poa_manager->activate (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->connect_consumers (scheduler.in (), channel.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected consumer(s)\n")); - - this->connect_suppliers (scheduler.in (), - channel.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "connected supplier(s)\n")); - - this->activate_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "suppliers are active\n")); - - ACE_DEBUG ((LM_DEBUG, "running the event loop\n")); - if (this->orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - -#if 0 - naming_context->unbind (schedule_name, TAO_TRY_ENV); - TAO_CHECK_ENV; -#endif - - // Wait for the supplier threads... - if (ACE_Thread_Manager::instance ()->wait () == -1) - { - ACE_ERROR ((LM_ERROR, "Thread_Manager wait failed\n")); - return 1; - } - - ACE_DEBUG ((LM_DEBUG, "suppliers finished\n")); - - this->dump_results (); - - { - // Deactivate the EC - PortableServer::POA_var poa = - ec_impl->_default_POA (TAO_TRY_ENV); - TAO_CHECK_ENV; - PortableServer::ObjectId_var id = - poa->servant_to_id (ec_impl.get (), TAO_TRY_ENV); - TAO_CHECK_ENV; - poa->deactivate_object (id.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - { - // Deactivate the Scheduler - PortableServer::POA_var poa = - scheduler_impl._default_POA (TAO_TRY_ENV); - TAO_CHECK_ENV; - PortableServer::ObjectId_var id = - poa->servant_to_id (&scheduler_impl, TAO_TRY_ENV); - TAO_CHECK_ENV; - poa->deactivate_object (id.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - this->disconnect_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->disconnect_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - channel->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("ECT_Throughput::run"); - } - TAO_CATCHALL - { - ACE_ERROR ((LM_ERROR, "non-corba exception raised\n")); - } - TAO_ENDTRY; - return 0; -} - -void -ECT_Throughput::shutdown_consumer (void*, - CORBA::Environment &) -{ - // int ID = - // (ACE_reinterpret_cast(Test_Consumer**,consumer_cookie) - // - this->consumers_); - // - // ACE_DEBUG ((LM_DEBUG, "(%t) events received by consumer %d\n", ID)); - - ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); - this->active_count_--; - if (this->active_count_ <= 0) - this->orb_->shutdown (); -} - -void -ECT_Throughput::connect_consumers - (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr channel, - CORBA::Environment &TAO_IN_ENV) -{ - { - ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); - this->active_count_ = this->n_consumers_; - } - for (int i = 0; i < this->n_consumers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "consumer_%02.2d", i); - - ACE_NEW (this->consumers_[i], - Test_Consumer (this, - this->consumers_ + i, - this->n_suppliers_)); - - int start = this->consumer_type_start_ - + i * this->consumer_type_shift_; - - this->consumers_[i]->connect (scheduler, - buf, - start, - this->consumer_type_count_, - channel, - TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - } -} - -void -ECT_Throughput::connect_suppliers - (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr channel, - CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "supplier_%02.2d", i); - - ACE_NEW (this->suppliers_[i], Test_Supplier (this)); - - int start = this->supplier_type_start_ + i*this->supplier_type_shift_; - this->suppliers_[i]->connect (scheduler, - buf, - this->burst_count_, - this->burst_size_, - this->event_size_, - this->burst_pause_, - start, - this->supplier_type_count_, - channel, - TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - } -} - -void -ECT_Throughput::activate_suppliers (CORBA::Environment &) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - this->suppliers_[i]->activate (); - } -} - -void -ECT_Throughput::disconnect_suppliers (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->n_suppliers_; ++i) - { - this->suppliers_[i]->disconnect (TAO_IN_ENV); - if (TAO_IN_ENV.exception () != 0) return; - } -} - -void -ECT_Throughput::disconnect_consumers (CORBA::Environment &TAO_IN_ENV) -{ - for (int i = 0; i < this->n_consumers_; ++i) - { - this->consumers_[i]->disconnect (TAO_IN_ENV); - TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV); - } -} - -void -ECT_Throughput::dump_results (void) -{ - for (int j = 0; j < this->n_consumers_; ++j) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "consumer_%02.2d", j); - - this->consumers_[j]->dump_results (buf); - } - for (int i = 0; i < this->n_suppliers_; ++i) - { - char buf[BUFSIZ]; - ACE_OS::sprintf (buf, "supplier_%02.2d", i); - - this->suppliers_[i]->dump_results (buf); - } - this->dump_latency_results ("Latency"); -} - -int -ECT_Throughput::parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "rdc:s:u:n:t:b:h:l:p:m:w:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'r': - this->new_ec_ = 0; - this->reactive_ec_ = 1; - break; - - case 'm': - if (ACE_OS::strcasecmp (get_opt.optarg, "rt") == 0) - { - this->new_ec_ = 0; - this->reactive_ec_ = 0; - } - else if (ACE_OS::strcasecmp (get_opt.optarg, "st") == 0) - { - this->new_ec_ = 0; - this->reactive_ec_ = 1; - } - else if (ACE_OS::strcasecmp (get_opt.optarg, "new") == 0) - { - this->new_ec_ = 1; - this->reactive_ec_ = 1; - } - else - { - ACE_DEBUG ((LM_DEBUG, - "Unknown mode <%s> " - "default is rt\n", - get_opt.optarg)); - this->new_ec_ = 0; - this->reactive_ec_ = 0; - } - break; - - case 'c': - this->n_consumers_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 's': - this->n_suppliers_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'u': - this->burst_count_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'n': - this->burst_size_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'b': - this->event_size_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 't': - this->burst_pause_ = ACE_OS::atoi (get_opt.optarg); - break; - - case 'h': - { - char* aux; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - - this->consumer_type_start_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->consumer_type_count_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->consumer_type_shift_ = ACE_OS::atoi (arg); - } - break; - - case 'l': - { - char* aux; - char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); - - this->supplier_type_start_ = ACE_ES_EVENT_UNDEFINED + ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->supplier_type_count_ = ACE_OS::atoi (arg); - arg = ACE_OS::strtok_r (0, ",", &aux); - this->supplier_type_shift_ = ACE_OS::atoi (arg); - } - break; - - case 'p': - this->pid_file_name_ = get_opt.optarg; - break; - - case 'w': - this->ec_concurrency_hwm_ = ACE_OS::atoi (get_opt.optarg); - break; - - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "[ORB options] " - "-c " - "-s " - "-u " - "-n " - "-b " - "-t " - "-h " - "-l " - "-p " - "-w " - "-r " - "\n", - argv[0])); - return -1; - } - } - - if (this->burst_count_ <= 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: burst count (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->burst_count_, - 100)); - this->burst_count_ = 100; - } - - if (this->burst_size_ <= 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: burst size (%d) is out of range, " - "reset to default (%d)\n", - argv[0], this->burst_size_, - 10)); - this->burst_size_ = 10; - } - - if (this->event_size_ < 0) - { - ACE_DEBUG ((LM_DEBUG, - "%s: event size (%d) is out of range, " - "reseting to default (%d)\n", - argv[0], this->event_size_, - 128)); - this->event_size_ = 128; - } - - if (this->n_consumers_ < 0 - || this->n_consumers_ >= ECT_Throughput::MAX_CONSUMERS) - { - this->n_consumers_ = 1; - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: number of consumers or " - "suppliers out of range, " - "reset to default (%d)\n", - argv[0], 1), -1); - } - - if (this->n_suppliers_ < 0 - || this->n_suppliers_ >= ECT_Throughput::MAX_SUPPLIERS) - { - this->n_suppliers_ = 1; - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: number of suppliers out of range, " - "reset to default (%d)\n", - argv[0], 1), -1); - } - - if (this->n_suppliers_ == 0 && this->n_consumers_ == 0) - { - this->n_suppliers_ = 1; - this->n_consumers_ = 1; - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: no suppliers or consumers, " - "reset to default (%d of each)\n", - argv[0], 1), -1); - } - - if (this->ec_concurrency_hwm_ <= 0) - { - this->ec_concurrency_hwm_ = 1; - ACE_ERROR_RETURN ((LM_DEBUG, - "%s: invalid concurrency HWM, " - "reset to default (%d)\n", - argv[0], 1), -1); - } - - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Auto_Basic_Ptr; -template class auto_ptr; -template class ACE_Auto_Basic_Ptr; -template class auto_ptr; -template class ACE_Auto_Basic_Ptr; -template class auto_ptr; -template class ACE_Auto_Basic_Ptr; -template class auto_ptr; - -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate auto_ptr -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate auto_ptr -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate auto_ptr -#pragma instantiate ACE_Auto_Basic_Ptr -#pragma instantiate auto_ptr - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.dsp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.dsp deleted file mode 100644 index 3c14769a966..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.dsp +++ /dev/null @@ -1,123 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ECT_Throughput" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=ECT_Throughput - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ECT_Throughput.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ECT_Throughput.mak" CFG="ECT_Throughput - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ECT_Throughput - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "ECT_Throughput - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ECT_Throughput - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 TAO.lib orbsvcs.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "ECT_Throughput - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "ECT_Throughput - Win32 Release" -# Name "ECT_Throughput - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter ".cpp" -# Begin Source File - -SOURCE=.\ECT_Consumer.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECT_Driver.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECT_Supplier.cpp -# End Source File -# Begin Source File - -SOURCE=.\ECT_Throughput.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter ".h" -# Begin Source File - -SOURCE=.\ECT_Consumer.h -# End Source File -# Begin Source File - -SOURCE=.\ECT_Supplier.h -# End Source File -# Begin Source File - -SOURCE=.\ECT_Throughput.h -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h deleted file mode 100644 index 47d1ff7dacd..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = DESCRIPTION -// This is a helper class for the throughput tests of the Event -// Channel. -// Used for the collocated test. -// -// ============================================================================ - -#ifndef ECT_THROUGHPUT_H -#define ECT_THROUGHPUT_H - -#include "ECT_Driver.h" -#include "ECT_Consumer.h" -#include "ECT_Supplier.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class ECT_Throughput : public ECT_Driver -{ - // - // = TITLE - // - // = DESCRIPTION - // -public: - ECT_Throughput (void); - - virtual ~ECT_Throughput (void); - - enum { - MAX_CONSUMERS = 16, - // Maximum number of consumers. - MAX_SUPPLIERS = 16 - // Maximum number of suppliers. - }; - - int run (int argc, char* argv[]); - // Execute the test. - - virtual void shutdown_consumer (void* consumer_cookie, - CORBA::Environment&); - // Callback method for consumers, each consumer will call this - // method once it receives all the shutdown events from the - // suppliers. - -private: - int parse_args (int argc, char* argv[]); - // parse the command line args - - void connect_consumers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - void disconnect_consumers (CORBA::Environment &_env); - // Connect and disconnect the consumers. - - void connect_suppliers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); - void disconnect_suppliers (CORBA::Environment &_env); - // Connect the suppliers. - - void activate_suppliers (CORBA::Environment &_env); - // Activate the suppliers, i.e. they start generating events. - - void dump_results (void); - // Dump the results for each supplier. - -private: - Test_Consumer* consumers_[ECT_Throughput::MAX_CONSUMERS]; - // The consumer array. - - int n_consumers_; - // The number of consumers. - - Test_Supplier* suppliers_[ECT_Throughput::MAX_SUPPLIERS]; - // The suppliers array. - - int n_suppliers_; - // The number of suppliers. - - int burst_count_; - // How many bursts we will send from each supplier. - - int burst_size_; - // The number of events - - int event_size_; - // The size of the payload on each event. - - int burst_pause_; - // The time between each event burst, in microseconds. - - int consumer_type_start_; - int consumer_type_count_; - int consumer_type_shift_; - // The consumers subscribe to different sets of events, as follows: - // Consumer0: [start , start + count) - // Consumer1: [start + 1*shift, start + 1*shift + count) - // Consumer2: [start + 2*shift, start + 2*shift + count) - // And so on. - - int supplier_type_start_; - int supplier_type_count_; - int supplier_type_shift_; - // The suppliers generate different sets of events, as follows: - // Supplier0: [start , start + count) - // Supplier1: [start + 1*shift, start + 1*shift + count) - // Supplier2: [start + 2*shift, start + 2*shift + count) - // And so on. - - const char* pid_file_name_; - // The name of a file where the process stores its pid - - CORBA::ORB_var orb_; - // A reference to the ORB, to shut it down properly. - - ACE_SYNCH_MUTEX lock_; - int active_count_; - // How many consumers are still receiving events. - - int reactive_ec_; - // If not zero then we use a reactive EC. - - int new_ec_; - // If not zero then we use the new EC implementation - - int ec_concurrency_hwm_; - // Set the HWM for the concurrency in the EC. -}; - -#endif /* ECT_TRHOUGHPUT_H */ diff --git a/TAO/orbsvcs/tests/EC_Throughput/EC_Throughput.dsw b/TAO/orbsvcs/tests/EC_Throughput/EC_Throughput.dsw deleted file mode 100644 index 0df7f2ed0f6..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/EC_Throughput.dsw +++ /dev/null @@ -1,53 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "ECT_Consumer"=.\ECT_Consumer.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "ECT_Supplier"=.\ECT_Supplier.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "ECT_Throughput"=.\ECT_Throughput.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/EC_Throughput/Makefile b/TAO/orbsvcs/tests/EC_Throughput/Makefile deleted file mode 100644 index ec31619affe..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/Makefile +++ /dev/null @@ -1,292 +0,0 @@ -# $Id$ - -BIN = ECT_Supplier ECT_Consumer ECT_Throughput - -LDLIBS= -lorbsvcs -lTAO - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_ROOT) - -ECT_Supplier_OBJS=$(addsuffix .o,ECT_Supplier ECT_Driver ECT_Supplier_Driver) -ECT_Consumer_OBJS=$(addsuffix .o,ECT_Consumer ECT_Driver ECT_Consumer_Driver) -ECT_Throughput_OBJS=$(addsuffix .o,ECT_Throughput ECT_Driver ECT_Consumer ECT_Supplier) - -SRC = $(addsuffix .cpp, $(BIN)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU - -#### Local rules and variables... - -ECT_Supplier: $(addprefix $(VDIR),$(ECT_Supplier_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -ECT_Consumer: $(addprefix $(VDIR),$(ECT_Consumer_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -ECT_Throughput: $(addprefix $(VDIR),$(ECT_Throughput_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -realclean: - $(RM) -f $(BIN) - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/ECT_Supplier.o .obj/ECT_Supplier.so .shobj/ECT_Supplier.o .shobj/ECT_Supplier.so: ECT_Supplier.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - ECT_Supplier.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp \ - ECT_Driver.h ECT_Driver.i -.obj/ECT_Consumer.o .obj/ECT_Consumer.so .shobj/ECT_Consumer.o .shobj/ECT_Consumer.so: ECT_Consumer.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - ECT_Consumer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp \ - ECT_Driver.h ECT_Driver.i -.obj/ECT_Throughput.o .obj/ECT_Throughput.so .shobj/ECT_Throughput.o .shobj/ECT_Throughput.so: ECT_Throughput.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Auto_Ptr.h \ - $(ACE_ROOT)/ace/Auto_Ptr.i \ - $(ACE_ROOT)/ace/Auto_Ptr.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor.h \ - $(ACE_ROOT)/ace/Select_Reactor_T.h \ - $(ACE_ROOT)/ace/Select_Reactor_Base.h \ - $(ACE_ROOT)/ace/Token.h \ - $(ACE_ROOT)/ace/Token.i \ - $(ACE_ROOT)/ace/Pipe.h \ - $(ACE_ROOT)/ace/Pipe.i \ - $(ACE_ROOT)/ace/Select_Reactor_Base.i \ - $(ACE_ROOT)/ace/Select_Reactor_T.cpp \ - $(ACE_ROOT)/ace/Timer_Heap.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.h \ - $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ - $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(ACE_ROOT)/ace/Timer_List.h \ - $(ACE_ROOT)/ace/Timer_List_T.h \ - $(ACE_ROOT)/ace/Timer_List_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Module_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Event_Channel.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Event_Channel.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Basic_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Basic_Factory.i \ - ECT_Throughput.h ECT_Driver.h ECT_Driver.i ECT_Consumer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp \ - ECT_Supplier.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/EC_Throughput/README b/TAO/orbsvcs/tests/EC_Throughput/README deleted file mode 100644 index 9155815802b..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/README +++ /dev/null @@ -1,34 +0,0 @@ -# $Id$ - - This test tries to stress the Event_Service by sending events -in bursts, the user can control the size of the events, the size of -the burst, the number of bursts and the time between the bursts, the -number of suppliers and the number of consumers. - - There are two versions of the test, a collocated version and a -version using a remote event channel. - - Both versions require a Naming Service, a usual execution for -the collocated test would be: - -# Each command in a separate shell or window: -$ ../../Naming_Service/Naming_Service -$ ./ECT_Throughput - - and for the non-collocated test: - -# Each command in a separate shell or window: -$ ../../Naming_Service/Naming_Service -$ ../../Event_Service/Event_Service -$ ../../ECT_Consumer -$ ../../ECT_Supplier - - It is important that the consumer knows exactly how many -suppliers are sending events, otherwise it cannot terminate properly, -a typical use would be: - -# Each command in a separate shell or window: -$ ../../Naming_Service/Naming_Service -$ ../../Event_Service/Event_Service -$ ../../ECT_Consumer -s 4 -$ ../../ECT_Supplier -s 4 diff --git a/TAO/orbsvcs/tests/EC_Throughput/run_test.pl b/TAO/orbsvcs/tests/EC_Throughput/run_test.pl deleted file mode 100755 index 6a2a01a8bd8..00000000000 --- a/TAO/orbsvcs/tests/EC_Throughput/run_test.pl +++ /dev/null @@ -1,32 +0,0 @@ -# $Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -unshift @INC, '../../../../bin'; -require Process; - -$NS_ior = "NameService.ior"; -$sleeptime = 5; - -$NS = Process::Create ("..".$DIR_SEPARATOR. - "..".$DIR_SEPARATOR. - "Naming_Service".$DIR_SEPARATOR. - "Naming_Service".$Process::EXE_EXT. - " -o $NS_ior "); - -sleep $sleeptime; - -$T = Process::Create ($EXEPREFIX."ECT_Throughput".$Process::EXE_EXT); - -sleep $sleeptime; - -$T->Wait (); - -$NS->Kill (); $NS->Wait (); - -unlink $NS_ior; - -# @@ Capture the errors from the processes. -exit 0; diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp deleted file mode 100644 index 5cf5c6138ef..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp +++ /dev/null @@ -1,983 +0,0 @@ -// $Id$ - -#if defined (ACE_HAS_QUANTIFY) -# include -#endif /* ACE_HAS_QUANTIFY */ - -#include "ace/Get_Opt.h" -#include "ace/Sched_Params.h" -#include "ace/Profile_Timer.h" - -#include "orbsvcs/Event_Utilities.h" -#include "orbsvcs/Event_Service_Constants.h" -#include "orbsvcs/Scheduler_Factory.h" -#include "orbsvcs/Time_Utilities.h" -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "Event_Latency.h" - -#include "tao/Timeprobe.h" - -ACE_RCSID(Event_Latency, Event_Latency, "$Id$") - -#if defined (ACE_ENABLE_TIMEPROBES) - -static const char *Event_Latency_Timeprobe_Description[] = -{ - "push event to consumer", - "start with new event in Supplier", - "supplier starts pushing event", - "supplier ends pushing event" -}; - -enum -{ - // Timeprobe description table start key - EVENT_LATENCY_PUSH_EVENT_TO_CONSUMER = 20000, - EVENT_LATENCY_START_WITH_NEW_EVENT_IN_SUPPLIER, - EVENT_LATENCY_SUPPLIER_STARTS_PUSHING_EVENT, - EVENT_LATENCY_SUPPLIER_ENDS_PUSHING_EVENT -}; - -// Setup Timeprobes -ACE_TIMEPROBE_EVENT_DESCRIPTIONS (Event_Latency_Timeprobe_Description, - EVENT_LATENCY_PUSH_EVENT_TO_CONSUMER); - -#endif /* ACE_ENABLE_TIMEPROBES */ - -static const char usage [] = "[-? |\n" -" [-c [1]]\n" -" [-d directly connect all consumers/suppliers\n" -" [-j to collect jitter statistics]\n" -" [-m of messages to send [10]]\n" -" [-s , [1]]\n" -" [-t , msec [250]]]"; - -// Configuration parameters. -static u_int consumers = 1; -static u_int suppliers = 1; -static u_int total_messages = 10; -static int measure_jitter = 0; -static u_int timeout_interval = 250; // msec - -static int short_circuit_EC = 0; -static int shutting_down = 0; - -// This is global to allow the Supplier to short circuit the EC -// and talk directly to consumers. For testing only :-) -static Latency_Consumer **consumer; - -// ************************************************************ - -Latency_Consumer::Latency_Consumer (const int measure_jitter) - : measure_jitter_ (measure_jitter), - min_latency_ (INT_MAX), - max_latency_ (INT_MIN), - total_latency_ (0), - total_pushes_ (0), - min_to_ec_ (INT_MAX), - max_to_ec_ (INT_MIN), - sum_to_ec_ (0), - min_in_ec_ (INT_MAX), - max_in_ec_ (INT_MIN), - sum_in_ec_ (0), - min_from_ec_ (INT_MAX), - max_from_ec_ (INT_MIN), - sum_from_ec_ (0) -{ -} - -int -Latency_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec, - const char *my_name) -{ - entry_point (my_name); - TAO_TRY - { - RtecScheduler::Scheduler_ptr server = - ACE_Scheduler_Factory::server (); - - rt_info_ = - server->create (my_name, TAO_TRY_ENV); - - const ACE_hrtime_t wcet_ns = ACE_UINT64_LITERAL (10000000); // 1 ms - RtecScheduler::Time wcet; - ORBSVCS_Time::hrtime_to_TimeT (wcet, wcet_ns); - - server->set (rt_info_, - RtecScheduler::VERY_HIGH_CRITICALITY, - wcet, - wcet, - ORBSVCS_Time::zero, - 0, - RtecScheduler::VERY_LOW_IMPORTANCE, - ORBSVCS_Time::zero, - 1, - RtecScheduler::OPERATION, - TAO_TRY_ENV); - - // Create the event that we're registering for. - ACE_ConsumerQOS_Factory dependencies; - dependencies.start_disjunction_group (); - dependencies.insert_type (ACE_ES_EVENT_NOTIFICATION, rt_info_); - dependencies.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info_); - - this->channel_admin_ = - RtecEventChannelAdmin::EventChannel::_duplicate (ec); - - // = Connect as a consumer. - this->consumer_admin_ = - channel_admin_->for_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->suppliers_ = - consumer_admin_->obtain_push_supplier (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventComm::PushConsumer_var objref = - this->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->suppliers_->connect_push_consumer (objref.in (), - dependencies.get_ConsumerQOS (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR, se) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Latency_Consumer::open: " - "subscribe failed.\n"), -1); - } - TAO_CATCHANY - { - ACE_ERROR_RETURN ((LM_ERROR, - "Latency_Consumer::open: " - "unexpected exception.\n"), -1); - } - TAO_ENDTRY; - - return 0; -} - -void -Latency_Consumer::disconnect_push_consumer (CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, "Consumer received disconnect from channel.\n")); -} - -void -Latency_Consumer::push (const RtecEventComm::EventSet &events, - CORBA::Environment &) -{ - // ACE_DEBUG ((LM_DEBUG, "Latency_Consumer:push - ")); - ACE_TIMEPROBE (EVENT_LATENCY_PUSH_EVENT_TO_CONSUMER); - - if (events.length () == 0) - { - // ACE_DEBUG ((LM_DEBUG, "no events\n")); - return; - } - // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ())); - -#if defined (ACE_HAS_QUANTIFY) - // If measuring jitter, just Quantify the supplier-consumer path. - if (measure_jitter_) - { - quantify_stop_recording_data (); - } -#endif /* ACE_HAS_QUANTIFY */ - - for (CORBA::ULong i = 0; i < events.length (); ++i) - { - if (events[i].header.type == ACE_ES_EVENT_SHUTDOWN) - { - ACE_DEBUG ((LM_DEBUG, - "Latency Consumer: received shutdown event\n")); - this->shutdown (); - } - else - { - if (measure_jitter_) - { - ACE_hrtime_t creation; - ORBSVCS_Time::TimeT_to_hrtime (creation, - events[i].header.creation_time); - - ACE_hrtime_t ec_recv; - ORBSVCS_Time::TimeT_to_hrtime (ec_recv, - events[i].header.ec_recv_time); - - ACE_hrtime_t ec_send; - ORBSVCS_Time::TimeT_to_hrtime (ec_send, - events[i].header.ec_send_time); - - const ACE_hrtime_t now = ACE_OS::gethrtime (); - const ACE_hrtime_t elapsed = now - creation; - ACE_Time_Value latency (ACE_static_cast (long, - elapsed / ACE_ONE_SECOND_IN_NSECS), - ACE_static_cast (long, - ACE_CU64_TO_CU32 (elapsed) % ACE_ONE_SECOND_IN_NSECS / 1000)); - - const long to_ec_nsecs = ACE_CU64_TO_CU32 (ec_recv - creation); - ACE_Time_Value to_ec (to_ec_nsecs / ACE_ONE_SECOND_IN_NSECS, - to_ec_nsecs % ACE_ONE_SECOND_IN_NSECS / - 1000); - - ACE_Time_Value in_ec, from_ec; - if (! short_circuit_EC) - { - const ACE_hrtime_t in_ec_nsecs = ec_send - ec_recv; - in_ec = - ACE_Time_Value (ACE_static_cast (long, - in_ec_nsecs / ACE_ONE_SECOND_IN_NSECS), - ACE_static_cast (long, - ACE_CU64_TO_CU32 (in_ec_nsecs) % - ACE_ONE_SECOND_IN_NSECS / 1000)); - - const ACE_hrtime_t from_ec_nsecs = now - ec_send; - from_ec = - ACE_Time_Value (ACE_static_cast (long, - from_ec_nsecs / ACE_ONE_SECOND_IN_NSECS), - ACE_static_cast (long, - ACE_CU64_TO_CU32 (from_ec_nsecs) % - ACE_ONE_SECOND_IN_NSECS / 1000)); - } - - if (! shutting_down) - { - ++total_pushes_; - if (min_latency_ > latency) min_latency_ = latency; - if (max_latency_ < latency) max_latency_ = latency; - total_latency_ += latency; - if (min_to_ec_ > to_ec) min_to_ec_ = to_ec; - if (max_to_ec_ < to_ec) max_to_ec_ = to_ec; - if (! short_circuit_EC) - { - sum_to_ec_ += to_ec; - if (min_in_ec_ > in_ec) min_in_ec_ = in_ec; - if (max_in_ec_ < in_ec) max_in_ec_ = in_ec; - sum_in_ec_ += in_ec; - if (min_from_ec_ > from_ec) min_from_ec_ = from_ec; - if (max_from_ec_ < from_ec) max_from_ec_ = from_ec; - sum_from_ec_ += from_ec; - } - } - } - } - - } -} - -void -Latency_Consumer::shutdown (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) %s shutting down.\n", entry_point ())); - - TAO_TRY - { - // Disconnect from the push supplier. - this->suppliers_->disconnect_push_supplier (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - ACE_ERROR ((LM_ERROR, - "(%t) %s Latency_Consumer::shutdown: unexpected exception.\n", - entry_point ())); - } - TAO_ENDTRY; -} - - -void -Latency_Consumer::print_stats () /* const */ -{ - if (measure_jitter_) - { - double lat_min = - (min_latency_.sec () * 1000000.0 + min_latency_.usec ()) / 1000.0; - double lat_max = - (max_latency_.sec () * 1000000.0 + max_latency_.usec ()) / 1000.0; - double lat_avg = - (total_latency_.sec () * 1000000.0 +total_latency_.usec ()) / - total_pushes_ / 1000.0; - ACE_DEBUG ((LM_TRACE, - "%s: Latency in msec (min/max/avg): " - "%5.3f/%5.3f/%5.3f\n", - entry_point (), lat_min, lat_max, lat_avg)); - - if (! short_circuit_EC) - { - double to_ec_min = - (min_to_ec_.sec () * 1000000.0 + min_to_ec_.usec ()) / 1000.0; - double to_ec_max = - (max_to_ec_.sec () * 1000000.0 + max_to_ec_.usec ()) / 1000.0; - double to_ec_avg = - (sum_to_ec_.sec () * 1000000.0 + sum_to_ec_.usec ()) / - total_pushes_ / 1000.0; - ACE_DEBUG ((LM_TRACE, - "%s: From test to EC (min/max/avg): " - "%5.3f/%5.3f/%5.3f\n", - entry_point (), to_ec_min, to_ec_max, to_ec_avg)); - - double in_ec_min = - (min_in_ec_.sec () * 1000000.0 + min_in_ec_.usec ()) / 1000.0; - double in_ec_max = - (max_in_ec_.sec () * 1000000.0 + max_in_ec_.usec ()) / 1000.0; - double in_ec_avg = - (sum_in_ec_.sec () * 1000000.0 + sum_in_ec_.usec ()) / - total_pushes_ / 1000.0; - ACE_DEBUG ((LM_TRACE, - "%s: In the EC (min/max/avg): " - "%5.3f/%5.3f/%5.3f\n", - entry_point (), in_ec_min, in_ec_max, in_ec_avg)); - - double from_ec_min = - (min_from_ec_.sec () * 1000000.0 + min_from_ec_.usec ()) / 1000.0; - double from_ec_max = - (max_from_ec_.sec () * 1000000.0 + max_from_ec_.usec ()) / 1000.0; - double from_ec_avg = - (sum_from_ec_.sec () * 1000000.0 + sum_from_ec_.usec ()) / - total_pushes_ / 1000.0; - ACE_DEBUG ((LM_TRACE, - "%s: From EC to test (min/max/avg): " - "%5.3f/%5.3f/%5.3f\n", - entry_point (), from_ec_min, from_ec_max, from_ec_avg)); - } - } -} - - -// ************************************************************ - -Latency_Supplier::Supplier::Supplier (Latency_Supplier* impl) - : impl_ (impl) -{ -} - -void Latency_Supplier::Supplier::disconnect_push_supplier - (CORBA::Environment &TAO_IN_ENV) -{ - this->impl_->disconnect_push_supplier (TAO_IN_ENV); -} - -Latency_Supplier::Consumer::Consumer (Latency_Supplier* impl) - : impl_ (impl) -{ -} - -void Latency_Supplier::Consumer::disconnect_push_consumer - (CORBA::Environment &TAO_IN_ENV) -{ - this->impl_->disconnect_push_consumer (TAO_IN_ENV); -} - -void Latency_Supplier::Consumer::push - (const RtecEventComm::EventSet &events, - CORBA::Environment &TAO_IN_ENV) -{ - this->impl_->push (events, TAO_IN_ENV); -} - -// ************************************************************ - -Latency_Supplier::Latency_Supplier (const u_int total_messages, - CORBA::Long supplier_id, - const int timestamp) - : total_messages_ (total_messages), - supplier_id_ (supplier_id), - timestamp_ (timestamp), - total_sent_ (0), - master_ (0), - supplier_ (this), - consumer_ (this) -{ -} - -int -Latency_Supplier::open_supplier (RtecEventChannelAdmin::EventChannel_ptr ec, - const char *name, int master) -{ - this->entry_point (name); - master_ = master; - TAO_TRY - { - this->channel_admin_ = - RtecEventChannelAdmin::EventChannel::_duplicate (ec); - - RtecScheduler::Scheduler_ptr server = - ACE_Scheduler_Factory::server (); - - this->rt_info_ = - server->create (name, TAO_TRY_ENV); - - RtecScheduler::Period_t period = timeout_interval * 20000; - - server->set (rt_info_, - RtecScheduler::VERY_HIGH_CRITICALITY, - ORBSVCS_Time::zero, - ORBSVCS_Time::zero, - ORBSVCS_Time::zero, - period, - RtecScheduler::VERY_LOW_IMPORTANCE, - ORBSVCS_Time::zero, - 1, - RtecScheduler::OPERATION, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_SupplierQOS_Factory publications; - publications.insert (supplier_id_, - ACE_ES_EVENT_NOTIFICATION, - rt_info_, 1); - publications.insert (supplier_id_, - ACE_ES_EVENT_SHUTDOWN, - rt_info_, 1); - - // = Connect as a supplier. - this->supplier_admin_ = - channel_admin_->for_suppliers (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->consumers_ = - supplier_admin_->obtain_push_consumer (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventComm::PushSupplier_var objref = - this->supplier_._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - consumers_->connect_push_supplier (objref.in (), - publications.get_SupplierQOS (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Latency_Supplier::open"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -void -Latency_Supplier::disconnect_push_consumer (CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, - "Supplier-consumer received disconnect from channel.\n")); -} - -void -Latency_Supplier::disconnect_push_supplier (CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, "Supplier received disconnect from channel.\n")); -} - -int -Latency_Supplier::start_generating_events (void) -{ - const ACE_hrtime_t now = ACE_OS::gethrtime (); - test_start_time_.set (ACE_static_cast (long, now / 1000000000), - ACE_static_cast (long, - ACE_CU64_TO_CU32 (now) % 1000000000 / - 1000)); - - TAO_TRY - { - ACE_Time_Value tv_timeout (0, timeout_interval * 1000); - TimeBase::TimeT timeout; - ORBSVCS_Time::Time_Value_to_TimeT (timeout, tv_timeout); - - ACE_DEBUG ((LM_DEBUG, - "start generating events: " - "timeout = %d " - "interval = %d " - "tv.msec () = %d\n", - ACE_U64_TO_U32 (timeout), - timeout_interval, - tv_timeout.msec ())); - - ACE_ConsumerQOS_Factory dependencies; - dependencies.start_disjunction_group (); - dependencies.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT, - timeout, - rt_info_); - if (!master_) - dependencies.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info_); - - // = Connect as a consumer. - consumer_admin_ = - channel_admin_->for_consumers (TAO_TRY_ENV); - TAO_CHECK_ENV; - suppliers_ = - consumer_admin_->obtain_push_supplier (TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventComm::PushConsumer_var objref = - this->consumer_._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->suppliers_->connect_push_consumer (objref.in (), - dependencies.get_ConsumerQOS (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - ACE_ERROR_RETURN ((LM_ERROR, - "Latency_Supplier::generate_events:" - " unexpected exception.\n"), -1); - } - TAO_ENDTRY; - - return 0; -} - -void -Latency_Supplier::push (const RtecEventComm::EventSet &events, - CORBA::Environment & TAO_IN_ENV) -{ - // ACE_DEBUG ((LM_DEBUG, "Latency_Supplier::push - ")); - ACE_UNUSED_ARG (TAO_IN_ENV); - - if (events.length () == 0) - { - // ACE_DEBUG ((LM_DEBUG, "no events\n")); - return; - } - - // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ())); - - for (CORBA::ULong i = 0; i < events.length (); ++i) - { - if (!master_ && events[i].header.type == ACE_ES_EVENT_SHUTDOWN) - { - ACE_DEBUG ((LM_DEBUG, - "Latency Supplier: received shutdown event\n")); - this->shutdown (); - } - else if (events[i].header.type == ACE_ES_EVENT_INTERVAL_TIMEOUT) - { - // Create the event to send. - RtecEventComm::Event event; - event.header.source = this->supplier_id_; - event.header.type = ACE_ES_EVENT_NOTIFICATION; - ++total_sent_; - - if (this->timestamp_) - { - ACE_hrtime_t now = ACE_OS::gethrtime (); - ORBSVCS_Time::hrtime_to_TimeT (event.header.creation_time, - now); - } - - // @@ ACE_TIMEPROBE_RESET; - // @@ ACE_TIMEPROBE (EVENT_LATENCY_START_WITH_NEW_EVENT_IN_SUPPLIER); - - TAO_TRY - { - if (short_circuit_EC) - { - for (u_int cons = 0; cons < consumers; ++cons) - { - // This constructor is fast. - const RtecEventComm::EventSet es (1, 1, &event); - consumer [cons]->push (es, TAO_TRY_ENV); - } - } - else - { -#if defined (ACE_HAS_QUANTIFY) - // If measuring jitter, just Quantify the - // supplier-consumer path. - if (measure_jitter) - { - quantify_start_recording_data (); - } -#endif /* ACE_HAS_QUANTIFY */ - - ACE_TIMEPROBE (EVENT_LATENCY_SUPPLIER_STARTS_PUSHING_EVENT); - - RtecEventComm::EventSet events (1); - events.length (1); - events[0] = event; - consumers_->push (events, TAO_TRY_ENV); - - ACE_TIMEPROBE (EVENT_LATENCY_SUPPLIER_ENDS_PUSHING_EVENT); - } - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - ACE_ERROR ((LM_ERROR, "(%t) %s Latency_Supplier::push:" - " unexpected exception.\n", - entry_point ())); - } - TAO_ENDTRY; - - // Check if we're done. - if (master_ && (total_sent_ >= total_messages_)) - this->shutdown (); - } - else - { - ACE_ERROR ((LM_ERROR, "(%t) %s received unexpected events: ", - entry_point ())); - // ::dump_sequence (events); - return; - } - } -} - -void -Latency_Supplier::shutdown (void) -{ - shutting_down = 1; - -#if defined (ACE_HAS_QUANTIFY) - // Need to stop recording here even if testing for jitter, because - // recording is still probably enabled. - quantify_stop_recording_data (); - if (! measure_jitter) - { - ACE_DEBUG ((LM_DEBUG, "(%t) stopped Quantify recording\n")); - } -#endif /* ACE_HAS_QUANTIFY */ - - const ACE_hrtime_t now = ACE_OS::gethrtime (); - test_stop_time_.set (ACE_static_cast (long, now / ACE_ONE_SECOND_IN_NSECS), - ACE_static_cast (long, ACE_CU64_TO_CU32 (now) % - ACE_ONE_SECOND_IN_NSECS / - 1000)); - - static int total_iterations = 1; - if (--total_iterations > 0) - { - total_sent_ = 0; - return; - } - - TAO_TRY - { - if (master_) - { - // Create the shutdown message. - RtecEventComm::Event event; - event.header.source = this->supplier_id_; - event.header.type = ACE_ES_EVENT_SHUTDOWN; - - // Push the shutdown event. - RtecEventComm::EventSet events (1); - events.length (1); - events[0] = event; - consumers_->push (events, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - // Disconnect from the channel. - consumers_->disconnect_push_consumer (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Disconnect from the push supplier. - suppliers_->disconnect_push_supplier (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (master_) - { - TAO_ORB_Core_instance ()->orb ()->shutdown (); - } - } - TAO_CATCHANY - { - ACE_ERROR ((LM_ERROR, "(%t) %s Latency_Supplier::shutdown:" - " unexpected exception.\n", - entry_point ())); - TAO_TRY_ENV.print_exception ("Latency_Supplier::shutdown"); - } - TAO_ENDTRY; -} - - -void -Latency_Supplier::print_stats () /* const */ -{ - ACE_Time_Value test_elapsed_time (test_stop_time_ - test_start_time_); - const u_int elapsed = test_elapsed_time.sec () * 1000000 + - test_elapsed_time.usec (); // usec - - ACE_DEBUG ((LM_TRACE, - "%s: delivered %u events to %u consumer(s) in %u msec;\n" - " per-event average was %8.3f msec.\n", - entry_point (), - total_sent_, - consumers / suppliers + consumers % suppliers, - elapsed / 1000, - ACE_static_cast (ACE_CAST_CONST double, elapsed) / total_sent_ / - 1000.0)); -} - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -// function get_options -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -static -unsigned int -get_options (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "Oc:djm:s:t:?"); - int opt; - int temp; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) { - case 'c': - if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0) - { - consumers = ACE_static_cast (u_int, temp); - } - else - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s: number of consumers must be > 0", - argv[0]), 1); - } - break; - case 'd': - short_circuit_EC = 1; - break; - case 'j': - measure_jitter = 1; - break; - case 'm': - if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0) - { - total_messages = ACE_static_cast (u_int, temp); - } - else - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s: count must be > 0", - argv[0]), 1); - } - break; - case 's': - if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0) - { - suppliers = ACE_static_cast (u_int, temp); - } - else - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s: number of suppliers must be > 0", - argv[0]), 1); - } - break; - case 't': - if (ACE_OS::atoi (get_opt.optarg) >= 0) - { - timeout_interval = ACE_OS::atoi (get_opt.optarg); - } - else - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s: timeout must be >= 0", - argv[0]), 1); - } - break; - case '?': - ACE_DEBUG ((LM_DEBUG, - "Usage: %s %s\n", - argv[0], usage)); - ACE_OS::exit (0); - break; - default: - ACE_ERROR_RETURN ((LM_ERROR, - "%s: unknown arg, -%c\n" - "Usage: %s %s\n", - argv[0], ACE_static_cast (char, opt), - argv[0], usage), 1); - } - } - - if (argc != get_opt.optind) - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s: too many arguments\n" - "Usage: %s %s\n", - argv[0], argv[0], usage), 1); - } - - return 0; -} - - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -// function main -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -int -main (int argc, char *argv []) -{ - if (ACE_OS::sched_params ( - ACE_Sched_Params ( - ACE_SCHED_FIFO, - ACE_Sched_Params::priority_min (ACE_SCHED_FIFO), - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - { - ACE_DEBUG ((LM_MAX, "Latency: user is not superuser, " - "so remain in time-sharing class\n")); - } - else - { - ACE_DEBUG ((LM_ERROR, "%p\n", "Latency")); - } - } - - u_int i; - - TAO_TRY - { - // Initialize ORB. - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var naming_obj = - orb->resolve_initial_references ("NameService"); - if (CORBA::is_nil (naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to get the Naming Service.\n"), - 1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_Scheduler_Factory::use_config (naming_context.in ()); - - if (get_options (argc, argv)) - ACE_OS::exit (-1); - - // Allocate the timeprobe instance now, so we don't measure - // the cost of doing it later. - ACE_TIMEPROBE_RESET; - - CosNaming::Name channel_name (1); - channel_name.length (1); - channel_name[0].id = CORBA::string_dup ("EventService"); - - CORBA::Object_var ec_obj = - naming_context->resolve (channel_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - - RtecEventChannelAdmin::EventChannel_var ec = - RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Create supplier(s). - Latency_Supplier **supplier; - ACE_NEW_RETURN (supplier, Latency_Supplier *[suppliers], -1); - for (i = 0; i < suppliers; ++i) - { - int supplier_timestamps = (i==0); - ACE_NEW_RETURN (supplier [i], - Latency_Supplier (total_messages, - ACE_static_cast (CORBA::Long, i), - supplier_timestamps), - -1); - char supplier_name [BUFSIZ]; - sprintf (supplier_name, "supplier-%d", i+1); - // Only the first supplier timestamps its messages. - int master = (i==0); - if (supplier [i]->open_supplier (ec.in (), - supplier_name, - master) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Supplier open failed.\n"), -1); - } - - // Create consumers. - ACE_NEW_RETURN (consumer, Latency_Consumer *[consumers], -1); - for (i = 0; i < consumers; ++i) - { - ACE_NEW_RETURN (consumer [i], Latency_Consumer (measure_jitter), -1); - char buf [BUFSIZ]; - sprintf (buf, "consumer-%d", i+1); - - if (consumer [i]->open_consumer (ec.in (), buf) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Someone was feeling introverted.\n"), - -1); - } - -#if defined (ACE_HAS_QUANTIFY) - if (! measure_jitter) - { - ACE_DEBUG ((LM_DEBUG, "(%t) start Quantify recording\n")); - quantify_start_recording_data (); - } -#endif /* ACE_HAS_QUANTIFY */ - - // Tell supplier(s) to generate events. - for (i = 0; i < suppliers; ++i) - { - if (supplier [i]->start_generating_events () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "generate_events failed.\n"), -1); - } - - orb->run (); - - for (i = 0; i < suppliers; ++i) - { - supplier [i]->print_stats (); - delete supplier[i]; - TAO_CHECK_ENV; - } - delete [] supplier; - - for (i = 0; i < consumers; ++i) - { - consumer [i]->print_stats (); - delete consumer [i]; - TAO_CHECK_ENV; - } - delete [] consumer; - - ec->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_TIMEPROBE_PRINT; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_ENDTRY; - - - return 0; -} diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp deleted file mode 100644 index b9ecd48409b..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp +++ /dev/null @@ -1,104 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Event_Latency" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Event_Latency - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Event_Latency.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Event_Latency.mak" CFG="Event_Latency - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Event_Latency - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "Event_Latency - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Event_Latency - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 orbsvcs.lib TAO.lib aced.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "Event_Latency - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Event_Latency - Win32 Release" -# Name "Event_Latency - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Event_Latency.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Event_Latency.h -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw deleted file mode 100644 index 3188c9cb9c8..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Event_Latency"=.\Event_Latency.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h deleted file mode 100644 index 2ef454cc317..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h +++ /dev/null @@ -1,253 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE Event Service Benchmarks -// -// = FILENAME -// Latency.h -// -// = AUTHOR -// David Levine (levine@cs.wustl.edu) and -// Tim Harrison (harrison@cs.wustl.edu) -// -// = DESCRIPTION -// -// ============================================================================ - -#ifndef EVENT_LATENCY_H -#define EVENT_LATENCY_H - -#include "ace/SString.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "orbsvcs/RtecEventCommS.h" - -class Latency_Consumer : public POA_RtecEventComm::PushConsumer -// = TITLE -// Latency Consumer -// -// = DESCRIPTION -// Simple example of a consumer that registers for supplier -// notifications. -{ -public: - Latency_Consumer (const int measure_jitter = 0); - // Construction. The default of not measuring jitter provides - // a "null" push routine, for measuring aggregate timing. - - int open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec, - const char *my_name); - // Uses the name server to obtain a reference to the - // and registers with channel to receive notifications from the - // supplier. Also registers to receive shutdown messages from the - // supplier. Stores for printing out messages. Returns 0 - // on success, -1 on failure. - - virtual void disconnect_push_consumer (CORBA::Environment &); - // The channel is disconnecting. - - void entry_point (const char*); - const char *entry_point () const; - - void print_stats () /* const */; - // Print timing statistics. - -// (not protected to allow short-circuiting) protected: - virtual void push (const RtecEventComm::EventSet &events, - CORBA::Environment &); - // If the [0] is a notification, prints out the data from - // the supplier. If its a shutdown message, the consumer - // disconnects from the channel. - -protected: - void shutdown (void); - // Disconnect from the Event Service. - - // = Event channel adminstration references. - RtecEventChannelAdmin::EventChannel_var channel_admin_; - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_; - RtecEventChannelAdmin::ProxyPushSupplier_var suppliers_; - -private: - RtecScheduler::handle_t rt_info_; - - int measure_jitter_; - - ACE_Time_Value min_latency_; - ACE_Time_Value max_latency_; - ACE_Time_Value total_latency_; - u_long total_pushes_; - // Registers and counters for keeping track of latency statistics. - - ACE_Time_Value min_to_ec_; - ACE_Time_Value max_to_ec_; - ACE_Time_Value sum_to_ec_; - // Statitics on time to get to the EC. - - ACE_Time_Value min_in_ec_; - ACE_Time_Value max_in_ec_; - ACE_Time_Value sum_in_ec_; - // Statitics on time spent in the EC. - - ACE_Time_Value min_from_ec_; - ACE_Time_Value max_from_ec_; - ACE_Time_Value sum_from_ec_; - // Statitics on time spent since the EC put the event on the wire - // and it gets here. - - ACE_CString entry_point_; -}; - -// ************************************************************ - -class Latency_Supplier -// = TITLE -// Latency Supplier -// -// = DESCRIPTION -// Generates event nofications and a shutdown message. -{ -public: - - // - // This class provides IS-A Consumer and Supplier of events. But - // inheritance from two skeleton classes is non-complaint (or at - // least won't work with TAO). We use smaller implementation classes - // that delegate on Latency_Supplier to do the job. - // - class Supplier : public POA_RtecEventComm::PushSupplier { - public: - virtual void disconnect_push_supplier (CORBA::Environment &); - // The channel is disconnecting. - - private: - Supplier (Latency_Supplier* impl); - friend class Latency_Supplier; - - private: - Latency_Supplier* impl_; - }; - - class Consumer : public POA_RtecEventComm::PushConsumer { - public: - virtual void push (const RtecEventComm::EventSet &events, - CORBA::Environment &); - // The channel pushed some events to us. - - virtual void disconnect_push_consumer (CORBA::Environment &); - // The channel is disconnecting. - - private: - Consumer (Latency_Supplier* impl); - friend class Latency_Supplier; - - private: - Latency_Supplier* impl_; - }; - - Latency_Supplier (const u_int total_messages, - CORBA::Long supplier_id, - const int timestamp = 0); - // Construction. Requires the total number of messages to be - // sent. If the timestamp flag is enabled, then events are - // timestamped, e.g., for use in measuring jitter. - - int open_supplier (RtecEventChannelAdmin::EventChannel_ptr event_channel, - const char *name, int master); - // Registers with the name server under the given . Also - // connects to the Event Channel as a supplier of notifications and - // shutdown messages. If != 0, then the supplier will - // destroy the channel upon shutting down. Returns 0 on success, -1 - // on failure. - - void disconnect_push_supplier (CORBA::Environment &); - // The channel is disconnecting. - - void disconnect_push_consumer (CORBA::Environment &); - // The channel is disconnecting. - - void push (const RtecEventComm::EventSet &events, - CORBA::Environment &); - // Takes a timestamp and then pushes event_ to all consumers, either - // directly, or via a channel. - - int start_generating_events (void); - // Called when the supplier should start generating events. - // Registers with the Event Channel to receive timeouts every .25 - // seconds. Will generate some number of events and then send a - // shutdown message. Returns 0 on success, -1 on failure. - - void entry_point (const char *); - const char *entry_point () const; - - void print_stats () /* const */; - // Print timing statistics. - -protected: - - void shutdown (void); - // Disconnect from the Event Service. - - // = Event Channel adminstration references. - RtecEventChannelAdmin::EventChannel_var channel_admin_; - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_; - RtecEventChannelAdmin::ProxyPushConsumer_var consumers_; - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin_; - RtecEventChannelAdmin::ProxyPushSupplier_var suppliers_; - -private: - RtecScheduler::handle_t rt_info_; - - u_int total_messages_; - // How many events to push before ending the test. - - CORBA::Long supplier_id_; - // Our supplier ID. - - int timestamp_; - // Flag indicating whether or not to timestamp outgoing events. - - u_int total_sent_; - // How many events we've pushed. - - ACE_Time_Value test_start_time_; - ACE_Time_Value test_stop_time_; - // Start/stop times, marking the time period when events are - // sent to consumers. - - int master_; - - ACE_CString entry_point_; - - Supplier supplier_; - Consumer consumer_; -}; - -void Latency_Consumer::entry_point(const char* s) -{ - entry_point_ = s; -} - -const char* Latency_Consumer::entry_point (void) const -{ - return entry_point_.fast_rep (); -} - -void Latency_Supplier::entry_point(const char* s) -{ - entry_point_ = s; -} - -const char* Latency_Supplier::entry_point (void) const -{ - return entry_point_.fast_rep (); -} - -#endif /* EVENT_LATENCY_H */ diff --git a/TAO/orbsvcs/tests/Event_Latency/Makefile b/TAO/orbsvcs/tests/Event_Latency/Makefile deleted file mode 100644 index b6a4c705a90..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/Makefile +++ /dev/null @@ -1,111 +0,0 @@ -# $Id$ - -BIN = Event_Latency - - -EVENT_LATENCY_SRCS= \ - Event_Latency.cpp - -LSRC= \ - $(EVENT_LATENCY_SRCS) \ - -EVENT_LATENCY_OBJS = $(EVENT_LATENCY_SRCS:.cpp=.o) - -LDLIBS= -lorbsvcs -lTAO - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#### Local rules and variables... - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif -TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE -LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) $(TSS_ORB_FLAG) - -# Leave the scheduler output out if this is a config run. -ifeq ($(runtime),1) -EVENT_LATENCY_CONFIG_OBJS=Event_Latency_Scheduler_Runtime.o -endif # runtime - -Event_Latency: $(addprefix $(VDIR),$(EVENT_LATENCY_OBJS) $(EVENT_LATENCY_CONFIG_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Event_Latency.o .obj/Event_Latency.so .shobj/Event_Latency.o .shobj/Event_Latency.so: Event_Latency.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(ACE_ROOT)/ace/Profile_Timer.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(ACE_ROOT)/ace/Profile_Timer.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - Event_Latency.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ - $(TAO_ROOT)/tao/Timeprobe.h \ - $(ACE_ROOT)/ace/Timeprobe.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Event_Latency/run_test.pl b/TAO/orbsvcs/tests/Event_Latency/run_test.pl deleted file mode 100755 index 1c0506f887c..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/run_test.pl +++ /dev/null @@ -1,31 +0,0 @@ -# $Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -unshift @INC, '../../../../bin'; -require Process; - -$NS_ior = "NameService.ior"; -$sleeptime = 3; - -$NS = Process::Create ("../../Naming_Service/Naming_Service". - $Process::EXE_EXT." -o $NS_ior "); - -sleep $sleeptime; - -$ES = Process::Create ("../../Event_Service/Event_Service".$Process::EXE_EXT); - -sleep $sleeptime; - -$status = system ($EXEPREFIX."Event_Latency".$Process::EXE_EXT. - " -j -m 100"); - -$NS->Kill (); -$ES->Kill (); - -unlink ($NS_ior); - -# @@ Capture any errors from the server too. -exit $status; diff --git a/TAO/orbsvcs/tests/Event_Latency/run_tests.sh b/TAO/orbsvcs/tests/Event_Latency/run_tests.sh deleted file mode 100755 index 545a634dd1b..00000000000 --- a/TAO/orbsvcs/tests/Event_Latency/run_tests.sh +++ /dev/null @@ -1,67 +0,0 @@ -#! /bin/sh -# $Id$ -# -# Runs Event_Latency test. - -usage="Usage: $0 [-m ] [-s ]" -messages=1000 -suppliers=1 - -######## -######## Interpret command arguments. -######## -skip_arg=0 -for arg in "$@"; do - if [ $skip_arg -eq 0 ]; then - case $arg in - -m ) messages=$2 - skip_arg=1 - ;; - -s ) suppliers=$2 - skip_arg=1 - ;; - -* ) echo undefined option: $arg - echo $usage - exit 1 - ;; - * ) echo $usage - exit 1 - ;; - esac - else - skip_arg=0 - fi - shift -done - -whoami=`whoami` - -run () -#### Run the process in the RT class, if root on Solaris. -{ - if [ `uname -s` = 'SunOS' -a "$whoami" = 'root' ]; then - LD_BIND_NOW=1 priocntl -e -c RT -p 0 $@ - else - $@ - fi -} - - -######## -######## Clean up on normal or abnormal termination. -######## -trap '../start_services clean' 0 1 2 3 15 - - -######## -######## Start NameService, etc. -######## -run ../start_services -NameService=`cat /tmp/nameserviceior_levine` -export NameService - - -######## -######## Run the Event_Latency test. -######## -./Event_Latency -j -t 50 -m $messages -s $suppliers -c $suppliers diff --git a/TAO/orbsvcs/tests/ImplRepo/Airplane.idl b/TAO/orbsvcs/tests/ImplRepo/Airplane.idl deleted file mode 100644 index ecc38afa7c5..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/Airplane.idl +++ /dev/null @@ -1,7 +0,0 @@ -// $Id$ - -interface Paper_Airplane_Server -{ - string get_plane (); - // Returns the plane of the moment. -}; diff --git a/TAO/orbsvcs/tests/ImplRepo/IR_Helper.cpp b/TAO/orbsvcs/tests/ImplRepo/IR_Helper.cpp deleted file mode 100644 index 649c8903775..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/IR_Helper.cpp +++ /dev/null @@ -1,227 +0,0 @@ -// $Id$ - -#include "IR_Helper.h" -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" -#include "orbsvcs/PingS.h" -#include "tao/IIOP_Profile.h" - -class Ping_i: public POA_Ping_Object - // = TITLE - // Ping Object Implementation - // - // = DESCRIPTION - // Implementation Repository uses this to check to see if the server - // is still running. -{ -public: - Ping_i (int debug = 0) : debug_ (debug) {} - - virtual void ping (CORBA::Environment &) - { - if (this->debug_) - ACE_DEBUG ((LM_DEBUG, "Pong!\n")); - } -private: - int debug_; -}; - -IR_Helper::IR_Helper (char *server_name, - PortableServer::POA_ptr poa, - CORBA::ORB_ptr orb, - int debug) - : name_ (ACE::strnew (server_name)), - ir_key_ (0), - ir_addr_ (0), - ping_ (new Ping_i (debug)), - implrepo_ (0), - poa_ (poa), - orb_ (orb), - debug_ (debug) -{ - const char *exception_message = "Null Message"; - - ACE_TRY_NEW_ENV - { - exception_message = "While read_ir_ior"; - this->read_ir_ior (ACE_TRY_ENV); - ACE_TRY_CHECK; - - // Resolve the IR. - exception_message = "While string_to_object of ImplRepo"; - CORBA::Object_var implrepo_object = - this->orb_->string_to_object (this->ir_key_, ACE_TRY_ENV); - ACE_TRY_CHECK;; - - if (CORBA::is_nil (implrepo_object.in ())) - ACE_ERROR ((LM_ERROR, - "invalid implrepo key <%s>\n", - this->ir_key_)); - - exception_message = "While narrowing ImplRepo"; - this->implrepo_ = - Implementation_Repository::_narrow (implrepo_object.in(), ACE_TRY_ENV); - ACE_TRY_CHECK; - - // Now register the Ping Object - PortableServer::ObjectId_var ping_id = - PortableServer::string_to_ObjectId ("ping"); - - exception_message = "While activating ping object"; - this->poa_->activate_object_with_id (ping_id.in (), - this->ping_, - ACE_TRY_ENV); - ACE_TRY_CHECK; - - exception_message = "While creating reference to ping object"; - this->ping_ptr_ = - this->poa_->id_to_reference (ping_id.in (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_ERROR ((LM_ERROR, "IR_Helper::IR_Helper - %s\n", exception_message)); - ACE_TRY_ENV.print_exception ("SYS_EX"); - return; - } - ACE_ENDTRY; -} - -IR_Helper::~IR_Helper () -{ - delete this->name_; - delete this->ir_key_; - - // @@ Delete the two objects -} - -int -IR_Helper::register_server (const char *comm_line, - const char *environment, - const char *working_dir, - CORBA_Environment &ACE_TRY_ENV) -{ - ACE_TRY - { - CORBA::Object_var implrepo_object = - this->orb_->string_to_object (this->ir_key_, ACE_TRY_ENV); - ACE_TRY_CHECK; - - Implementation_Repository *ImplRepo = - Implementation_Repository::_narrow (implrepo_object.in(), ACE_TRY_ENV); - ACE_TRY_CHECK; - - if (CORBA::is_nil (implrepo_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid implrepo key <%s>\n", - this->ir_key_), - -1); - - Implementation_Repository::Process_Options proc_opts; - - proc_opts.command_line_ = CORBA::string_dup (comm_line); - proc_opts.environment_ = CORBA::string_dup (environment); - proc_opts.working_directory_ = CORBA::string_dup (working_dir); - - ImplRepo->reregister_server (this->name_, proc_opts, ACE_TRY_ENV); - } - ACE_CATCHANY - { - ACE_TRY_ENV.print_exception ("IR_Helper::register_server"); - return -1; - } - ACE_ENDTRY; - return 0; -} - -int -IR_Helper::read_ir_ior (CORBA_Environment &ACE_TRY_ENV) -{ - ACE_UNUSED_ARG (ACE_TRY_ENV); - - // Open the file for reading. - // @@ Hard-coded name is bad. Need to fix. - ACE_HANDLE f_handle_ = ACE_OS::open ("implrepo.ior", 0); - - if (f_handle_ == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: implrepo.ior\n"), - -1); - - ACE_Read_Buffer ior_buffer (f_handle_); - this->ir_key_ = ior_buffer.read (); - - if (this->ir_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to allocate memory to read ior: %p\n"), - -1); - - ACE_OS::close (f_handle_); - return 0; -} - - -void -IR_Helper::notify_startup (CORBA_Environment &ACE_TRY_ENV) -{ - // Get our host and port and convert it to something we can use. - ACE_INET_Addr my_addr = TAO_ORB_Core_instance ()->orb_params ()->addr (); - Implementation_Repository::INET_Addr my_ir_addr; - my_ir_addr.port_ = my_addr.get_port_number (); - my_ir_addr.host_ = CORBA::string_dup (my_addr.get_host_name ()); - - ACE_TRY - { - delete this->ir_addr_; - this->ir_addr_ = this->implrepo_->server_is_running (this->name_, - my_ir_addr, - this->ping_ptr_, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_RETHROW; - } - ACE_ENDTRY; -} - - -// Notify the IR that the server has been shut down. -void -IR_Helper::notify_shutdown (CORBA_Environment &ACE_TRY_ENV) -{ - ACE_TRY - { - this->implrepo_->server_is_shutting_down (this->name_, ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_RETHROW; - } - ACE_ENDTRY; -} - -void -IR_Helper::change_object (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV) -{ - if ( obj - && obj->_stubobj () - && obj->_stubobj ()->profile_in_use () - && this->implrepo_ - && this->implrepo_->_stubobj () - && this->implrepo_->_stubobj ()->profile_in_use () ) - { - TAO_IIOP_Profile *implrepo_pfile = - ACE_dynamic_cast (TAO_IIOP_Profile *, - this->implrepo_->_stubobj ()->profile_in_use ()); - TAO_IIOP_Profile *iiop_pfile = - ACE_dynamic_cast (TAO_IIOP_Profile *, - obj->_stubobj ()->profile_in_use ()); - - // @@ Only same host for now - iiop_pfile->port (implrepo_pfile->port ()); - } -} diff --git a/TAO/orbsvcs/tests/ImplRepo/IR_Helper.h b/TAO/orbsvcs/tests/ImplRepo/IR_Helper.h deleted file mode 100644 index fa674bc7a41..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/IR_Helper.h +++ /dev/null @@ -1,74 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/ImplRepo -// -// = FILENAME -// IR_Helper.h -// -// = DESCRIPTION -// Class which contains basic operations needed by a server to use the IR. -// -// = AUTHORS -// Darrell Brunsch -// -// ============================================================================ - -#if !defined (IR_HELPER_H) -#define IR_HELPER_H - -#include "tao/TAO.h" -#include "orbsvcs/ImplRepoC.h" - -class POA_Ping_Object; - -class IR_Helper - // = TITLE - // Implementation Repository Helper Class - // - // = DESCRIPTION - // Contains basic IR operations required by a server. - // -{ -public: - IR_Helper (char *server_name, PortableServer::POA_ptr poa, CORBA::ORB_ptr orb, int debug = 0); - // Constructor - ~IR_Helper (); - // Destructor - - void notify_startup (CORBA_Environment &_env = CORBA_Environment::default_environment ()); - // Notify the IR that the server is now running. - - void notify_shutdown (CORBA_Environment &_env = CORBA_Environment::default_environment ()); - // Notify the IR that the server has been shut down. - - int register_server (const char *comm_line, - const char *environment = "", - const char *working_dir = "", - CORBA_Environment &_env = CORBA_Environment::default_environment ()); - // Tell the IR how to start yourself up. - - void change_object (CORBA::Object_ptr obj, - CORBA_Environment &_env = CORBA_Environment::default_environment ()); - // Convert an object into a IR controlled object. -private: - int read_ir_ior (CORBA_Environment &_env = CORBA_Environment::default_environment ()); - - char *name_; - char *ir_key_; - - Implementation_Repository::INET_Addr *ir_addr_; - - POA_Ping_Object *ping_; - CORBA::Object_ptr ping_ptr_; - - Implementation_Repository *implrepo_; - PortableServer::POA_var poa_; - CORBA::ORB_var orb_; - int debug_; -}; - -#endif /* IR_HELPER_H */ diff --git a/TAO/orbsvcs/tests/ImplRepo/ImplRepo.dsw b/TAO/orbsvcs/tests/ImplRepo/ImplRepo.dsw deleted file mode 100644 index 4dde9407ed2..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/ImplRepo.dsw +++ /dev/null @@ -1,77 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Airplane Client"=.\airplane_client.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Airplane Server"=.\airplane_server.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Nestea Client"=.\nestea_client.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Nestea Server"=.\nestea_server.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Repository_Test"=.\Repository_Test.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/ImplRepo/Makefile b/TAO/orbsvcs/tests/ImplRepo/Makefile deleted file mode 100644 index 10cc9a17429..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/Makefile +++ /dev/null @@ -1,602 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif # ! TAO_ROOT - -# Make sure the directory we depend on is up-to-date. -DIRS = ../../ImplRepo_Service - -LDLIBS = -lorbsvcs -lTAO -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_ROOT) - -IDL_SRC = AirplaneS.cpp AirplaneC.cpp -PROG_SRCS = Repository.cpp \ - Repository_Test.cpp \ - airplane_client.cpp \ - airplane_server.cpp \ - airplane_client_i.cpp \ - airplane_server_i.cpp \ - airplane_i.cpp \ - IR_Helper.cpp - -SRC=$(IDL_SRC) $(PROG_SRCS) - -AIRPLANE_CLIENT_OBJS = AirplaneC.o \ - AirplaneS.o \ - airplane_client.o \ - airplane_client_i.o - -AIRPLANE_SERVER_OBJS = AirplaneC.o \ - AirplaneS.o \ - airplane_server.o \ - airplane_server_i.o \ - airplane_i.o \ - IR_Helper.o - -REPOSITORY_TEST_OBJS = ../../../ImplRepo_Service/$(VDIR)/Repository.o \ - Repository_Test.o - -BIN = airplane_server \ - airplane_client \ - Repository_Test - -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) -VBIN = $(BIN:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -IDL_EXT=C.h C.i C.cpp S.h S.i S.cpp S_T.h S_T.i S_T.cpp - -.PRECIOUS: $(foreach ext, $(IDL_EXT), Airplane$(ext)) - -airplane_server: $(addprefix $(VDIR),$(AIRPLANE_SERVER_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -airplane_client: $(addprefix $(VDIR),$(AIRPLANE_CLIENT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -Repository_Test: $(addprefix $(VDIR),$(REPOSITORY_TEST_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -realclean: clean - -/bin/rm -rf $(foreach ext, $(IDL_EXT), Airplane$(ext)) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/AirplaneS.o .obj/AirplaneS.so .shobj/AirplaneS.o .shobj/AirplaneS.so: AirplaneS.cpp AirplaneS.h AirplaneC.h AirplaneC.i \ - AirplaneS_T.h AirplaneS_T.i AirplaneS_T.cpp AirplaneS.i -.obj/AirplaneC.o .obj/AirplaneC.so .shobj/AirplaneC.o .shobj/AirplaneC.so: AirplaneC.cpp AirplaneC.h AirplaneC.i AirplaneS.h \ - AirplaneS_T.h AirplaneS_T.i AirplaneS_T.cpp AirplaneS.i -.obj/Repository.o .obj/Repository.so .shobj/Repository.o .shobj/Repository.so: Repository.cpp Repository.h \ - $(ACE_ROOT)/ace/Naming_Context.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Name_Proxy.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Name_Request_Reply.h \ - $(ACE_ROOT)/ace/Name_Space.h -.obj/Repository_Test.o .obj/Repository_Test.so .shobj/Repository_Test.o .shobj/Repository_Test.so: Repository_Test.cpp \ - ../../ImplRepo_Service/Repository.h \ - $(ACE_ROOT)/ace/Naming_Context.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Name_Proxy.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Name_Request_Reply.h \ - $(ACE_ROOT)/ace/Name_Space.h -.obj/airplane_client.o .obj/airplane_client.so .shobj/airplane_client.o .shobj/airplane_client.so: airplane_client.cpp airplane_client_i.h AirplaneC.h \ - AirplaneC.i -.obj/airplane_server.o .obj/airplane_server.so .shobj/airplane_server.o .shobj/airplane_server.so: airplane_server.cpp airplane_server_i.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - airplane_i.h AirplaneS.h AirplaneC.h AirplaneC.i AirplaneS_T.h \ - AirplaneS_T.i AirplaneS_T.cpp AirplaneS.i IR_Helper.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/ImplRepoC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/ImplRepoC.i -.obj/airplane_client_i.o .obj/airplane_client_i.so .shobj/airplane_client_i.o .shobj/airplane_client_i.so: airplane_client_i.cpp airplane_client_i.h \ - AirplaneC.h AirplaneC.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Read_Buffer.h \ - $(ACE_ROOT)/ace/Read_Buffer.i -.obj/airplane_server_i.o .obj/airplane_server_i.so .shobj/airplane_server_i.o .shobj/airplane_server_i.so: airplane_server_i.cpp airplane_server_i.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - airplane_i.h AirplaneS.h AirplaneC.h AirplaneC.i AirplaneS_T.h \ - AirplaneS_T.i AirplaneS_T.cpp AirplaneS.i IR_Helper.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/ImplRepoC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/ImplRepoC.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Read_Buffer.h \ - $(ACE_ROOT)/ace/Read_Buffer.i -.obj/airplane_i.o .obj/airplane_i.so .shobj/airplane_i.o .shobj/airplane_i.so: airplane_i.cpp \ - \ - airplane_i.h AirplaneS.h AirplaneC.h AirplaneC.i AirplaneS_T.h \ - AirplaneS_T.i AirplaneS_T.cpp AirplaneS.i -.obj/IR_Helper.o .obj/IR_Helper.so .shobj/IR_Helper.o .shobj/IR_Helper.so: IR_Helper.cpp IR_Helper.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/ImplRepoC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/ImplRepoC.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Read_Buffer.h \ - $(ACE_ROOT)/ace/Read_Buffer.i \ - $(TAO_ROOT)/tao/IIOP_Profile.h \ - $(TAO_ROOT)/tao/IIOP_Profile.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/PingS.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/ImplRepo/Nestea.idl b/TAO/orbsvcs/tests/ImplRepo/Nestea.idl deleted file mode 100644 index 0be9ee1e792..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/Nestea.idl +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ - -interface Nestea_Bookshelf -{ - void drink (in long cans); - // Add a number of cans to the bookshelf. - - void crush (in long cans); - // Crush some of those cans. - - long bookshelf_size (); - // How many cans are in the collection? - - string get_praise (); - // What does the server think of your collection? -}; diff --git a/TAO/orbsvcs/tests/ImplRepo/README b/TAO/orbsvcs/tests/ImplRepo/README deleted file mode 100644 index 30ab7f2e5ff..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/README +++ /dev/null @@ -1,10 +0,0 @@ -$Id$ - -Here are a few tests for the ImplRepo. The best way to test is to -use the run_test.pl passing it either airplane or airplane_ir to -test out the airplane server. - -More information about the Implementation Repository can be found in -TAO/docs. - --Darrell Brunsch \ No newline at end of file diff --git a/TAO/orbsvcs/tests/ImplRepo/Repository.cpp b/TAO/orbsvcs/tests/ImplRepo/Repository.cpp deleted file mode 100644 index 0c243356b0c..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/Repository.cpp +++ /dev/null @@ -1,208 +0,0 @@ -// $Id$ -#include "Repository.h" - -// Default Constructor -Repository::Repository () -{ - this->repository_.open (ACE_Naming_Context::PROC_LOCAL); -} - -// Add a new server to the Repository -int -Repository::add (const char *key, const char *comm_line, const char *env, const char *wdir) -{ - char *temp; // Temporary string to hold all the variables in. - - // Needs to be as long as all the lengths plus the 2 separators and the - // null character. - ACE_NEW_RETURN (temp, char [ACE_OS::strlen (comm_line) + ACE_OS::strlen (env) - + ACE_OS::strlen (wdir) + 10], -1); - - ACE_OS::sprintf (temp, "%s\n%s\n%s", comm_line, env, wdir); - - // Store the record in the repository. - int retval = this->repository_.bind (key, temp); - - // Clean up and exit. - delete [] temp; - - return retval; -} - -// Removes the server from the Repository -int -Repository::remove (const char *key) -{ - return this->repository_.unbind (key); -} - - -// Find the key record in the Repository -int -Repository::resolve (const char *key, char *&comm_line, char *&env, char *&wdir) -{ - char *value, *type; // Temp variables needed for resolve - char *last, *temp ; // For fields - int retval = this->repository_.resolve (key, value, type); - - // If successful, return what we need. - while (retval == 0) - { - temp = value; - last = ACE_OS::strstr (temp, "\n"); - if (last != 0 && *last == '\n') - { - *last = '\0'; - ACE_NEW_RETURN (comm_line, char [strlen (temp) + 1], -1); - - // Copy to the comm_line argument - strcpy (comm_line, temp); - } - else - { - retval = -1; - break; - } - - temp = last + 1; - last = ACE_OS::strstr (temp, "\n"); - if (last != 0 && *last == '\n') - { - *last = '\0'; - ACE_NEW_RETURN (env, char [strlen (temp) + 1], -1); - - // Copy to the env argument - strcpy (env, temp); - } - else - { - retval = -1; - break; - } - - temp = last + 1; - if (last != 0) - { - ACE_NEW_RETURN (wdir, char [strlen (temp) + 1], -1); - - // Copy to the env argument - strcpy (wdir, temp); - } - else - { - retval = -1; - break; - } - - // Now exit out. - break; - } - - delete [] value; - delete [] type; - return retval; -} -// = Accessor methods - -int -Repository::get_comm_line (const char *key, char *&comm_line) -{ - char *value, *type; // Temp variables needed for resolve - char *last, *temp; // For fields - int retval = this->repository_.resolve (key, value, type); - - // If successful, return what we need. - if (retval == 0) - { - temp = value; - // Null terminate the first field - last = ACE_OS::strstr (value, "\n"); - if (last != 0 && *last == '\n') - { - *last = '\0'; - ACE_NEW_RETURN (comm_line, char [strlen (temp) + 1], -1); - - // Copy to the comm_line argument - strcpy (comm_line, temp); - - delete [] value; - delete [] type; - return 0; - } - else - { - delete [] value; - delete [] type; - return -1; - } - } - - return retval; -} - - -int -Repository::get_env (const char *key, char *&env) -{ - char *value, *type; // Temp variables needed for resolve - char *last, *temp; // For field position - int retval = this->repository_.resolve (key, value, type); - - // If successful, return what we need. - if (retval == 0) - { - last = ACE_OS::strstr (value, "\n"); - temp = last + 1; - last = ACE_OS::strstr (temp, "\n"); - - if (last != 0 && *last == '\n') - { - *last = '\0'; - ACE_NEW_RETURN (env, char [strlen (temp) + 1], -1); - - // Copy to the env argument - strcpy (env, temp); - delete [] value; - delete [] type; - return 0; - } - else - { - delete [] value; - delete [] type; - return -1; - } - } - - return retval; -} - -int -Repository::get_wdir (const char *key, char *&wdir) -{ - char *value, *type; // Temp variables needed for resolve - char *last, *temp ; // For fields - int retval = this->repository_.resolve (key, value, type); - - // If successful, return what we need. - if (retval == 0) - { - last = ACE_OS::strstr (value, "\n"); - last = ACE_OS::strstr (last + 1, "\n"); - temp = last + 1; - - ACE_NEW_RETURN (wdir, char [strlen (temp) + 1], -1); - - // Copy to the wdir argument - strcpy (wdir, temp); - delete [] value; - delete [] type; - } - return retval; -} - -void -Repository::dump (void) -{ - this->repository_.dump (); -} diff --git a/TAO/orbsvcs/tests/ImplRepo/Repository.h b/TAO/orbsvcs/tests/ImplRepo/Repository.h deleted file mode 100644 index aa8467e2d2c..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/Repository.h +++ /dev/null @@ -1,35 +0,0 @@ -// $Id$ -#if !defined (REPOSITORY_H) -#define REPOSITORY_H - -#include "ace/Naming_Context.h" - -class Repository -{ -public: - Repository (); - // Default Constructor - - int add (const char *key, const char *comm_line, const char *env, const char *wdir); - // Add a new server to the Repository - - int remove (const char *key); - // Removes the server from the Repository - - int resolve (const char *key, char *&comm_line, char *&env, char *&wdir); - // Find the key record in the Repository - - // = Accessor methods - int get_comm_line (const char *key, char *&comm_line); - int get_env (const char *key, char *&env); - int get_wdir (const char *key, char *&wdir); - - // Dump method - void dump (void); - -private: - ACE_Naming_Context repository_; -}; - - -#endif /* REPOSITORY_H */ diff --git a/TAO/orbsvcs/tests/ImplRepo/Repository_Test.cpp b/TAO/orbsvcs/tests/ImplRepo/Repository_Test.cpp deleted file mode 100644 index 31f3b2fa3ed..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/Repository_Test.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "../../ImplRepo_Service/Repository.h" - -const char *NAME_VALUE = "server"; -const char *COMM_LINE_VALUE = "server -i"; -const char *ENV_VALUE = "null environment"; -const char *HOST_VALUE = "maxixe.cs.wustl.edu"; -const int PORT_VALUE = 20000; -const char *PING_IOR_VALUE = "iiop://maxixe/ping"; -const char *WDIR_VALUE = "."; - -// Just tests the functionality of the Repository - -int main (int argc, char *argv[]) -{ - int test_success = 1; - Repository rep; - Repository::Record new_rec, rec; - - new_rec.comm_line = ACE::strnew (COMM_LINE_VALUE); - new_rec.env = ACE::strnew (ENV_VALUE); - new_rec.host = ACE::strnew (HOST_VALUE); - new_rec.port = PORT_VALUE; - new_rec.ping_ior = ACE::strnew (PING_IOR_VALUE); - new_rec.wdir = ACE::strnew (WDIR_VALUE); - - ACE_DEBUG ((LM_DEBUG, "=Adding Record to Repository\n")); - - // Add our one record - int result = rep.add (NAME_VALUE, new_rec); - - if (result == 1) // We need to get rid of it - { - ACE_DEBUG ((LM_DEBUG, "New Record already registered, updating\n")); - rep.update (NAME_VALUE, new_rec); - } - - ACE_DEBUG ((LM_DEBUG, "=Performing Resolve Test\n")); - - // Bring it back! - if (rep.resolve (NAME_VALUE, rec) == 0) - { - if (ACE_OS::strcmp (rec.comm_line, COMM_LINE_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: comm_line compare failed: \"%s\" \"%s\"\n", - rec.comm_line, - COMM_LINE_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (rec.env, ENV_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: env compare failed: \"%s\" \"%s\"\n", - rec.env, - ENV_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (rec.wdir, WDIR_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: wdir compare failed: \"%s\" \"%s\"\n", - rec.wdir, - WDIR_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (rec.host, HOST_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: host compare failed: \"%s\" \"%s\"\n", - rec.host, - HOST_VALUE)); - test_success = 0; - } - - if (rec.port != PORT_VALUE) - { - ACE_DEBUG ((LM_DEBUG, - "Error: port compare failed: \"%hu\" \"%hu\"\n", - rec.port, - PORT_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (rec.ping_ior, PING_IOR_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: ping_ior compare failed: \"%s\" \"%s\"\n", - rec.ping_ior, - PING_IOR_VALUE)); - test_success = 0; - } - } - - // Try some of the single accessors - - char *cl, *env, *ping_ior; - - ACE_DEBUG ((LM_DEBUG, "=Performing Single Accessor Test\n")); - - if (rep.get_comm_line (NAME_VALUE, cl) == 0 - && rep.get_env (NAME_VALUE, env) == 0 - && rep.get_ping_ior (NAME_VALUE, ping_ior) == 0) - { - if (ACE_OS::strcmp (cl, COMM_LINE_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: comm_line compare failed: \"%s\" \"%s\"\n", - cl, - COMM_LINE_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (env, ENV_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: env compare failed: \"%s\" \"%s\"\n", - env, - ENV_VALUE)); - test_success = 0; - } - - if (ACE_OS::strcmp (ping_ior, PING_IOR_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "Error: ping_ior compare failed: \"%s\" \"%s\"\n", - ping_ior, - PING_IOR_VALUE)); - test_success = 0; - } - - delete [] cl; - delete [] env; - delete [] ping_ior; - } - - ACE_DEBUG ((LM_DEBUG, "=Performing Reregister Test\n")); - - if (rep.add (NAME_VALUE, new_rec) != 1) - { - ACE_DEBUG ((LM_DEBUG, "Error: Reregistration not detected\n")); - test_success = 0; - } - - ACE_DEBUG ((LM_DEBUG, "=Cleaning up\n")); - - if (rep.remove (NAME_VALUE) != 0) - { - ACE_DEBUG ((LM_DEBUG, "Error: Could not remove record\n")); - test_success = 0; - } - - if (test_success == 0) - { - ACE_DEBUG ((LM_DEBUG, "Tests were successful\n")); - return 0; - } - else - return -1; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/Repository_Test.dsp b/TAO/orbsvcs/tests/ImplRepo/Repository_Test.dsp deleted file mode 100644 index 17c1df0a9cb..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/Repository_Test.dsp +++ /dev/null @@ -1,108 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Repository_Test" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Repository_Test - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Repository_Test.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Repository_Test.mak" CFG="Repository_Test - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Repository_Test - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Repository_Test - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Repository_Test - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "Repository_Test - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Repository_Test - Win32 Release" -# Name "Repository_Test - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\ImplRepo_Service\Repository.cpp -# End Source File -# Begin Source File - -SOURCE=.\Repository_Test.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\ImplRepo_Service\Repository.h -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_client.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_client.cpp deleted file mode 100644 index 6d386d2de1e..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_client.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// $Id$ - -#include "airplane_client_i.h" - -ACE_RCSID(ImplRepo, airplane_client, "$Id$") - -// This function runs the test. - -int -main (int argc, char **argv) -{ - Airplane_Client_i client; - - ACE_DEBUG ((LM_DEBUG, "\n\tPaper Airplane Client\n\n")); - - if (client.init (argc, argv) == -1) - return 1; - else - return client.run (); -} - diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_client.dsp b/TAO/orbsvcs/tests/ImplRepo/airplane_client.dsp deleted file mode 100644 index 3dd4f596208..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_client.dsp +++ /dev/null @@ -1,208 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Airplane Client" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Airplane Client - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "airplane_client.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "airplane_client.mak" CFG="Airplane Client - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Airplane Client - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Airplane Client - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Airplane Client - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "Airplane Client - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Airplane Client - Win32 Release" -# Name "Airplane Client - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\airplane_client.cpp -# End Source File -# Begin Source File - -SOURCE=.\airplane_client_i.cpp -# End Source File -# End Group -# Begin Group "Generated Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\AirplaneC.cpp -# End Source File -# Begin Source File - -SOURCE=.\AirplaneS.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\airplane_client_i.h -# End Source File -# End Group -# Begin Group "IDL Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Airplane.idl - -!IF "$(CFG)" == "Airplane Client - Win32 Release" - -USERDEP__AIRPL="..\..\..\..\bin\Release\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\Airplane.idl -InputName=Airplane - -BuildCmds= \ - ..\..\..\..\bin\Release\tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ELSEIF "$(CFG)" == "Airplane Client - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -USERDEP__AIRPL="..\..\..\..\bin\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\Airplane.idl -InputName=Airplane - -BuildCmds= \ - ..\..\..\..\bin\tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ENDIF - -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_client_i.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_client_i.cpp deleted file mode 100644 index 765944d3bac..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_client_i.cpp +++ /dev/null @@ -1,171 +0,0 @@ -// $Id$ - -#include "airplane_client_i.h" -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" - -ACE_RCSID(ImplRepo, airplane_client_i, "$Id$") - -// Constructor. -Airplane_Client_i::Airplane_Client_i (void) - : server_key_ (ACE_OS::strdup ("key0")), - loop_count_ (10), - server_ (Paper_Airplane_Server::_nil ()) -{ -} - -// Reads the Server factory ior from a file - -int -Airplane_Client_i::read_ior (char *filename) -{ - // Open the file for reading. - ACE_HANDLE f_handle_ = ACE_OS::open (filename, 0); - - if (f_handle_ == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: %p\n", - filename), - -1); - ACE_Read_Buffer ior_buffer (f_handle_); - this->server_key_ = ior_buffer.read (); - - if (this->server_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to allocate memory to read ior: %p\n"), - -1); - - ACE_OS::close (f_handle_); - return 0; -} - -// Parses the command line arguments and returns an error status. - -int -Airplane_Client_i::parse_args (void) -{ - ACE_Get_Opt get_opts (argc_, argv_, "dn:k:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; - break; - case 'n': // loop count - this->loop_count_ = (u_int) ACE_OS::atoi (get_opts.optarg); - break; - case 'k': // ior provide on command line - this->server_key_ = ACE_OS::strdup (get_opts.optarg); - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-n loopcount]" - " [-k server-obj-key]" - "\n", - this->argv_ [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - -// Retreives paper airplanes from the server. - -void -Airplane_Client_i::get_planes (size_t count) -{ - for (size_t i = 0; i < count; i++) - { - TAO_TRY - { - TAO_TRY_ENV.clear (); - CORBA::String_var response = - this->server_->get_plane (TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "Plane %d is %s\n", i, response.in ())); - } - TAO_CATCHANY - { - ACE_ERROR ((LM_ERROR, "Plane %d exception:\n", i)); - TAO_TRY_ENV.print_exception ("get_planes"); - } - TAO_ENDTRY; - } -} - - -// Execute client example code. - -int -Airplane_Client_i::run () -{ - this->get_planes (this->loop_count_); - - return 0; -} - -Airplane_Client_i::~Airplane_Client_i (void) -{ - // Free resources - // Close the ior files - CORBA::release (this->server_); - - if (this->server_key_ != 0) - delete this->server_key_; -} - - -int -Airplane_Client_i::init (int argc, char **argv) -{ - this->argc_ = argc; - this->argv_ = argv; - - TAO_TRY - { - // Retrieve the ORB. - this->orb_ = CORBA::ORB_init (this->argc_, - this->argv_, - "internet", - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; - - if (this->server_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%s: no server key specified\n", - this->argv_[0]), - -1); - - CORBA::Object_var server_object = - this->orb_->string_to_object (this->server_key_, TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->server_ = Paper_Airplane_Server::_narrow (server_object.in(), TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (server_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid server key <%s>\n", - this->server_key_), - -1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Airplane_Client_i::init"); - return -1; - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_client_i.h b/TAO/orbsvcs/tests/ImplRepo/airplane_client_i.h deleted file mode 100644 index 66790adca6d..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_client_i.h +++ /dev/null @@ -1,78 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/ImplRepo -// -// = FILENAME -// airplane_client_i.h -// -// = DESCRIPTION -// This class implements a simple CORBA client which returns a random -// paper airplane from the paper airplane server. -// -// = AUTHORS -// Darrell Brunsch -// -// ============================================================================ - -#if !defined (AIRPLANE_CLIENT_I_H) -#define AIRPLANE_CLIENT_I_H - -#include "AirplaneC.h" -#include "tao/corba.h" - -class Airplane_Client_i -{ - // = TITLE - // Paper Airplane Client Implementation - // - // = DESCRIPTION - // Class wrapper for a client which gets the server IOR and then makes - // a couple of calls to the server. -public: - // = Constructor and destructor. - Airplane_Client_i (void); - ~Airplane_Client_i (void); - - int run (); - // Execute client example code. - - int init (int argc, char **argv); - // Initialize the client communication endpoint with server. - -private: - int read_ior (char *filename); - // Function to read the server ior from a file. - - int parse_args (void); - // Parses the arguments passed on the command line. - - void get_planes (size_t count); - // Ask the Paper Airplane Server for planes. - - int argc_; - // # of arguments on the command line. - - char **argv_; - // arguments from command line. - - char *server_key_; - // Key of the obj ref of the server. - - size_t loop_count_; - // Number of airplanes to query for. - - CORBA::Environment env_; - // Environment variable. - - Paper_Airplane_Server_ptr server_; - // Server object ptr. - - CORBA::ORB_var orb_; - // Remember our orb. -}; - -#endif /* AIRPLANE_CLIENT_I_H */ diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp deleted file mode 100644 index dbf2c5a2f9b..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_i.cpp +++ /dev/null @@ -1,95 +0,0 @@ -// $Id$ - -#include "time.h" -#include "airplane_i.h" -#include "tao/corba.h" - -ACE_RCSID(ImplRepo, airplane_i, "$Id$") - -// Constructor - -Airplane_i::Airplane_i (int shutdown) -: shutdown_ (shutdown) -{ - // Seed the random number generator - // Note: This server should not be run with thread-per-request since the seeding - // doesn't work with threads. - ACE_OS::srand (ACE_OS::time (0L)); -} - - -// Destructor - -Airplane_i::~Airplane_i (void) -{ - // Nothing -} - - -// Returns a random plane and page number - -char * -Airplane_i::get_plane (CORBA::Environment &TAO_IN_ENV) -{ - ACE_UNUSED_ARG (TAO_IN_ENV); - - if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, "Airplane_i::get_plane\n")); - - if (this->shutdown_ != 0) - TAO_ORB_Core_instance ()->orb ()->shutdown (); - - switch (ACE_OS::rand () % 24) - { - case 0: - return CORBA::string_dup ("Seagull, page 2"); - case 1: - return CORBA::string_dup ("Albatross, page 7"); - case 2: - return CORBA::string_dup ("Owl, page 13"); - case 3: - return CORBA::string_dup ("Falcon, page 19"); - case 4: - return CORBA::string_dup ("Sparrow, page 24"); - case 5: - return CORBA::string_dup ("Condor, page 31"); - case 6: - return CORBA::string_dup ("Basic wing-flapper, page 36"); - case 7: - return CORBA::string_dup ("Butterfly, page 42"); - case 8: - return CORBA::string_dup ("Moth, page 49"); - case 9: - return CORBA::string_dup ("Bat, page 54"); - case 10: - return CORBA::string_dup ("Wind rider, page 62"); - case 11: - return CORBA::string_dup ("Bobber, page 67"); - case 12: - return CORBA::string_dup ("Thunderbird, page 72"); - case 13: - return CORBA::string_dup ("Oddbird, page 77"); - case 14: - return CORBA::string_dup ("Another oddbird, page 81"); - case 15: - return CORBA::string_dup ("Asymmetric plane, page 86"); - case 16: - return CORBA::string_dup ("Flying spectacles, page 90"); - case 17: - return CORBA::string_dup ("UFO, page 100"); - case 18: - return CORBA::string_dup ("Space fighter #1, page 105"); - case 19: - return CORBA::string_dup ("Space fighter #2, page 110"); - case 20: - return CORBA::string_dup ("Pinwheel, page 120"); - case 21: - return CORBA::string_dup ("Flying saucer, page 128"); - case 22: - return CORBA::string_dup ("Flying teacup, page 134"); - case 23: - return CORBA::string_dup ("Tumbler, page 138"); - } - - return 0; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_i.h b/TAO/orbsvcs/tests/ImplRepo/airplane_i.h deleted file mode 100644 index 05398af6b86..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_i.h +++ /dev/null @@ -1,60 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/ImplRepo -// -// = FILENAME -// airplane_i.h -// -// = DESCRIPTION -// This class implements a simple CORBA server which returns a random -// paper airplane from the book "Oddballs, Wing-Flappers, & Spinners: -// Great Paper Airplanes" by John Bringhurst. ISBN: 0-07-067910-X (pbk.) -// An excellent book to have! I personally recommend getting it just -// for the wing-flappers. -// -// = AUTHOR -// Darrell Brunsch -// -// ============================================================================ - -#if !defined (AIRPLANE_I_H) -#define AIRPLANE_I_H - -#include "AirplaneS.h" - -// Forward declarations. -class Airplane_i; - -// Typedefs. -typedef Airplane_i *Airplane_i_ptr; -typedef Airplane_i_ptr Airplane_i_ref; - -class Airplane_i: public POA_Paper_Airplane_Server -{ - // = TITLE - // Paper Airplane Server Implementation - // - // = DESCRIPTION - // This server has one method that returns the featured paper airplane - // at this moment (in other words, a random airplane). -public: - Airplane_i (int shutdown = 0); - // Constructor that takes in an optional shutdown parameter which, if nonzero, - // will shutdown the server after each call to get_plane. - - ~Airplane_i (void); - // Destructor - - virtual char *get_plane (CORBA::Environment &_env); - // Returns a random plane. - -private: - int shutdown_; - // Shutdown flag -}; - -#endif /* AIRPLANE_I_H */ diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp deleted file mode 100644 index 290770b24f2..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// $Id$ - -#include "airplane_server_i.h" - -ACE_RCSID(ImplRepo, airplane_server, "$Id$") - -int -main (int argc, char *argv[]) -{ - Airplane_Server_i server; - - ACE_DEBUG ((LM_DEBUG, "\n\tPaper Airplane Server\n\n")); - TAO_TRY - { - if (server.init (argc, argv, TAO_TRY_ENV) == -1) - return -1; - else - { - server.run (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - } - TAO_CATCH (CORBA::SystemException, sysex) - { - ACE_UNUSED_ARG (sysex); - TAO_TRY_ENV.print_exception ("System Exception"); - return -1; - } - TAO_CATCH (CORBA::UserException, userex) - { - ACE_UNUSED_ARG (userex); - TAO_TRY_ENV.print_exception ("User Exception"); - return -1; - } - TAO_ENDTRY; - return 0; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_server.dsp b/TAO/orbsvcs/tests/ImplRepo/airplane_server.dsp deleted file mode 100644 index a5068a8b5d4..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_server.dsp +++ /dev/null @@ -1,224 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Airplane Server" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Airplane Server - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "airplane_server.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "airplane_server.mak" CFG="Airplane Server - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Airplane Server - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Airplane Server - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Airplane Server - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "Airplane Server - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib TAOd.lib orbsvcsd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Airplane Server - Win32 Release" -# Name "Airplane Server - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\airplane_i.cpp -# End Source File -# Begin Source File - -SOURCE=.\airplane_server.cpp -# End Source File -# Begin Source File - -SOURCE=.\airplane_server_i.cpp -# End Source File -# Begin Source File - -SOURCE=.\IR_Helper.cpp -# End Source File -# End Group -# Begin Group "Generated Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\AirplaneC.cpp -# End Source File -# Begin Source File - -SOURCE=.\AirplaneS.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\airplane_i.h -# End Source File -# Begin Source File - -SOURCE=.\airplane_server_i.h -# End Source File -# Begin Source File - -SOURCE=.\IR_Helper.h -# End Source File -# End Group -# Begin Group "IDL Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Airplane.idl - -!IF "$(CFG)" == "Airplane Server - Win32 Release" - -USERDEP__AIRPL="..\..\..\..\bin\Release\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\Airplane.idl -InputName=Airplane - -BuildCmds= \ - ..\..\..\..\bin\Release\tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ELSEIF "$(CFG)" == "Airplane Server - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -USERDEP__AIRPL="..\..\..\..\bin\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\Airplane.idl -InputName=Airplane - -BuildCmds= \ - ..\..\..\..\bin\tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ENDIF - -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.cpp deleted file mode 100644 index 3a6ec2909d1..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.cpp +++ /dev/null @@ -1,175 +0,0 @@ -// $Id$ - -#include "airplane_server_i.h" -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" - -ACE_RCSID(ImplRepo, airplane_server_i, "$Id$") - -Airplane_Server_i::Airplane_Server_i (void) - : server_impl_ (0), - ior_output_file_ (0), - ir_helper_ (0), - register_with_ir_ (0), - use_ir_ (0) -{ - // Nothing -} - -int -Airplane_Server_i::parse_args (void) -{ - ACE_Get_Opt get_opts (this->argc_, this->argv_, "do:ir"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag. - TAO_debug_level++; - break; - case 'r': // Register restart information with the IR. - this->register_with_ir_ = 1; - break; - case 'i': // Use the IR - this->use_ir_ = 1; - break; - case 'o': // output the IOR to a file. - this->ior_output_file_ = ACE_OS::fopen (get_opts.optarg, "w"); - if (this->ior_output_file_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: %p\n", - get_opts.optarg), -1); - break; - case '?': // display help for use of the server. - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-i]" - " [-r]" - " [-o] " - "\n", - argv_ [0]), - 1); - } - - // Indicates successful parsing of command line. - return 0; -} - -int -Airplane_Server_i::init (int argc, char** argv, CORBA::Environment& TAO_IN_ENV) -{ - char poa_name[] = "plane"; - - TAO_TRY - { - // Call the init of to initialize the ORB and - // create a child POA under the root POA. - if (this->orb_manager_.init_child_poa (argc, argv, poa_name, TAO_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init_child_poa"), -1); - - TAO_CHECK_ENV; - - this->argc_ = argc; - this->argv_ = argv; - - int retval = this->parse_args (); - - if (retval != 0) - return retval; - - ACE_NEW_RETURN (this->server_impl_, Airplane_i (this->use_ir_), -1); - - CORBA::String_var server_str = - this->orb_manager_.activate_under_child_poa ("server", - this->server_impl_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->use_ir_ == 1) - { - ACE_NEW_RETURN (this->ir_helper_, IR_Helper (poa_name, - this->orb_manager_.child_poa (), - this->orb_manager_.orb (), - TAO_debug_level), - -1); - - if (this->register_with_ir_ == 1) - this->ir_helper_->register_server ("airplane_server -i"); - } - - PortableServer::ObjectId_var id = - PortableServer::string_to_ObjectId ("server"); - - CORBA::Object_var server_obj = - this->orb_manager_.child_poa ()->id_to_reference (id.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->use_ir_ == 1) - { - this->ir_helper_->change_object (server_obj, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - server_str = - this->orb_manager_.orb ()->object_to_string (server_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "The IOR is: <%s>\n", server_str.in ())); - - if (this->ior_output_file_) - { - ACE_OS::fprintf (this->ior_output_file_, "%s", server_str.in ()); - ACE_OS::fclose (this->ior_output_file_); - } - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Airplane_i::init"); - TAO_RETHROW_RETURN (-1); - } - TAO_ENDTRY; - - return 0; -} - -int -Airplane_Server_i::run (CORBA::Environment& env) -{ - TAO_TRY - { - if (this->use_ir_ == 1) - { - this->ir_helper_->notify_startup (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - this->orb_manager_.run (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->use_ir_ == 1) - { - this->ir_helper_->notify_shutdown (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Airplane_Server_i::run"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -Airplane_Server_i::~Airplane_Server_i (void) -{ - delete this->ir_helper_; - delete this->server_impl_; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.h b/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.h deleted file mode 100644 index 351ea8133a2..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.h +++ /dev/null @@ -1,80 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/ImplRepo -// -// = FILENAME -// airplane_server_i.h -// -// = DESCRIPTION -// Server that sets up the ORB and handles the registration and execution -// of the Paper Airplane Server. -// -// = AUTHORS -// Darrell Brunsch -// -// ============================================================================ - -#if !defined (AIRPLANE_SERVER_I_H) -#define AIRPLANE_SERVER_I_H - -#include "tao/TAO.h" -#include "airplane_i.h" -#include "IR_Helper.h" - -class Airplane_Server_i -{ - // = TITLE - // Paper Airplane Server Implementation Class - // - // = DESCRIPTION - // Sets up everything necessary to get the Paper Airplane Server - // running. - // -public: - // = Initialization and termination methods. - Airplane_Server_i (void); - // Default constructor - - ~Airplane_Server_i (void); - // Destructor - - int init (int argc, char **argv, CORBA::Environment& env); - // Initialize the Server state - parsing arguments and waiting - - int run (CORBA::Environment& env); - // Run the orb - -private: - int parse_args (void); - // Parses the commandline arguments. - - int argc_; - // Number of command line arguments. - - char **argv_; - // The command line arguments. - - TAO_ORB_Manager orb_manager_; - // The ORB manager. - - Airplane_i *server_impl_; - // The Paper Airplane Server Implementation. - - FILE *ior_output_file_; - // File where the IOR of the server object is stored. - - IR_Helper *ir_helper_; - // Helper class for using the IR. - - int register_with_ir_; - // Flag for whether or not to register startup with the IR. - - int use_ir_; - // Flag for whether or not to use the IR. -}; - -#endif /* AIRPLANE_SERVER_I_H */ diff --git a/TAO/orbsvcs/tests/ImplRepo/implrepo.conf b/TAO/orbsvcs/tests/ImplRepo/implrepo.conf deleted file mode 100644 index dfef701b2ae..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/implrepo.conf +++ /dev/null @@ -1,4 +0,0 @@ -# $Id$ -dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources tss" -dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency thread-per-connection -ORBpoalock null -ORBtablesize 128" diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_client.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_client.cpp deleted file mode 100644 index 03e00c6bdd6..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_client.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// $Id$ - -#include "nestea_client_i.h" - -ACE_RCSID(ImplRepo, nestea_client, "$Id$") - -// This function runs the test. - -int -main (int argc, char **argv) -{ - Nestea_Client_i client; - - ACE_DEBUG ((LM_DEBUG, "\n\tNestea Bookshelf Client\n\n")); - - if (client.init (argc, argv) == -1) - return 1; - else - return client.run (); -} - diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_client.dsp b/TAO/orbsvcs/tests/ImplRepo/nestea_client.dsp deleted file mode 100644 index 88780a43145..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_client.dsp +++ /dev/null @@ -1,208 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Nestea Client" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Nestea Client - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "nestea_client.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "nestea_client.mak" CFG="Nestea Client - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Nestea Client - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Nestea Client - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Nestea Client - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "Nestea Client - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Nestea Client - Win32 Release" -# Name "Nestea Client - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\nestea_client.cpp -# End Source File -# Begin Source File - -SOURCE=.\nestea_client_i.cpp -# End Source File -# End Group -# Begin Group "Generated Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\NesteaC.cpp -# End Source File -# Begin Source File - -SOURCE=.\NesteaS.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\nestea_client_i.h -# End Source File -# End Group -# Begin Group "IDL Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Nestea.idl - -!IF "$(CFG)" == "Nestea Client - Win32 Release" - -USERDEP__AIRPL="..\..\..\..\bin\Release\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\Nestea.idl -InputName=Nestea - -BuildCmds= \ - ..\..\..\..\bin\Release\tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ELSEIF "$(CFG)" == "Nestea Client - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -USERDEP__AIRPL="..\..\..\..\bin\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\Nestea.idl -InputName=Nestea - -BuildCmds= \ - ..\..\..\..\bin\tao_idl -Gi $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ENDIF - -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_client_i.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_client_i.cpp deleted file mode 100644 index b8b47a28d8b..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_client_i.cpp +++ /dev/null @@ -1,155 +0,0 @@ -// $Id$ - -#include "nestea_client_i.h" -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" - -ACE_RCSID(ImplRepo, nestea_client_i, "$Id$") - -// Constructor. -Nestea_Client_i::Nestea_Client_i (void) - : server_key_ (ACE_OS::strdup ("key0")), - server_ (Nestea_Bookshelf::_nil ()) -{ -} - -// Reads the Server factory ior from a file - -int -Nestea_Client_i::read_ior (char *filename) -{ - // Open the file for reading. - ACE_HANDLE f_handle_ = ACE_OS::open (filename, 0); - - if (f_handle_ == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: %p\n", - filename), - -1); - ACE_Read_Buffer ior_buffer (f_handle_); - this->server_key_ = ior_buffer.read (); - - if (this->server_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to allocate memory to read ior: %p\n"), - -1); - - ACE_OS::close (f_handle_); - return 0; -} - -// Parses the command line arguments and returns an error status. - -int -Nestea_Client_i::parse_args (void) -{ - ACE_Get_Opt get_opts (argc_, argv_, "dn:k:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; - break; - case 'k': // ior provide on command line - this->server_key_ = ACE_OS::strdup (get_opts.optarg); - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-n loopcount]" - " [-k server-object-key]" - "\n", - this->argv_ [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - -// Execute client example code. - -int -Nestea_Client_i::run () -{ - this->server_->drink (40); - this->server_->drink (100); - - ACE_DEBUG ((LM_DEBUG, "Cans: %d\n" - "Praise: %s\n", - this->server_->bookshelf_size (), - this->server_->get_praise ())); - - this->server_->drink (500); - this->server_->crush (200); - - ACE_DEBUG ((LM_DEBUG, "Cans: %d\n" - "Praise: %s\n", - this->server_->bookshelf_size (), - this->server_->get_praise ())); - - return 0; -} - -Nestea_Client_i::~Nestea_Client_i (void) -{ - // Free resources - // Close the ior files - CORBA::release (this->server_); - - if (this->server_key_ != 0) - delete this->server_key_; -} - - -int -Nestea_Client_i::init (int argc, char **argv) -{ - this->argc_ = argc; - this->argv_ = argv; - - ACE_TRY_NEW_ENV - { - // Retrieve the ORB. - this->orb_ = CORBA::ORB_init (this->argc_, - this->argv_, - "internet", - ACE_TRY_ENV); - ACE_TRY_CHECK; - - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; - - if (this->server_key_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%s: no server key specified\n", - this->argv_[0]), - -1); - - CORBA::Object_var server_object = - this->orb_->string_to_object (this->server_key_, ACE_TRY_ENV); - ACE_TRY_CHECK; - - this->server_ = Nestea_Bookshelf::_narrow (server_object.in(), ACE_TRY_ENV); - ACE_TRY_CHECK; - - if (CORBA::is_nil (server_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid server key <%s>\n", - this->server_key_), - -1); - } - ACE_CATCHANY - { - ACE_TRY_ENV.print_exception ("Nestea_Client_i::init"); - return -1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_client_i.h b/TAO/orbsvcs/tests/ImplRepo/nestea_client_i.h deleted file mode 100644 index 5a428183d36..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_client_i.h +++ /dev/null @@ -1,69 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/ImplRepo -// -// = FILENAME -// nestea_client_i.h -// -// = DESCRIPTION -// This class implements a simple CORBA client which controls a Nestea -// can database -// -// = AUTHORS -// Darrell Brunsch -// -// ============================================================================ - -#if !defined (NESTEA_CLIENT_I_H) -#define NESTEA_CLIENT_I_H - -#include "tao/corba.h" -#include "NesteaC.h" - -class Nestea_Client_i -{ - // = TITLE - // Nestea Bookshelf Client Implementation - // - // = DESCRIPTION - // Class wrapper for a client which gets the server IOR and then makes - // a couple of calls to the server. -public: - // = Constructor and destructor. - Nestea_Client_i (void); - ~Nestea_Client_i (void); - - int run (); - // Execute client example code. - - int init (int argc, char **argv); - // Initialize the client communication endpoint with server. - -private: - int read_ior (char *filename); - // Function to read the server ior from a file. - - int parse_args (void); - // Parses the arguments passed on the command line. - - int argc_; - // # of arguments on the command line. - - char **argv_; - // arguments from command line. - - char *server_key_; - // Key of the obj ref of the server. - - Nestea_Bookshelf_ptr server_; - // Server object ptr. - - CORBA::ORB_var orb_; - // Remember our orb. -}; - -#endif /* Nestea_CLIENT_I_H */ diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp deleted file mode 100644 index f3a3e842654..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp +++ /dev/null @@ -1,105 +0,0 @@ -// $Id$ - -#include "time.h" -#include "nestea_i.h" -#include "tao/corba.h" - -ACE_RCSID(ImplRepo, nestea_i, "$Id$") - -// Constructor - -Nestea_i::Nestea_i (int shutdown) -: shutdown_ (shutdown), - cans_ (0) -{ -} - - -// Destructor - -Nestea_i::~Nestea_i (void) -{ - // Nothing -} - - -// Add number of cans to the bookshelf. - -void -Nestea_i::drink (CORBA::Long cans, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_UNUSED_ARG (ACE_TRY_ENV); - - if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, "Nestea_i::drink %d cans\n", cans)); - - if (this->shutdown_ != 0) - TAO_ORB_Core_instance ()->orb ()->shutdown (); - - this->cans_ += cans; -} - - -// Removes number of cans from the bookshelf. - -void -Nestea_i::crush (CORBA::Long cans, - CORBA::Environment &ACE_TRY_ENV) -{ - ACE_UNUSED_ARG (ACE_TRY_ENV); - - if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, "Nestea_i::crush %d cans\n", cans)); - - if (this->shutdown_ != 0) - TAO_ORB_Core_instance ()->orb ()->shutdown (); - - this->cans_ -= cans; - - // Don't go below 0. - if (this->cans_ < 0) - this->cans_ = 0; -} - - -// Returns the number of cans in the bookshelf. - -CORBA::Long -Nestea_i::bookshelf_size (CORBA::Environment &ACE_TRY_ENV) -{ - ACE_UNUSED_ARG (ACE_TRY_ENV); - - if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, "Nestea_i::bookshelf_size\n")); - - if (this->shutdown_ != 0) - TAO_ORB_Core_instance ()->orb ()->shutdown (); - - return this->cans_; -} - -// Returns comments about your collection. - -char * -Nestea_i::get_praise (CORBA::Environment &ACE_TRY_ENV) -{ - ACE_UNUSED_ARG (ACE_TRY_ENV); - - if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, "Nestea_i::get_praise\n")); - - if (this->shutdown_ != 0) - TAO_ORB_Core_instance ()->orb ()->shutdown (); - - if (this->cans_ > 500) - return CORBA::string_dup ("Man, that is one excellent Nestea Collection!"); - else if (this->cans_ > 250) - return CORBA::string_dup ("We are getting into the big leagues now!"); - else if (this->cans_ > 100) - return CORBA::string_dup ("Things are looking up!"); - else if (this->cans_ > 0) - return CORBA::string_dup ("Well, it is a start. Drink more Nestea!"); - else - return CORBA::string_dup ("No cans, no praise."); -} diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_i.h b/TAO/orbsvcs/tests/ImplRepo/nestea_i.h deleted file mode 100644 index f9229a39fd5..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_i.h +++ /dev/null @@ -1,75 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/ImplRepo -// -// = FILENAME -// nestea_i.h -// -// = DESCRIPTION -// This class is an implementation of the Nestea Bookshelf interface. -// -// = AUTHOR -// Darrell Brunsch -// -// ============================================================================ - -#if !defined (NESTEA_I_H) -#define NESTEA_I_H - -#include "NesteaS.h" - -// Forward declarations. -class Nestea_i; - -// Typedefs. -typedef Nestea_i *Nestea_i_ptr; -typedef Nestea_i_ptr Nestea_i_ref; - -class Nestea_i: public POA_Nestea_Bookshelf -{ - // = TITLE - // Nestea Bookshelf Implementation - // - // = DESCRIPTION - // Implements the Nestea Bookshelf server, which keeps track of the - // number of nestea cans in a bookshelf. You can drink Nestea to add - // it to the bookshelf or crush the cans to remove them. -public: - Nestea_i (int shutdown = 0); - // Constructor that takes in an optional shutdown parameter which, if nonzero, - // will shutdown the server after each call. - - virtual ~Nestea_i (void); - // Destructor - - virtual void drink (CORBA::Long cans, - CORBA::Environment &ACE_TRY_ENV = - CORBA::Environment::default_environment ()); - // Add number of cans to the bookshelf. - - virtual void crush (CORBA::Long cans, - CORBA::Environment &ACE_TRY_ENV = - CORBA::Environment::default_environment ()); - // Removes number of cans from the bookshelf. - - virtual CORBA::Long bookshelf_size (CORBA::Environment &ACE_TRY_ENV = - CORBA::Environment::default_environment ()); - // Returns the number of cans in the bookshelf. - - virtual char *get_praise (CORBA::Environment &ACE_TRY_ENV = - CORBA::Environment::default_environment ()); - // Returns comments about your collection. - -private: - int shutdown_; - // Shutdown flag. - - CORBA::Long cans_; - // Number of cans in the bookshelf. -}; - -#endif /* NESTEA_I_H */ diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_server.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_server.cpp deleted file mode 100644 index e78110f1e48..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_server.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// $Id$ - -#include "nestea_server_i.h" - -ACE_RCSID(ImplRepo, nestea_server, "$Id$") - -int -main (int argc, char *argv[]) -{ - Nestea_Server_i server; - - ACE_DEBUG ((LM_DEBUG, "\n\tPaper Nestea Server\n\n")); - TAO_TRY - { - if (server.init (argc, argv, TAO_TRY_ENV) == -1) - return -1; - else - { - server.run (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - } - TAO_CATCH (CORBA::SystemException, sysex) - { - ACE_UNUSED_ARG (sysex); - TAO_TRY_ENV.print_exception ("System Exception"); - return -1; - } - TAO_CATCH (CORBA::UserException, userex) - { - ACE_UNUSED_ARG (userex); - TAO_TRY_ENV.print_exception ("User Exception"); - return -1; - } - TAO_ENDTRY; - return 0; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_server.dsp b/TAO/orbsvcs/tests/ImplRepo/nestea_server.dsp deleted file mode 100644 index 72be10ec8c5..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_server.dsp +++ /dev/null @@ -1,224 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Nestea Server" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Nestea Server - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "nestea_server.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "nestea_server.mak" CFG="Nestea Server - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Nestea Server - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Nestea Server - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Nestea Server - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "Nestea Server - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib TAOd.lib orbsvcsd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Nestea Server - Win32 Release" -# Name "Nestea Server - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\nestea_i.cpp -# End Source File -# Begin Source File - -SOURCE=.\nestea_server.cpp -# End Source File -# Begin Source File - -SOURCE=.\nestea_server_i.cpp -# End Source File -# Begin Source File - -SOURCE=.\IR_Helper.cpp -# End Source File -# End Group -# Begin Group "Generated Source Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\NesteaC.cpp -# End Source File -# Begin Source File - -SOURCE=.\NesteaS.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\nestea_i.h -# End Source File -# Begin Source File - -SOURCE=.\nestea_server_i.h -# End Source File -# Begin Source File - -SOURCE=.\IR_Helper.h -# End Source File -# End Group -# Begin Group "IDL Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Nestea.idl - -!IF "$(CFG)" == "Nestea Server - Win32 Release" - -USERDEP__AIRPL="..\..\..\..\bin\Release\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\Nestea.idl -InputName=Nestea - -BuildCmds= \ - ..\..\..\..\bin\Release\tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ELSEIF "$(CFG)" == "Nestea Server - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -USERDEP__AIRPL="..\..\..\..\bin\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\Nestea.idl -InputName=Nestea - -BuildCmds= \ - ..\..\..\..\bin\tao_idl -Gi $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ENDIF - -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp deleted file mode 100644 index bb1f5982972..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp +++ /dev/null @@ -1,175 +0,0 @@ -// $Id$ - -#include "nestea_server_i.h" -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" - -ACE_RCSID(ImplRepo, nestea_server_i, "$Id$") - -Nestea_Server_i::Nestea_Server_i (void) - : server_impl_ (0), - ior_output_file_ (0), - ir_helper_ (0), - register_with_ir_ (0), - use_ir_ (0) -{ - // Nothing -} - -int -Nestea_Server_i::parse_args (void) -{ - ACE_Get_Opt get_opts (this->argc_, this->argv_, "do:ir"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag. - TAO_debug_level++; - break; - case 'r': // Register restart information with the IR. - this->register_with_ir_ = 1; - break; - case 'i': // Use the IR - this->use_ir_ = 1; - break; - case 'o': // output the IOR to a file. - this->ior_output_file_ = ACE_OS::fopen (get_opts.optarg, "w"); - if (this->ior_output_file_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: %p\n", - get_opts.optarg), -1); - break; - case '?': // display help for use of the server. - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-i]" - " [-r]" - " [-o] " - "\n", - argv_ [0]), - 1); - } - - // Indicates successful parsing of command line. - return 0; -} - -int -Nestea_Server_i::init (int argc, char** argv, CORBA::Environment& TAO_IN_ENV) -{ - char poa_name[] = "nestea_server"; - - TAO_TRY - { - // Call the init of to initialize the ORB and - // create a child POA under the root POA. - if (this->orb_manager_.init_child_poa (argc, argv, poa_name, TAO_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init_child_poa"), -1); - - TAO_CHECK_ENV; - - this->argc_ = argc; - this->argv_ = argv; - - int retval = this->parse_args (); - - if (retval != 0) - return retval; - - ACE_NEW_RETURN (this->server_impl_, Nestea_i (this->use_ir_), -1); - - CORBA::String_var server_str = - this->orb_manager_.activate_under_child_poa ("server", - this->server_impl_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->use_ir_ == 1) - { - ACE_NEW_RETURN (this->ir_helper_, IR_Helper (poa_name, - this->orb_manager_.child_poa (), - this->orb_manager_.orb (), - TAO_debug_level), - -1); - - if (this->register_with_ir_ == 1) - this->ir_helper_->register_server ("nestea_server -i"); - } - - PortableServer::ObjectId_var id = - PortableServer::string_to_ObjectId ("server"); - - CORBA::Object_var server_obj = - this->orb_manager_.child_poa ()->id_to_reference (id.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->use_ir_ == 1) - { - this->ir_helper_->change_object (server_obj, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - server_str = - this->orb_manager_.orb ()->object_to_string (server_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "The IOR is: <%s>\n", server_str.in ())); - - if (this->ior_output_file_) - { - ACE_OS::fprintf (this->ior_output_file_, "%s", server_str.in ()); - ACE_OS::fclose (this->ior_output_file_); - } - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Nestea_i::init"); - TAO_RETHROW_RETURN (-1); - } - TAO_ENDTRY; - - return 0; -} - -int -Nestea_Server_i::run (CORBA::Environment& env) -{ - TAO_TRY - { - if (this->use_ir_ == 1) - { - this->ir_helper_->notify_startup (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - this->orb_manager_.run (TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (this->use_ir_ == 1) - { - this->ir_helper_->notify_shutdown (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Nestea_Server_i::run"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -Nestea_Server_i::~Nestea_Server_i (void) -{ - delete this->ir_helper_; - delete this->server_impl_; -} diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.h b/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.h deleted file mode 100644 index d62bd9e0fc3..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.h +++ /dev/null @@ -1,80 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/ImplRepo -// -// = FILENAME -// nestea_server_i.h -// -// = DESCRIPTION -// Server that sets up the ORB and handles the registration and execution -// of the Paper Nestea Server. -// -// = AUTHORS -// Darrell Brunsch -// -// ============================================================================ - -#if !defined (NESTEA_SERVER_I_H) -#define NESTEA_SERVER_I_H - -#include "tao/TAO.h" -#include "nestea_i.h" -#include "IR_Helper.h" - -class Nestea_Server_i -{ - // = TITLE - // Paper Nestea Server Implementation Class - // - // = DESCRIPTION - // Sets up everything necessary to get the Paper Nestea Server - // running. - // -public: - // = Initialization and termination methods. - Nestea_Server_i (void); - // Default constructor - - ~Nestea_Server_i (void); - // Destructor - - int init (int argc, char **argv, CORBA::Environment& env); - // Initialize the Server state - parsing arguments and waiting - - int run (CORBA::Environment& env); - // Run the orb - -private: - int parse_args (void); - // Parses the commandline arguments. - - int argc_; - // Number of command line arguments. - - char **argv_; - // The command line arguments. - - TAO_ORB_Manager orb_manager_; - // The ORB manager. - - Nestea_i *server_impl_; - // The Paper Nestea Server Implementation. - - FILE *ior_output_file_; - // File where the IOR of the server object is stored. - - IR_Helper *ir_helper_; - // Helper class for using the IR. - - int register_with_ir_; - // Flag for whether or not to register startup with the IR. - - int use_ir_; - // Flag for whether or not to use the IR. -}; - -#endif /* NESTEA_SERVER_I_H */ diff --git a/TAO/orbsvcs/tests/ImplRepo/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/run_test.pl deleted file mode 100755 index 3e29e0c5eba..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/run_test.pl +++ /dev/null @@ -1,155 +0,0 @@ -#$Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -use lib "../../../../bin"; - -require ACEutils; - -$airplane_ior = "airplane.ior"; -$nestea_ior = "nestea.ior"; -$implrepo_ior = "implrepo.ior"; - -# Make sure the files are gone, so we can wait on them. -unlink $airplane_ior; -unlink $nestea_iro; -unlink $implrepo_ior; - -# The Tests - -sub airplane_test -{ - $SV = Process::Create ($EXEPREFIX."airplane_server".$Process::EXE_EXT, - "-o $airplane_ior -r"); - - ACE::waitforfile ($airplane_ior); - - $status = system ($EXEPREFIX."airplane_client".$Process::EXE_EXT. - " -k file://$airplane_ior"); - - $SV->Kill (); $SV->Wait (); - unlink $airplane_ior; -} - -sub airplane_ir_test -{ - $IR = Process::Create ("..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."ImplRepo_Service".$DIR_SEPARATOR."ImplRepo_Service".$Process::EXE_EXT, - "-ORBsvcconf implrepo.conf -ORBobjrefstyle url -d 0"); - - ACE::waitforfile ($implrepo_ior); - - $SV = Process::Create ($EXEPREFIX."airplane_server".$Process::EXE_EXT, - "-o $airplane_ior -i -r -ORBobjrefstyle url"); - - ACE::waitforfile ($airplane_ior); - - system($EXEPREFIX."airplane_client -k file://$airplane_ior -ORBobjrefstyle url"); - - $IR->Kill (); $IR->Wait (); -} - -sub nestea_test -{ - $SV = Process::Create ($EXEPREFIX."nestea_server".$Process::EXE_EXT, - "-o $nestea_ior"); - - ACE::waitforfile ($nestea_ior); - - $status = system ($EXEPREFIX."nestea_client".$Process::EXE_EXT. - " -k file://$nestea_ior"); - - $SV->Kill (); $SV->Wait (); - - unlink $nestea_ior; -} - -sub nestea_ir_test -{ - $IR = Process::Create ("..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."ImplRepo_Service".$DIR_SEPARATOR."ImplRepo_Service".$Process::EXE_EXT, - "-ORBsvcconf implrepo.conf -ORBobjrefstyle url -d 0"); - - ACE::waitforfile ($implrepo_ior); - - $SV = Process::Create ($EXEPREFIX."nestea_server".$Process::EXE_EXT, - "-o $nestea_ior -i -r -ORBobjrefstyle url"); - - ACE::waitforfile ($nestea_ior); - - system($EXEPREFIX."nestea_client -k file://$nestea_ior -ORBobjrefstyle url"); - - $IR->Kill (); $IR->Wait (); -} - -sub both_ir_test -{ - $IR = Process::Create ("..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."ImplRepo_Service".$DIR_SEPARATOR."ImplRepo_Service".$Process::EXE_EXT, - "-ORBsvcconf implrepo.conf -ORBobjrefstyle url -d 0"); - - ACE::waitforfile ($implrepo_ior); - - $ASV = Process::Create ($EXEPREFIX."nestea_server".$Process::EXE_EXT, - "-o $nestea_ior -i -r -ORBobjrefstyle url"); - - $NSV = Process::Create ($EXEPREFIX."airplane_server".$Process::EXE_EXT, - "-o $airplane_ior -i -r -ORBobjrefstyle url"); - - ACE::waitforfile ($airplane_ior); - - $ACL = Process::Create ($EXEPREFIX."airplane_client".$Process::EXE_EXT, - "-k file://$airplane_ior -ORBobjrefstyle url"); - - ACE::waitforfile ($nestea_ior); - - system($EXEPREFIX."nestea_client -k file://$nestea_ior -ORBobjrefstyle url"); - - $IR->Kill (); $IR->Wait (); -} - - -# Parse the arguments - -for ($i = 0; $i <= $#ARGV; $i++) -{ - SWITCH: - { - if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") - { - print "run_test test\n"; - print "\n"; - print "test -- Runs a specific test\n"; - print " airplane, simple, or implrepo\n"; - exit; - } - if ($ARGV[$i] eq "airplane") - { - airplane_test (); - exit; - } - if ($ARGV[$i] eq "airplane_ir") - { - airplane_ir_test (); - exit; - } - if ($ARGV[$i] eq "nestea") - { - nestea_test (); - exit; - } - if ($ARGV[$i] eq "nestea_ir") - { - nestea_ir_test (); - exit; - } - if ($ARGV[$i] eq "both_ir") - { - both_ir_test (); - exit; - } - - print "run_test: Unknown Option: ".$ARGV[$i]."\n"; - } -} - -print "Specify airplane, airplane_ir, nestea, nestea_ir, or both_ir\n" diff --git a/TAO/orbsvcs/tests/ImplRepo/svc.conf b/TAO/orbsvcs/tests/ImplRepo/svc.conf deleted file mode 100644 index be31b0bb031..00000000000 --- a/TAO/orbsvcs/tests/ImplRepo/svc.conf +++ /dev/null @@ -1,4 +0,0 @@ -# $Id$ -dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global" -dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBtablesize 128" diff --git a/TAO/orbsvcs/tests/Logger/Logger.dsw b/TAO/orbsvcs/tests/Logger/Logger.dsw deleted file mode 100644 index d17cf7c9604..00000000000 --- a/TAO/orbsvcs/tests/Logger/Logger.dsw +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "client"=.\client.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "server"=.\server.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/Logger/Logging_Test.cpp b/TAO/orbsvcs/tests/Logger/Logging_Test.cpp deleted file mode 100644 index 35fb4dc27a1..00000000000 --- a/TAO/orbsvcs/tests/Logger/Logging_Test.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// $Id$ - -#include "Logging_Test_i.h" - -ACE_RCSID(Logger, Logging_Test, "$Id$") - -// This function runs the Logging service test. - -int -main (int argc, char **argv) -{ - Logger_Client logger_client; - - ACE_DEBUG ((LM_DEBUG, - "\n \t IDL_Logger: client \n\n")); - - if (logger_client.init (argc, argv) == -1) - return 1; - - return logger_client.run (); -} diff --git a/TAO/orbsvcs/tests/Logger/Logging_Test_i.cpp b/TAO/orbsvcs/tests/Logger/Logging_Test_i.cpp deleted file mode 100644 index 38c37f2f803..00000000000 --- a/TAO/orbsvcs/tests/Logger/Logging_Test_i.cpp +++ /dev/null @@ -1,348 +0,0 @@ -// $Id$ - -#include "ace/INET_Addr.h" -#include "ace/SOCK_Dgram_Mcast.h" -#include "ace/OS.h" -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/LoggerC.h" -#include "Logging_Test_i.h" - -ACE_RCSID(Logger, Logging_Test_i, "$Id$") - - // Constructor - Logger_Client::Logger_Client (void) -{ - // Do nothing -} - -// Destructor -Logger_Client::~Logger_Client (void) -{ - // Do nothing -} - -int -Logger_Client::init (int argc, char *argv[]) -{ - this->argc_ = argc; - this->argv_ = argv; - - TAO_TRY - { - // Initialize the ORB - orb_ = CORBA::ORB_init (argc, - argv, - "internet", - TAO_TRY_ENV); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nTrying to initialize orb\n")); - - TAO_CHECK_ENV; - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nOrb initialized successfully\n")); - - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; - - // Initialize the naming service - if (this->init_naming_service (TAO_TRY_ENV) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize naming" - "services.\n"), - -1); - // Create the logger instances - if (this->init_loggers (TAO_TRY_ENV) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize logger" - "instances.\n"), - -1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("init"); - return -1; - } - TAO_ENDTRY; - - return 0; - -} - -int -Logger_Client::init_naming_service (CORBA::Environment &env) -{ - // Initialize the naming services - if (my_name_client_.init (orb_.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - // Resolve an instance of the Logger_Factory - CosNaming::Name factory_name (1); - factory_name.length (1); - factory_name[0].id = CORBA::string_dup ("Logger_Factory"); - - CORBA::Object_var factory_ref = - my_name_client_->resolve (factory_name, - env); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nFactory_ref resolved\n")); - - if (CORBA::is_nil (factory_ref.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "resolved to nil object"), - -1); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nLogger_Factory resolved\n")); - - // Narrow the factory and check the success - factory_ = - Logger_Factory::_narrow (factory_ref.in (), - env); - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nFactory narrowed\n")); - if (CORBA::is_nil (factory_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "narrow returned nil"), - -1); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nLogger_Factory narrowed\n")); - - // If debugging, get the factory's IOR - CORBA::String_var str = - orb_->object_to_string (factory_.in (), - env); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "The factory IOR is <%s>\n", - str.in ())); - return 0; -} - -int -Logger_Client::init_loggers (CORBA::Environment &env) -{ - // Retrieve the Logger obj ref corresponding to key1 and - // key2. - this->logger_1_ = factory_->make_logger ("key1", - env); - if (env.exception () != 0) - return -1; - - this->logger_2_ = factory_->make_logger ("key2", - env); - if (env.exception () != 0) - return -1; - - if (CORBA::is_nil (this->logger_1_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "nil logger1"), - -1); - - if (CORBA::is_nil (this->logger_2_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "nil logger2"), - -1); - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Created two loggers\n")); - - if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "\nTrying to resolve already created logger...")); - Logger_var logger_3 = factory_->make_logger ("key1", - env); - if (CORBA::is_nil (logger_3.in ())) - ACE_DEBUG ((LM_DEBUG, - "\nResolution failed.")); - else - ACE_DEBUG ((LM_DEBUG, - "\nResolution succeeded.")); - } - - return 0; -} - - -// Execute client example code. - -int -Logger_Client::run (void) -{ - TAO_TRY - { - // Create 3 Log_Records for the test - Logger::Log_Record rec1; - Logger::Log_Record rec2; - Logger::Log_Record rec3; - Logger::Log_Record rec4; - ; - // Setup the first log record - this->init_record (rec1, - Logger::LM_DEBUG, - "log() test (1) \n"); - - // Setup the second log record - this->init_record (rec2, - Logger::LM_MAX, - "log() test (2) \n"); - - // Setup the third log record - this->init_record (rec3, - Logger::LM_INFO, - "logv() test (3) \n"); - - // Setup the fourth log record - this->init_record (rec4, - Logger::LM_EMERGENCY, - "log2() test (4) \n"); - - // If debugging, output the new log records - if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "\nFirst Log_Record created. Contents:\n")); - this->show_record (rec1); - - ACE_DEBUG ((LM_DEBUG, - "\nSecond Log_Record created. Contents:\n")); - this->show_record (rec2); - - ACE_DEBUG ((LM_DEBUG, - "\nThird log record created. Contents:\n")); - this->show_record (rec3); - - ACE_DEBUG ((LM_DEBUG, - "\nFourth log record created. Contents:\n")); - this->show_record (rec4); - } - - // Change the verbosity. - this->logger_1_->verbosity (Logger::VERBOSE_LITE, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Log the first Log_Record (VERBOSE_LITE) - this->logger_1_->log (rec1, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Change the verbosity again. - this->logger_2_->verbosity (Logger::VERBOSE, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Log the second Log_Record (VERBOSE) - this->logger_2_->log (rec2, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Change the verbosity again - this->logger_2_->verbosity (Logger::SILENT, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Log the third log record using logv() (this shows if the - // verbosity level overrides the logger's verbosity level) - this->logger_2_->logv (rec3, Logger::VERBOSE, TAO_TRY_ENV); - - // Change the verbosity again (so that regular log msgs can be - // seen again) - this->logger_2_->verbosity (Logger::VERBOSE, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Log the fourth record using log2() - this->logger_2_->log2 (rec4, TAO_TRY_ENV); - } - - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("run"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -// Parses the command line arguments and returns an error status. - -int -Logger_Client::parse_args (void) -{ - ACE_Get_Opt get_opts (argc_, argv_, "d"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - "\n" - " -d: increase debug level\n", - this->argv_ [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - - -void -Logger_Client::init_record (Logger::Log_Record &newrec, - Logger::Log_Priority lp, - const char *msg) -{ - // Copy the message data into newrec. - newrec.msg_data = CORBA::string_copy (msg); - - // Assign the log priority. - newrec.type = lp; - - // Create and assign the timestamp. - ACE_Time_Value time (ACE_OS::gettimeofday ()); - newrec.time = time.sec (); - - // Get and store the PID of the calling process. - pid_t pid = ACE_OS::getpid (); - newrec.app_id = pid; - - // Get and store the IP of the local host . - char name[MAXHOSTNAMELEN]; - ACE_OS::hostname (name, MAXHOSTNAMELEN); - hostent *he = ACE_OS::gethostbyname (name); - newrec.host_addr = - (ACE_reinterpret_cast (in_addr *, - he->h_addr_list[0])->s_addr); -} - -void -Logger_Client::show_record (Logger::Log_Record &newrec) -{ - in_addr address; - address.s_addr = newrec.host_addr; - - ACE_DEBUG ((LM_DEBUG, - " Log Priority: %d\n" - " Time: %d\n" - " PID: %d\n" - " Host Address: %s\n" - " Message: %s\n", - newrec.type, - newrec.time, - newrec.app_id, - inet_ntoa (address), - newrec.msg_data.in ())); -} diff --git a/TAO/orbsvcs/tests/Logger/Logging_Test_i.h b/TAO/orbsvcs/tests/Logger/Logging_Test_i.h deleted file mode 100644 index 748473ea51b..00000000000 --- a/TAO/orbsvcs/tests/Logger/Logging_Test_i.h +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/Logger -// -// = FILENAME -// client_i.h -// -// = DESCRIPTION -// This class implements a simple logger CORBA client for the Logger -// example using stubs generated by the TAO ORB IDL compiler -// -// = AUTHORS -// Sergio Flores-Gaitan -// Matt Braun -// -// ============================================================================ - -#ifndef _LOG_CLIENT_H -#define _LOG_CLIENT_H - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/corba.h" -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/LoggerC.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -class Logger_Client -{ - // = TITLE - // Defines a class that encapsulates behaviour of the Logger - // client example. Provides a better understanding of the logic - // in an object oriented way. - // - // = DESCRIPTION - // This class declares an interface to run the example client for - // Logger CORBA server. All the complexity for initializing the - // server is hidden in the class. Just the interface is - // needed. -public: - // = Initialization and termination methods. - - Logger_Client (void); - // Constructor. - - ~Logger_Client (void); - // Destructor. - - int init (int argc, char **argv); - // Initialize the client communication endpoint with server. - - int run (void); - // Execute client example code. - -private: - int parse_args (void); - // Parses the arguments passed on the command line. - - void init_record (Logger::Log_Record &newrec, - Logger::Log_Priority lp, - const char *msg); - // Prepares the for logging. - - int init_naming_service (CORBA::Environment &env); - // Initialises the name server and resolves the logger_factory - - int init_loggers (CORBA::Environment &env); - // Instantiates the 2 logger member variables - - void show_record (Logger::Log_Record &newrec); - // Shows contents of the record (for debugging purposes). - - TAO_Naming_Client my_name_client_; - // An instance of the name client used for resolving the factory - // objects. - - CORBA::ORB_var orb_; - // Keep a pointer to the ORB for easy access - - int argc_; - // # of arguments on the command line. - - char **argv_; - // arguments from command line. - - Logger_Factory_var factory_; - // A pointer to the Logger_Factory; used in init_loggers - - Logger_var logger_1_; - // Logger obj ref. - - Logger_var logger_2_; - // Logger obj ref. -}; - -#endif /* _LOG_CLIENT_H */ diff --git a/TAO/orbsvcs/tests/Logger/Makefile b/TAO/orbsvcs/tests/Logger/Makefile deleted file mode 100644 index 11bf1c8c936..00000000000 --- a/TAO/orbsvcs/tests/Logger/Makefile +++ /dev/null @@ -1,361 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -# -# Top-level Makefile for the Logging Service test -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif # ! TAO_ROOT - -LDLIBS = -lorbsvcs -lTAO - -SRC = Logging_Test.cpp \ - Logging_Test_i.cpp - -LOGGING_TEST_OBJS = Logging_Test_i.o Logging_Test.o - -BIN = Logging_Test - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE -LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) $(TSS_ORB_FLAG)#-H - -Logging_Test: $(addprefix $(VDIR),$(LOGGING_TEST_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Logging_Test.o .obj/Logging_Test.so .shobj/Logging_Test.o .shobj/Logging_Test.so: Logging_Test.cpp Logging_Test_i.h \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/singletons.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/Servant_Base.i \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Pluggable.h \ - $(TAO_ROOT)/tao/MProfile.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/params.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(TAO_ROOT)/tao/IIOP_Connector.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/IIOP_Acceptor.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/LoggerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/LoggerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h -.obj/Logging_Test_i.o .obj/Logging_Test_i.so .shobj/Logging_Test_i.o .shobj/Logging_Test_i.so: Logging_Test_i.cpp \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/LoggerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/LoggerC.i \ - Logging_Test_i.h \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Logger/README b/TAO/orbsvcs/tests/Logger/README deleted file mode 100644 index 64a11da2ede..00000000000 --- a/TAO/orbsvcs/tests/Logger/README +++ /dev/null @@ -1,45 +0,0 @@ -$ID$ - -This example tests the TAO logging service. It generates SII stubs and -skeletons using the TAO IDL compiler. You can either run the client -and server as seperate processes in the same, or different windows (or -machines), or you may run the "runtests.pl" script which will start -both executables. - -By default, the client and server use the Naming Service. The -log_server has its own NamingServer implementation, so it doesn't -require you to start the NamingService before starting the client and -server. - -The test demonstrates the functionality of the logging service. The -client program will generate 4 logging messages which will be logged -to the screen. The first message will be in the "verbose_lite" -format. The rest will be fully verbose messages. Successful output is: - -LM_DEBUG@::log() test (1) -Mar 8 16:31:06.000 1999@128.252.165.142@822@LM_EMERGENCY@::log() test (2) -Mar 8 16:31:06.000 1999@128.252.165.142@822@LM_INFO@::logv() test (3) -Mar 8 16:31:06.000 1999@128.252.165.142@822@LM_EMERGENCY@::log2() test (4) - -server: ------ - -% server [-d] - -client: ------- - -% client [-d] - -Options: ------- - --d Debug flag. It is an additive flag, so more -d's will increase - the debugging level. Only one flag is necessary to enable the - debugging output from the executables, but the debug level - affects how the utilized TAO methods act (including mysterious - debugging messages). - -That's all there is to it. If you desire, feel free to change the -logging priorities, verbosity levels and messages in the client -program but note that the maximum length of the message is 1023 -characters. - --Matt Braun mjb2@cs.wustl.edu Thursday, Nov 12'th, 1998 diff --git a/TAO/orbsvcs/tests/Logger/client.cpp b/TAO/orbsvcs/tests/Logger/client.cpp deleted file mode 100644 index b2f1fd63640..00000000000 --- a/TAO/orbsvcs/tests/Logger/client.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// $Id$ - -#include "client_i.h" - -ACE_RCSID(Logger, client, "$Id$") - -// This function runs the Logging service test. - -int -main (int argc, char **argv) -{ - Logger_Client logger_client; - - ACE_DEBUG ((LM_DEBUG, - "\n \t IDL_Logger: client \n\n")); - - if (logger_client.init (argc, argv) == -1) - return 1; - - return logger_client.run (); -} diff --git a/TAO/orbsvcs/tests/Logger/client.dsp b/TAO/orbsvcs/tests/Logger/client.dsp deleted file mode 100644 index 48cf02669c5..00000000000 --- a/TAO/orbsvcs/tests/Logger/client.dsp +++ /dev/null @@ -1,104 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Logger Test Client" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Logger Test Client - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "client.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "client.mak" CFG="Logger Test Client - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Logger Test Client - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "Logger Test Client - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Logger Test Client - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\..\.." /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "Logger Test Client - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib TAOd.lib orbsvcsd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Logger Test Client - Win32 Release" -# Name "Logger Test Client - Win32 Debug" -# Begin Source File - -SOURCE=.\client.cpp -# End Source File -# Begin Source File - -SOURCE=.\client.h -# End Source File -# Begin Source File - -SOURCE=.\client_i.cpp -# End Source File -# Begin Source File - -SOURCE=.\client_i.h -# End Source File -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/Logger/client.h b/TAO/orbsvcs/tests/Logger/client.h deleted file mode 100644 index 8a6e1978466..00000000000 --- a/TAO/orbsvcs/tests/Logger/client.h +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/Logger -// -// = FILENAME -// client.h -// -// = DESCRIPTION -// This program tests an implementation of a logger service. It uses the -// server to create a number of logger objects. -// It then uses their object references to test functions supported -// by the logger server. -// -// = AUTHORS -// Sergio Flores-Gaitan -// Matt Braun -// -// ============================================================================ - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/corba.h" -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/LoggerC.h" - -class Logger_Client -{ - // = TITLE - // Defines a class that encapsulates behaviour of the Logger - // client example. Provides a better understanding of the logic - // in an object oriented way. - // - // = DESCRIPTION - // This class declares an interface to run the example client for - // Logger CORBA server. All the complexity for initializing the - // server is hidden in the class. Just the interface is - // needed. -public: - // = Constructor and destructor. - Logger_Client (void); - ~Logger_Client (void); - - int run (void); - // Execute client example code. - - int init (int argc, char **argv); - // Initialize the client communication endpoint with server. - -private: - int parse_args (void); - // Parses the arguments passed on the command line. - - void init_record (Logger::Log_Record &newrec, - Logger::Log_Priority lp, - const char *msg); - // Prepares the for logging. - - void show_record (Logger::Log_Record &newrec); - // Shows contents of the record (for debugging purposes) - - CORBA::Object_var - resolve_name (CosNaming::Name &name, char* namestring, - CosNaming::NamingContext_var context, - CORBA::Environment &env); - // Take the Name, give it the proper string name, and - // resolve it - int - nesting_test (CosNaming::Name &name, char* namestring, - CosNaming::NamingContext_var context, - CORBA::Environment &env); - // Test the nesting context - - int argc_; - // # of arguments on the command line. - - char **argv_; - // arguments from command line. - - int test_nesting_; - // Test nested naming context or not. - - CORBA::ORB_var orb_; - // Keep a pointer to the orb, to avoid accidental deletes. - - Logger_var logger_1_; - // Logger obj ref. - - Logger_var logger_2_; - // Logger obj ref. - - // @@ Matt, I recommend that once you finish implementing the - // TAO_Naming_Client class that you include an instance of it in - // this class, which can then do the (simplified) initialization of - // the Naming Service CLIENT. -}; - diff --git a/TAO/orbsvcs/tests/Logger/client_i.cpp b/TAO/orbsvcs/tests/Logger/client_i.cpp deleted file mode 100644 index 02003a5f608..00000000000 --- a/TAO/orbsvcs/tests/Logger/client_i.cpp +++ /dev/null @@ -1,291 +0,0 @@ -// $Id$ - -#include "ace/INET_Addr.h" -#include "ace/SOCK_Dgram_Mcast.h" -#include "ace/OS.h" -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/LoggerC.h" -#include "client_i.h" - -ACE_RCSID(Logger, client_i, "$Id$") - -// Constructor -Logger_Client::Logger_Client (void) -{ - // Do nothing -} - -// Destructor -Logger_Client::~Logger_Client (void) -{ - // Do nothing -} - -int -Logger_Client::init (int argc, char *argv[]) -{ - this->argc_ = argc; - this->argv_ = argv; - - TAO_TRY - { - // Initialize the ORB - orb_ = CORBA::ORB_init (argc, - argv, - "internet", - TAO_TRY_ENV); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nTrying to initialize orb\n")); - - TAO_CHECK_ENV; - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nOrb initialized successfully\n")); - - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; - - // Initialize the naming service - if (this->init_naming_service (TAO_TRY_ENV) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize naming" - "services.\n"), - -1); - // Create the logger instances - if (this->init_loggers (TAO_TRY_ENV) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize logger" - "instances.\n"), - -1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("init"); - return -1; - } - TAO_ENDTRY; - - return 0; - -} - -int -Logger_Client::init_naming_service (CORBA::Environment &env) -{ - // Initialize the naming services - if (my_name_client_.init (orb_) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - // Resolve an instance of the Logger_Factory - CosNaming::Name factory_name (1); - factory_name.length (1); - factory_name[0].id = CORBA::string_dup ("logger_factory"); - - CORBA::Object_var factory_ref = - my_name_client_->resolve (factory_name, - env); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nFactory_ref resolved\n")); - - if (CORBA::is_nil (factory_ref.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "resolved to nil object"), - -1); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nLogger_Factory resolved\n")); - - // Narrow the factory and check the success - factory_ = - Logger_Factory::_narrow (factory_ref.in (), - env); - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nFactory narrowed\n")); - if (CORBA::is_nil (factory_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "narrow returned nil"), - -1); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "\nLogger_Factory narrowed\n")); - - // If debugging, get the factory's IOR - CORBA::String_var str = - orb_->object_to_string (factory_.in (), - env); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "The factory IOR is <%s>\n", - str.in ())); - return 0; -} - -int -Logger_Client::init_loggers (CORBA::Environment &env) -{ - // Retrieve the Logger obj ref corresponding to key1 and - // key2. - this->logger_1_ = factory_->make_logger ("key1", - env); - this->logger_2_ = factory_->make_logger ("key2", - env); - - if (CORBA::is_nil (this->logger_1_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "nil logger1"), - -1); - - if (CORBA::is_nil (this->logger_2_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "nil logger2"), - -1); - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Created two loggers\n")); - return 0; -} - - -// Execute client example code. - -int -Logger_Client::run (void) -{ - TAO_TRY - { - // Create 2 Log_Records for the test - Logger::Log_Record rec1; - Logger::Log_Record rec2; - - // Setup the first log record - this->init_record (rec1, - Logger::LM_DEBUG, - "Praise Bob! (1)\n"); - - // Setup the second log record - this->init_record (rec2, - Logger::LM_ERROR, - "Beware The Stark Fist of Removal. (2)\n"); - - // If debugging, output the new log records - if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "First Log_Record created. Contents:\n")); - this->show_record (rec1); - - ACE_DEBUG ((LM_DEBUG, - "Second Log_Record created. Contents:\n")); - this->show_record (rec2); - } - - // Change the verbosity. - this->logger_1_->verbosity (Logger::VERBOSE_LITE, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Log the first Log_Record - this->logger_1_->log (rec1, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Change the verbosity again. - this->logger_2_->verbosity (Logger::VERBOSE, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Log the second Log_Record. - this->logger_2_->log (rec2, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("run"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -// Parses the command line arguments and returns an error status. - -int -Logger_Client::parse_args (void) -{ - ACE_Get_Opt get_opts (argc_, argv_, "d"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - "\n" - " -d: increase debug level\n", - this->argv_ [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - - -void -Logger_Client::init_record (Logger::Log_Record &newrec, - Logger::Log_Priority lp, - const char *msg) -{ - // Copy the message data into newrec. - newrec.msg_data = CORBA::string_copy (msg); - - // Assign the log priority. - newrec.type = lp; - - // Create and assign the timestamp. - ACE_Time_Value time (ACE_OS::gettimeofday ()); - newrec.time = time.sec (); - - // Get and store the PID of the calling process. - pid_t pid = ACE_OS::getpid (); - newrec.app_id = pid; - - // Get and store the IP of the local host . - char name[MAXHOSTNAMELEN]; - ACE_OS::hostname (name, MAXHOSTNAMELEN); - hostent *he = ACE_OS::gethostbyname (name); - newrec.host_addr = - (ACE_reinterpret_cast (in_addr *, - he->h_addr_list[0])->s_addr); -} - -void -Logger_Client::show_record (Logger::Log_Record &newrec) -{ - in_addr address; - address.s_addr = newrec.host_addr; - - ACE_DEBUG ((LM_DEBUG, - " Log Priority: %d\n" - " Time: %d\n" - " PID: %d\n" - " Host Address: %s\n" - " Message: %s\n", - newrec.type, - newrec.time, - newrec.app_id, - inet_ntoa (address), - newrec.msg_data.in ())); -} diff --git a/TAO/orbsvcs/tests/Logger/client_i.h b/TAO/orbsvcs/tests/Logger/client_i.h deleted file mode 100644 index 0ce8873035d..00000000000 --- a/TAO/orbsvcs/tests/Logger/client_i.h +++ /dev/null @@ -1,102 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/Logger -// -// = FILENAME -// client_i.h -// -// = DESCRIPTION -// This class implements a simple logger CORBA client for the Logger -// example using stubs generated by the TAO ORB IDL compiler -// -// = AUTHORS -// Sergio Flores-Gaitan -// Matt Braun -// -// ============================================================================ - -// @@ Add the guard against multiple inclusions. - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/corba.h" -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/LoggerC.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -class Logger_Client -{ - // = TITLE - // Defines a class that encapsulates behaviour of the Logger - // client example. Provides a better understanding of the logic - // in an object oriented way. - // - // = DESCRIPTION - // This class declares an interface to run the example client for - // Logger CORBA server. All the complexity for initializing the - // server is hidden in the class. Just the interface is - // needed. -public: - // = Initialization and termination methods. - - Logger_Client (void); - // Constructor. - - ~Logger_Client (void); - // Destructor. - - int init (int argc, char **argv); - // Initialize the client communication endpoint with server. - - int run (void); - // Execute client example code. - -private: - int parse_args (void); - // Parses the arguments passed on the command line. - - void init_record (Logger::Log_Record &newrec, - Logger::Log_Priority lp, - const char *msg); - // Prepares the for logging. - - int init_naming_service (CORBA::Environment &env); - // Initialises the name server and resolves the logger_factory - - int init_loggers (CORBA::Environment &env); - // Instantiates the 2 logger member variables - - void show_record (Logger::Log_Record &newrec); - // Shows contents of the record (for debugging purposes). - - TAO_Naming_Client my_name_client_; - // An instance of the name client used for resolving the factory - // objects. - - CORBA::ORB_var orb_; - // Keep a pointer to the ORB for easy access - - int argc_; - // # of arguments on the command line. - - char **argv_; - // arguments from command line. - - Logger_Factory_var factory_; - // A pointer to the Logger_Factory; used in init_loggers - - Logger_var logger_1_; - // Logger obj ref. - - Logger_var logger_2_; - // Logger obj ref. -}; - diff --git a/TAO/orbsvcs/tests/Logger/run_test.pl b/TAO/orbsvcs/tests/Logger/run_test.pl deleted file mode 100755 index bbacd0be9ee..00000000000 --- a/TAO/orbsvcs/tests/Logger/run_test.pl +++ /dev/null @@ -1,46 +0,0 @@ -# $Id$ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -$tao_root = $ENV{TAO_ROOT}; -# This is a Perl script that runs the Logger client and server - -unshift @INC, '../../../../bin'; -require Process; - -# amount of delay between running the servers -$sleeptime = 3; - -# Starts the Logging Service -sub service -{ - my $args = ""; - my $prog = $EXEPREFIX."$tao_root/orbsvcs/Logging_Service/Logging_Service" - .$Process::EXE_EXT; - $SV = Process::Create ($prog, $args); -} - -# Starts the test client -sub test -{ - my $args = ""; - my $prog = $EXEPREFIX."Logging_Test".$Process::EXE_EXT; - - system ("$prog $args"); -} - -# Start the service -service (); - -# Give the service time to settle -sleep $sleeptime; - -# Start the client (which exits automatically) -test (); - -# Give the client time to log and exit -sleep 3; - -# Kill the service -$SV->Kill (); diff --git a/TAO/orbsvcs/tests/Logger/server.cpp b/TAO/orbsvcs/tests/Logger/server.cpp deleted file mode 100644 index 1d8db63fdf8..00000000000 --- a/TAO/orbsvcs/tests/Logger/server.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// $Id$ - -#include "server_i.h" - -ACE_RCSID(Logger, server, "$Id$") - -int -main (int argc, char *argv[]) -{ - Logger_Server log_server; - - ACE_DEBUG ((LM_DEBUG, - "\n\tIDL_Logger:SERVER\n\n")); - - TAO_TRY - { - if (log_server.init (argc, argv, TAO_TRY_ENV) == -1) - return 1; - else - { - log_server.run (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - } - TAO_CATCH (CORBA::SystemException, sysex) - { - ACE_UNUSED_ARG (sysex); - TAO_TRY_ENV.print_exception ("System Exception"); - return -1; - } - TAO_CATCH (CORBA::UserException, userex) - { - ACE_UNUSED_ARG (userex); - TAO_TRY_ENV.print_exception ("User Exception"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - - diff --git a/TAO/orbsvcs/tests/Logger/server.dsp b/TAO/orbsvcs/tests/Logger/server.dsp deleted file mode 100644 index 964fb378a74..00000000000 --- a/TAO/orbsvcs/tests/Logger/server.dsp +++ /dev/null @@ -1,100 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Logger Test Server" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Logger Test Server - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "server.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "server.mak" CFG="Logger Test Server - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Logger Test Server - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "Logger Test Server - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Logger Test Server - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\..\.." /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ELSEIF "$(CFG)" == "Logger Test Server - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib TAOd.lib orbsvcsd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Logger Test Server - Win32 Release" -# Name "Logger Test Server - Win32 Debug" -# Begin Source File - -SOURCE=.\server.cpp -# End Source File -# Begin Source File - -SOURCE=.\server_i.cpp -# End Source File -# Begin Source File - -SOURCE=.\server_i.h -# End Source File -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/Logger/server_i.cpp b/TAO/orbsvcs/tests/Logger/server_i.cpp deleted file mode 100644 index a995334e1cc..00000000000 --- a/TAO/orbsvcs/tests/Logger/server_i.cpp +++ /dev/null @@ -1,131 +0,0 @@ -// $Id$ - -#include "server_i.h" - -ACE_RCSID(Logger, server_i, "$Id$") - -Logger_Server::Logger_Server (void) -{ - // Do nothing -} - -int -Logger_Server::parse_args (void) -{ - ACE_Get_Opt get_opts (argc_, argv_, "d"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag. - TAO_debug_level++; - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - "\n", - argv_ [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - -int -Logger_Server::init (int argc, - char *argv[], - CORBA::Environment &env) -{ - this->argc_ = argc; - this->argv_ = argv; - - // Call the init of to initialize the ORB and - // create a child POA under the root POA. - if (this->orb_manager_.init_child_poa (argc, - argv, - "child_poa", - env) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "init_child_poa"), - -1); - - TAO_CHECK_ENV_RETURN (env,-1); - - // Parse the command line arguments. - if (this->parse_args () != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "parse_args"), - -1); - - // Activate the logger_factory. - CORBA::String_var str = - this->orb_manager_.activate_under_child_poa ("logger_factory", - &this->factory_impl_, - env); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "The IOR is: <%s>\n", - str.in ())); - - // Initialize the naming service - if (this->init_naming_service (env) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "init_naming_service"), - -1); - else - return 0; -} - - -// Initialisation of Naming Service and register IDL_Logger Context -// and logger_factory object. - -int -Logger_Server::init_naming_service (CORBA::Environment& env) -{ - // Get pointers to the ORB and child POA - CORBA::ORB_var orb = this->orb_manager_.orb (); - PortableServer::POA_var child_poa = this->orb_manager_.child_poa (); - - // Initialize the naming service - if (this->my_name_server_.init (orb.in (), - child_poa.in ()) == -1) - return -1; - - // Create an instance of the Logger_Factory - Logger_Factory_var factory = this->factory_impl_._this (env); - TAO_CHECK_ENV_RETURN (env, -1); - - //Register the logger_factory - CosNaming::Name factory_name (1); - factory_name.length (1); - factory_name[0].id = CORBA::string_dup ("logger_factory"); - this->my_name_server_->bind (factory_name, - factory.in (), - env); - TAO_CHECK_ENV_RETURN (env,-1); - - return 0; -} - -int -Logger_Server::run (CORBA::Environment& env) -{ - if (this->orb_manager_.run (env) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Logger_Server::run"), - -1); - return 0; -} - -Logger_Server::~Logger_Server (void) -{ - // Do nothing -} diff --git a/TAO/orbsvcs/tests/Logger/server_i.h b/TAO/orbsvcs/tests/Logger/server_i.h deleted file mode 100644 index 0a8736a8ab0..00000000000 --- a/TAO/orbsvcs/tests/Logger/server_i.h +++ /dev/null @@ -1,92 +0,0 @@ -// -*- c++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/Logger -// -// = FILENAME -// server_i.h -// -// = DESCRIPTION -// This class implements a simple "logger" CORBA server for the Logger -// example using skeletons generated by the TAO ORB IDL compiler. -// -// = AUTHORS -// Nagarajan Surendran -// Matthew Braun -// -// ============================================================================ - -#ifndef _C_SERVER_H -#define _C_SERVER_H - -#include "ace/Get_Opt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Log_Msg.h" -#include "tao/TAO.h" -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/Naming/Naming_Utils.h" -#include "orbsvcs/Log/Logger_i.h" -#include "orbsvcs/LoggerS.h" - -class Logger_Server -{ - // = TITLE - // Defines a Logger_Server class that implements the functionality - // of a server process as an object. - // - // = DESCRIPTION - // The interface is quite simple. A server program has to call - // init to initialize the logger_server's state and then call run - // to run the orb. -public: - // = Initialization and termination methods. - Logger_Server (void); - // Constructor. - - ~Logger_Server (void); - // Destructor. - - int init (int argc, - char **argv, - CORBA::Environment& env); - // Initialize the Logger_Server state - parsing arguments and ... - - int run (CORBA::Environment& env); - // Run the ORB. - -private: - int parse_args (void); - // Parses the commandline arguments. - - int init_naming_service (CORBA::Environment &env); - // Initialises the name server and registers logger_factory with the - // name server. - - TAO_ORB_Manager orb_manager_; - // The ORB manager. - - TAO_Naming_Server my_name_server_; - // An instance of the name server used for registering the factory - // objects. - - Logger_Factory_i factory_impl_; - // Implementation object of the Logger_Factory. - - Logger_Factory_var factory_; - // Factory_var to register with NamingService. - - int argc_; - // Number of commandline arguments. - - char **argv_; - // commandline arguments. -}; - -#endif /* _C_SERVER_H */ diff --git a/TAO/orbsvcs/tests/Makefile b/TAO/orbsvcs/tests/Makefile deleted file mode 100644 index c4247d21f1b..00000000000 --- a/TAO/orbsvcs/tests/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = Simple_Naming \ - Logger \ - Event_Latency \ - EC_Multiple \ - EC_Throughput \ - EC_Mcast \ - EC_Custom_Marshal \ - EC_Basic \ - Concurrency \ - Trading \ - Property \ - CosEC_Basic \ - CosEC_Multiple \ - ImplRepo \ - Sched_Conf \ - Time - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU - diff --git a/TAO/orbsvcs/tests/Property/Makefile b/TAO/orbsvcs/tests/Property/Makefile deleted file mode 100644 index 25695197a82..00000000000 --- a/TAO/orbsvcs/tests/Property/Makefile +++ /dev/null @@ -1,340 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -# -# Top-level Makefile for the CosPropertyService Demo. -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -LDLIBS = -lorbsvcs -lTAO - -CosProperty_SERVER_OBJS = server.o -CosProperty_CLIENT_OBJS = client.o -SRC=server.cpp client.cpp - -BIN = server client -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) - - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) $(TSS_ORB_FLAG) - -server:$(addprefix $(VDIR),$(CosProperty_SERVER_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -client:$(addprefix $(VDIR),$(CosProperty_CLIENT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -realclean: clean - -/bin/rm -rf - - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/server.o .obj/server.so .shobj/server.o .shobj/server.so: server.cpp server.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h -.obj/client.o .obj/client.so .shobj/client.o .shobj/client.so: client.cpp client.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Property/README b/TAO/orbsvcs/tests/Property/README deleted file mode 100644 index 77be4c63db3..00000000000 --- a/TAO/orbsvcs/tests/Property/README +++ /dev/null @@ -1,37 +0,0 @@ -This tests TAO's CosPropertyService implementation. - -Please report bugs/comments to and - - -To compile: -========== - -% make realclean all - - -To run: -====== - -% run_test.pl - -OR - -Run the each of NamingService, Server and Client separately within the -same host. - - -Naming Service: --------------- - -% $TAO_ROOT/orbsvcs/NamingService/NamingService [-ORBnameserviceport ] - -Server: ------ - -% server [-ORBnameserviceport ] - -Client: ------- -% client [-ORBnameserviceport ] - - is same everywhere. diff --git a/TAO/orbsvcs/tests/Property/client.cpp b/TAO/orbsvcs/tests/Property/client.cpp deleted file mode 100644 index c9a2b58ef55..00000000000 --- a/TAO/orbsvcs/tests/Property/client.cpp +++ /dev/null @@ -1,823 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/Property -// -// = FILENAME -// client.cpp -// -// = DESCRIPTION -// Test client for the Property Service. -// -// = AUTHORS -// Alexander Babu Arulanthu -// -// ============================================================================ - -#include "client.h" - -ACE_RCSID(CosPropertyService, client, "$Id$") - - Client::Client (void) -{ -} - -int -Client::init (int argc, - char *argv[], - CORBA::Environment &env) -{ - // Init the ORB. - manager_.init (argc, - argv, - env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Open the ORB. - manager_.orb ()->open (); - - // Initialize the naming services - if (my_name_client_.init (manager_.orb()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - // Bind PropertySetDef Object. - - CosNaming::Name propsetdef_name (1); - propsetdef_name.length (1); - propsetdef_name [0].id = CORBA::string_dup ("PropertySetDef"); - CORBA::Object_var propsetdef_obj = my_name_client_->resolve (propsetdef_name, - env); - TAO_CHECK_ENV_RETURN (env, 1); - - ACE_DEBUG ((LM_DEBUG, "Naming resolve done\n")); - - this->propsetdef_ = CosPropertyService::PropertySetDef::_narrow (propsetdef_obj.in (), - env); - TAO_CHECK_ENV_RETURN (env, -1); - - if (CORBA::is_nil (this->propsetdef_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "Couldnot resolve propsetdef in Naming server"), - -1); - - return 0; -} - -// Testing the methods of the property service. - -int -Client::property_tester (CORBA::Environment &env) -{ - // = Testing PropertySet & Iterators. - - // Testing define_property () of PropertySet interface. - this->test_define_property (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Test the number of properties. - this->test_get_number_of_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Testing get_all_property_names. - this->test_get_all_property_names (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Test get_property_value. - this->test_get_property_value (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Testing delete property. - this->test_delete_property ("no_property",env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Testing get_properties. - this->test_get_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Testing delete_properties. - this->test_delete_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Test the number of properties. - this->test_get_number_of_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Testing define_properties. - this->test_define_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Test the number of properties. - this->test_get_number_of_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Testing get_all_property_names. - this->test_get_all_property_names (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Testing get_all_properties. - this->test_get_all_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // = Testing PropertySetDef & Iterators. - - // Testing define_property_with_mode. - this->test_define_property_with_mode (env); - TAO_CHECK_ENV_RETURN (env, -1); - - return 0; -} - -// Testing define_property. - -int -Client::test_define_property (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking define_property\n")); - - CORBA::Any anyval; - - // Prepare a char and "define" that in the PropertySet. - CORBA::Char ch = '#'; - anyval <<= CORBA::Any::from_char (ch); - ch = '*'; - anyval >>= CORBA::Any::to_char (ch); - - ACE_DEBUG ((LM_DEBUG, - "Main : Char ch = %c\n", - ch)); - this->propsetdef_->define_property ("char_property", - anyval, - env); - - // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) - { - env.print_exception ("char_property"); - env.clear (); - } - - // Prepare a Short and "define" that in the PropertySet. - CORBA::Short s = 3; - anyval <<= s; - s = 7; - anyval >>= s; - - ACE_DEBUG ((LM_DEBUG, - "Main : Short s = %d\n", - s)); - propsetdef_->define_property ("short_property", - anyval, - env); - - // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) - { - env.print_exception ("char_property"); - env.clear (); - } - - // Prepare a Long and "define" that in the PropertySet. - CORBA::Long l = 931232; - anyval <<= l; - l = 931233; - anyval >>= l; - ACE_DEBUG ((LM_DEBUG, - "Main : Long l = %d\n", - l)); - CORBA::Any newany(anyval); - propsetdef_->define_property ("long_property", - anyval, - env); - - // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) - { - env.print_exception ("char_property"); - env.clear (); - } - - // Prepare a Float and "define" that in the PropertySet. - CORBA::Float f = 3.14F; - anyval <<= f; - f = 4.14F; - anyval >>= f; - ACE_DEBUG ((LM_DEBUG, - "Main : Float f = %f\n", - f)); - propsetdef_->define_property ("float_property", - anyval, - env); - - // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) - { - env.print_exception ("char_property"); - env.clear (); - } - - // Prepare a String and "define" that in the PropertySet. - ACE_DEBUG ((LM_DEBUG, - "Main: Any holding String\n")); - CORBA::String_var strvar (CORBA::string_dup ("Test_String")); - anyval <<= strvar.in (); - CORBA::String newstr; - anyval >>= newstr; - ACE_DEBUG ((LM_DEBUG, - "Main: String : %s, From any : %s\n", - strvar.in (), - newstr)); - propsetdef_->define_property ("string_property", - anyval, - env); - - // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) - { - env.print_exception ("string_property"); - env.clear (); - } - - return 0; -} - -// Testing get_all_property_names of the PropertySet. - -int -Client::test_get_all_property_names (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nTesting get_all_property_names ()\n")); - - // Get the size. - CORBA::ULong num_of_properties = - propsetdef_->get_number_of_properties (env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Get half on the names and half of on the iterator. - CORBA::ULong how_many = num_of_properties / 2; - - // The extra ptr's and out's required to avoind SunnCC's warning - // when foo.out () is passed to a funtion. - CosPropertyService::PropertyNames_var names_var; - CosPropertyService::PropertyNames_ptr names_ptr = 0; - CosPropertyService::PropertyNames_out names_out (names_ptr); - - CosPropertyService::PropertyNamesIterator_var iterator_var; - CosPropertyService::PropertyNamesIterator_ptr iterator_ptr; - CosPropertyService::PropertyNamesIterator_out iterator_out (iterator_ptr); - - propsetdef_->get_all_property_names (how_many, - names_out, - iterator_out, - env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Get the values back to var. - names_var = names_out.ptr (); - iterator_var = iterator_out.ptr (); - - // Print out the names in the names-sequence. - if (names_var.ptr () != 0) - { - CORBA::ULong len = names_var->length (); - - for (CORBA::ULong ni = 0; ni < len; ni++) - ACE_DEBUG ((LM_DEBUG, - "%s\n", - (const char *) names_var [ni])); - } - - // Iterate thru and print out the names in the iterator, if any. - if (iterator_var.ptr () != 0) - { - // Helper variables to stop the SunCC warnings on on foo.out - // (). - CosPropertyService::PropertyName name_ptr = 0; - CosPropertyService::PropertyName_out name_out (name_ptr); - - // Call the function. - CORBA::Boolean next_one_result = iterator_var->next_one (name_out, env); - - // Get the values back on a _var variable. - CosPropertyService::PropertyName_var name_var = name_out.ptr (); - - while (next_one_result == 1) - { - TAO_CHECK_ENV_RETURN (env, -1); - ACE_DEBUG ((LM_DEBUG, "%s\n", name_var.in ())); - - // Call the function to iterate again. - next_one_result = iterator_var->next_one (name_out, env); - - // Get the values back on a _var variable. - name_var = name_out.ptr (); - } - - TAO_CHECK_ENV_RETURN (env, -1); - } - - return 0; -} - -// Test get_properties. Give a sequence of names and get all their -// properties. - -int -Client::test_get_properties (CORBA::Environment &env) -{ - // Get float_property, string_property and no_property. If return - // value is false and type is tc_void then that name is not there in - // the PropertySet. - ACE_DEBUG ((LM_DEBUG, "\nTesting get_properties\n")); - CosPropertyService::PropertyNames_var names; - CosPropertyService::PropertyNames_ptr names_ptr; - - ACE_NEW_RETURN (names_ptr, - CosPropertyService::PropertyNames, - -1); - names = names_ptr; - - names->length (3); - names [0] = CORBA::string_dup ("float_property"); - //names [1] = CORBA::string_dup ("string_property"); - names [1] = CORBA::string_dup ("long_property"); - names [2] = CORBA::string_dup ("char_property"); - //names [2] = CORBA::string_dup ("no_property"); - - - CosPropertyService::Properties_ptr properties_ptr = 0; - CosPropertyService::Properties_out properties_out (properties_ptr); - - // Get the properties. - CORBA::Boolean return_val = propsetdef_->get_properties (names.in (), - properties_out, - env); - ACE_UNUSED_ARG (return_val); - TAO_CHECK_ENV_RETURN (env, -1); - - // Get the value to the _var. - CosPropertyService::Properties_var properties = properties_out.ptr (); - - if (properties.ptr () != 0) - { - // Go thru the properties and print them out, if they are not - // _tc_void typed values. - CORBA::ULong len = properties->length (); - - for (CORBA::ULong pi = 0; pi < len; pi++) - { - // Print the name. - ACE_DEBUG ((LM_DEBUG, - "%s : ", - (const char *) properties [pi].property_name.in ())); - - // Print the value. - CORBA::Any::dump (properties [pi].property_value); - } - } - return 0; -} - -// Testing, get_number_of_properties. - -int -Client::test_get_number_of_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nNumber of props : %d\n", - this->propsetdef_->get_number_of_properties (env))); - TAO_CHECK_ENV_RETURN (env, -1); - - return 0; -} - -// Test delete_property. - -int -Client::test_delete_property (CORBA::String property_name, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, "\nDeleting %s\n",property_name)); - - TAO_TRY - { - this->propsetdef_->delete_property (property_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::UserException, ex) - { - TAO_TRY_ENV.print_exception ("User exception"); - return -1; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Not an user exception"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -// Test delete_properties. -// Make a sequence of property names and delete them from the -// PropertySet. Deleting char, short, long, float and string -// properties. - -int -Client::test_delete_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking delete_properties\n")); - CosPropertyService::PropertyNames prop_names; - prop_names.length (3); - prop_names [0] = CORBA::string_dup ("char_property"); - prop_names [1] = CORBA::string_dup ("short_property"); - prop_names [2] = CORBA::string_dup ("long_property"); - // prop_names [3] = CORBA::string_dup ("no_property"); - ACE_DEBUG ((LM_DEBUG, - "Length of sequence %d, Maxlength : %d\n", - prop_names.length (), - prop_names.maximum ())); - this->propsetdef_->delete_properties (prop_names, - env); - TAO_CHECK_ENV_RETURN (env, 0); - - return 0; -} - -// Defines a sequnce of properties containing, char, short, long, -// float in the property set. - -int -Client::test_define_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking define_properties\n")); - CosPropertyService::Properties nproperties; - nproperties.length (4); - CORBA::Any anyval; - // Prepare a char and "define" that in the PropertySet. - CORBA::Char ch = '#'; - anyval <<= CORBA::Any::from_char (ch); - ch = '*'; - anyval >>= CORBA::Any::to_char (ch); - nproperties[0].property_name = CORBA::string_copy ("char_property"); - nproperties[0].property_value <<= CORBA::Any::from_char (ch); - - // Prepare a Short and "define" that in the PropertySet. - CORBA::Short s = 3; - anyval <<= s; - s = 7; - anyval >>= s; - nproperties[1].property_name = CORBA::string_copy ("short_property"); - nproperties[1].property_value <<= s; - - // Prepare a Long and "define" that in the PropertySet. - CORBA::Long l = 931232; - anyval <<= l; - l = 931233; - anyval >>= l; - nproperties[2].property_name = CORBA::string_copy ("long_property"); - nproperties[2].property_value <<= l; - - // Prepare a Float and "define" that in the PropertySet. - CORBA::Float f = 3.14F; - anyval <<= f; - f = 4.14F; - anyval >>= f; - nproperties[3].property_name = CORBA::string_copy ("float_property"); - nproperties[3].property_value <<= f; - - // Define this sequence of properties now. - this->propsetdef_->define_properties (nproperties, env); - TAO_CHECK_ENV_RETURN (env, -1); - - return 0; -} - -// Test get_all_properties. - -int -Client::test_get_all_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nTesting get_all_properties\n")); - // Get the number of current properties. - CORBA::ULong num_of_properties = - this->propsetdef_->get_number_of_properties (env); - ACE_UNUSED_ARG (num_of_properties); - TAO_CHECK_ENV_RETURN (env, -1); - - // Get half on the properties and half of on the iterator. - CORBA::ULong how_many = 1; - - // Helper variables to avoid SunCC warnings. - CosPropertyService::Properties_ptr properties_ptr = 0; - CosPropertyService::Properties_out properties_out (properties_ptr); - CosPropertyService::PropertiesIterator_ptr iterator_ptr = 0; - CosPropertyService::PropertiesIterator_out iterator_out (iterator_ptr); - - propsetdef_->get_all_properties (how_many, - properties_out, - iterator_out, - env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Get these values to the _var's. - CosPropertyService::Properties_var properties = properties_out.ptr (); - CosPropertyService::PropertiesIterator_var iterator = iterator_out.ptr (); - - // Print out the properties now. - if (properties.ptr () != 0) - { - CORBA::ULong len = properties->length (); - - for (CORBA::ULong pi = 0; pi < len; pi++) - { - // Print the property_name. - ACE_DEBUG ((LM_DEBUG, - "%s : ", - properties [pi].property_name.in ())); - - // Print the value if type is not tk_void. - if (properties [pi].property_value.type () == CORBA::_tc_void) - ACE_DEBUG ((LM_DEBUG,"Void\n")); - - if (properties [pi].property_value.type () == CORBA::_tc_float) - { - CORBA::Float f; - properties [pi].property_value >>= f; - ACE_DEBUG ((LM_DEBUG,"%f\n", f)); - } - - if (properties [pi].property_value.type () == CORBA::_tc_string) - { - CORBA::String str; - properties [pi].property_value >>= str; - ACE_DEBUG ((LM_DEBUG,"%s\n", str)); - } - - if (properties [pi].property_value.type () == CORBA::_tc_long) - { - CORBA::Long l; - properties [pi].property_value >>= l; - ACE_DEBUG ((LM_DEBUG,"%d\n", l)); - } - } - } - - // Pass thru the iterator. - if (iterator.ptr () != 0) - { - // Helper variables to avoid warnings with .out () in SunCC. - CosPropertyService::Property* property_ptr = 0; - CosPropertyService::Property_out property_out (property_ptr); - - // Call the funtion. - CORBA::Boolean next_one_result = iterator->next_one (property_out, - env); - - // Get the value to the _var variable. - CosPropertyService::Property_var property = property_out.ptr (); - - while (next_one_result != 0) - { - ACE_DEBUG ((LM_DEBUG, "Iteration over PropertyIterartor")); - TAO_CHECK_ENV_RETURN (env, -1); - ACE_DEBUG ((LM_DEBUG, - "%s : ", - property->property_name.in ())); - - // Print the property_value. - if (property->property_value.type () == CORBA::_tc_char) - { - CORBA::Char c; - property->property_value >>= CORBA::Any::to_char (c); - ACE_DEBUG ((LM_DEBUG,"%c\n", c)); - } - - if (property->property_value.type () == CORBA::_tc_short) - { - CORBA::Short s; - property->property_value >>= s; - ACE_DEBUG ((LM_DEBUG,"%d\n", s)); - } - - if (property->property_value.type () == CORBA::_tc_float) - { - CORBA::Float f; - property->property_value >>= f; - ACE_DEBUG ((LM_DEBUG,"%f\n", f)); - } - - if (property->property_value.type () == CORBA::_tc_string) - { - CORBA::String str; - property->property_value >>= str; - ACE_DEBUG ((LM_DEBUG,"%s\n", str)); - } - - if (property->property_value.type () == CORBA::_tc_long) - { - CORBA::Long l; - property->property_value >>= l; - ACE_DEBUG ((LM_DEBUG,"%d\n", l)); - } - - // Call the function for the next iteraton. - next_one_result = iterator->next_one (property_out, - env); - - // Get the value to the _var variable. - property = property_out.ptr (); - } - TAO_CHECK_ENV_RETURN (env, -1); - } - return 0; -} - -// Testing define property with mode. -// Defines char, short, long and float properties with different modes. -int -Client::test_define_property_with_mode (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking define_property_with_mode\n")); - - CORBA::Any anyval; - - // Prepare a char and "define" that in the PropertySet. - CORBA::Char ch = '#'; - anyval <<= CORBA::Any::from_char (ch); - ch = '*'; - anyval >>= CORBA::Any::to_char (ch); - - ACE_DEBUG ((LM_DEBUG, - "Main : Char ch = %c\n", - ch)); - this->propsetdef_->define_property_with_mode ("char_property", - anyval, - CosPropertyService::normal, - env); - // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) - { - env.print_exception ("char_property"); - env.clear (); - } - - // Prepare a Short and "define" that in the PropertySet. - CORBA::Short s = 3; - anyval <<= s; - s = 7; - anyval >>= s; - - ACE_DEBUG ((LM_DEBUG, - "Main : Short s = %d\n", - s)); - propsetdef_->define_property_with_mode ("short_property", - anyval, - CosPropertyService::read_only, - env); - // Check if that is an user exception, if so, print it out. - if (env.exception () != 0) - { - env.print_exception ("char_property"); - if (CORBA::UserException::_narrow (env.exception ()) != 0) - env.clear (); - else - return -1; - } - - - // Prepare a Long and "define" that in the PropertySet. - CORBA::Long l = 931232; - anyval <<= l; - l = 931233; - anyval >>= l; - ACE_DEBUG ((LM_DEBUG, - "Main : Long l = %d\n", - l)); - CORBA::Any newany(anyval); - propsetdef_->define_property_with_mode ("long_property", - anyval, - CosPropertyService::fixed_normal, - env); - TAO_CHECK_ENV_RETURN (env, -1); - - - // Prepare a Float and "define" that in the PropertySet. - CORBA::Float f = 3.14F; - anyval <<= f; - f = 4.14F; - anyval >>= f; - ACE_DEBUG ((LM_DEBUG, - "Main : Float f = %f\n", - f)); - propsetdef_->define_property_with_mode ("float_property", - anyval, - CosPropertyService::fixed_readonly, - env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Prepare a String and "define" that in the PropertySet. - ACE_DEBUG ((LM_DEBUG, - "Main: Any holding String\n")); - CORBA::String_var strvar (CORBA::string_dup ("Test_String")); - anyval <<= strvar.in (); - CORBA::String newstr; - anyval >>= newstr; - - ACE_DEBUG ((LM_DEBUG, - "Main: String : %s, From any : %s\n", - strvar.in (), - newstr)); - propsetdef_->define_property ("string_property", - anyval, - env); - TAO_CHECK_ENV_RETURN (env, -1); - - return 0; -} - -int -Client::test_get_property_value (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, "Testing get_property_value\n")); - - TAO_TRY - { - // Get the ior property. - CORBA::Any_ptr any_ptr = this->propsetdef_->get_property_value ("PropertySetDef_IOR", - TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, "Property value received successfully\n")); - - // Check whether the IOR is fine. - CORBA::Object_var propsetdef_object; - (*any_ptr) >>= CORBA::Any::to_object (propsetdef_object); - - CosPropertyService::PropertySetDef_var propsetdef = - CosPropertyService::PropertySetDef::_narrow (propsetdef_object.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (propsetdef.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid object reference\n"), - -1); - - ACE_DEBUG ((LM_DEBUG, "IOR retrieved\n")); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("get_property_value"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -int -main (int argc, char **argv) -{ - TAO_TRY - { - Client client; - - if (client.init (argc, - argv, - TAO_TRY_ENV) == -1) - return 1; - TAO_CHECK_ENV; - - // client.run (TAO_TRY_ENV); - if (client.property_tester (TAO_TRY_ENV) != 0) - ACE_DEBUG ((LM_DEBUG, "Test failed\n")); - else - ACE_DEBUG ((LM_DEBUG, "Test succeeded\n")); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("PropertyService Test : client"); - return -1; - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/tests/Property/client.h b/TAO/orbsvcs/tests/Property/client.h deleted file mode 100644 index dab07813f50..00000000000 --- a/TAO/orbsvcs/tests/Property/client.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/Property -// -// = FILENAME -// client.h -// -// = DESCRIPTION -// Test client for the Property Service. -// -// = AUTHORS -// Alexander Babu Arulanthu -// -// ============================================================================ - -#ifndef PROPERTY_CLIENT_H -#define PROPERTY_CLIENT_H - -#include "ace/Synch.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Task.h" -#include "ace/Thread_Manager.h" -#include "ace/Get_Opt.h" -#include "tao/TAO.h" -#include "orbsvcs/Property/CosPropertyService_i.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -class Client -{ - // = TITLE - // Client for A/V Streams demo. - // - // = DESCRIPTION - // Encapsulates client functionality. -public: - Client (void); - // Constructor. - - int init (int argc, - char **argv, - CORBA::Environment &env); - // Initialize the ORB etc, and bind the MMDevices. - - int run (CORBA::Environment &env); - // Run the client. This will call StreamCtrl::bind_devs. - - int property_tester (CORBA::Environment &env); - // Testing the property service methods. - -protected: - int bind_to_remote_mmdevice (int argc, - char *argv[], - CORBA::Environment &env); - // Bind to the remote MMDevice. - - // = Property Testing. - - int test_define_property (CORBA::Environment &env); - // Testing the define property method. - - int test_get_number_of_properties (CORBA::Environment &env); - // Testing the number of properties, currently in the Property Set. - - int test_get_all_property_names (CORBA::Environment &env); - //Testing get_all_property_names. - - int test_get_property_value (CORBA::Environment &env); - // Testing get_property_value. - - int test_get_properties (CORBA::Environment &env); - //Testing get_properties. Give the names and get their properties. - - int test_get_all_properties (CORBA::Environment &env); - // Testing get_all_properties. - - int test_delete_property (CORBA::String property_name, - CORBA::Environment &env); - // Testing delete_property. - - int test_delete_properties (CORBA::Environment &env); - // Testing delete_properties. - - int test_define_properties (CORBA::Environment &env); - // Defining a sequence of properties. - - int test_define_property_with_mode (CORBA::Environment &env); - // Defines properties with various modes. - - TAO_ORB_Manager manager_; - // The ORB manager, handles ORB initialization etc. - - TAO_Naming_Client my_name_client_; - // The Naming Client handles Naming Service work - - CosPropertyService::PropertySetDef_var propsetdef_; - // To test propertySetDef interface. -}; - -#endif /* COSPROPERTYSERVICE_CLIENT_H */ diff --git a/TAO/orbsvcs/tests/Property/main.cpp b/TAO/orbsvcs/tests/Property/main.cpp deleted file mode 100644 index eb739fae1d6..00000000000 --- a/TAO/orbsvcs/tests/Property/main.cpp +++ /dev/null @@ -1,591 +0,0 @@ -// $Id$ - -// ======================================================================== -// -// = FILE -// Program to test the property services. -// -// = DESCRIPTION -// Here all the objects are at one address space. See the -// client.cpp and server.cpp to see property calls on remote -// objects. -// -// = AUTHOR -// Alexander Babu Arulanthu -// -// ======================================================================== - -#include "orbsvcs/CosPropertyServiceS.h" -#include "orbsvcs/Property/CosPropertyService_i.h" - -ACE_RCSID(CosPropertyService, main, "$Id$") - -class TAO_PropertySet_Tester -{ - // = TITLE - // The testing code for the PropertySet interface are grouped - // under the functions of this class. - // - // = DESCRIPTION - // Go thru the functions to understand the usage of the various - // methods of the PropertySet interaface. -public: - friend class TAO_PropertyNamesIterator_Tester; - // He has to instantiate TAO_NamesIterator class using the instance - // of TAO_PropertySet. - - TAO_PropertySet_Tester (void); - // Constructor. - - ~TAO_PropertySet_Tester (void); - // Destructor. - - int test_define_property (CORBA::Environment &env); - // Defines a char,a short, a long, a float and a string property. - - int test_get_number_of_properties (CORBA::Environment &env); - // Gets the number of properties currently defined in the PropertySet. - - int test_delete_property (const char *property_name, - CORBA::Environment &env); - // Delete a given property. - - int test_is_property_defined (CORBA::Environment &env); - // Check the following properties are defined or - // no. "char_property", "short_property" and a "string_property". - - int test_get_property_value (CORBA::Environment &env); - // Get the "float_property" and "string_property" and print them - // out. - - int test_delete_properties (CORBA::Environment &env); - // Delete char, short,long, and string properties. - - int test_delete_all_properties (CORBA::Environment &env); - // Delete all the properties. - - int test_define_properties (CORBA::Environment &env); - // Define a sequence of properties. a char, a short, a long, a float - // and a string. - -private: - TAO_PropertySet property_set_; - // The PropertySet. -}; - -class TAO_PropertyNamesIterator_Tester -{ - // = TITLE - // The testing code for the PropertyNamesIterator interface are grouped - // under the functions of this class. - // - // = DESCRIPTION - // Go thru the functions to understand the usage of the various - // methods of the PropertyNamesIterator interaface. -public: - TAO_PropertyNamesIterator_Tester (TAO_PropertySet_Tester &propertyset_tester); - // Constructor. To make names iterator from the property set object. - - ~TAO_PropertyNamesIterator_Tester (void); - // Destructor. - - int test_next_one (CORBA::Environment &env); - // Test next one method. Iterate thru all the names in the - // PropertySet and print them out. - - int test_reset (CORBA::Environment &env); - // Test the reset method. - - int test_next_n (size_t n, CORBA::Environment &env); - // Test the next_n method. -private: - TAO_PropertyNamesIterator iterator_; - // Our names iterator. -}; - - -// Constructor. -TAO_PropertySet_Tester::TAO_PropertySet_Tester (void) -{ -} - -// Destructor. -TAO_PropertySet_Tester::~TAO_PropertySet_Tester (void) -{ -} - -// Defines a char, a short, a long, a float and a string. -int -TAO_PropertySet_Tester::test_define_property (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking define_property\n")); - - CORBA::Any anyval; - - // Prepare a char and "define" that in the PropertySet. - CORBA::Char ch = '#'; - anyval <<= from_char (ch); - ch = '*'; - anyval >>= to_char (ch); - ACE_DEBUG ((LM_DEBUG, - "Main : Char ch = %c\n", - ch)); - property_set_.define_property ("char_property", - anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Prepare a Short and "define" that in the PropertySet. - CORBA::Short s = 3; - anyval <<= s; - s = 7; - anyval >>= s; - ACE_DEBUG ((LM_DEBUG, - "Main : Short s = %d\n", - s)); - property_set_.define_property ("short_property", - anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); - - - // Prepare a Long and "define" that in the PropertySet. - CORBA::Long l = 931232; - anyval <<= l; - l = 931233; - anyval >>= l; - ACE_DEBUG ((LM_DEBUG, - "Main : Long l = %d\n", - l)); - CORBA::Any newany(anyval); - - property_set_.define_property ("long_property", - anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Prepare a Float and "define" that in the PropertySet. - CORBA::Float f = 3.14; - anyval <<= f; - f = 4.14; - anyval >>= f; - ACE_DEBUG ((LM_DEBUG, - "Main : Float f = %f\n", - f)); - property_set_.define_property ("float_property", - anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Prepare a String and "define" that in the PropertySet. - ACE_DEBUG ((LM_DEBUG, - "Main: Any holding String\n")); - CORBA::String_var strvar (CORBA::string_dup ("Test_String")); - anyval <<= strvar.in (); - CORBA::String newstr; - anyval >>= newstr; - ACE_DEBUG ((LM_DEBUG, - "Main: String : %s, From any : %s\n", - strvar.in (), - newstr)); - property_set_.define_property ("string_property", - anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); - - return 0; -} - -// Testing, get_number_of_properties. -int -TAO_PropertySet_Tester::test_get_number_of_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "Main : Number of props : %d\n", - property_set_.get_number_of_properties (env))); - TAO_CHECK_ENV_RETURN (env, 1); - - return 0; -} - -// Testing the delete_property. Delets property, with the given name, -// if that exsists. -int -TAO_PropertySet_Tester::test_delete_property (const char *property_name, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, "\nChecking delete_property\n")); - property_set_.delete_property (property_name, - env); - TAO_CHECK_ENV_RETURN (env, 1); - - return 0; -} - -// Gets the value of "short_property" and "string_property". - -int -TAO_PropertySet_Tester::test_get_property_value (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking get_property_value\n")); - - CORBA::Any_ptr anyptr = property_set_.get_property_value ("short_property", - env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Get the short value. - if (anyptr != 0) - { - CORBA::Short s; - *anyptr >>= s; - ACE_DEBUG ((LM_DEBUG, - "Short %d\n", - s)); - } - else - ACE_DEBUG ((LM_DEBUG, - "Short property not found\n")); - // Get the string. - anyptr = property_set_.get_property_value ("string_property", - env); - TAO_CHECK_ENV_RETURN (env, 1); - if (anyptr != 0) - { - CORBA::String str; - *anyptr >>= str; - ACE_DEBUG ((LM_DEBUG, - "Str %s\n", str)); - } - else - ACE_DEBUG ((LM_DEBUG, - "string_property not found\n")); - return 0; -} - -// Check the following properties are defined or no. "short_property", -// "string_property" and "char_property". - -int -TAO_PropertySet_Tester::test_is_property_defined (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking is_property_defined ()\n")); - if (property_set_.is_property_defined ("short_property", - env) == 0) - ACE_DEBUG ((LM_DEBUG, - "short_property not defined\n")); - else - ACE_DEBUG ((LM_DEBUG, - "short_property defined\n")); - TAO_CHECK_ENV_RETURN (env, 1); - if (property_set_.is_property_defined ("string_property", - env) == 0) - ACE_DEBUG ((LM_DEBUG, - "string_property not defined\n")); - else - ACE_DEBUG ((LM_DEBUG, - "string_property defined\n")); - TAO_CHECK_ENV_RETURN (env, 1); - if (property_set_.is_property_defined ("char_property", - env) == 0) - ACE_DEBUG ((LM_DEBUG, - "char_property not defined\n")); - else - ACE_DEBUG ((LM_DEBUG, - "char_property defined\n")); - TAO_CHECK_ENV_RETURN (env, 1); - - return 0; -} - -// Make a sequence of property names and delete them from the -// PropertySet. Deleting char, short, long, float and string -// properties. -int -TAO_PropertySet_Tester::test_delete_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking delete_properties == Deleting a sequence of Properties\n")); - CosPropertyService::PropertyNames prop_names; - prop_names.length (4); - prop_names [0] = CORBA::string_dup ("char_property"); - prop_names [1] = CORBA::string_dup ("short_property"); - prop_names [2] = CORBA::string_dup ("long_property"); - prop_names [3] = CORBA::string_dup ("float_property"); - ACE_DEBUG ((LM_DEBUG, - "Length of sequence %d, Maxlength : %d\n", - prop_names.length (), - prop_names.maximum ())); - property_set_.delete_properties (prop_names, - env); - TAO_CHECK_ENV_RETURN (env, 0); - - return 0; -} - -// Defines a sequnce of properties containing, char, short, long, -// float and string property in the property set. -int -TAO_PropertySet_Tester::test_define_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking define_properties == Defining sequence of properties\n")); - // TAO_TRY - // { - CosPropertyService::Properties nproperties; - nproperties.length (5); - CORBA::Any anyval; - // Prepare a char and "define" that in the PropertySet. - CORBA::Char ch = '#'; - anyval <<= from_char (ch); - ch = '*'; - anyval >>= to_char (ch); - nproperties[0].property_name = CORBA::string_copy ("char_property"); - nproperties[0].property_value <<= from_char (ch); - - // Prepare a Short and "define" that in the PropertySet. - CORBA::Short s = 3; - anyval <<= s; - s = 7; - anyval >>= s; - nproperties[1].property_name = CORBA::string_copy ("short_property"); - nproperties[1].property_value <<= s; - - // Prepare a Long and "define" that in the PropertySet. - CORBA::Long l = 931232; - anyval <<= l; - l = 931233; - anyval >>= l; - nproperties[2].property_name = CORBA::string_copy ("long_property"); - nproperties[2].property_value <<= l; - - // Prepare a Float and "define" that in the PropertySet. - CORBA::Float f = 3.14; - anyval <<= f; - f = 4.14; - anyval >>= f; - nproperties[3].property_name = CORBA::string_copy ("float_property"); - nproperties[3].property_value <<= f; - - // Prepare a String and "define" that in the PropertySet. - CORBA::String_var strvar (CORBA::string_dup ("Test_String")); - anyval <<= strvar.in (); - nproperties[4].property_name = CORBA::string_copy ("string_property"); - nproperties[4].property_value <<= strvar.in (); - - // Define this sequence of properties now. - property_set_.define_properties (nproperties, env); - TAO_CHECK_ENV_RETURN (env, 1); - - return 0; -} - -// Delete all the properties. -int -TAO_PropertySet_Tester::test_delete_all_properties (CORBA::Environment &env) -{ - // Deleting all the properties - ACE_DEBUG ((LM_DEBUG, - "\nChecking delete_all_properties\n")); - if (property_set_.delete_all_properties (env) == 1) - ACE_DEBUG ((LM_DEBUG, - "All properties deleted, I guess\n")); - else - ACE_DEBUG ((LM_DEBUG, - "delete_all_properties failed\n")); - return 0; -} - -// Constructor. To make names iterator from the property set object. -TAO_PropertyNamesIterator_Tester::TAO_PropertyNamesIterator_Tester (TAO_PropertySet_Tester &propertyset_tester) - : iterator_ (propertyset_tester.property_set_) -{ -} - -// Destructor. -TAO_PropertyNamesIterator_Tester::~TAO_PropertyNamesIterator_Tester (void) -{ -} - -// Test next one method. Iterate thru all the names in the -// PropertySet and print them out. -int -TAO_PropertyNamesIterator_Tester::test_next_one (CORBA::Environment &env) -{ - CORBA::String_var strvar; - ACE_DEBUG ((LM_DEBUG, - "\nTesting next_one of NamesIterator, Iterating thru names.\n")); - // Let us iterate, now. - while (iterator_.next_one (strvar.out (), env) != 0) - { - TAO_CHECK_ENV_RETURN (env, 1); - ACE_DEBUG ((LM_DEBUG, "Str : %s\n", strvar.in ())); - } - return 0; -} - -// Reset the names iterator. -int -TAO_PropertyNamesIterator_Tester::test_reset (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "Resetting (reset ()) the NamesIterator.")); - iterator_.reset (env); - TAO_CHECK_ENV_RETURN (env, 1); - return 0; -} - -// Test the next_n method. Get the next n names and print them all. -int -TAO_PropertyNamesIterator_Tester::test_next_n (size_t n, - CORBA::Environment &env) -{ - CosPropertyService::PropertyNames_var pnames_var; - ACE_DEBUG ((LM_DEBUG, - "Checking next_n (), next %d\n", - n)); - if (iterator_.next_n (n, pnames_var.out (), env) == 0) - { - // Return if no more items in the iterator. - TAO_CHECK_ENV_RETURN (env, 1); - ACE_DEBUG ((LM_DEBUG, - "Iterator has no more items\n")); - return 0; - } - TAO_CHECK_ENV_RETURN (env, 1); - for (size_t i = 0; i < pnames_var.in ().length (); i++) - ACE_DEBUG ((LM_DEBUG, - "str %s \n", - (const char *) pnames_var[i])); - return 0; -} - -int -main (int argc, char *argv []) -{ - TAO_TRY - { - CORBA::ORB_var orb_var = CORBA::ORB_init (argc, - argv, - "internet", - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // = Checking PropertySet interface. - - ACE_DEBUG ((LM_DEBUG, - "\nTAO_PropertySet Testing\n")); - TAO_PropertySet_Tester propertyset_tester; - - // Checking define_property. define a char, a short,a long, a float - // and a string. - propertyset_tester.test_define_property (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Test delete property. Delete "string_property" - propertyset_tester.test_delete_property ("string_property", TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Test delete_properties. Delete char, short, long and float. - propertyset_tester.test_delete_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Define a sequence of properties. char, short, long, float and - // string. - propertyset_tester.test_define_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Checking get_property_value. get the value of short and string. - propertyset_tester.test_get_property_value (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Checking delete_all_properties. - propertyset_tester.test_delete_all_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Define a sequence of properties. char, short, long, float and - // string. - propertyset_tester.test_define_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Test the number of properties and print it out. - propertyset_tester.test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // = Checking the PropertyNamesIterator interface. - - ACE_DEBUG ((LM_DEBUG, - "\nTAO_PropertyNamesIterator Testing\n")); - - // Construct the names iterator from the PropertySet object. - TAO_PropertyNamesIterator_Tester names_iterator_tester (propertyset_tester); - - // Checking next_one. Iterate thru the property names. - names_iterator_tester.test_next_one (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Checking the reset () method. - names_iterator_tester.test_reset (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Iterating again thru the property names. - names_iterator_tester.test_next_one (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Reset again. - names_iterator_tester.test_reset (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Checking next_n. Prints out all the names it has got. - names_iterator_tester.test_next_n (6, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Try next_n without resetting. - names_iterator_tester.test_next_n (6, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::SystemException, sysex) - { - TAO_TRY_ENV.print_exception ("System Exception"); - return -1; - } - TAO_CATCH (CORBA::UserException, userex) - { - TAO_TRY_ENV.print_exception ("User Exception"); - return -1; - } - TAO_ENDTRY; - return 0; -} - - - - - - - - - - diff --git a/TAO/orbsvcs/tests/Property/run_test.pl b/TAO/orbsvcs/tests/Property/run_test.pl deleted file mode 100755 index 50292c6c72a..00000000000 --- a/TAO/orbsvcs/tests/Property/run_test.pl +++ /dev/null @@ -1,57 +0,0 @@ -# $Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -$tao_root = $ENV{TAO_ROOT}; -# This is a Perl script that runs the Naming Service, client and servers - -unshift @INC, '../../../../bin'; -require Process; -require Uniqueid; - -# amount of delay between running the servers - -$sleeptime = 6; - -# variables for parameters - -$nsport = 20000 + uniqueid (); -sub name_server -{ - my $args = "-ORBnameserviceport $nsport"; - my $prog = "$tao_root/orbsvcs/Naming_Service/Naming_Service" - .$Process::EXE_EXT; - print ("\nNaming_Service: $prog$Process::EXE_EXT $args\n"); - $NS = Process::Create ($prog, $args); -} - - -sub server -{ - my $args = "-ORBnameserviceport $nsport"; - print ("\nServer: server$Process::EXE_EXT $args\n"); - $SV = Process::Create ($EXEPREFIX."server$Process::EXE_EXT", $args); -} - - -sub client -{ - my $args = "-ORBnameserviceport $nsport"; - print ("\nclient: client $args\n"); - $CL = Process::Create ($EXEPREFIX."client$Process::EXE_EXT", $args); -} - -name_server (); -sleep $sleeptime; - -server (); -sleep $sleeptime; - -client (); -sleep $sleeptime; - -$NS->Kill (); -$SV->Kill (); - diff --git a/TAO/orbsvcs/tests/Property/server.cpp b/TAO/orbsvcs/tests/Property/server.cpp deleted file mode 100644 index 8e9cc712b23..00000000000 --- a/TAO/orbsvcs/tests/Property/server.cpp +++ /dev/null @@ -1,119 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/CosPropertyService -// -// = FILENAME -// server.cpp -// -// = DESCRIPTION -// Test server for the CosPropertyService -// -// = AUTHORS -// Alexander Babu Arulanthu -// -// ============================================================================ - -#include "server.h" - -ACE_RCSID(CosPropertyService, server, "$Id$") - -// Main program - -int -main (int argc, char ** argv) -{ - TAO_TRY - { - TAO_ORB_Manager m; - - // Initialize the ORB. - m.init_child_poa (argc, - argv, - "child_poa", - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Using naming server. - TAO_Naming_Client my_name_client; - if (my_name_client.init (m.orb ()) < 0) - return 1; - - ACE_DEBUG ((LM_DEBUG, "Name init done\n")); - - // Create PropertySetDef object and register. - TAO_PropertySetDef *propsetdef_impl; - ACE_NEW_RETURN (propsetdef_impl, - TAO_PropertySetDef, - -1); - CosPropertyService::PropertySetDef_var propsetdef = - propsetdef_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - CosNaming::Name propsetdef_name (1); - propsetdef_name.length (1); - propsetdef_name[0].id = CORBA::string_dup ("PropertySetDef"); - my_name_client->bind (propsetdef_name, - propsetdef.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Any any_val; - - // Make this IOR as one of the properties in there. - any_val <<= propsetdef_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var ior = propsetdef_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - CORBA::Object_ptr ior_ptr = ior.in (); - any_val <<= ior_ptr; - // any_val.replace (CORBA::_tc_Object, - // &ior_ptr, - // 1, - // TAO_TRY_ENV); - // TAO_CHECK_ENV; - - propsetdef_impl->define_property_with_mode ("PropertySetDef_IOR", - any_val, - CosPropertyService::fixed_readonly, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Create PropertySet factory and then register. - TAO_PropertySetFactory *propset_factory_impl; - ACE_NEW_RETURN (propset_factory_impl, - TAO_PropertySetFactory, - -1); - CosPropertyService::PropertySetFactory_var propset_factory = - propset_factory_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - CosNaming::Name propset_factory_name (1); - propset_factory_name.length (1); - propset_factory_name[0].id = CORBA::string_dup ("PropertySetFactory"); - my_name_client->bind (propset_factory_name, - propset_factory.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Run the ORB Event loop. - m.run (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::SystemException, sysex) - { - TAO_TRY_ENV.print_exception ("System Exception"); - return 1; - } - TAO_CATCH (CORBA::UserException, userex) - { - TAO_TRY_ENV.print_exception ("User Exception"); - return 1; - } - TAO_ENDTRY; - ACE_DEBUG ((LM_DEBUG, - "\nServer is terminating")); - return 0; -} diff --git a/TAO/orbsvcs/tests/Property/server.h b/TAO/orbsvcs/tests/Property/server.h deleted file mode 100644 index 09e5fa5a52b..00000000000 --- a/TAO/orbsvcs/tests/Property/server.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/CosPropertyService -// -// = FILENAME -// server.h -// -// = DESCRIPTION -// Test server for the CosPropertyService. -// -// = AUTHORS -// Alexander Babu Arulanthu -// -// ============================================================================ - -#ifndef COSPROPERTYSERVICE_SERVER_H -#define COSPROPERTYSERVICE_SERVER_H - -#include "tao/TAO.h" -#include "orbsvcs/Property/CosPropertyService_i.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -#endif /* COSPROPERTYSERVICE_SERVER_H */ diff --git a/TAO/orbsvcs/tests/Sched/DynSched_Test.cpp b/TAO/orbsvcs/tests/Sched/DynSched_Test.cpp deleted file mode 100644 index ac5bb643d3c..00000000000 --- a/TAO/orbsvcs/tests/Sched/DynSched_Test.cpp +++ /dev/null @@ -1,288 +0,0 @@ -// $Id$ - -#include "Strategy_Scheduler.h" -#if defined (ACE_HAS_QUANTIFY) -# include -#endif /* ACE_HAS_QUANTIFY */ - -ACE_RCSID(Sched, DynSched_Test, "$Id$") - -// period times, in 100 nanoseconds -#define ONE_HZ 10000000 -#define FIVE_HZ 2000000 -#define TEN_HZ 1000000 -#define TWENTY_HZ 500000 - -typedef RtecScheduler::handle_t handle_t; -typedef RtecScheduler::Dependency_Info Dependency_Info; -typedef RtecScheduler::Preemption_Priority Preemption_Priority; -typedef RtecScheduler::OS_Priority OS_Priority; -typedef RtecScheduler::Sub_Priority Sub_Priority; -typedef RtecScheduler::RT_Info RT_Info; -typedef RtecScheduler::Time Time; -typedef RtecScheduler::Period Period; -typedef RtecScheduler::Info_Type Info_Type; -typedef RtecScheduler::Dependency_Type Dependency_Type; - - -static -void -setup_rt_info (RT_Info &info, const char *entry_point, u_long period, - u_long execution, RtecScheduler::Criticality criticality, - RtecScheduler::Importance importance, u_long threads) -{ - // copy the passed entry point string into the RT_Info - info.entry_point = CORBA::string_dup (entry_point); - - const TimeBase::ulonglong execution_time = {execution, 0}; - const TimeBase::ulonglong zero = {0, 0}; - - // initialize other values - info.handle = 0; - info.worst_case_execution_time = execution_time; - info.typical_execution_time = execution_time; - info.cached_execution_time = zero; - info.period = period; - info.criticality = criticality; - info.importance = importance; - info.quantum = zero; - info.threads = threads; - info.priority = 0; - info.dynamic_subpriority = 0; - info.static_subpriority = 0; - info.preemption_priority = 0; - info.info_type = RtecScheduler::OPERATION; - info.volatile_token = 0; -} - -static -int -register_rt_info (ACE_DynScheduler &scheduler, - RtecScheduler::RT_Info &info) -{ - int result = 0; - - if (scheduler.register_task (&info, info.handle) != - ACE_DynScheduler::SUCCEEDED) - { - result = 1; - printf ("Could not register info for \"%s\"\n", info.entry_point.in ()); - } - - return result; -} - -#if 0 /* not currently used */ -static -void -setup_conjunction (RT_Info &info, const char *entry_point) -{ - // copy the passed entry point string into the RT_Info - info.entry_point = CORBA::string_dup (entry_point); - - const TimeBase::ulonglong zero = {0, 0}; - - // initialize other values - info.handle = 0; - info.worst_case_execution_time = zero; - info.typical_execution_time = zero; - info.cached_execution_time = zero; - info.period = 0; - info.criticality = RtecScheduler::VERY_LOW_CRITICALITY; - info.importance = RtecScheduler::VERY_LOW_IMPORTANCE; - info.quantum = zero; - info.threads = 0; - info.priority = 0; - info.dynamic_subpriority = 0; - info.static_subpriority = 0; - info.preemption_priority = 0; - info.info_type = RtecScheduler::CONJUNCTION; - info.volatile_token = 0; -} - -static -void -setup_disjunction (RT_Info &info, const char *entry_point) -{ - // copy the passed entry point string into the RT_Info - info.entry_point = CORBA::string_dup (entry_point); - - const TimeBase::ulonglong zero = {0, 0}; - - // initialize other values - info.handle = 0; - info.worst_case_execution_time = zero; - info.typical_execution_time = zero; - info.cached_execution_time = zero; - info.period = 0; - info.criticality = RtecScheduler::VERY_LOW_CRITICALITY; - info.importance = RtecScheduler::VERY_LOW_IMPORTANCE; - info.quantum = zero; - info.threads = 0; - info.priority = 0; - info.dynamic_subpriority = 0; - info.static_subpriority = 0; - info.preemption_priority = 0; - info.info_type = RtecScheduler::DISJUNCTION; - info.volatile_token = 0; -} -#endif /* not currently used */ - - -static -int -run_schedule (ACE_Scheduler_Strategy &strategy, - const char *output_filename, const char *heading) -{ -// RtecScheduler::RT_Info low_10, low_20, high_10, high_20; - RtecScheduler::RT_Info low_1, low_5, low_10, low_20; - RtecScheduler::RT_Info high_1, high_5, high_10, high_20; - - ACE_Strategy_Scheduler scheduler (strategy); - - setup_rt_info (low_1, "low_1", ONE_HZ, 180000, - RtecScheduler::LOW_CRITICALITY, - RtecScheduler::HIGH_IMPORTANCE, 1); - setup_rt_info (low_5, "low_5", FIVE_HZ, 180000, - RtecScheduler::LOW_CRITICALITY, - RtecScheduler::HIGH_IMPORTANCE, 1); - setup_rt_info (low_10, "low_10", TEN_HZ, 180000, - RtecScheduler::LOW_CRITICALITY, - RtecScheduler::HIGH_IMPORTANCE, 1); - setup_rt_info (low_20, "low_20", TWENTY_HZ, 180000, - RtecScheduler::LOW_CRITICALITY, - RtecScheduler::HIGH_IMPORTANCE, 1); - setup_rt_info (high_1, "high_1", ONE_HZ, 180000, - RtecScheduler::HIGH_CRITICALITY, - RtecScheduler::LOW_IMPORTANCE, 1); - setup_rt_info (high_5, "high_5", FIVE_HZ, 180000, - RtecScheduler::HIGH_CRITICALITY, - RtecScheduler::LOW_IMPORTANCE, 1); - setup_rt_info (high_10, "high_10", TEN_HZ, 180000, - RtecScheduler::HIGH_CRITICALITY, - RtecScheduler::LOW_IMPORTANCE, 1); - setup_rt_info (high_20, "high_20", TWENTY_HZ, 180000, - RtecScheduler::HIGH_CRITICALITY, - RtecScheduler::LOW_IMPORTANCE, 1); - - if ( - register_rt_info (scheduler, low_1) || - register_rt_info (scheduler, low_5) || - register_rt_info (scheduler, low_10) || - register_rt_info (scheduler, low_20) || - register_rt_info (scheduler, high_1) || - register_rt_info (scheduler, high_5) || - register_rt_info (scheduler, high_10) || - register_rt_info (scheduler, high_20)) - { - return -1; - } - -#if defined (ACE_HAS_QUANTIFY) - quantify_start_recording_data (); -#endif /* ACE_HAS_QUANTIFY */ - ACE_DynScheduler::status_t status = scheduler.schedule (); -#if defined (ACE_HAS_QUANTIFY) - quantify_stop_recording_data (); -#endif /* ACE_HAS_QUANTIFY */ - - switch (status) - { - case ACE_DynScheduler::SUCCEEDED: - case ACE_DynScheduler::ST_UTILIZATION_BOUND_EXCEEDED: - - status = scheduler.output_timeline (output_filename, heading); - switch (status) - { - case ACE_DynScheduler::SUCCEEDED: - case ACE_DynScheduler::ST_UTILIZATION_BOUND_EXCEEDED: - break; - - default : - printf ("scheduler.output_timeline (\"%s\") failed: returned %d\n", - output_filename, status); - return -1; - } - - break; - - default : - - printf ("scheduler.schedule () failed: returned %d\n", status); - return -1; - } - - return 0; -} - -int -main (int, char *[]) -{ - int result = 0; - - // create a bunch of different strategies, indicating the minimum critical - // priority level (number of priority levels in critical set - 1) for each. - - ACE_RMS_Scheduler_Strategy rms_strategy (3); -// ACE_RMS_Scheduler_Strategy rms_strategy (1); - - ACE_MLF_Scheduler_Strategy mlf_strategy (0); - ACE_EDF_Scheduler_Strategy edf_strategy (0); - - ACE_RMS_Dyn_Scheduler_Strategy rms_dyn_strategy (3); -// ACE_RMS_Dyn_Scheduler_Strategy rms_dyn_strategy (1); - - ACE_MUF_Scheduler_Strategy muf_strategy (0); - - result = run_schedule (rms_strategy, "RMS_Timelines", - "RMS Scheduling Strategy"); - if (result < 0) - { - printf ("run_schedule (rms_strategy, \"RMS_Timelines\", " - "\"RMS Scheduling Strategy\") returned %d\n", - result); - return 1; - } - - result = run_schedule (mlf_strategy, "MLF_Timelines", - "MLF Scheduling Strategy"); - if (result < 0) - { - printf ("run_schedule (mlf_strategy, \"MLF_Timelines\", " - "\"MLF Scheduling Strategy\") returned %d\n", - result); - return 1; - } - - result = run_schedule (edf_strategy, "EDF_Timelines", - "EDF Scheduling Strategy"); - if (result < 0) - { - printf ("run_schedule (edf_strategy, \"EDF_Timelines\", " - "\"EDF Scheduling Strategy\") returned %d\n", - result); - return 1; - } - - result = run_schedule (rms_dyn_strategy, "RMS_Dyn_Timelines", - "RMS-Dynamic Scheduling Strategy"); - if (result < 0) - { - printf ("run_schedule (rms_dyn_strategy, \"RMS_Dyn_Timelines\", " - "\"RMS-Dynamic Scheduling Strategy\") returned %d\n", - result); - return 1; - } - - result = run_schedule (muf_strategy, "MUF_Timelines", - "MUF Scheduling Strategy"); - if (result < 0) - { - printf ("run_schedule (muf_strategy, \"MUF_Timelines\", " - "\"MUF Scheduling Strategy\") returned %d\n", - result); - return 1; - } - - return 0; -} diff --git a/TAO/orbsvcs/tests/Sched/Makefile b/TAO/orbsvcs/tests/Sched/Makefile deleted file mode 100644 index 290b2b81a18..00000000000 --- a/TAO/orbsvcs/tests/Sched/Makefile +++ /dev/null @@ -1,131 +0,0 @@ -# $Id$ - -BIN = DynSched_Test -BUILD = $(BIN) -SRC = $(BIN:%=%$(VAR).cpp) -LDLIBS= -lorbsvcs -lTAO - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif - -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs/orbsvcs/Sched \ - -I$(TAO_ROOT)/orbsvcs \ - -I$(TAO_ROOT) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/DynSched_Test.o .obj/DynSched_Test.so .shobj/DynSched_Test.o .shobj/DynSched_Test.so: DynSched_Test.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/DynSched.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/SchedEntry.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/SchedEntry.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/DynSched.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Sched_Conf/Makefile b/TAO/orbsvcs/tests/Sched_Conf/Makefile deleted file mode 100644 index 4c49ed15966..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/Makefile +++ /dev/null @@ -1,311 +0,0 @@ -# $Id$ - -BIN = Sched_Conf -BUILD = $(BIN) - -DUMP_SRCS = \ - Sched_Conf.cpp - -LSRC = $(DUMP_SRCS) - -SCHEDULE_OBJS=$(SCHEDULE_SRCS:.cpp=.o) -DUMP_OBJS=$(DUMP_SRCS:.cpp=.o) - -LDLIBS = -lorbsvcs -lTAO -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif -TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE -LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) $(TSS_ORB_FLAG) - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Sched_Conf.o .obj/Sched_Conf.so .shobj/Sched_Conf.o .shobj/Sched_Conf.so: Sched_Conf.cpp \ - $(ACE_ROOT)/ace/Sched_Params.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Sched_Params.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/Servant_Base.i \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Pluggable.h \ - $(TAO_ROOT)/tao/MProfile.h \ - $(TAO_ROOT)/tao/MProfile.i \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/params.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(TAO_ROOT)/tao/IIOP_Connector.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/IIOP_Acceptor.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Sched_Conf/README b/TAO/orbsvcs/tests/Sched_Conf/README deleted file mode 100644 index e787e7d690a..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/README +++ /dev/null @@ -1,42 +0,0 @@ -Overview: - - The scheduling service can run in one of two different modes of - operation, an off-line configuration mode, and a run-time execution mode. - The application uses the Scheduler_Factory to specify in which mode - it would like to use the scheduling service. - - In the configuration mode, the application registers RT_Infos containing - operation characteristics with the off-line scheduler, and also specifies - operation dependencies. The Event Channel also registers RT_Infos for its - own operations, and specifies any additional dependencies introduced by - subscription or event correllation. - - Once all operations are registered, the application invokes the - scheduler's compute_scheduling method. The scheduler generates a - "schedule" consisting of operation priorities and sub-priorities, and - determines whether or not the schedule is feasible. The scheduler also - produces queue specification information that can be used to configure - the dispatching module's number and kinds of queues (this - automatic dispatching module configuration will appear in a TAO release - *very* soon). The application then may ask the config scheduler to dump - it's schedule to a header file. - - The Sched_Conf.cpp file in this directory is an example of how this is done. - Building and running the Sched_Conf executable will produce a header file - called Sched_Conf_Runtime.h, which is included by Sched_Conf_Runtime.cpp. - - The dumped header file contains tables with the static scheduling and - configuration information. The Sched_Conf_Runtime application passes this - information to the run-time scheduler at start-up. The application may also - re-register its operations to verify the correct operations were loaded. The - Sched_Conf_Runtime does this, and in fact exercises a number of methods - of the run-time scheduler to ensure it gives correct responses for the - table of operations with which it was instantiated. - -Program operation: - - build Sched_Conf - run Sched_Conf - build Sched_Conf_Runtime - run Sched_Conf_Runtime - diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp deleted file mode 100644 index 0eb5c1477ec..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp +++ /dev/null @@ -1,443 +0,0 @@ -// $Id$ - -// This program performa a simple scheduler configuration run, -// and dumps the results of one scheduling into a C++ header file. - -#include "ace/Sched_Params.h" -#include "ace/Get_Opt.h" -#include "tao/corba.h" - -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/Scheduler_Factory.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -ACE_RCSID(Sched_Conf, Sched_Conf, "$Id$") - -const char* service_name = "ScheduleService"; - -const char* format_string = "{%-12s, %d, %d, %d, %d, %8d, " - "ACE_static_cast (RtecScheduler::Criticality_t, %d), " - "ACE_static_cast (RtecScheduler::Importance_t, %d), " - "%d, %d, %3d, %d, %d, " - "ACE_static_cast (RtecScheduler::Info_Type_t, %d)}\n"; - -int -parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "n:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'n': - service_name = get_opt.optarg; - break; - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "-n service_name " - "\n", - argv[0])); - return -1; - } - } - - return 0; -} - -int -main (int argc, char *argv[]) -{ - if (parse_args (argc, argv) != 0) - { - return 1; - } - - // create initial data for supplier and consumer operations - const int operation_count = 16; - ACE_Scheduler_Factory::POD_RT_Info config_infos[operation_count] = { - // 20 Hz high criticality supplier - { "high_20_S", // entry point - 0, // handle - 5000, // worst case execution time - 5000, // typical execution time (unused) - 5000, // cached execution time - 500000, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 1, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 20 Hz low criticality supplier - { "low_20_S", // entry point - 0, // handle - 5000, // worst case execution time - 5000, // typical execution time (unused) - 5000, // cached execution time - 500000, // period (100 ns) - RtecScheduler::LOW_CRITICALITY, // criticality - RtecScheduler::HIGH_IMPORTANCE, // importance - 0, // quantum (unused) - 1, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 10 Hz high criticality supplier - { "high_10_S", // entry point - 0, // handle - 10000, // worst case execution time - 10000, // typical execution time (unused) - 10000, // cached execution time - 1000000, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 1, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 10 Hz low criticality supplier - { "low_10_S", // entry point - 0, // handle - 10000, // worst case execution time - 10000, // typical execution time (unused) - 10000, // cached execution time - 1000000, // period (100 ns) - RtecScheduler::LOW_CRITICALITY, // criticality - RtecScheduler::HIGH_IMPORTANCE, // importance - 0, // quantum (unused) - 1, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 5 Hz high criticality supplier - { "high_05_S", // entry point - 0, // handle - 20000, // worst case execution time - 20000, // typical execution time (unused) - 20000, // cached execution time - 2000000, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 1, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 5 Hz low criticality supplier - { "low_05_S", // entry point - 0, // handle - 20000, // worst case execution time - 20000, // typical execution time (unused) - 20000, // cached execution time - 2000000, // period (100 ns) - RtecScheduler::LOW_CRITICALITY, // criticality - RtecScheduler::HIGH_IMPORTANCE, // importance - 0, // quantum (unused) - 1, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 1 Hz high criticality supplier (declares a rate but no threads) - { "high_01_S", // entry point - 0, // handle - 100000, // worst case execution time - 100000, // typical execution time (unused) - 100000, // cached execution time - 10000000, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 1 Hz low criticality supplier (remote dependant: scheduler should warn) - { "low_01_S", // entry point - 0, // handle - 100000, // worst case execution time - 100000, // typical execution time (unused) - 100000, // cached execution time - 10000000, // period (100 ns) - RtecScheduler::LOW_CRITICALITY, // criticality - RtecScheduler::HIGH_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 20 Hz high criticality consumer - { "high_20_C", // entry point - 0, // handle - 0, // worst case execution time - 0, // typical execution time (unused) - 0, // cached execution time - 0, // period (zero) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 20 Hz low criticality consumer - { "low_20_C", // entry point - 0, // handle - 0, // worst case execution time - 0, // typical execution time (unused) - 0, // cached execution time - 0, // period (zero) - RtecScheduler::LOW_CRITICALITY, // criticality - RtecScheduler::HIGH_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 10 Hz high criticality consumer - { "high_10_C", // entry point - 0, // handle - 0, // worst case execution time - 0, // typical execution time (unused) - 0, // cached execution time - 0, // period (zero) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 10 Hz low criticality consumer - { "low_10_C", // entry point - 0, // handle - 0, // worst case execution time - 0, // typical execution time (unused) - 0, // cached execution time - 0, // period (zero) - RtecScheduler::LOW_CRITICALITY, // criticality - RtecScheduler::HIGH_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 5 Hz high criticality consumer - { "high_05_C", // entry point - 0, // handle - 0, // worst case execution time - 0, // typical execution time (unused) - 0, // cached execution time - 0, // period (zero) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 5 Hz low criticality consumer - { "low_05_C", // entry point - 0, // handle - 0, // worst case execution time - 0, // typical execution time (unused) - 0, // cached execution time - 0, // period (zero) - RtecScheduler::LOW_CRITICALITY, // criticality - RtecScheduler::HIGH_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 1 Hz high criticality consumer - { "high_01_C", // entry point - 0, // handle - 0, // worst case execution time - 0, // typical execution time (unused) - 0, // cached execution time - 0, // period (zero) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // 1 Hz low criticality consumer - { "low_01_C", // entry point - 0, // handle - 0, // worst case execution time - 0, // typical execution time (unused) - 0, // cached execution time - 0, // period (zero) - RtecScheduler::LOW_CRITICALITY, // criticality - RtecScheduler::HIGH_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - } - }; - - - TAO_TRY - { - // Initialize ORB. - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - if (CORBA::is_nil(poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in(), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Initialize the naming services - TAO_Naming_Client my_name_client; - if (my_name_client.init (orb.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - if (ACE_Scheduler_Factory::use_config (my_name_client.get_context (), - service_name) < 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to bind to the scheduling service.\n"), - 1); - } - // create and initialize RT_Infos in the scheduler, - // make second half of array depend on first half. - for (int i = 0; i < operation_count; ++i) - { - // create the RT_Info - config_infos[i].handle = - ACE_Scheduler_Factory::server ()->create (config_infos[i].entry_point, - TAO_TRY_ENV); - - // initialize the RT_Info - ACE_Scheduler_Factory::server ()-> - set (config_infos[i].handle, - ACE_static_cast (RtecScheduler::Criticality_t, config_infos[i].criticality), - config_infos[i].worst_case_execution_time, - config_infos[i].typical_execution_time, - config_infos[i].cached_execution_time, - config_infos[i].period, - ACE_static_cast (RtecScheduler::Importance_t, config_infos[i].importance), - config_infos[i].quantum, - config_infos[i].threads, - ACE_static_cast (RtecScheduler::Info_Type_t, config_infos[i].info_type), - TAO_TRY_ENV); - - // make operations in second half dependant on - // operations in the first half of the array, - // and have each called twice as a oneway call - if (i >= (operation_count / 2)) - { - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[i].handle, - config_infos[i - (operation_count / 2)].handle, - 2, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - } - } - - RtecScheduler::RT_Info_Set_var infos; - RtecScheduler::Config_Info_Set_var configs; - RtecScheduler::Scheduling_Anomaly_Set_var anomalies; - -#if defined (__SUNPRO_CC) - // Sun C++ 4.2 warns with the code below: - // Warning (Anachronism): Temporary used for non-const - // reference, now obsolete. - // Note: Type "CC -migration" for more on anachronisms. - // Warning (Anachronism): The copy constructor for argument - // infos of type RtecScheduler::RT_Info_Set_out should take - // const RtecScheduler::RT_Info_Set_out&. - // But, this code is not CORBA conformant, because users should - // not define instances of _out types. - - RtecScheduler::RT_Info_Set_out infos_out (infos); - RtecScheduler::Config_Info_Set_out configs_out (configs); - RtecScheduler::Scheduling_Anomaly_Set_out anomalies_out (anomalies); - ACE_Scheduler_Factory::server ()->compute_scheduling - (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - infos_out, configs_out, anomalies_out, TAO_TRY_ENV); -#else /* ! __SUNPRO_CC */ - ACE_Scheduler_Factory::server ()->compute_scheduling - (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - infos.out (), configs.out (), anomalies.out (), TAO_TRY_ENV); -#endif /* ! __SUNPRO_CC */ - - TAO_CHECK_ENV; - - ACE_Scheduler_Factory::dump_schedule (infos.in (), - configs.in (), - anomalies.in (), - "Sched_Conf_Runtime.h", - format_string); - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsp b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsp deleted file mode 100644 index fa1d0de9124..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsp +++ /dev/null @@ -1,92 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Sched_Conf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Sched_Conf - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Sched_Conf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Sched_Conf.mak" CFG="Sched_Conf - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Sched_Conf - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "Sched_Conf - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Sched_Conf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 orbsvcs.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /out:"Sched_Conf.exe" - -!ELSEIF "$(CFG)" == "Sched_Conf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 orbsvcsd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Sched_Conf - Win32 Release" -# Name "Sched_Conf - Win32 Debug" -# Begin Source File - -SOURCE=.\Sched_Conf.cpp -# End Source File -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsw b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsw deleted file mode 100644 index 829c4735f1e..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsw +++ /dev/null @@ -1,56 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Sched_Conf"=.\Sched_Conf.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Sched_Conf_Anomalies"=.\Sched_Conf_Anomalies.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Sched_Conf_Runtime"=.\Sched_Conf_Runtime.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name Sched_Conf - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies.cpp b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies.cpp deleted file mode 100644 index a41bbff05c8..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies.cpp +++ /dev/null @@ -1,388 +0,0 @@ -// $Id$ - -// This program performa a simple scheduler configuration run, -// and dumps the results of one scheduling into a C++ header file. - -#include "ace/Sched_Params.h" -#include "ace/Get_Opt.h" -#include "tao/corba.h" - -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/Scheduler_Factory.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -ACE_RCSID(Sched_Conf, Sched_Conf_Anomalies, "$Id$") - -const char* service_name = "ScheduleService"; - -const char* format_string = "{%-12s, %d, %d, %d, %d, %8d, " - "ACE_static_cast (RtecScheduler::Criticality_t, %d), " - "ACE_static_cast (RtecScheduler::Importance_t, %d), " - "%d, %d, %3d, %d, %d, " - "ACE_static_cast (RtecScheduler::Info_Type_t, %d)}\n"; - -int -parse_args (int argc, char *argv []) -{ - ACE_Get_Opt get_opt (argc, argv, "n:"); - int opt; - - while ((opt = get_opt ()) != EOF) - { - switch (opt) - { - case 'n': - service_name = get_opt.optarg; - break; - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "-n service_name " - "\n", - argv[0])); - return -1; - } - } - - return 0; -} - -int -main (int argc, char *argv[]) -{ - if (parse_args (argc, argv) != 0) - { - return 1; - } - - // create initial data for supplier and consumer operations - const int operation_count = 8; - ACE_Scheduler_Factory::POD_RT_Info config_infos[operation_count] = { - // good supplier (no unresolved dependencies) - { "good_supplier", // entry point - 0, // handle - 5000, // worst case execution time - 5000, // typical execution time (unused) - 5000, // cached execution time - 500000, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 1, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // good consumer (no unresolved dependencies) - { "good_consumer", // entry point - 1, // handle - 5000, // worst case execution time - 5000, // typical execution time (unused) - 5000, // cached execution time - 0, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // supplier with unresolved remote dependencies - { "unresolved_remote_supplier", // entry point - 2, // handle - 5000, // worst case execution time - 5000, // typical execution time (unused) - 5000, // cached execution time - 0, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::REMOTE_DEPENDANT // info type - }, - // consumer with unresolved remote dependencies - { "unresolved_remote_consumer", // entry point - 3, // handle - 5000, // worst case execution time - 5000, // typical execution time (unused) - 5000, // cached execution time - 0, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // supplier with unresolved local dependencies - { "unresolved_local_supplier", // entry point - 4, // handle - 5000, // worst case execution time - 5000, // typical execution time (unused) - 5000, // cached execution time - 0, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // consumer with unresolved local dependencies - { "unresolved_local_consumer", // entry point - 5, // handle - 5000, // worst case execution time - 5000, // typical execution time (unused) - 5000, // cached execution time - 0, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // consumer with unresolved local and remote dependencies - { "both_unresolved_consumer_1", // entry point - 6, // handle - 5000, // worst case execution time - 5000, // typical execution time (unused) - 5000, // cached execution time - 0, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - }, - // another consumer with unresolved - // local and remote dependencies - { "both_unresolved_consumer_2", // entry point - 7, // handle - 5000, // worst case execution time - 5000, // typical execution time (unused) - 5000, // cached execution time - 0, // period (100 ns) - RtecScheduler::HIGH_CRITICALITY, // criticality - RtecScheduler::LOW_IMPORTANCE, // importance - 0, // quantum (unused) - 0, // threads - 0, // OS priority - 0, // Preemption subpriority - 0, // Preemption priority - RtecScheduler::OPERATION // info type - } - }; - - - TAO_TRY - { - // Initialize ORB. - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - if (CORBA::is_nil(poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in(), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Initialize the naming services - TAO_Naming_Client my_name_client; - if (my_name_client.init (orb.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - if (ACE_Scheduler_Factory::use_config (my_name_client.get_context (), - service_name) < 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to bind to the scheduling service.\n"), - 1); - } - // create and initialize RT_Infos in the scheduler, - // make second half of array depend on first half. - for (int i = 0; i < operation_count; ++i) - { - // create the RT_Info - config_infos[i].handle = - ACE_Scheduler_Factory::server ()->create (config_infos[i].entry_point, - TAO_TRY_ENV); - - // initialize the RT_Info - ACE_Scheduler_Factory::server ()-> - set (config_infos[i].handle, - ACE_static_cast (RtecScheduler::Criticality_t, - config_infos[i].criticality), - config_infos[i].worst_case_execution_time, - config_infos[i].typical_execution_time, - config_infos[i].cached_execution_time, - config_infos[i].period, - ACE_static_cast (RtecScheduler::Importance_t, - config_infos[i].importance), - config_infos[i].quantum, - config_infos[i].threads, - ACE_static_cast (RtecScheduler::Info_Type_t, - config_infos[i].info_type), - TAO_TRY_ENV); - } - - - // register dependency of good consumer on good supplier - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[1].handle, - config_infos[0].handle, - 1, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - - // register dependency of consumer that will have unresolved remote - // dependencies on supplier with unresolved remote dependencies - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[3].handle, - config_infos[2].handle, - 1, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - - - // register dependency of consumer that will have unresolved local - // dependencies on supplier with unresolved local dependencies - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[5].handle, - config_infos[4].handle, - 1, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - - - // register dependencies on each supplier of first consumer that will - // have both unresolved local and unresolved remote dependencies. - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[6].handle, - config_infos[0].handle, - 1, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[6].handle, - config_infos[2].handle, - 1, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[6].handle, - config_infos[4].handle, - 1, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - - - // Register dependencies on each of the other consumers by second - // consumer that will have both unresolved local and unresolved remote - // dependencies. - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[7].handle, - config_infos[1].handle, - 1, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[7].handle, - config_infos[3].handle, - 1, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[7].handle, - config_infos[5].handle, - 1, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - ACE_Scheduler_Factory::server ()-> - add_dependency (config_infos[7].handle, - config_infos[6].handle, - 1, // number of calls - RtecScheduler::ONE_WAY_CALL, // type of dependency - TAO_TRY_ENV); - - - RtecScheduler::RT_Info_Set_var infos; - RtecScheduler::Config_Info_Set_var configs; - RtecScheduler::Scheduling_Anomaly_Set_var anomalies; - -#if defined (__SUNPRO_CC) - // Sun C++ 4.2 warns with the code below: - // Warning (Anachronism): Temporary used for non-const - // reference, now obsolete. - // Note: Type "CC -migration" for more on anachronisms. - // Warning (Anachronism): The copy constructor for argument - // infos of type RtecScheduler::RT_Info_Set_out should take - // const RtecScheduler::RT_Info_Set_out&. - // But, this code is not CORBA conformant, because users should - // not define instances of _out types. - - RtecScheduler::RT_Info_Set_out infos_out (infos); - RtecScheduler::Config_Info_Set_out configs_out (configs); - RtecScheduler::Scheduling_Anomaly_Set_out anomalies_out (anomalies); - ACE_Scheduler_Factory::server ()->compute_scheduling - (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - infos_out, configs_out, anomalies_out, TAO_TRY_ENV); -#else /* ! __SUNPRO_CC */ - ACE_Scheduler_Factory::server ()->compute_scheduling - (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - infos.out (), configs.out (), anomalies.out (), TAO_TRY_ENV); -#endif /* ! __SUNPRO_CC */ - - TAO_CHECK_ENV; - - ACE_Scheduler_Factory::dump_schedule (infos.in (), - configs.in (), - anomalies.in (), - "Sched_Conf_Anomalies_Runtime.h", - format_string); - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_ENDTRY; - - return 0; -} - - diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies.dsp b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies.dsp deleted file mode 100644 index f7e9d6bad1d..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies.dsp +++ /dev/null @@ -1,102 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Sched_Conf_Anomalies" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Sched_Conf_Anomalies - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Sched_Conf_Anomalies.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Sched_Conf_Anomalies.mak" CFG="Sched_Conf_Anomalies - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Sched_Conf_Anomalies - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Sched_Conf_Anomalies - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Sched_Conf_Anomalies - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "Sched_Conf_Anomalies - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Sched_Conf_Anomalies___Win32_Debug" -# PROP BASE Intermediate_Dir "Sched_Conf_Anomalies___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 orbsvcsd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Sched_Conf_Anomalies - Win32 Release" -# Name "Sched_Conf_Anomalies - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\Sched_Conf_Anomalies.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies_Runtime.h b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies_Runtime.h deleted file mode 100644 index ef7d87eadb1..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Anomalies_Runtime.h +++ /dev/null @@ -1,59 +0,0 @@ -// $Id $ - -// This file was automatically generated by the Scheduler_Factory. -// Before editing the file please consider generating it again. - -#include "orbsvcs/Scheduler_Factory.h" - - -// The following scheduling anomalies were detected: -ERROR: ST_UNRESOLVED_LOCAL_DEPENDENCIES -ERROR: The following entry points have unresolved local dependencies: -// unresolved_local_supplier -// unresolved_local_consumer -// both_unresolved_consumer_1 -// both_unresolved_consumer_2 - -// WARNING: ST_UNRESOLVED_REMOTE_DEPENDENCIES -// WARNING: The following entry points have unresolved remote dependencies: -// unresolved_remote_supplier -// unresolved_remote_consumer -// both_unresolved_consumer_1 -// both_unresolved_consumer_2 - - - -static ACE_Scheduler_Factory::POD_RT_Info infos[] = { -{"good_supplier", 1, 5000, 5000, 5000, 500000, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 1, 15, 0, 0, (RtecScheduler::Info_Type_t) 0} -, -{"good_consumer", 2, 5000, 5000, 5000, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 15, 1, 0, (RtecScheduler::Info_Type_t) 0} -, -{"unresolved_remote_supplier", 3, 5000, 5000, 5000, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 0, 0, 0, (RtecScheduler::Info_Type_t) 3} -, -{"unresolved_remote_consumer", 4, 5000, 5000, 5000, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 0, 0, 0, (RtecScheduler::Info_Type_t) 0} -, -{"unresolved_local_supplier", 5, 5000, 5000, 5000, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 0, 0, 0, (RtecScheduler::Info_Type_t) 0} -, -{"unresolved_local_consumer", 6, 5000, 5000, 5000, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 0, 0, 0, (RtecScheduler::Info_Type_t) 0} -, -{"both_unresolved_consumer_1", 7, 5000, 5000, 5000, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 0, 0, 0, (RtecScheduler::Info_Type_t) 0} -, -{"both_unresolved_consumer_2", 8, 5000, 5000, 5000, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 0, 0, 0, (RtecScheduler::Info_Type_t) 0} - -}; - -static int infos_size = sizeof(infos)/sizeof(infos[0]); - - -static ACE_Scheduler_Factory::POD_Config_Info configs[] = { - { 0, 15, (RtecScheduler::Dispatching_Type_t) 2 } -}; - -static int configs_size = sizeof(configs)/sizeof(configs[0]); - - -// This sets up Scheduler_Factory to use the runtime version. -int scheduler_factory_setup = - ACE_Scheduler_Factory::use_runtime (configs_size, configs, infos_size, infos); - -// EOF diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.cpp b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.cpp deleted file mode 100644 index 2c0bd902827..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.cpp +++ /dev/null @@ -1,160 +0,0 @@ -// $Id$ - -// This program exercises a run-time scheduler, -// using the config run generated C++ header file. - -#include "ace/Sched_Params.h" -#include "ace/Get_Opt.h" -#include "tao/corba.h" - -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/Scheduler_Factory.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -#include "Sched_Conf_Runtime.h" - -ACE_RCSID(Sched_Conf, Sched_Conf_Runtime, "$Id$") - - - -int -main (int argc, char *argv[]) -{ - TAO_TRY - { - // Initialize ORB. - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - if (CORBA::is_nil(poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in(), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Store a pointer to the local run-time scheduler. - RtecScheduler::Scheduler_ptr runtime_scheduler = - ACE_Scheduler_Factory::server (); - - // Some useful variables for retrieving values from the scheduler. - RtecScheduler::RT_Info *rt_info = 0; - RtecScheduler::OS_Priority priority; - RtecScheduler::Preemption_Subpriority_t subpriority; - RtecScheduler::Preemption_Priority_t p_priority; - RtecScheduler::Dispatching_Type_t dispatching_type; - - for (int i = 0; i < infos_size; ++i) - { - // Make sure the correct handle is returned by the - // run-time scheduler's create and lookup methods. - ACE_ASSERT (infos [i].handle == - runtime_scheduler->create (infos [i].entry_point, - TAO_TRY_ENV)); - ACE_ASSERT (infos [i].handle == - runtime_scheduler->lookup (infos [i].entry_point, - TAO_TRY_ENV)); - - // Make sure the values in the RT_Info returned by get are OK. - delete rt_info; - rt_info = runtime_scheduler->get (infos [i].handle, - TAO_TRY_ENV); - ACE_ASSERT (rt_info != 0); - ACE_ASSERT (ACE_OS::strcmp (rt_info->entry_point, - infos [i].entry_point) == 0); - ACE_ASSERT (rt_info->handle == - infos [i].handle); - ACE_ASSERT (rt_info->worst_case_execution_time == - infos [i].worst_case_execution_time); - ACE_ASSERT (rt_info->typical_execution_time == - infos [i].typical_execution_time); - ACE_ASSERT (rt_info->cached_execution_time == - infos [i].cached_execution_time); - ACE_ASSERT (rt_info->period == - infos [i].period); - ACE_ASSERT (rt_info->criticality == - ACE_static_cast (RtecScheduler::Criticality_t, infos [i].criticality)); - ACE_ASSERT (rt_info->importance == - ACE_static_cast (RtecScheduler::Importance_t, infos [i].importance)); - ACE_ASSERT (rt_info->quantum == - infos [i].quantum); - ACE_ASSERT (rt_info->threads == - infos [i].threads); - ACE_ASSERT (rt_info->priority == - infos [i].priority); - ACE_ASSERT (rt_info->preemption_subpriority == - infos [i].static_subpriority); - ACE_ASSERT (rt_info->preemption_priority == - infos [i].preemption_priority); - ACE_ASSERT (rt_info->info_type == - ACE_static_cast (RtecScheduler::Info_Type_t, infos [i].info_type)); - - // Make sure the values in the scheduler's internal RT_Info are OK. - // Scheduler will generate messages if any values don't match. - runtime_scheduler->set (infos [i].handle, - ACE_static_cast (RtecScheduler::Criticality_t, - infos [i].criticality), - infos [i].worst_case_execution_time, - infos [i].typical_execution_time, - infos [i].cached_execution_time, - infos [i].period, - ACE_static_cast (RtecScheduler::Importance_t, - infos [i].importance), - infos [i].quantum, - infos [i].threads, - ACE_static_cast (RtecScheduler::Info_Type_t, - infos [i].info_type), - TAO_TRY_ENV); - - // Make sure the correct priority values are returned. - runtime_scheduler->priority (infos [i].handle, - priority, - subpriority, - p_priority, - TAO_TRY_ENV); - ACE_ASSERT (priority == infos [i].priority); - ACE_ASSERT (subpriority == infos [i].static_subpriority); - ACE_ASSERT (p_priority == infos [i].preemption_priority); - runtime_scheduler->entry_point_priority (infos [i].entry_point, - priority, - subpriority, - p_priority, - TAO_TRY_ENV); - ACE_ASSERT (priority == infos [i].priority); - ACE_ASSERT (subpriority == infos [i].static_subpriority); - ACE_ASSERT (p_priority == infos [i].preemption_priority); - } - - for (int j = 0; j < configs_size; ++j) - { - // Make sure the correct preemption priority is stored. - ACE_ASSERT (j == configs [j].preemption_priority); - - // Make sure the correct queue configuration values are returned. - runtime_scheduler-> - dispatch_configuration (configs [j].preemption_priority, - priority, - dispatching_type, - TAO_TRY_ENV); - ACE_ASSERT (priority == configs [j].thread_priority); - ACE_ASSERT (dispatching_type == configs [j].dispatching_type); - - } - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.dsp b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.dsp deleted file mode 100644 index f58ec0ec629..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.dsp +++ /dev/null @@ -1,96 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Sched_Conf_Runtime" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Sched_Conf_Runtime - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Sched_Conf_Runtime.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Sched_Conf_Runtime.mak"\ - CFG="Sched_Conf_Runtime - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Sched_Conf_Runtime - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "Sched_Conf_Runtime - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Sched_Conf_Runtime - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "Sched_Conf_Runtime - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Sched_Co" -# PROP BASE Intermediate_Dir "Sched_Co" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 orbsvcsd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Sched_Conf_Runtime - Win32 Release" -# Name "Sched_Conf_Runtime - Win32 Debug" -# Begin Source File - -SOURCE=.\Sched_Conf_Runtime.cpp -# End Source File -# Begin Source File - -SOURCE=.\Sched_Conf_Runtime.h -# End Source File -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h deleted file mode 100644 index e45231075a3..00000000000 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h +++ /dev/null @@ -1,62 +0,0 @@ -// $Id $ - -// This file was automatically generated by the Scheduler_Factory. -// Before editing the file please consider generating it again. - -#include "orbsvcs/Scheduler_Factory.h" - - -// There were no scheduling anomalies. - - -static ACE_Scheduler_Factory::POD_RT_Info infos[] = { -{"high_20_S" , 1, 5000, 5000, 5000, 500000, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 1, 15, 11, 0, (RtecScheduler::Info_Type_t) 0} -, -{"low_20_S" , 2, 5000, 5000, 5000, 500000, (RtecScheduler::Criticality_t) 1, (RtecScheduler::Importance_t) 3, 0, 1, 2, 11, 1, (RtecScheduler::Info_Type_t) 0} -, -{"high_10_S" , 3, 10000, 10000, 10000, 1000000, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 1, 15, 8, 0, (RtecScheduler::Info_Type_t) 0} -, -{"low_10_S" , 4, 10000, 10000, 10000, 1000000, (RtecScheduler::Criticality_t) 1, (RtecScheduler::Importance_t) 3, 0, 1, 2, 8, 1, (RtecScheduler::Info_Type_t) 0} -, -{"high_05_S" , 5, 20000, 20000, 20000, 2000000, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 1, 15, 5, 0, (RtecScheduler::Info_Type_t) 0} -, -{"low_05_S" , 6, 20000, 20000, 20000, 2000000, (RtecScheduler::Criticality_t) 1, (RtecScheduler::Importance_t) 3, 0, 1, 2, 5, 1, (RtecScheduler::Info_Type_t) 0} -, -{"high_01_S" , 7, 100000, 100000, 100000, 10000000, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 15, 2, 0, (RtecScheduler::Info_Type_t) 0} -, -{"low_01_S" , 8, 100000, 100000, 100000, 10000000, (RtecScheduler::Criticality_t) 1, (RtecScheduler::Importance_t) 3, 0, 0, 2, 2, 1, (RtecScheduler::Info_Type_t) 0} -, -{"high_20_C" , 9, 0, 0, 0, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 15, 9, 0, (RtecScheduler::Info_Type_t) 0} -, -{"low_20_C" , 10, 0, 0, 0, 0, (RtecScheduler::Criticality_t) 1, (RtecScheduler::Importance_t) 3, 0, 0, 2, 9, 1, (RtecScheduler::Info_Type_t) 0} -, -{"high_10_C" , 11, 0, 0, 0, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 15, 6, 0, (RtecScheduler::Info_Type_t) 0} -, -{"low_10_C" , 12, 0, 0, 0, 0, (RtecScheduler::Criticality_t) 1, (RtecScheduler::Importance_t) 3, 0, 0, 2, 6, 1, (RtecScheduler::Info_Type_t) 0} -, -{"high_05_C" , 13, 0, 0, 0, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 15, 3, 0, (RtecScheduler::Info_Type_t) 0} -, -{"low_05_C" , 14, 0, 0, 0, 0, (RtecScheduler::Criticality_t) 1, (RtecScheduler::Importance_t) 3, 0, 0, 2, 3, 1, (RtecScheduler::Info_Type_t) 0} -, -{"high_01_C" , 15, 0, 0, 0, 0, (RtecScheduler::Criticality_t) 3, (RtecScheduler::Importance_t) 1, 0, 0, 15, 0, 0, (RtecScheduler::Info_Type_t) 0} -, -{"low_01_C" , 16, 0, 0, 0, 0, (RtecScheduler::Criticality_t) 1, (RtecScheduler::Importance_t) 3, 0, 0, 2, 0, 1, (RtecScheduler::Info_Type_t) 0} - -}; - -static int infos_size = sizeof(infos)/sizeof(infos[0]); - - -static ACE_Scheduler_Factory::POD_Config_Info configs[] = { - { 0, 15, (RtecScheduler::Dispatching_Type_t) 2 }, - { 1, 2, (RtecScheduler::Dispatching_Type_t) 2 } -}; - -static int configs_size = sizeof(configs)/sizeof(configs[0]); - - -// This sets up Scheduler_Factory to use the runtime version. -int scheduler_factory_setup = - ACE_Scheduler_Factory::use_runtime (configs_size, configs, infos_size, infos); - -// EOF diff --git a/TAO/orbsvcs/tests/Simple_Naming/Makefile b/TAO/orbsvcs/tests/Simple_Naming/Makefile deleted file mode 100644 index ffd51d785df..00000000000 --- a/TAO/orbsvcs/tests/Simple_Naming/Makefile +++ /dev/null @@ -1,327 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -LDLIBS = -lorbsvcs -lTAO - -IDL_SRC = test_objectC.cpp test_objectS.cpp -CLIENT_SRC = client.cpp - -LSRC = $(IDL_SRC) $(CLIENT_SRC) - -CLIENT_OBJS = $(IDL_SRC:.cpp=.o) $(CLIENT_SRC:.cpp=.o) - -TEST_OBJECT_OBJS = test_objectC.o \ - test_objectS.o \ - client.o - -BIN = client -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) -VBIN = $(BIN:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) $(TSS_ORB_FLAG)#-H - -client: $(addprefix $(VDIR),$(TEST_OBJECT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -realclean: - -/bin/rm -rf test_objectC.* test_objectS* client - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/test_objectC.o .obj/test_objectC.so .shobj/test_objectC.o .shobj/test_objectC.so: test_objectC.cpp test_objectC.h test_objectC.i \ - test_objectS.h test_objectS_T.h test_objectS_T.i test_objectS_T.cpp \ - test_objectS.i -.obj/test_objectS.o .obj/test_objectS.so .shobj/test_objectS.o .shobj/test_objectS.so: test_objectS.cpp test_objectS.h test_objectC.h \ - test_objectC.i test_objectS_T.h test_objectS_T.i test_objectS_T.cpp \ - test_objectS.i -.obj/client.o .obj/client.so .shobj/client.o .shobj/client.so: client.cpp client.h \ - $(TAO_ROOT)/tao/corba.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(TAO_ROOT)/tao/corbafwd.h \ - $(ACE_ROOT)/ace/CDR_Stream.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/CDR_Stream.i \ - $(TAO_ROOT)/tao/try_macros.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/CORBA_macros.h \ - $(TAO_ROOT)/tao/Environment.h \ - $(TAO_ROOT)/tao/Environment.i \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(TAO_ROOT)/tao/Managed_Types.h \ - $(TAO_ROOT)/tao/Managed_Types.i \ - $(TAO_ROOT)/tao/Sequence.i \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/Sequence_T.h \ - $(TAO_ROOT)/tao/Sequence_T.i \ - $(TAO_ROOT)/tao/Sequence_T.cpp \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/varout.i \ - $(TAO_ROOT)/tao/varout.cpp \ - $(TAO_ROOT)/tao/singletons.h \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/Servant_Base.i \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/DynAnyC.h \ - $(TAO_ROOT)/tao/DynAnyC.i \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Active_Object_Map.h \ - $(TAO_ROOT)/tao/Active_Object_Map.i \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Pluggable.h \ - $(TAO_ROOT)/tao/MProfile.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/params.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(TAO_ROOT)/tao/IIOP_Connector.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Map_Manager.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.i \ - $(ACE_ROOT)/ace/Stream_Modules.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/IIOP_Acceptor.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ - $(TAO_ROOT)/tao/DynAny_i.h \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/TAO.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ - $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ - test_objectS.h test_objectC.h test_objectC.i test_objectS_T.h \ - test_objectS_T.i test_objectS_T.cpp test_objectS.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Simple_Naming/README b/TAO/orbsvcs/tests/Simple_Naming/README deleted file mode 100644 index 2d80c03a121..00000000000 --- a/TAO/orbsvcs/tests/Simple_Naming/README +++ /dev/null @@ -1,169 +0,0 @@ -// $Id$ - -This application tests different features of TAO's Naming Service. - -To run all tests automatically - - execute Perl script run_test.pl - -To run tests manually - - start Naming Service ($TAO_ROOT/orbsvcs/Naming_Service/Naming_Service), - then run ./client with one of the following options below. - -The following options exist: - --s Run the Simple test of the Naming Service. - --t Run the Tree test of the Naming Service. - --e Run the Exceptions test of the Naming Service - --i Run the Iterator test of the Naming Service. - --y Run the Destroy test of the Naming Service. - --m Run the MT test of the Naming Service. Requires integer - argument specifying number of thread to spawn. (If running - this test manually, its output should be redirected to some - file, say, "foo". Then, process-m-output.pl script can be - used to analyze the test output and print out a diagnostic - message. Invoke the script with - "process-m-output.pl foo number_of_threads", where - is the argument that was supplied with "-m" - option to the client.) - -If no option is specified, Simple test is run. If more than one -option is specified, only one test runs. - -NOTE: if running tests manually, Naming Service has to be restarted -before each test (this is due to some tests not 'cleaning up' bindings -after themselves). - -NOTE: destroy test will not produce desired output if POA 'recreates -servants on request'. - -DESCRIPTION AND EXPECTED OUTPUT FOR EACH TEST -******************************************* - -Simple Test. - -Performs bind (), resolve (), and unbind () of an object reference in -the root context. - -Expected Output: - -Bound name OK -Resolved name OK -Unbound name OK - -******************************************** - -MT Test. - -Spawns a specified number of threads. Threads concurrently attempt to -bind (), resolve (), and unbind () the object reference. - -Expected Output (produced by the output processing script): - -Multithreaded output is ok -******************************************* - -Tree Test. - -Checks all Naming Service functions with a tree of Naming Contexts. - -root->bind_new_context (level1) - -new = root->new_context (), new->bind (foo, obj), and - root->bind_context (level1/level2, new) - -We now have root->level1->level2->foo - -root->resolve (level1/level2/foo). -root->unbind (level1/level2/foo). -root->bind (level1/level2/foo, obj). - -new = root->new_context() -root->rebind_context(level1/level2, new) - -root->bind (level1/level2/foo obj) -root->resolve (level1/level2/foo) -root->rebind (level1/level2/foo, obj2) to have a different object under the name bar. -root->resolve (level1/level2/foo) to make sure correct reference is returned. - - -Expected Output: - -All funtions work properly -******************************************** - -Exceptions Test. - -Makes sure that Naming Service throws exceptions as expected, and data -inside exceptions is set correctly. - -Create a tree of Naming Contexts: root context -> level1 -> level2. - -Bind an object with the name foo into each of the Naming Contexts. - -root->resolve () (with a Name of length 0) - should get InvalidName exception. -root->bind (foo, obj) - should get AlreadyBound exception. -root->bind (level1/foo, obj) - should get AlreadyBound exception. -root->unbind (level1/level2/bar) - should get NotFound exception - with why = not_object, rest_of_name = bar. -root->unbind (level1/level3/foo) - should get NotFound exception - with why = missing_node, rest_of_name = level3/foo. -root->unbind (level1/foo/foo) -should get NotFound exception - with why = not_context, rest_of_name = foo/foo. - - -Expected Output: - -AlreadyBound exception (case 1) works properly -AlreadyBound exception (case 2) works properly -NotFound exception (case 1) works properly -NotFound exception (case 2) works properly -NotFound exception (case 3) works properly - -********************************************* - -Iterator Test. - -Checks iterator functions. - -Bind () objects with the following names foo1, foo2, foo3, and foo4 -into the root Naming Context. - -root->lists (1, bl, iter) -iter->next_one () -iter->next_n (2, bl) -iter->next_one () - should return false -iter->destroy () - - -Expected Output: - -First binding: foo1 -Second binding: foo2 -Third binding: foo3 -Fourth binding: foo4 - -********************************************* - -Destroy Test. - -Makes sure destroy method is working properly. - -Create a context and bind an object under it. -Attempt to destroy the context - NotEmpty exception should be raised. - -Unbind the object and call destroy on the context. -Attempt to call destroy on the object again - OBJECT_NOT_EXIST -exception should be raised. - - -Expected Output: - -NotEmpty exception works properly -Destroy works properly - -******************************************** diff --git a/TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.dsw b/TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.dsw deleted file mode 100644 index 3e83cd1bc20..00000000000 --- a/TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "client"=.\client.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/TAO/orbsvcs/tests/Simple_Naming/client.cpp b/TAO/orbsvcs/tests/Simple_Naming/client.cpp deleted file mode 100644 index 77e0f3f53f2..00000000000 --- a/TAO/orbsvcs/tests/Simple_Naming/client.cpp +++ /dev/null @@ -1,1178 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/Naming_Service/ -// -// = FILENAME -// client.cpp -// -// = DESCRIPTION -// This class implements a simple CORBA client for the CosNaming -// example using stubs generated by the TAO ORB IDL compiler. -// -// = AUTHORS -// Sergio Flores-Gaitan , -// Marina Spivak , and -// Douglas C. Schmidt -// ============================================================================ - -#include "client.h" -#include "ace/Get_Opt.h" - -ACE_RCSID(Simple_Naming, client, "$Id$") - -class My_Test_Object : public POA_Test_Object -{ -public: - // = Initialization and termination methods. - My_Test_Object (CORBA::Short id = 0); - // Constructor. - - ~My_Test_Object (void); - // Destructor. - - // = Interface implementation accessor methods. - - void id (CORBA::Short id, CORBA::Environment &TAO_IN_ENV); - // Sets id. - - CORBA::Short id (CORBA::Environment &TAO_IN_ENV); - // Gets id. - -private: - short id_; -}; - -My_Test_Object::My_Test_Object (CORBA::Short id) - : id_ (id) -{ -} - -My_Test_Object::~My_Test_Object (void) -{ -} - -CORBA::Short -My_Test_Object::id (CORBA::Environment &) -{ - return id_; -} - -void -My_Test_Object::id (CORBA::Short id, CORBA::Environment &) -{ - id_ = id; -} - -// Constructor. - -CosNaming_Client::CosNaming_Client (void) - : argc_ (0), - argv_ (0), - test_ (0) -{ -} - -// Parses the command line arguments and returns an error status. - -int -CosNaming_Client::parse_args (void) -{ - ACE_Get_Opt get_opts (argc_, argv_, "dstieylm:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; - break; - case 's': - if (this->test_ == 0) - ACE_NEW_RETURN (this->test_, - Simple_Test, - -1); - break; - case 'l': - if (this->test_ == 0) - ACE_NEW_RETURN (this->test_, - Loop_Test, - -1); - break; - case 'm': - if (this->test_ == 0) - { - int size = ACE_OS::atoi (get_opts.optarg); - if (size <= 0) - size = 10; - - ACE_NEW_RETURN (this->test_, - MT_Test (this->orbmgr_.orb (), size), - -1); - } - - break; - case 't': - if (this->test_ == 0) - ACE_NEW_RETURN (this->test_, - Tree_Test, - -1); - break; - case 'i': - if (this->test_ == 0) - ACE_NEW_RETURN (this->test_, - Iterator_Test, - -1); - break; - case 'e': - if (this->test_ == 0) - ACE_NEW_RETURN (this->test_, - Exceptions_Test, - -1); - break; - case 'y': - if (this->test_ == 0) - ACE_NEW_RETURN (this->test_, - Destroy_Test, - -1); - break; - default: - ACE_ERROR_RETURN ((LM_ERROR, - "Argument %c \n usage: %s" - " [-d]" - " [-s or -e or -t or -i or -y]" - "\n", - c, - this->argv_ [0]), - -1); - } - - if (this->test_ == 0) - ACE_NEW_RETURN (this->test_, - Simple_Test, - -1); - - // Indicates successful parsing of command line. - return 0; -} - -// Execute client example code. - -int -CosNaming_Client::run (void) -{ - return test_->execute (naming_client_); -} - -CosNaming_Client::~CosNaming_Client (void) -{ - delete test_; -} - -int -CosNaming_Client::init (int argc, char **argv) -{ - this->argc_ = argc; - this->argv_ = argv; - - TAO_TRY - { - // Initialize ORB. - this->orbmgr_.init (this->argc_, - this->argv_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; - - return this->naming_client_.init (this->orbmgr_.orb ()); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("init"); - return -1; - } - TAO_ENDTRY_RETURN (0); -} - -MT_Test::MT_Test (CORBA::ORB_ptr orb, - int size) - :size_ (size), - orb_ (orb), - name_service_ior_ (0) -{ -} - -int -MT_Test::svc (void) -{ - // Obtain object reference to the Naming Service (create new stub.) - - CosNaming::NamingContext_var name_service; - - TAO_TRY_EX (SETUP) - { - CORBA::Object_var name_service_obj = - orb_->string_to_object (name_service_ior_, TAO_TRY_ENV); - TAO_CHECK_ENV_EX (SETUP); - - name_service = - CosNaming::NamingContext::_narrow (name_service_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV_EX (SETUP); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in MT test"); - return -1; - } - TAO_ENDTRY; - - // Bind the object. - TAO_TRY_EX (BIND) - { - name_service->bind (test_name_, - test_ref_.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV_EX (BIND); - ACE_DEBUG ((LM_DEBUG, - "Bound name OK in thread %8.8x \n", - ACE_OS::thr_self ())); - } - TAO_CATCH (CosNaming::NamingContext::AlreadyBound, ex) - { - ACE_DEBUG ((LM_DEBUG, - "Unable to bind in thread %8.8x \n", - ACE_OS::thr_self ())); - - TAO_TRY_ENV.clear (); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in MT test"); - return -1; - } - TAO_ENDTRY; - - // Resolve the object from the Naming Context. - TAO_TRY_EX (RESOLVE) - { - CORBA::Object_var result_obj_ref = - name_service->resolve (test_name_, - TAO_TRY_ENV); - TAO_CHECK_ENV_EX (RESOLVE); - - Test_Object_var result_object = - Test_Object::_narrow (result_obj_ref.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV_EX (RESOLVE); - - if (!CORBA::is_nil (result_object.in ()) - && result_object->id (TAO_TRY_ENV) == CosNaming_Client::OBJ1_ID) - TAO_CHECK_ENV_EX (RESOLVE); - ACE_DEBUG ((LM_DEBUG, - "Resolved name OK in thread %8.8x \n", - ACE_OS::thr_self ())); - } - TAO_CATCH (CosNaming::NamingContext::NotFound, ex) - { - ACE_DEBUG ((LM_DEBUG, - "Unable to resolve in thread %8.8x \n", - ACE_OS::thr_self ())); - - TAO_TRY_ENV.clear (); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in MT test"); - return -1; - } - TAO_ENDTRY; - - // Unbind the object from the Naming Context. - TAO_TRY_EX (UNBIND) - { - name_service->unbind (test_name_, - TAO_TRY_ENV); - TAO_CHECK_ENV_EX (UNBIND); - ACE_DEBUG ((LM_DEBUG, - "Unbound name OK in thread %8.8x \n", - ACE_OS::thr_self ())); - } - TAO_CATCH (CosNaming::NamingContext::NotFound, ex) - { - ACE_DEBUG ((LM_DEBUG, - "Unable to unbind in thread %8.8x \n", - ACE_OS::thr_self ())); - - TAO_TRY_ENV.clear (); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in MT test"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -int -MT_Test::execute (TAO_Naming_Client &root_context) -{ - // if we weren't given the orb pointer - cannot proceed. - if (orb_ == 0) - return -1; - - // Create data which will be used by all threads. - - // Dummy object instantiation. - My_Test_Object test_obj_impl (CosNaming_Client::OBJ1_ID); - - TAO_TRY - { - test_ref_ = - test_obj_impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Get the IOR for the Naming Service. Each thread - // can use it in to create its own stub for - // the Naming Service. This 'trick' is necessary, because - // multiple threads cannot be using the same stub - bad things - // happen... This is just a way to give each thread its own stub. - - name_service_ior_ = - orb_->object_to_string (root_context.get_context (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception while instantiating dummy"); - return -1; - } - TAO_ENDTRY; - - // Create a name for dummy. - test_name_.length (1); - test_name_[0].id = CORBA::string_dup ("Foo"); - - // Spawn threads, each of which will be executing svc (). - int status = this->activate (THR_NEW_LWP | THR_JOINABLE, - size_); - if (status == -1) - return -1; - else - return this->wait (); -} - - -int -Loop_Test::execute (TAO_Naming_Client &root_context) -{ - // Create a dummy object. - My_Test_Object test_obj_impl (CosNaming_Client::OBJ1_ID); - Test_Object_var test_ref; - - TAO_TRY_EX (SETUP) - { - test_ref = - test_obj_impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV_EX (SETUP); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception while instantiating dummy"); - return -1; - } - TAO_ENDTRY; - - // Create a name for dummy. - CosNaming::Name test_name; - test_name.length (1); - test_name[0].id = CORBA::string_dup ("Foo"); - - // Perform bind, resolve, and unbind operations on the dummy in a - // loop. CosNaming::NamingContext::AlreadyBound and - // CosNaming::NamingContext::NotFound exceptions are ignored (i.e., - // we move on to performing the next operation in a loop). - for (int i = 0; i < 200; i++) - { - // Bind the object. - TAO_TRY_EX (BIND) - { - root_context->bind (test_name, - test_ref.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV_EX (BIND); - ACE_DEBUG ((LM_DEBUG, - "Bound name OK in process %8.8x \n", - ACE_OS::getpid ())); - } - TAO_CATCH (CosNaming::NamingContext::AlreadyBound, ex) - { - ACE_DEBUG ((LM_DEBUG, - "Unable to bind in process %8.8x \n", - ACE_OS::getpid ())); - - TAO_TRY_ENV.clear (); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in Loop test"); - return -1; - } - TAO_ENDTRY; - - // Resolve the object from the Naming Context. - TAO_TRY_EX (RESOLVE) - { - CORBA::Object_var result_obj_ref = - root_context->resolve (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV_EX (RESOLVE); - - Test_Object_var result_object = - Test_Object::_narrow (result_obj_ref.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV_EX (RESOLVE); - - if (!CORBA::is_nil (result_object.in ()) - && result_object->id (TAO_TRY_ENV) == CosNaming_Client::OBJ1_ID) - TAO_CHECK_ENV_EX (RESOLVE); - ACE_DEBUG ((LM_DEBUG, - "Resolved name OK in process %8.8x \n", - ACE_OS::getpid ())); - } - TAO_CATCH (CosNaming::NamingContext::NotFound, ex) - { - ACE_DEBUG ((LM_DEBUG, - "Unable to resolve in process %8.8x \n", - ACE_OS::getpid ())); - TAO_TRY_ENV.clear (); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in Loop test"); - return -1; - } - TAO_ENDTRY; - - - // Unbind the object from the Naming Context. - TAO_TRY_EX (UNBIND) - { - root_context->unbind (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV_EX (UNBIND); - ACE_DEBUG ((LM_DEBUG, - "Unbound name OK in process %8.8x \n", - ACE_OS::getpid ())); - } - TAO_CATCH (CosNaming::NamingContext::NotFound, ex) - { - ACE_DEBUG ((LM_DEBUG, - "Unable to unbind in process %8.8x \n", - ACE_OS::getpid ())); - TAO_TRY_ENV.clear (); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in Loop test"); - return -1; - } - - TAO_ENDTRY; - } - return 0; -} - -int -Simple_Test::execute (TAO_Naming_Client &root_context) -{ - TAO_TRY - { - // Dummy object instantiation. - My_Test_Object test_obj_impl (CosNaming_Client::OBJ1_ID); - Test_Object_var test_obj_ref = - test_obj_impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Bind an object to the Naming Context. - CosNaming::Name test_name; - test_name.length (1); - test_name[0].id = CORBA::string_dup ("Foo"); - root_context->bind (test_name, - test_obj_ref.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, - "Bound name OK\n")); - - // Resolve the object from the Naming Context. - CORBA::Object_var result_obj_ref = - root_context->resolve (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - Test_Object_var result_object = - Test_Object::_narrow (result_obj_ref.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (!CORBA::is_nil (result_object.in ()) - && result_object->id (TAO_TRY_ENV) == CosNaming_Client::OBJ1_ID) - ACE_DEBUG ((LM_DEBUG, - "Resolved name OK\n")); - TAO_CHECK_ENV; - - // Unbind the object from the Naming Context. - root_context->unbind (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, - "Unbound name OK\n")); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in Simple test"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -int -Tree_Test::execute (TAO_Naming_Client &root_context) -{ - TAO_TRY - { - // Create a tree of contexts: root->level1->level2. Bind object - // foo under context level2. - - // Bind level1 context under root. - CosNaming::Name level1; - level1.length (1); - level1[0].id = CORBA::string_dup ("level1_context"); - CosNaming::NamingContext_var level1_context; - level1_context = root_context->bind_new_context (level1, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Create a new context. - CosNaming::NamingContext_var level2_context; - level2_context = root_context->new_context (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Instantiate a dummy object and bind it under the new context. - My_Test_Object impl1 (CosNaming_Client::OBJ1_ID); - Test_Object_var obj1 = impl1._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - CosNaming::Name obj_name; - obj_name.length (1); - obj_name[0].id = CORBA::string_dup ("foo"); - level2_context->bind (obj_name, obj1.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Bind the context we just created under level1. - CosNaming::Name level2 (level1); - level2.length (2); - level2[1].id = CORBA::string_dup ("level2_context"); - root_context->bind_context (level2, - level2_context.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Resolve and unbind level1/level2/foo, and bind it back. - CosNaming::Name test_name (level2); - test_name.length (3); - test_name[2].id = obj_name[0].id; - CORBA::Object_var result_obj_ref = - root_context->resolve (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - Test_Object_var result_object = - Test_Object::_narrow (result_obj_ref.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (CORBA::is_nil (result_object.in ()) - || !(result_object->id (TAO_TRY_ENV) == CosNaming_Client::OBJ1_ID)) - ACE_ERROR_RETURN ((LM_ERROR, - "Problems with resolving foo in Tree Test\n"), - -1); - TAO_CHECK_ENV; - - // Unbind the object from the Naming Context and bind it back - // in. - root_context->unbind (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - root_context->bind (test_name, - obj1.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Create new context and rebind under the name level1/level2. - CosNaming::NamingContext_var new_level2_context; - new_level2_context = - root_context->new_context (TAO_TRY_ENV); - TAO_CHECK_ENV; - root_context->rebind_context (level2, - new_level2_context.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Bind, resolve, rebind, and resolve foo under level1/level2. - root_context->bind (test_name, - obj1.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - result_obj_ref = root_context->resolve (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - result_object = Test_Object::_narrow (result_obj_ref.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (CORBA::is_nil (result_object.in ()) - || !(result_object->id (TAO_TRY_ENV) == CosNaming_Client::OBJ1_ID)) - ACE_ERROR_RETURN ((LM_ERROR, - "Problems in the Tree Test\n"), - -1); - TAO_CHECK_ENV; - - My_Test_Object impl2 (CosNaming_Client::OBJ2_ID); - Test_Object_var obj2 = impl2._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - root_context->rebind (test_name, - obj2.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - result_obj_ref = root_context->resolve (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - result_object = Test_Object::_narrow (result_obj_ref.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (CORBA::is_nil (result_object.in ()) - || !(result_object->id (TAO_TRY_ENV) == CosNaming_Client::OBJ2_ID)) - ACE_ERROR_RETURN ((LM_ERROR, - "Problems with rebind in Tree Test\n"), - -1); - TAO_CHECK_ENV; - } - - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in Tree test"); - return -1; - } - - TAO_ENDTRY; - ACE_DEBUG ((LM_DEBUG, - "All functions work properly \n")); - return 0; -} - -int -Exceptions_Test::execute (TAO_Naming_Client &root_context) -{ - TAO_TRY - { - // Set things up. - - // Create a tree of contexts root->level1->level2. - CosNaming::Name context_name; - context_name.length (1); - context_name[0].id = CORBA::string_dup ("level1_context"); - CosNaming::NamingContext_var level1_context; - level1_context = root_context->bind_new_context (context_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - context_name[0].id = CORBA::string_dup ("level2_context"); - CosNaming::NamingContext_var level2_context; - level2_context = level1_context->bind_new_context (context_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Bind a dummy object foo under each context. - My_Test_Object impl; - Test_Object_var obj = impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - CosNaming::Name object_name; - object_name.length (1); - object_name[0].id = CORBA::string_dup ("foo"); - root_context->bind (object_name, - obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - level1_context->bind (object_name, - obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - level2_context->bind (object_name, - obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Run exceptions tests. - invalid_name_test (root_context, - TAO_TRY_ENV); - TAO_CHECK_ENV; - already_bound_test (root_context, - TAO_TRY_ENV); - TAO_CHECK_ENV; - already_bound_test2 (root_context, - TAO_TRY_ENV); - TAO_CHECK_ENV; - not_found_test (root_context, - TAO_TRY_ENV); - TAO_CHECK_ENV; - not_found_test2 (root_context, - TAO_TRY_ENV); - TAO_CHECK_ENV; - not_found_test3 (root_context, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in Exceptions test"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -void -Exceptions_Test::invalid_name_test (TAO_Naming_Client &root_context, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - CosNaming::Name test_name; - test_name.length (0); - - root_context->resolve (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - TAO_CATCH (CosNaming::NamingContext::InvalidName, ex) - { - TAO_TRY_ENV.clear (); - ACE_DEBUG ((LM_DEBUG, - "InvalidName exception works properly\n")); - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Exceptions_Test::already_bound_test (TAO_Naming_Client &root_context, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - CosNaming::Name test_name; - test_name.length (1); - test_name[0].id = CORBA::string_dup ("foo"); - My_Test_Object impl; - Test_Object_var obj = impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - root_context->bind (test_name, - obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - TAO_CATCH (CosNaming::NamingContext::AlreadyBound, ex) - { - TAO_TRY_ENV.clear (); - ACE_DEBUG ((LM_DEBUG, - "AlreadyBound exception (case 1) works properly\n")); - } - TAO_CATCHANY - { - TAO_RETHROW; - } - - TAO_ENDTRY; -} - -void -Exceptions_Test::already_bound_test2 (TAO_Naming_Client &root_context, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - CosNaming::Name test_name; - test_name.length (2); - test_name[0].id = CORBA::string_dup ("level1_context"); - test_name[1].id = CORBA::string_dup ("foo"); - My_Test_Object impl; - Test_Object_var obj = impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - root_context->bind (test_name, - obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - TAO_CATCH (CosNaming::NamingContext::AlreadyBound, ex) - { - TAO_TRY_ENV.clear (); - ACE_DEBUG ((LM_DEBUG, - "AlreadyBound exception (case 2) works properly\n")); - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Exceptions_Test::not_found_test (TAO_Naming_Client &root_context, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - CosNaming::Name test_name; - test_name.length (3); - test_name[0].id = CORBA::string_dup ("level1_context"); - test_name[1].id = CORBA::string_dup ("level2_context"); - test_name[2].id = CORBA::string_dup ("bar"); - - root_context->unbind (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - TAO_CATCH (CosNaming::NamingContext::NotFound, ex) - { - if (ex.why == CosNaming::NamingContext::not_object && - ex.rest_of_name.length () == 1 - && ACE_OS::strcmp (ex.rest_of_name[0].id.in (), - "bar") == 0) - ACE_DEBUG ((LM_DEBUG, - "NotFound exception (case 1) works properly\n")); - else - ACE_DEBUG ((LM_DEBUG, - "NotFound exception (case 1)" - " - parameters aren't set correctly\n")); - TAO_TRY_ENV.clear (); - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Exceptions_Test::not_found_test2 (TAO_Naming_Client &root_context, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - CosNaming::Name test_name; - test_name.length (3); - test_name[0].id = CORBA::string_dup ("level1_context"); - test_name[1].id = CORBA::string_dup ("level3_context"); - test_name[2].id = CORBA::string_dup ("foo"); - - root_context->unbind (test_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - TAO_CATCH (CosNaming::NamingContext::NotFound, ex) - { - if (ex.why == CosNaming::NamingContext::missing_node - && ex.rest_of_name.length () == 2 - && ACE_OS::strcmp (ex.rest_of_name[0].id.in (), - "level3_context") == 0 - && ACE_OS::strcmp (ex.rest_of_name[1].id.in (), - "foo") == 0) - ACE_DEBUG ((LM_DEBUG, - "NotFound exception (case 2) works properly\n")); - else - ACE_DEBUG ((LM_DEBUG, - "NotFound exception (case 2)" - " - parameters aren't set correctly\n")); - TAO_TRY_ENV.clear (); - } - TAO_CATCHANY - { - TAO_RETHROW; - } - - TAO_ENDTRY; -} - -void -Exceptions_Test::not_found_test3 (TAO_Naming_Client &root_context, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - CosNaming::Name test_name; - test_name.length (3); - test_name[0].id = CORBA::string_dup ("level1_context"); - test_name[1].id = CORBA::string_dup ("foo"); - test_name[2].id = CORBA::string_dup ("foo"); - - root_context->unbind (test_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - TAO_CATCH (CosNaming::NamingContext::NotFound, ex) - { - if (ex.why == CosNaming::NamingContext::not_context - && ex.rest_of_name.length () == 2 - && ACE_OS::strcmp (ex.rest_of_name[0].id.in (), - "foo") == 0 - && ACE_OS::strcmp (ex.rest_of_name[1].id.in (), - "foo") == 0) - ACE_DEBUG ((LM_DEBUG, - "NotFound exception (case 3) works properly\n")); - else - ACE_DEBUG ((LM_DEBUG, - "NotFound exception (case 3)" - " - parameters aren't set correctly\n")); - TAO_TRY_ENV.clear (); - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -int -Iterator_Test::execute (TAO_Naming_Client &root_context) -{ - TAO_TRY - { - // Instantiate four dummy objects. - My_Test_Object impl1; - Test_Object_var obj1 = impl1._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - My_Test_Object impl2; - Test_Object_var obj2 = impl2._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - My_Test_Object impl3; - Test_Object_var obj3 = impl3._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - My_Test_Object impl4; - Test_Object_var obj4 = impl4._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Bind objects to the naming context. - CosNaming::Name name1; - name1.length (1); - name1[0].id = CORBA::string_dup ("foo1"); - CosNaming::Name name2; - name2.length (1); - name2[0].id = CORBA::string_dup ("foo2"); - CosNaming::Name name3; - name3.length (1); - name3[0].id = CORBA::string_dup ("foo3"); - CosNaming::Name name4; - name4.length (1); - name4[0].id = CORBA::string_dup ("foo4"); - root_context->bind (name1, - obj1.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - root_context->bind (name2, - obj2.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - root_context->bind (name3, - obj3.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - root_context->bind (name4, - obj4.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // List the content of the Naming Context. - CosNaming::BindingIterator_var iter; - CosNaming::BindingList_var bindings_list; - root_context->list (1, - bindings_list.out (), - iter.out (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (CORBA::is_nil (iter.in ()) - || bindings_list->length () != 1 - || bindings_list[0].binding_type != CosNaming::nobject) - ACE_ERROR_RETURN ((LM_ERROR, - "CosNaming::list does not function properly\n"), - -1); - ACE_DEBUG ((LM_DEBUG, - "First binding: %s\n", - bindings_list[0].binding_name[0].id.in ())); - - // Invoke operations on the iterator. - CosNaming::Binding_var binding; - iter->next_one (binding.out (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (binding->binding_type != CosNaming::nobject) - ACE_ERROR_RETURN ((LM_ERROR, - "CosNaming::next_one does not function properly\n"), - -1); - ACE_DEBUG ((LM_DEBUG, - "Second binding: %s\n", - binding->binding_name[0].id.in ())); - - iter->next_n (2, bindings_list.out (), TAO_TRY_ENV); - TAO_CHECK_ENV; - if (bindings_list->length () != 2 - || bindings_list[0].binding_type != CosNaming::nobject - || bindings_list[1].binding_type != CosNaming::nobject) - ACE_ERROR_RETURN ((LM_ERROR, - "CosNaming::BindingIterator does not function properly\n"), - -1); - ACE_DEBUG ((LM_DEBUG, - "Third binding: %s\n" - "Fourth binding: %s\n", - bindings_list[0].binding_name[0].id.in (), - bindings_list[1].binding_name[0].id.in ())); - - // We already iterated over all the bindings, so the following - // should return false. - CORBA::Boolean result = iter->next_one (binding.out (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - if (result) - ACE_ERROR_RETURN ((LM_ERROR, - "CosNaming::BindingIterator does not function properly\n"), - -1); - iter->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in Iterator test"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -int -Destroy_Test::execute (TAO_Naming_Client &root_context) -{ - TAO_TRY - { - // Create a context and bind an object under it. - - CosNaming::NamingContext_var my_context; - my_context = root_context->new_context (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Bind a dummy object foo under my_context. - My_Test_Object impl; - Test_Object_var obj = impl._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - CosNaming::Name object_name; - object_name.length (1); - object_name[0].id = CORBA::string_dup ("foo"); - my_context->bind (object_name, - obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Do the testing. - not_empty_test (my_context, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - my_context->unbind (object_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - my_context->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - - not_exist_test (my_context, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Unexpected exception in Exceptions test"); - return -1; - } - TAO_ENDTRY; - return 0; -} - -void -Destroy_Test::not_empty_test (CosNaming::NamingContext_var &ref, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - ref->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - TAO_CATCH (CosNaming::NamingContext::NotEmpty, ex) - { - TAO_TRY_ENV.clear (); - ACE_DEBUG ((LM_DEBUG, - "NotEmpty exception works properly\n")); - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -void -Destroy_Test::not_exist_test (CosNaming::NamingContext_var &ref, - CORBA::Environment &TAO_IN_ENV) -{ - TAO_TRY - { - ref->destroy (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - - TAO_CATCH (CORBA::OBJECT_NOT_EXIST, ex) - { - TAO_TRY_ENV.clear (); - ACE_DEBUG ((LM_DEBUG, - "Destroy works properly\n")); - } - TAO_CATCHANY - { - TAO_RETHROW; - } - TAO_ENDTRY; -} - -// This function runs the test. - -int -main (int argc, char **argv) -{ - CosNaming_Client cosnaming_client; - - if (cosnaming_client.init (argc, argv) == -1) - return 1; - - return cosnaming_client.run (); -} diff --git a/TAO/orbsvcs/tests/Simple_Naming/client.dsp b/TAO/orbsvcs/tests/Simple_Naming/client.dsp deleted file mode 100644 index 1662e309723..00000000000 --- a/TAO/orbsvcs/tests/Simple_Naming/client.dsp +++ /dev/null @@ -1,245 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Simple Naming Client" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 5.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Simple Naming Client - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "client.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "client.mak" CFG="Simple Naming Client - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Simple Naming Client - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "Simple Naming Client - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Simple Naming Client - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib TAO.lib orbsvcs.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" - -!ELSEIF "$(CFG)" == "Simple Naming Client - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 aced.lib TAOd.lib orbsvcsd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" - -!ENDIF - -# Begin Target - -# Name "Simple Naming Client - Win32 Release" -# Name "Simple Naming Client - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter ".cpp" -# Begin Source File - -SOURCE=.\client.cpp -# End Source File -# Begin Source File - -SOURCE=.\test_objectC.cpp -# End Source File -# Begin Source File - -SOURCE=.\test_objectS.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter ".h" -# Begin Source File - -SOURCE=.\client.h -# End Source File -# Begin Source File - -SOURCE=.\test_objectC.h -# End Source File -# Begin Source File - -SOURCE=.\test_objectS.h -# End Source File -# Begin Source File - -SOURCE=.\test_objectS_T.h -# End Source File -# End Group -# Begin Group "IDL Files" - -# PROP Default_Filter ".idl" -# Begin Source File - -SOURCE=.\test_object.idl - -!IF "$(CFG)" == "Simple Naming Client - Win32 Release" - -# PROP Ignore_Default_Tool 1 -USERDEP__TEST_="..\..\..\..\bin\Release\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\test_object.idl -InputName=test_object - -BuildCmds= \ - tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ELSEIF "$(CFG)" == "Simple Naming Client - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -USERDEP__TEST_="..\..\..\..\bin\tao_idl.exe" -# Begin Custom Build - Invoking TAO_IDL Compiler -InputPath=.\test_object.idl -InputName=test_object - -BuildCmds= \ - tao_idl $(InputName).idl - -"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) - -"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - $(BuildCmds) -# End Custom Build - -!ENDIF - -# End Source File -# End Group -# Begin Group "Inline Files" - -# PROP Default_Filter ".i" -# Begin Source File - -SOURCE=.\test_objectC.i -# End Source File -# Begin Source File - -SOURCE=.\test_objectS.i -# End Source File -# Begin Source File - -SOURCE=.\test_objectS_T.i -# End Source File -# End Group -# Begin Group "Template Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\test_objectS_T.cpp - -!IF "$(CFG)" == "Simple Naming Client - Win32 Release" - -!ELSEIF "$(CFG)" == "Simple Naming Client - Win32 Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# End Group -# End Target -# End Project diff --git a/TAO/orbsvcs/tests/Simple_Naming/client.h b/TAO/orbsvcs/tests/Simple_Naming/client.h deleted file mode 100644 index 744035f99c6..00000000000 --- a/TAO/orbsvcs/tests/Simple_Naming/client.h +++ /dev/null @@ -1,282 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests -// -// = FILENAME -// client.h -// -// = DESCRIPTION -// This class tests the facilities to connect to the naming service. -// -// = AUTHORS -// Marina Spivak -// -// ============================================================================ - -#include "tao/corba.h" -#include "tao/TAO.h" -#include "orbsvcs/Naming/Naming_Utils.h" -#include "orbsvcs/CosNamingC.h" -#include "test_objectS.h" - -class Naming_Test -{ - // = TITLE - // This is an abstract class which is subclassed - // to create different Naming Service tests. - // - // = DESCRIPTION - // This is a basic example of the "Strategy" pattern. This class - // provides a common interface for different tests (or - // "strategies"), so that a specific test to be used can be - // chosen at runtime. - -public: - virtual int execute (TAO_Naming_Client &root_context) = 0; - // Execute the test code. is the context to assume - // as the root for all tests operations. -}; - -class Simple_Test : public Naming_Test -{ - // = TITLE - // This class implements a simple Naming Service test. - // - // = DESCRIPTION - // The test binds(), resolves(), and unbinds() an object - // reference from the given Naming Context. -public: - virtual int execute (TAO_Naming_Client &root_context); - // Execute the simple test code. -}; - -class Loop_Test : public Naming_Test -{ - // = TITLE - // This class implements a loop Naming Service test. - // - // = DESCRIPTION - // The test binds(), resolves(), and unbinds() an object - // reference in a loop, ignoring AlreadyBound and NotFound - // exceptions. This is useful for a script that spawns multiple - // client processes, each executing the loop test, using the same - // name for the object reference. -public: - virtual int execute (TAO_Naming_Client &root_context); - // Execute the loop test code. -}; - -class MT_Test : public Naming_Test, public ACE_Task_Base -{ - // = TITLE - // This class implements a simple Multithreaded (multiclient) Naming Service test. - // - // = DESCRIPTION - // The test spawns multiple threads: each attempts to - // bind(), resolve(), and unbind() an object - // reference using the same name, and the same Naming Context. -public: - // = Initialization and termination methods. - - MT_Test (CORBA::ORB_ptr orb, - int size = 10); - // Constructor. Takes in an orb pointer and number of threads to spawn. - - virtual int execute (TAO_Naming_Client &root_context); - // Execute the MT test code. - - virtual int svc (void); - // This code is executed by each thread. - -private: - int size_; - // Number of threads to spawn. By default is set to 10. - - CORBA::ORB_ptr orb_; - // A pointer to our ORB. - - char* name_service_ior_; - // IOR in the string format for Naming Service we are to deal with. - // Each thread will use string_to_object() and this IOR to create - // its own NamingContext stub for invoking operations on the - // Naming Service. If all threads try to use the same stub, bad things - // happen... - - // This can be replaced with CORBA::String_var when - // is fixed - this will clean up the memory properly. - - CosNaming::Name test_name_; - // Holds name used for registering the object with Naming Service. - - Test_Object_var test_ref_; - // Holds object to be registered with the Naming Service by each thread. - -}; - -class Tree_Test : public Naming_Test -{ - // = TITLE - // This class implements a test of all Naming Service functions - // on a tree of Naming Contexts. - // - // = DESCRIPTION - // Bind_context() under the root context with the name level1. - // Create_new_context(), bind() foo object into it, and - // bind the context into root/level1 under the name level2. - // Resolve (root/level1/level2/foo). - // Unbind (root/level1/level2/foo). - // Bind (root/level1/level2/foo, obj) - // Create_new_context() - // and invoke rebind_context() to substitute it for the current - // level2 context. - // Bind (root/level1/level2/foo, obj) - // Resolve (root/level1/level2/foo). - // Rebind() to have a different object under the name bar. - // Resolve (root/level1/level2/foo) to make sure correct reference is returned. -public: - virtual int execute (TAO_Naming_Client &root_context); - // Execute the tree test code. -}; - -class Iterator_Test : public Naming_Test -{ - // = TITLE - // This class implements a test of Naming Service functions - // which involve BindingIterator. - // - // = DESCRIPTION - // The test binds foo1, foo2, foo3, and foo4 objects to the - // Naming Context. It lists() one binding and receives - // BindingIterator to iterate over the rest of the bindings. It - // then invokes next_one(), next_n(2), next_one(), and destroy() - // on the iterator. -public: - virtual int execute (TAO_Naming_Client &root_context); - // Execute the iterator test code. -}; - -class Exceptions_Test : public Naming_Test -{ - // = TITLE - // This class implements a test of exceptions in the Naming Service. - // - // = DESCRIPTION - // Makes sure that Naming Service throws exceptions as expected, and - // data inside exceptions is set correctly. The test creates a tree of - // of Naming Contexts: root context -> level1 -> level2. It then binds() an - // object with the name foo to each of Naming Contexts in the tree. - // Invoke resolve() with a Name of length 0 - make sure we get InvalidName exception. - // Invoke bind( foo, obj) on root context - make sure we get AlreadyBound exception. - // Invoke bind( level1/foo, obj) on root context - make sure we get AlreadyBound exc. - // Invoke unbind( level1/level2/bar) on root context - make sure we get NotFound exc. - // with why = not_object, rest_of_name = bar. - // Invoke unbind( level1/level3/foo) on root context - make sure we get NotFound exc. - // with why = missing_node, rest_of_name = level3/foo. - // Invoke unbind( level1/foo/foo) on root context - make sure we get NotFound exc. - // with why = not_context, rest_of_name = foo/foo. -public: - virtual int execute (TAO_Naming_Client &root_context); - // Execute the exceptions test code. - -private: - // the following functions isolate specific tests due to the - // limitation of only 1 TAO_TRY being allowed per function. - - void invalid_name_test (TAO_Naming_Client &root_context, - CORBA::Environment &_env); - void already_bound_test (TAO_Naming_Client &root_context, - CORBA::Environment &_env); - void already_bound_test2 (TAO_Naming_Client &root_context, - CORBA::Environment &_env); - void not_found_test (TAO_Naming_Client &root_context, - CORBA::Environment &_env); - void not_found_test2 (TAO_Naming_Client &root_context, - CORBA::Environment &_env); - void not_found_test3 (TAO_Naming_Client &root_context, - CORBA::Environment &_env); -}; - -class Destroy_Test : public Naming_Test -{ - // = TITLE - // This class implements a test of destroy() function - // in the Naming Service. - // - // = DESCRIPTION - // Create a context and bind an object under it. - // Attempt to destroy the context - NotEmpty exception should be raised. - // - // Unbind the object and call destroy on the context. - // Attempt to call destroy on the object again - OBJECT_NOT_EXIST - // exception should be raised. - // -public: - virtual int execute (TAO_Naming_Client &root_context); - // Execute the destroy test code. - -private: - // = The following functions isolate specific tests. - void not_empty_test (CosNaming::NamingContext_var &ref, - CORBA::Environment &_env); - void not_exist_test (CosNaming::NamingContext_var &ref, - CORBA::Environment &_env); -}; - -class CosNaming_Client -{ - // = TITLE, - // Defines a class that encapsulates behaviour of the CosNaming - // client example. Provides a better understanding of the logic - // in an object-oriented way. - // - // = DESCRIPTION - // This class declares an interface to run the example client for - // CosNaming CORBA server. All the complexity for initializing - // the server is hidden in the class. Just the interface - // is needed. -public: - // = Initialization and termination methods. - - CosNaming_Client (void); - // Constructor. - - ~CosNaming_Client (void); - // Destructor. - - int run (void); - // Execute client example code. - - int init (int argc, char **argv); - // Initialize the client communication endpoint with server. - - // = Symbolic ids. - enum - { - OBJ1_ID = 5, - OBJ2_ID = 6 - }; - -private: - int parse_args (void); - // Parses the arguments passed on the command line. - - int argc_; - // # of arguments on the command line. - - char **argv_; - // arguments from command line. - - Naming_Test *test_; - // A pointer to the specific Naming Service test a client will - // execute. - - TAO_ORB_Manager orbmgr_; - // Our ORB manager helper class. - - TAO_Naming_Client naming_client_; - // Our naming client helper class. -}; diff --git a/TAO/orbsvcs/tests/Simple_Naming/process-m-output.pl b/TAO/orbsvcs/tests/Simple_Naming/process-m-output.pl deleted file mode 100755 index ab8a0ec9b73..00000000000 --- a/TAO/orbsvcs/tests/Simple_Naming/process-m-output.pl +++ /dev/null @@ -1,107 +0,0 @@ -# $Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -unshift @INC, '../../../../bin'; -require Process; -require Uniqueid; - -# This is a Perl script that processes the output of the multithreaded -# client test. Usage: process-m-output.pl output-file-name number-of-threads - -# The following checks are performed: -# 1) Number of sucessful binds equals to the number of sucessful -# unbinds. -# 2) Each thread id has 1 output line for each of the following: bind, -# resolve and unbind. -# 3) There are no unexpected output lines (e.g., more lines than -# expected or with unexpected content like Exceptions, seg faults). - -# Open the output file. -$input_file = $ARGV[0]; -if ($input_file and $ARGV[1]) -{ - open (DATA, $input_file); -} -else -{ - die "Usage: process-m-output.pl output-file-name number-of-threads \n"; -} - -$binds = 0; -$unbinds = 0; - -while ($line = ) -{ - # Process the line. - chomp $line; - @words = split (/ /, $line); - - # Make sure the line contains expected output. - if (not ($words[0] eq "Unbound" or - $words[0] eq "Bound" or - $words[0] eq "Resolved" or - $words[0] eq "Unable")) - { - close (DATA); - die "Error is detected in the output file <$input_file> \n"; - } - - # Keep track of sucessful binds/unbinds. - if ($words[0] eq "Bound") - { - ++$binds; - } - if ($words[0] eq "Unbound") - { - ++$unbinds; - } - - # Keep track of output lines for each thread. - $count = $threads{$words[5]}; - - if ($count eq "" and - ($words[0] eq "Bound" or $words[2] eq "bind")) - { - ++$threads{$words[5]}; - } - elsif ($count eq 1 and - ($words[0] eq "Resolved" or $words[2] eq "resolve")) - { - ++$threads{$words[5]}; - } - elsif ($count eq 2 and - ($words[0] eq "Unbound" or $words[2] eq "unbind")) - { - ++$threads{$words[5]}; - } - else - { - close (DATA); - die "Wrong output for thread $word[5]\n"; - } -} -close (DATA); -# Check that each thread performed 3 operations. -if (grep {not $_ eq 3} values %threads) -{ - die "Some thread has performed a wrong number of operations\n"; -} -$number = values %threads; -if ($number ne $ARGV[1]) -{ - die "Not all threads performed operations\n"; -} - -# Check that number of binds equals to those of unbinds. -if ($binds == $unbinds) -{ - print "Multithreaded output is ok \n"; -} -else -{ - print "Number of sucessfule binds is different from number of -sucessful unbinds\n"; -} diff --git a/TAO/orbsvcs/tests/Simple_Naming/run_test.pl b/TAO/orbsvcs/tests/Simple_Naming/run_test.pl deleted file mode 100755 index e837dfcf91c..00000000000 --- a/TAO/orbsvcs/tests/Simple_Naming/run_test.pl +++ /dev/null @@ -1,89 +0,0 @@ -# $Id$ -# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# This is a Perl script that runs the client and all the other servers that -# are needed - -unshift @INC, '../../../../bin'; -require Process; -require Uniqueid; - -# amount of delay between running the servers - -$sleeptime = 8; - -# variables for parameters - -$nsmport = 10000 + uniqueid (); - -sub name_server -{ - my $args = "-ORBnameserviceport $nsmport"; - my $prog = "..$DIR_SEPARATOR..$DIR_SEPARATOR"."Naming_Service".$DIR_SEPARATOR. - "Naming_Service".$Process::EXE_EXT; - - $NS = Process::Create ($prog, $args); -} - -sub client -{ - my $args = $_[0]." "."-ORBnameserviceport $nsmport"; - my $prog = $EXEPREFIX."client".$Process::EXE_EXT; - - system ($prog." ".$args); -} - -# Options for all tests recognized by the 'client' program. -@opts = ("-s", "-t", "-i", "-e", "-y"); - -@comments = ("Simple Test: \n", - "Tree Test: \n", - "Iterator Test: \n", - "Exceptions Test: \n", - "Destroy Test: \n"); - -$test_number = 0; - -# Run server and client with each option available to the client. -foreach $o (@opts) -{ - name_server (); - - sleep $sleeptime; - print "\n"; - print " ".$comments[$test_number]; - - client ($o); - - $NS->Kill (); - $test_number++; -} - -print "\n"; - -# Now run the multithreaded test, sending output to the file. -open (OLDOUT, ">&STDOUT"); -open (STDOUT, ">test_run.data") or die "can't redirect stdout: $!"; -open (OLDERR, ">&STDERR"); -open (STDERR, ">&STDOUT") or die "can't redirect stderror: $!"; - -name_server (); -sleep $sleeptime; -client ("-m25"); - -close (STDERR); -close (STDOUT); -open (STDOUT, ">&OLDOUT"); -open (STDERR, ">&OLDERR"); - -$NS->Kill (); - -print " Multithreaded Test:\n"; -system ("process-m-output.pl test_run.data 25"); -print "\n"; - -# @@ Capture any exit status from the processes. -exit 0; diff --git a/TAO/orbsvcs/tests/Simple_Naming/test_object.idl b/TAO/orbsvcs/tests/Simple_Naming/test_object.idl deleted file mode 100644 index 4737f6dc6c8..00000000000 --- a/TAO/orbsvcs/tests/Simple_Naming/test_object.idl +++ /dev/null @@ -1,11 +0,0 @@ -// $Id$ - -interface Test_Object -{ - // = TITLE - // This is a simple interface that tests the Naming Service. - - attribute short id; - // This provides an easy way to differentiate objects if each - // objects is served by a separate servant. -}; diff --git a/TAO/orbsvcs/tests/Time/Client_i.cpp b/TAO/orbsvcs/tests/Time/Client_i.cpp deleted file mode 100644 index 39625ec11dd..00000000000 --- a/TAO/orbsvcs/tests/Time/Client_i.cpp +++ /dev/null @@ -1,421 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" -#include "ace/OS.h" - -#include "Client_i.h" - -ACE_RCSID(Time_Service, Client_i, "$Id$") - -// Constructor. - -Client_i::Client_i (void) - : ior_ (0), - loop_count_ (10), - shutdown_ (0), - clerk_ () -{ -} - -// The following test throws an exception that the operation -// has not been currently implemented in the -// given server. - -void -Client_i::test_for_secure_universal_time (void) -{ - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Testing secure_time()\n")); - TAO_TRY - { - CosTime::UTO_var UTO_server = - this->clerk_->secure_universal_time (TAO_TRY_ENV); - - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::SystemException, sysex) - { - ACE_UNUSED_ARG (sysex); - TAO_TRY_ENV.print_exception ("System Exception"); - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) test_for_secure_universal_time() successful !!\n")); - } - TAO_ENDTRY; -} - -// The following test retrieves the current universal time as a UTO -// from the clerk_ and prints out the various attributes of the UTO. - -void -Client_i::test_for_universal_time (void) -{ - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Testing universal_time()\n")); - TAO_TRY - { - CosTime::UTO_var UTO_server = - this->clerk_->universal_time (TAO_TRY_ENV); - - TAO_CHECK_ENV; - ACE_DEBUG ((LM_DEBUG, - "\nTime = %Q\nInaccuracy = %Q\nTimeDiff = %d\nstruct.time = %Q" - "\nstruct.inacclo = %d\nstruct.inacchi = %d\nstruct.Tdf = %d\n", - UTO_server->time (TAO_TRY_ENV), - UTO_server->inaccuracy (TAO_TRY_ENV), - UTO_server->tdf (TAO_TRY_ENV), - (UTO_server->utc_time ()).time, - (UTO_server->utc_time ()).inacclo, - (UTO_server->utc_time ()).inacchi, - (UTO_server->utc_time ()).tdf)); - - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Error:"); - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) test_for_universal_time()\n")); - } - TAO_ENDTRY; -} - -void -Client_i::test_for_new_universal_time (void) -{ - // @@ Vishal, please consider replacing these numbers with consts or enums. - TimeBase::TimeT time = 999999999; - TimeBase::InaccuracyT inaccuracy = 9999; - TimeBase::TdfT tdf = 99; - - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Testing new_universal_time()\n")); - - TAO_TRY - { - CosTime::UTO_var UTO_server = this->clerk_->new_universal_time (time, - inaccuracy, - tdf, - TAO_TRY_ENV); - - ACE_ASSERT (UTO_server->time (TAO_TRY_ENV) == 999999999); - ACE_ASSERT (UTO_server->inaccuracy (TAO_TRY_ENV) == 9999); - ACE_ASSERT (UTO_server->tdf (TAO_TRY_ENV) == 99); - ACE_ASSERT ((UTO_server->utc_time (TAO_TRY_ENV)).time == 999999999); - ACE_ASSERT ((UTO_server->utc_time (TAO_TRY_ENV)).inacchi == 0); - ACE_ASSERT ((UTO_server->utc_time (TAO_TRY_ENV)).inacclo == 9999); - ACE_ASSERT ((UTO_server->utc_time (TAO_TRY_ENV)).tdf == 99); - - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Test new_universal_time () fails.\n")); - } - TAO_ENDTRY; -} - -void -Client_i::test_for_uto_from_utc (void) -{ - TimeBase::UtcT utc_struct; - - utc_struct.time = 999999999; - utc_struct.inacclo = 50; - utc_struct.inacchi = 50; - utc_struct.tdf = 99; - - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Testing uto_from_utc ()\n")); - - TAO_TRY - { - CosTime::UTO_var UTO_server = this->clerk_->uto_from_utc (utc_struct, - TAO_TRY_ENV); - - TimeBase::InaccuracyT inaccuracy = utc_struct.inacchi; - inaccuracy <<= 32; - inaccuracy |= utc_struct.inacclo; - - ACE_ASSERT (UTO_server->time (TAO_TRY_ENV) == 999999999); - ACE_ASSERT (UTO_server->inaccuracy (TAO_TRY_ENV) == inaccuracy); - ACE_ASSERT (UTO_server->tdf (TAO_TRY_ENV) == 99); - ACE_ASSERT ((UTO_server->utc_time (TAO_TRY_ENV)).time == 999999999); - ACE_ASSERT ((UTO_server->utc_time (TAO_TRY_ENV)).inacclo == 50); - ACE_ASSERT ((UTO_server->utc_time (TAO_TRY_ENV)).inacchi == 50); - ACE_ASSERT ((UTO_server->utc_time (TAO_TRY_ENV)).tdf == 99); - - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Test uto_from_utc () fails.\n")); - } - TAO_ENDTRY; -} - -void -Client_i::test_for_new_interval (void) -{ - TimeBase::TimeT lower = 666666666; - TimeBase::TimeT upper = 999999999; - - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Testing new_interval ()\n")); - - TAO_TRY - { - CosTime::TIO_var TIO_server = this->clerk_->new_interval (lower, - upper, - TAO_TRY_ENV); - - ACE_ASSERT ((TIO_server->time_interval (TAO_TRY_ENV)).lower_bound == 666666666); - ACE_ASSERT ((TIO_server->time_interval (TAO_TRY_ENV)).upper_bound == 999999999); - - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Test new_interval () fails.\n")); - } - TAO_ENDTRY; - - return; -} - -// Reads the Time Service Server ior from a file - -int -Client_i::read_ior (char *filename) -{ - // Open the file for reading. - ACE_HANDLE f_handle = ACE_OS::open (filename, 0); - - if (f_handle == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, - "[CLIENT] Process/Thread Id : (%P/%t) Unable to open %s for writing: %p\n", - filename), - -1); - - ACE_Read_Buffer ior_buffer (f_handle); - char *data = ior_buffer.read (); - - if (data == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "[CLIENT] Process/Thread Id : (%P/%t) Unable to read ior: %p\n"), - -1); - - this->ior_ = ACE_OS::strdup (data); - ior_buffer.alloc ()->free (data); - - ACE_OS::close (f_handle); - - return 0; -} - -// Parses the command line arguments and returns an error status. - -int -Client_i::parse_args (void) -{ - ACE_Get_Opt get_opts (argc_, argv_, "dn:f:xk:"); - int c; - int result; - - while ((c = get_opts ()) != -1) - // ACE_DEBUG((LM_DEBUG,"bal =1%c",c - // )); - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; - break; - case 'n': // loop count - this->loop_count_ = (u_int) ACE_OS::atoi (get_opts.optarg); - break; - case 'k': // ior provide on command line - this->ior_ = ACE_OS::strdup (get_opts.optarg); - break; - case 'f': // read the IOR from the file. - result = this->read_ior (get_opts.optarg); - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "[CLIENT] Process/Thread Id : (%P/%t) Unable to read ior from %s : %p\n", - get_opts.optarg), - -1); - break; - case 'x': - this->shutdown_ = 1; - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-n loopcount]" - " [-f ior-file]" - " [-k ior]" - " [-x]" - "\n", - this->argv_ [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - -// Execute client example code. - -int -Client_i::run (void) -{ - // Retrieves the current universal time. - test_for_universal_time (); - - // Asserts the validity of the new_universal_time. - test_for_new_universal_time (); - - // Asserts the validity of the UTO created from a given UTC. - test_for_uto_from_utc (); - - // Asserts the validity of the TIO created using the given - // bounds. - test_for_new_interval (); - - // Throws an exception because the method has not been - // implemented currently. - test_for_secure_universal_time (); - - return 0; -} - -Client_i::~Client_i (void) -{ - ACE_OS::free (this->ior_); -} - -int -Client_i::obtain_initial_references (void) -{ - TAO_TRY - { - // Initialize the naming services. - if (my_name_client_.init (orb_.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "[CLIENT] Process/Thread Id : (%P/%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - ACE_DEBUG ((LM_DEBUG, - "DONE\n")); - - char host_name[MAXHOSTNAMELEN]; - char name[MAXHOSTNAMELEN]; - - ACE_OS::hostname (host_name, MAXHOSTNAMELEN); - - CosNaming::Name clerk_name; - clerk_name.length (2); - clerk_name[0].id = CORBA::string_dup ("ClerkContext"); - strcpy (name, "Clerk:"); - strcat (name, host_name); - clerk_name[1].id = CORBA::string_dup (name); - - ACE_DEBUG ((LM_DEBUG, - "%s|\n", - name)); - - CORBA::Object_var temp_object = - my_name_client_->resolve (clerk_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - clerk_ = CosTime::TimeService::_narrow (temp_object.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (clerk_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "[CLIENT] Process/Thread Id : (%P/%t) Unable to Resolve " - "Clerk Reference\n"), - -1); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Client :: obtain_initial_references"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -// This method uses the IOR if specified on the command line or in a -// file, else it uses the Naming Service - -int -Client_i::init (int argc, char **argv) -{ - this->argc_ = argc; - this->argv_ = argv; - - TAO_TRY - { - // Retrieve the ORB. - this->orb_ = CORBA::ORB_init (this->argc_, - this->argv_, - 0, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Parse command line and verify parameters. - if (this->parse_args () == -1) - return -1; - - if (this->ior_) - { - // An ior is specified for the client through a commandline - // option or a file. - - CORBA::Object_var server_object = - this->orb_->string_to_object (this->ior_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (server_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid ior <%s>\n", - this->ior_), - -1); - this->clerk_ = - CosTime::TimeService::_narrow (server_object.in (), - TAO_TRY_ENV); - - ACE_DEBUG ((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Using the IOR provided\n")); - TAO_CHECK_ENV; - } - else - { // No IOR specified. Use the Naming Service - ACE_DEBUG((LM_DEBUG, - "[CLIENT] Process/Thread Id : (%P/%t) Using the Naming Service\n")); - - if (this->obtain_initial_references () == -1) - return -1; - - TAO_CHECK_ENV; - } - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Client_i::init"); - return -1; - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/orbsvcs/tests/Time/Client_i.h b/TAO/orbsvcs/tests/Time/Client_i.h deleted file mode 100644 index 7d786b7b8cc..00000000000 --- a/TAO/orbsvcs/tests/Time/Client_i.h +++ /dev/null @@ -1,101 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/Time_Service -// -// = FILENAME -// Client_i.h -// -// = DESCRIPTION -// This class implements a simple CORBA client that accesses a Time Service -// server. -// -// = AUTHORS -// Vishal Kachroo -// -// ============================================================================ - -#include "orbsvcs/TimeServiceC.h" -#include "orbsvcs/Naming/Naming_Utils.h" - -class Client_i -{ - // = TITLE - // Client implementation to access the Time Service server. - // - // = DESCRIPTION - // Class wrapper for a client that gets the IOR of the clerk - // running on its machine and uses it to get the globally - // synchronized time -public: - // = Initialization and termination methods. - Client_i (void); - // Constructor. - - ~Client_i (void); - // Destructor. - - int run (void); - // Execute client example code. - - int init (int argc, char *argv[]); - // Initialize the client communication endpoint with server. - - void test_for_secure_universal_time (void); - // This test throws an exception that the operation - // has not been currently implemented in the - // given server. - - void test_for_universal_time (void); - // Tests if the server returns a valid time. - - void test_for_new_universal_time (void); - // Tests if the server returns a new UTO filled with the given time. - - void test_for_uto_from_utc (void); - // Tests if the returned UTO has the same value as the given UTC. - - void test_for_new_interval (void); - // Tests if a new TIO is created according to the given bounds. - -private: - int read_ior (char *filename); - // Function to read the server IOR from a file. - - int parse_args (void); - // Parses the arguments passed on the command line. - - int obtain_initial_references (void); - // To initialize the naming service and get a clerk IOR. - - int argc_; - // # of arguments on the command line. - - char **argv_; - // arguments from command line. - - char *ior_; - // IOR of the obj ref of the server. - - u_int loop_count_; - // Number of times to invoke the