Changeset 6162
- Timestamp:
- 01/17/08 09:21:35 (5 years ago)
- Files:
-
- 1 modified
-
components/RxDemo/trunk/RxDemo/main.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
components/RxDemo/trunk/RxDemo/main.cpp
r4250 r6162 1 1 /**************************************************************************** 2 2 3 Copyright 2006 Virginia Polytechnic Institute and State University3 Copyright 2006, 2008 Virginia Polytechnic Institute and State University 4 4 5 5 This file is part of the OSSIE RxDemo. … … 24 24 25 25 #include "ossie/ossieSupport.h" 26 #include "ossie/ossieResource.h" 26 27 #include "ossie/debug.h" 27 28 … … 35 36 DEBUG(5, RxDemo, "Starting component."); 36 37 37 ossieSupport::ORB *orb = new ossieSupport::ORB; 38 omni_mutex component_running_mutex; 39 omni_condition *component_running = new omni_condition(&component_running_mutex); 38 ossieResource<RxDemo_i> RxDemo(argc, argv); 40 39 41 DEBUG(5, RxDemo, "Creating ossieComponent."); 42 ossieSupport::ossieComponent rxDemo(orb, argc, argv); 43 44 RxDemo_i* rxdemo_servant; 45 CF::Resource_var rxdemo_var; 46 47 // Create the rxdemo component servant and object reference 48 49 rxdemo_servant = new RxDemo_i(rxDemo.getUuid(), component_running); 50 rxdemo_var = rxdemo_servant->_this(); 51 52 rxDemo.bind(rxdemo_var); 53 54 // This bit is ORB specific 55 // omniorb is threaded and the servants are running at this point 56 // so we block on the condition 57 // The releaseObject method clear the condition and the component exits 58 59 component_running->wait(); 60 rxDemo.unbind(); 61 orb->orb->shutdown(0); 40 RxDemo.run(); 62 41 63 42 }