Changeset 85 for vtcross

Show
Ignore:
Timestamp:
11/25/08 11:25:13 (16 years ago)
Author:
trnewman
Message:

Filled out UpdateCEExp a bit

Location:
vtcross/branches/trnewman/CR_shell
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • vtcross/branches/trnewman/CR_shell/example.ce.xml

    r56 r85  
    88    <!-- utilities : QoS metrics --> 
    99    <utilities> 
    10         <utility name="throughput" units="kbps" goal="max" target="125" /> 
     10        <utility name="throughput" units="kbps" goal="max" target="125000" /> 
    1111        <utility name="spectral_efficiency" units="b/s/Hz" goal="max" /> 
    1212        <utility name="log10_ber" units="none" goal="min" target="-3" /> 
  • vtcross/branches/trnewman/CR_shell/src/main_cognitive_radio.cpp

    r82 r85  
    238238        int n; 
    239239 
    240         message.append("\0000");         
     240        message.append("\0");    
    241241        // Write message back to client 
    242242        n = write(socketfd,message.c_str(),(message.size()+1)); 
     
    245245        if(n == 0) 
    246246                printf("Client closed the socket.\n"); 
    247          
     247 
     248        printf("SendMessage:%s %d\n",message.c_str(),n);         
    248249        return n; 
    249250} 
     
    333334} 
    334335 
    335 void LoadCEExperience(){ 
    336  
    337 } 
    338  
    339 void UpdateCEExperience() { 
     336void UpdateCEExperience(float * exp[]) { 
    340337 
    341338} 
     
    396393        Parameter * pList[], Observable * oList[],  
    397394        CE_Info * ce_info) { 
    398  
    399         // Set fake past environment -   
    400         LoadCEExperience(); 
    401          
     395         
     396        float **past_exp; 
     397 
    402398        // Set fake current environment params = current environment 
    403399        //RequestCEOptimization(); 
     
    409405 
    410406        // Send back fake utility values 
    411         UpdateCEExperience();    
     407        UpdateCEExperience(past_exp);    
    412408} 
    413409 
    414410void StartMessaging(int socketfd, Utility * uList[], Parameter * pList[], Observable * oList[], CE_Info * ce_info) { 
    415411 
     412        float **past_exp; 
     413 
    416414        LoadCEConfiguration(socketfd, uList, pList, oList, ce_info); 
     415         
     416        UpdateCEExperience(past_exp);    
    417417 
    418418        RunSimulator(socketfd, uList, pList, oList, ce_info);