Changeset 8861

Show
Ignore:
Timestamp:
03/03/09 20:18:28 (4 years ago)
Author:
mcarrick
Message:

AppFactory? checks against implementation details from device to find correct component implementations, this check in only operates on dummy data, however

Location:
ossiedev/trunk/system/ossie
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/trunk/system/ossie/framework/ApplicationFactory_impl.cpp

    r8768 r8861  
    136136        requiredComponents.clear(); 
    137137        } 
    138      
     138    
    139139    getRequiredComponents(base_naming_context.c_str()); 
    140      
     140 
    141141    // If there is a device assignment sequence, verify its validity; 
    142142    // otherwise generate deployment information automatically 
     
    735735        _spd->close(); 
    736736 
     737        // store implementation info from current SPD file 
     738        std::vector <SPDImplementation*> *compImpl = spd.getImplementations(); 
     739 
     740        // ----------------- (DELETE THESE LINES) --------------------- 
     741        // ----------------- ( TEST VECTORS ) ------------------------- 
     742        std::string os = "Linux"; 
     743        std::string proc = "powerpc"; 
     744        std::string version = "2.6.26.3"; 
     745 
     746        // the if () statements will need to be changes once the real 
     747        // variable name is given. 
     748 
     749        // ------------------------------------------------------------ 
     750 
     751        // search compImpl for matching implementation details from device 
     752        // (this checking section will need to be expanded if other 
     753        // options need to be verified: compiler,  
     754 
     755 
     756        // (it is currently assumed in SPDImplementation.h, 
     757        // DeviceManager.cpp, and other places that there is only 
     758        // a single OS. this is incorrect and needs to be fixed.) 
     759 
     760        DEBUG(4, AppFac, "Matching device implementation to candidate components."); 
     761        for (int i = 0; i < compImpl->size(); i++) 
     762        { 
     763            // match OS name 
     764            if ((*compImpl)[i]->getOperatingSystem().getOSName() == os)  
     765            { 
     766                // match OS version 
     767                if ((*compImpl)[i]->getOperatingSystem().getOSVersion() == version) 
     768                { 
     769                    // get list of candidate processors in component impl 
     770                    std::vector <std::string> procs = (*compImpl)[i]->getProcessors(); 
     771 
     772                    // loop through candidate procs, match to device 
     773                    for (int k = 0; k < procs.size(); k++) 
     774                    { 
     775                         // match processor 
     776                        if (procs[k] == proc) 
     777                        { 
     778                           DEBUG(4, AppFac, "Found operating system match: "  
     779                               << (*compImpl)[i]->getOperatingSystem().getOSName() 
     780                               << ", " 
     781                               << (*compImpl)[i]->getOperatingSystem().getOSVersion() ); 
     782 
     783                        
     784                           DEBUG(4, AppFac, "Found processor match: " << procs[k]); 
     785 
     786                           // return path to executable 
     787                           std::string path = (*compImpl)[i]->getCodeFile(); 
     788                           implsToExecute.push_back(path); 
     789                        } 
     790                    } 
     791                } 
     792            } 
     793            else 
     794            { 
     795                DEBUG(4, AppFac, "in getRequiredComponents, could not match component implementation to device."); 
     796            } 
     797        } 
     798 
     799 
     800 
    737801        try 
    738802        { 
  • ossiedev/trunk/system/ossie/include/ossie/ApplicationFactory_impl.h

    r8427 r8861  
    9393    vector <CF::Device_ptr> registeredDevices; 
    9494    vector <ossieSupport::ConnectionInfo *> connectionData; 
    95      
     95 
     96    std::vector <std::string> implsToExecute; 
     97 
    9698    void verifyDeviceAssignments (const CF::DeviceAssignmentSequence & _deviceAssignments); 
    9799    void getRegisteredDevices();