Show
Ignore:
Timestamp:
03/22/09 00:38:32 (15 years ago)
Author:
bhilburn
Message:

Moved a shell-specific function back into the shell source file.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/shell/cr_shell.cpp

    r178 r179  
    438438 
    439439        // Act like we are updating the hardware tranmission settings 
    440         UpdateRadioSettings(); 
     440        //UpdateRadioSettings(); 
    441441 
    442442        // Send back fake utility values 
     
    497497 
    498498        RunSimulator(socketfd, uList, pList, oList, ce_info); 
     499} 
     500 
     501 
     502void  
     503HandleTCPClient(int32_t socketFD, Utility* uList[], Parameter* pList[], \ 
     504        Observable* oList[], CE_Info* ce_info)  
     505{ 
     506    char buffer[256]; 
     507 
     508    /* Receive message from client */ 
     509    bzero(buffer, 256); 
     510    ReadMessage(socketFD, buffer); 
     511 
     512    LOG("Cognitive Radio:: Message Received - %s.\n\n", buffer); 
     513 
     514    if(strcmp(buffer,"c_register") == 0)  
     515            InitializeCE(socketFD, uList, pList, oList, ce_info); 
     516 
     517    if(strcmp(buffer,"p_register") == 0) 
     518            InitializePE(socketFD, ce_info); 
     519 
     520    if(strcmp(buffer,"optimize") == 0) 
     521            RunSimulator(socketFD, uList, pList, oList, ce_info); 
     522         
     523    // TODO why aren't we doing this anymore? 
     524    //close(socketfd);    /* Close client socket */ 
    499525} 
    500526