Changeset 7853
- Timestamp:
- 06/12/08 21:26:27 (5 years ago)
- Location:
- ossiedev/branches/ssayed/devs/src/system
- Files:
-
- 3 modified
-
nodebooter/nodebooter.cpp (modified) (1 diff)
-
ossie/framework/DeviceManager_impl.cpp (modified) (5 diffs)
-
ossie/framework/DomainManager_impl.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/branches/ssayed/devs/src/system/nodebooter/nodebooter.cpp
r7846 r7853 169 169 170 170 // finish initializing the Device Manager 171 DeviceManager_servant->post_constructor(DeviceManager_objref); 171 try 172 { 173 DeviceManager_servant->post_constructor(DeviceManager_objref); 174 } catch( CF::FileException &_ex ) { 175 std::cout << "[nodebooter] While starting DevMgr: " << _ex.msg << "\n"; 176 exit(EXIT_FAILURE); 177 } 172 178 } 173 179 -
ossiedev/branches/ssayed/devs/src/system/ossie/framework/DeviceManager_impl.cpp
r7846 r7853 168 168 } 169 169 #endif 170 170 ossieSupport::nsleep(0, 1000*1000); 171 171 CORBA::Object_var _obj = CORBA::Object::_nil(); 172 172 char nameStr[255]; 173 sprintf( nameStr, "DomainName1/%s", componentPlacements[i].usageName() ); 174 DEBUG(3, DevMgr, "searching for "<< nameStr) 173 sprintf( nameStr, "DomainName1/%s", componentPlacements[i].usageName() ); DEBUG(3, DevMgr, "searching for "<< nameStr) 175 174 do 176 175 { … … 181 180 _obj = orb_obj->get_object_from_name(nameStr); 182 181 } catch (CosNaming::NamingContext::NotFound) { 183 std::cout << "[DeviceManager::post_ctor] While obtaining NamingContext: NamingContext Not Found\n"; 184 ossieSupport::nsleep(0, 50*1000); 182 ossieSupport::nsleep(0, 100*1000); 185 183 } catch( ... ) { 186 184 std::cout << "[DeviceManager::post_ctor] While obtaining NamingContext: Unknown Exception\n"; … … 193 191 tempDevice->initialize (); 194 192 193 if( strlen( _SPDParser.getPRFFile() ) > 0 ) 194 { 195 195 //Get properties from PRF 196 CF::File_var _prf; 197 try 198 { 199 _prf = _fileSys->open( _SPDParser.getPRFFile(), true ); 200 } catch( CF::InvalidFileName &_ex ) { 201 std::cout << "[DeviceManager::post_ctor] While opening PRF: " << _ex.msg << "\n"; 202 exit(EXIT_FAILURE); 203 } catch( CF::FileException &_ex ) { 204 std::cout << "[DeviceManager::post_ctor] While opening PRF: " << _ex.msg << "\n"; 205 exit(EXIT_FAILURE); 206 } catch( ... ) { 207 std::cout << "[DeviceManager::post_ctor] While opening PRF: Unknown Exception\n"; 208 exit(EXIT_FAILURE); 196 CF::File_var _prf; 197 try 198 { 199 _prf = _fileSys->open( _SPDParser.getPRFFile(), true ); 200 } catch( CF::InvalidFileName &_ex ) { 201 std::cout << "[DeviceManager::post_ctor] While opening PRF " << _SPDParser.getPRFFile() << ": " << _ex.msg << "\n"; 202 exit(EXIT_FAILURE); 203 } catch( CF::FileException &_ex ) { 204 std::cout << "[DeviceManager::post_ctor] While opening PRF " << _SPDParser.getPRFFile() << ": " << _ex.msg << "\n"; 205 exit(EXIT_FAILURE); 206 } catch( ... ) { 207 std::cout << "[DeviceManager::post_ctor] While opening PRF: Unknown Exception\n"; 208 exit(EXIT_FAILURE); 209 } 210 211 PRFParser _PRFparser ( _prf ); 212 _prf->close(); 213 std::vector <PRFProperty *> *prfSimpleProp = _PRFparser.getConfigureProperties (); 214 CF::Properties configCapacities; 215 configCapacities.length (prfSimpleProp->size ()); 216 for (unsigned int i = 0; i < prfSimpleProp->size (); i++) 217 { 218 configCapacities[i] = *((*prfSimpleProp)[i]->getDataType ()); 219 } 220 221 //configure properties 222 DEBUG(3, DevMgr, "Configuring capacities") 223 tempDevice->configure (configCapacities); 209 224 } 210 225 211 PRFParser _PRFparser ( _prf );212 _prf->close();213 std::vector <PRFProperty *> *prfSimpleProp = _PRFparser.getConfigureProperties ();214 CF::Properties configCapacities;215 configCapacities.length (prfSimpleProp->size ());216 for (unsigned int i = 0; i < prfSimpleProp->size (); i++)217 {218 configCapacities[i] = *((*prfSimpleProp)[i]->getDataType ());219 }220 221 //configure properties222 DEBUG(3, DevMgr, "Configuring capacities")223 tempDevice->configure (configCapacities);224 226 DEBUG(3, DevMgr, "Registering device") 225 227 try … … 229 231 std::cout << "[DeviceManager::post_ctor] While registering Device: " << _ex.msg << "\n"; 230 232 exit(EXIT_FAILURE); 233 } catch( CF::FileException &_ex ) { 234 std::cout << "[DeviceManager::post_ctor] While registering Device: " << _ex.msg << "\n"; 231 235 } catch( ... ) { 232 236 std::cout << "[DeviceManager::post_ctor] While registering Device: Unknown Exception\n"; … … 323 327 if (CORBA::is_nil (registeringDevice)) { 324 328 //writeLogRecord(FAILURE_ALARM,invalid reference input parameter.) 325 326 329 throw (CF:: 327 330 InvalidObjectReference 328 331 ("[DeviceManager::registerDevice] Cannot register Device. registeringDevice is a nil reference.")); 329 return;330 332 } 331 333 -
ossiedev/branches/ssayed/devs/src/system/ossie/framework/DomainManager_impl.cpp
r7833 r7853 245 245 string mountPoint = "/"; 246 246 mountPoint += deviceMgr->label(); 247 248 _fileMgr->mount (mountPoint.c_str(), deviceMgr->fileSys ()); 247 try 248 { 249 _fileMgr->mount (mountPoint.c_str(), deviceMgr->fileSys ()); 250 } catch( CF::InvalidFileName &_ex ) { 251 std::cout << "[DomainManager::registerDeviceManager] While mounting DevMgr FileSys: " << _ex.msg << "\n"; 252 exit(EXIT_FAILURE); 253 } catch( ... ) { 254 std::cout << "[DomainManager::registerDeviceManager] While mounting DevMgr FileSys: Unknown Exception\n"; 255 exit(EXIT_FAILURE); 256 } 249 257 250 258 // add all devices under device manager to registereddevice att. … … 335 343 throw (CF:: 336 344 InvalidObjectReference 337 (" Cannot unregister Device. DeviceMgr is a nil reference."));345 ("[DomainManager::unregisterDeviceManager] Cannot unregister Device. DeviceMgr is a nil reference.")); 338 346 return; 339 347 } … … 466 474 throw (CF:: 467 475 InvalidObjectReference 468 ("Cannot register Device. Either Device or DeviceMgr is a nil reference.")); 469 return; 476 ("[DomainManager::registerDevice] Cannot register Device. Either Device or DeviceMgr is a nil reference.")); 470 477 } 471 478 … … 476 483 477 484 throw CF::DomainManager::DeviceManagerNotRegistered (); 478 return;479 485 } 480 486 … … 490 496 // throw( CF::InvalidProfile() ); 491 497 throw CF::InvalidProfile (); 492 return;493 498 } 494 499