Changeset 208

Show
Ignore:
Timestamp:
03/26/09 12:21:13 (15 years ago)
Author:
bhilburn
Message:

%s/\t/\ \ \ \ /g

Location:
vtcross/trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/include/vtcross/components.h

    r207 r208  
    343343        bool CE_present; 
    344344        
    345         int32_t numberOfCognitiveEngines;  
     345        int32_t numberOfCognitiveEngines;  
    346346        int16_t primaryPort; 
    347347        int16_t policyPort; 
  • vtcross/trunk/src/shell/CognitiveRadioShell.cpp

    r207 r208  
    124124    numberOfCognitiveEngines--; 
    125125    if(numberOfCognitiveEngines == 0) 
    126         CE_present = false; 
     126    CE_present = false; 
    127127 
    128128    SendMessage(socketFD, "deregister_ack"); 
     
    216216        const char *uName = pChild->Attribute("name"); 
    217217        if(uName) 
    218             uList[item_count].name = uName;      
     218            uList[item_count].name = uName;     
    219219 
    220220        const char *uUnits = pChild->Attribute("units"); 
     
    232232    } 
    233233 
    234     radio_info->numUtilities = item_count;       
     234    radio_info->numUtilities = item_count;     
    235235    LOG("Cognitive Radio Shell:: Parsed %d utilities.\n", radioInfo->numUtilities); 
    236236 
     
    245245        if(oName)  
    246246            oList[item_count].name = oName; 
    247                  
     247         
    248248        affect_count = 0; 
    249249        for(pSecondChild = pChild->FirstChildElement("affect"); pSecondChild; \ 
     
    273273            } 
    274274            else 
    275                 match_found = false;     
     275                match_found = false;     
    276276        } 
    277277        oList[item_count].numAffects = affect_count;  
     
    279279    } 
    280280 
    281     radioInfo->numObservables = item_count;      
     281    radioInfo->numObservables = item_count;     
    282282    LOG("Cognitive Radio Shell:: Parsed %d observables.\n", radioInfo->numObservables); 
    283283 
    284284    pElem = hRoot.FirstChild("parameters").Element(); 
    285285    pChild1 = hRoot.Child("parameters", count).Element(); 
    286          
     286     
    287287    item_count = 0; 
    288288    for(pChild = pChild1->FirstChildElement("parameter"); pChild; \ 
     
    291291        const char *pName = pChild->Attribute("name"); 
    292292        if(pName)  
    293             pList[item_count].name = pName;      
     293            pList[item_count].name = pName;     
    294294 
    295295        const char *pUnits = pChild->Attribute("units"); 
     
    305305        if(pChild->QueryFloatAttribute("step", &pList[item_count].step) != TIXML_SUCCESS)  
    306306            pList[item_count].step = -1; 
    307                  
     307         
    308308        affect_count = 0; 
    309309        for(pSecondChild = pChild->FirstChildElement("affect"); pSecondChild; \ 
     
    317317                    if(uList[attribute_count].name == pUtilName)  
    318318                    { 
    319                         pList[item_count].affection_list[affect_count].u = &uList[attribute_count];      
     319                        pList[item_count].affection_list[affect_count].u = &uList[attribute_count];     
    320320 
    321321                        const char *pRelate = pSecondChild->Attribute("relationship"); 
     
    338338            } 
    339339 
    340             match_found = false;         
     340            match_found = false;     
    341341        } 
    342342 
     
    367367 
    368368    if(strcmp(buffer,"register_engine_cognitive") == 0) {  
    369             RegisterCognitiveEngine(socketFD); 
     369        RegisterCognitiveEngine(socketFD); 
    370370    } else if(strcmp(buffer,"deregister_engine_cognitive") == 0) { 
    371             DeregisterCognitiveEngine(socketFD); 
     371        DeregisterCognitiveEngine(socketFD); 
    372372    } else if(strcmp(buffer,"register_engine_policy") == 0) { 
    373             RegisterPolicyEngine(socketFD); 
     373        RegisterPolicyEngine(socketFD); 
    374374    } else if(strcmp(buffer,"deregister_engine_policy") == 0) { 
    375             DeregisterPolicyEngine(socketFD); 
     375        DeregisterPolicyEngine(socketFD); 
    376376    } else if(strcmp(buffer,"register_sml") == 0) { 
    377             RegisterSML(socketFD); 
     377        RegisterSML(socketFD); 
    378378    } else if(strcmp(buffer,"deregister_sml") == 0) { 
    379             DeregisterSML(socketFD); 
     379        DeregisterSML(socketFD); 
    380380    } else if(strcmp(buffer,"optimize") == 0) { 
    381             /* Receive optimization request and current environment */ 
    382             GetOptimalParameters(socketFD);   
     381        /* Receive optimization request and current environment */ 
     382        GetOptimalParameters(socketFD);   
    383383    } 
    384384} 
     
    407407 
    408408    if(InitializeTCPServerPort(servSock[primary]) == -1) { 
    409         ERROR(1,"Error initializing primary port\n"); 
    410         return;  
     409    ERROR(1,"Error initializing primary port\n"); 
     410           return;  
    411411    } 
    412412  
    413413    if(InitializeTCPServerPort(servSock[policy]) == -1) { 
    414         ERROR(1,"Error initializing policy port\n"); 
    415         return;  
     414    ERROR(1,"Error initializing policy port\n"); 
     415           return;  
    416416    } 
    417417 
    418418    if(InitializeTCPServerPort(servSock[command]) == -1) {  
    419         ERROR(1,"Error initializing command port\n"); 
    420         return;  
     419    ERROR(1,"Error initializing command port\n"); 
     420           return;  
    421421    } 
    422422 
     
    446446                if (FD_ISSET(port, &sockSet)) 
    447447                { 
    448                     desc_ready -= 1; 
     448                desc_ready -= 1; 
    449449 
    450450                    /* Check if request is new or on an existing open descriptor */