Changeset 8772

Show
Ignore:
Timestamp:
02/25/09 02:12:51 (4 years ago)
Author:
shereef
Message:

DeviceManager? now supports multiple implementations

Location:
ossiedev/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/trunk/platform/nodes/default_ml403_node/DeviceManager.dcd.xml

    r8759 r8772  
    1515    <partitioning> 
    1616        <componentplacement> 
    17             <componentfileref refid="GPP1_915e9e4e-fc5b-11dd-9115-001d092f0ea2"/> 
     17            <deployondevice refid="DCE:4b08ce96-fc5c-11dd-9347-001d092f0ea2"/> 
     18            <componentfileref refid="GPP1_915e9e4e-fc5b-11dd-9115-001d092f0ea2"/> 
    1819            <devicepkgfile type="DPD">  
    1920                <localfile name="/ml403.dpd.xml"/> 
  • ossiedev/trunk/system/ossie/framework/DeviceManager_impl.cpp

    r8759 r8772  
    177177//Parse local componenents from DCD files 
    178178     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     } 
    179189     DEBUG(2, DevMgr, "ComponentPlacement size is" << componentPlacements.size()) 
    180190     for (unsigned int i = 0; i < componentPlacements.size(); i++) 
     
    209219      for( unsigned int j = 0; j < _implementations->size(); j++ ) 
    210220      { 
    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; 
    212222       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(); 
    214224        // Assume only one processor per implementation 
    215225        // -- test if the target processor matches; if not, get next implementation 
     226       DEBUG(4, DevMgr, "Comparing processors") 
    216227       if( _devprocessors[0] != _devmgrprocessors[0] ) continue; 
     228       DEBUG(4, DevMgr, "Device processor matches DeviceManager processor") 
    217229       OSAttributes _devosattr = (*_implementations)[j]->getOperatingSystem(); 
    218        OSAttributes _devmgrosattr = (*_devmgrspdimpl)[j]->getOperatingSystem(); 
     230       OSAttributes _devmgrosattr = (*_devmgrspdimpl)[0]->getOperatingSystem(); 
    219231        // -- 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") 
    221235       _implIdx = j; 
    222236       break; 
     
    236250      int myPid2; 
    237251 
    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()) 
    239253 
    240254      if ((myPid2 = fork()) < 0) std::cout << "Fork Error" << std::endl; 
  • ossiedev/trunk/system/ossie/include/ossie/DCDComponentPlacement.h

    r8743 r8772  
    4242    ~DCDComponentPlacement(); 
    4343 
    44     const char* getDMDFile(); 
     44    const char* getDMDFile(); // ?? Where do you get this in ComponentPlacement ?? 
    4545    const char* getDeployOnDeviceID(); 
    4646    const char* getCompositePartOfDeviceID(); 
  • ossiedev/trunk/system/ossie/parser/DCDComponentPlacement.cpp

    r8759 r8772  
    3232 
    3333// the ifDeployOn initialization has been set from FALSE to true 
    34 DCDComponentPlacement::DCDComponentPlacement(TiXmlElement *elem) : ComponentPlacement(elem), ifDeployOn(/*true*/false), ifCompositePartOf(false), ifDomainManager(false) 
     34DCDComponentPlacement::DCDComponentPlacement(TiXmlElement *elem) : ComponentPlacement(elem), ifDeployOn(false), ifCompositePartOf(false), ifDomainManager(false) 
    3535{ 
    3636    DEBUG(4, DCDComponentPlacement, "In constructor."); 
    37 //    DEBUG(4, DCDComponentPlacement, "WARNING: ifDeployOn is initalized to TRUE"); 
    3837 
    3938    parseDeployOnDevice(elem); 
     
    5958 
    6059    if(deploy) { 
     60        ifDeployOn = true; 
    6161        deployOnDeviceID = deploy->Attribute("refid"); 
     62    } else { 
     63        DEBUG(4, DCDComponentPlacement, "deployondevice NOT found") 
    6264    } 
    6365} 
     
    7173 
    7274    if (composite) { 
     75        ifCompositePartOf = true; 
    7376        compositePartOfDeviceID = composite->Attribute("refid"); 
    7477    }