Changeset 4561
- Timestamp:
- 08/08/07 15:50:47 (6 years ago)
- Location:
- experimental/components/USRP_Ctrl_GUI/branches/0.6.2/USRP_Ctrl_GUI
- Files:
-
- 2 added
- 5 removed
- 1 modified
-
USRP_Commander.cpp (added)
-
USRP_Commander.h (added)
-
USRP_Ctrl.cpp (deleted)
-
USRP_Ctrl.h (deleted)
-
USRP_Ctrl.prf.xml (deleted)
-
USRP_Ctrl.scd.xml (deleted)
-
USRP_Ctrl.spd.xml (deleted)
-
main.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
experimental/components/USRP_Ctrl_GUI/branches/0.6.2/USRP_Ctrl_GUI/main.cpp
r4559 r4561 1 1 /**************************************************************************** 2 2 3 Copyright 200 6Virginia Polytechnic Institute and State University3 Copyright 2007 Virginia Polytechnic Institute and State University 4 4 5 This file is part of the OSSIE USRP_C trl.5 This file is part of the OSSIE USRP_Commander. 6 6 7 OSSIE USRP_C trlis free software; you can redistribute it and/or modify7 OSSIE USRP_Commander is free software; you can redistribute it and/or modify 8 8 it under the terms of the GNU General Public License as published by 9 9 the Free Software Foundation; either version 2 of the License, or 10 10 (at your option) any later version. 11 11 12 OSSIE USRP_C trlis distributed in the hope that it will be useful,12 OSSIE USRP_Commander is distributed in the hope that it will be useful, 13 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 16 16 17 17 You should have received a copy of the GNU General Public License 18 along with OSSIE USRP_C trl; if not, write to the Free Software18 along with OSSIE USRP_Commander; if not, write to the Free Software 19 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 20 … … 26 26 #include "ossie/debug.h" 27 27 28 #include "USRP_C trl.h"28 #include "USRP_Commander.h" 29 29 30 30 … … 32 32 33 33 { 34 ossieDebugLevel = 3; 35 34 36 ossieSupport::ORB *orb = new ossieSupport::ORB; 35 37 omni_mutex component_running_mutex; 36 38 omni_condition *component_running = new omni_condition(&component_running_mutex); 37 39 38 if (argc != 3) { 39 std::cout << argv[0] << " <id> <usage name> " << std::endl; 40 exit (-1); 41 } 40 ossieSupport::ossieComponent usrp_commander(orb, argc, argv); 42 41 43 char *uuid = argv[1];44 char *label = argv[2];42 USRP_Commander_i* usrp_commander_servant; 43 CF::Resource_var usrp_commander_var; 45 44 46 DEBUG(3, USRP_Ctrl, "Identifier - " << uuid << " Label - " << label)45 // Create the usrp_commander component servant and object reference 47 46 48 USRP_Ctrl_i* usrp_ctrl_servant;49 CF::Resource_var usrp_ctrl_var;47 usrp_commander_servant = new USRP_Commander_i(usrp_commander.getUuid(), component_running); 48 usrp_commander_var = usrp_commander_servant->_this(); 50 49 51 // Create the usrp_ctrl component servant and object reference50 PortableServer::ObjectId_var servantId = orb->poa->reference_to_id(usrp_commander_var); 52 51 53 usrp_ctrl_servant = new USRP_Ctrl_i(uuid, component_running); 54 usrp_ctrl_var = usrp_ctrl_servant->_this(); 55 56 orb->bind_object_to_name((CORBA::Object_ptr) usrp_ctrl_var, label); 52 usrp_commander.bind(usrp_commander_var); 57 53 58 54 // This bit is ORB specific … … 62 58 63 59 component_running->wait(); 64 orb->unbind_name(label); 60 61 usrp_commander.unbind(); 62 63 DEBUG(4, USRP_Commander, "Deactivate object."); 64 orb->poa->deactivate_object(servantId); 65 66 DEBUG(4, USRP_Commander, "Destroy POA."); 67 orb->poa->destroy(false, false); 68 69 DEBUG(4, USRP_Commander, "Shutdown orb."); 65 70 orb->orb->shutdown(0); 66 71