- Timestamp:
- 02/25/09 02:12:51 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/trunk/system/ossie/framework/DeviceManager_impl.cpp
r8759 r8772 177 177 //Parse local componenents from DCD files 178 178 std::vector <componentPlacement> componentPlacements = _DCDParser.getComponentPlacements (); 179 if( componentPlacements.size() == 0 ) 180 { 181 for( unsigned int i = 0; i < _DCDParser.getDeployOnComponents()->size(); i++ ) 182 { 183 componentPlacements.push_back(componentPlacement( 184 (*_DCDParser.getDeployOnComponents())[i]->getFileRefId(), 185 (*_DCDParser.getDeployOnComponents())[i]->getInstantiationId(), 186 (*_DCDParser.getDeployOnComponents())[i]->getUsageName() )); 187 } 188 } 179 189 DEBUG(2, DevMgr, "ComponentPlacement size is" << componentPlacements.size()) 180 190 for (unsigned int i = 0; i < componentPlacements.size(); i++) … … 209 219 for( unsigned int j = 0; j < _implementations->size(); j++ ) 210 220 { 211 std::cout << "[DeviceManager::post_ctor] Checking idx: " << j << std::endl;221 std::cout << "[DeviceManager::post_ctor] Checking idx: " << j << " of " << _implementations->size() << std::endl; 212 222 std::vector< std::string > _devprocessors = (*_implementations)[j]->getProcessors(); 213 std::vector< std::string > _devmgrprocessors = (*_devmgrspdimpl)[ j]->getProcessors();223 std::vector< std::string > _devmgrprocessors = (*_devmgrspdimpl)[0]->getProcessors(); 214 224 // Assume only one processor per implementation 215 225 // -- test if the target processor matches; if not, get next implementation 226 DEBUG(4, DevMgr, "Comparing processors") 216 227 if( _devprocessors[0] != _devmgrprocessors[0] ) continue; 228 DEBUG(4, DevMgr, "Device processor matches DeviceManager processor") 217 229 OSAttributes _devosattr = (*_implementations)[j]->getOperatingSystem(); 218 OSAttributes _devmgrosattr = (*_devmgrspdimpl)[ j]->getOperatingSystem();230 OSAttributes _devmgrosattr = (*_devmgrspdimpl)[0]->getOperatingSystem(); 219 231 // -- test if the target OS matches; if not, get next implementation 220 if( strcmp( _devosattr.getOSName(), _devmgrosattr.getOSName() ) != 0 ) continue; 232 DEBUG(4, DevMgr, "Comparing OSes") 233 if( strcmp( _devosattr.getOSName(), _devmgrosattr.getOSName() ) < 0 ) continue; 234 DEBUG(4, DevMgr, "Device OS matches DeviceManager OS") 221 235 _implIdx = j; 222 236 break; … … 236 250 int myPid2; 237 251 238 DEBUG(2, DevMgr, "Launching Device file " << (*_implementations)[_implIdx]->getCodeFile () << " Usage name " << componentPlacements[ _implIdx].usageName())252 DEBUG(2, DevMgr, "Launching Device file " << (*_implementations)[_implIdx]->getCodeFile () << " Usage name " << componentPlacements[i].usageName()) 239 253 240 254 if ((myPid2 = fork()) < 0) std::cout << "Fork Error" << std::endl;