Changeset 8415 for ossiedev/branches/hvolos/components/Modulator/main.cpp
- Timestamp:
- 11/03/08 15:31:33 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/branches/hvolos/components/Modulator/main.cpp
r4411 r8415 38 38 omni_condition *component_running = new omni_condition(&component_running_mutex); 39 39 40 ossieSupport::ossieComponent modulator(orb, argc, argv); 40 if (argc != 3) { 41 std::cout << argv[0] << " <id> <usage name> " << std::endl; 42 exit (-1); 43 } 44 45 char *uuid = argv[1]; 46 char *label = argv[2]; 47 48 std::cout << "Identifier - " << uuid << " Label - " << label << std::endl; 41 49 42 50 Modulator_i* modulator_servant; … … 45 53 // Create the modulator component servant and object reference 46 54 47 modulator_servant = new Modulator_i( modulator.getUuid(), component_running);55 modulator_servant = new Modulator_i(uuid, component_running); 48 56 modulator_var = modulator_servant->_this(); 49 57 50 PortableServer::ObjectId_var servantId = orb->poa->reference_to_id(modulator_var);51 58 52 modulator.bind(modulator_var);59 orb->bind_object_to_name((CORBA::Object_ptr) modulator_var, label); 53 60 54 61 // This bit is ORB specific … … 58 65 59 66 component_running->wait(); 60 61 modulator.unbind(); 62 63 DEBUG(4, Modulator, "Deactivate object."); 64 orb->poa->deactivate_object(servantId); 65 66 DEBUG(4, Modulator, "Destroy POA."); 67 orb->poa->destroy(false, false); 68 69 DEBUG(4, Modulator, "Shutdown orb."); 67 orb->unbind_name(label); 70 68 orb->orb->shutdown(0); 71 69