Changeset 6161
- Timestamp:
- 01/17/08 09:21:12 (5 years ago)
- Files:
-
- 1 modified
-
components/ChannelDemo/trunk/ChannelDemo/main.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
components/ChannelDemo/trunk/ChannelDemo/main.cpp
r4249 r6161 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 ChannelDemo. … … 22 22 23 23 #include <iostream> 24 24 25 #include "ossie/ossieSupport.h" 26 #include "ossie/ossieResource.h" 27 #include "ossie/debug.h" 25 28 26 29 #include "ChannelDemo.h" 27 28 30 29 31 int main(int argc, char* argv[]) 30 32 31 33 { 32 ossieSupport::ORB *orb = new ossieSupport::ORB;33 omni_mutex component_running_mutex;34 omni_condition *component_running = new omni_condition(&component_running_mutex);35 34 36 ossie Support::ossieComponent channelDemo(orb, argc, argv);35 ossieDebugLevel = 9; 37 36 38 ChannelDemo_i* channeldemo_servant; 39 CF::Resource_var channeldemo_var; 37 DEBUG(5, ChannelDemo, "Starting component."); 40 38 41 // Create the channeldemo component servant and object reference39 ossieResource<ChannelDemo_i> ChannelDemo(argc, argv); 42 40 43 channeldemo_servant = new ChannelDemo_i(channelDemo.getUuid(), component_running); 44 channeldemo_var = channeldemo_servant->_this(); 45 46 channelDemo.bind(channeldemo_var); 47 48 // This bit is ORB specific 49 // omniorb is threaded and the servants are running at this point 50 // so we block on the condition 51 // The releaseObject method clear the condition and the component exits 52 53 component_running->wait(); 54 channelDemo.unbind(); 55 orb->orb->shutdown(0); 56 41 ChannelDemo.run(); 57 42 }