Changeset 85 for vtcross/branches/trnewman/CR_shell
- Timestamp:
- 11/25/08 11:25:13 (16 years ago)
- Location:
- vtcross/branches/trnewman/CR_shell
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/branches/trnewman/CR_shell/example.ce.xml
r56 r85 8 8 <!-- utilities : QoS metrics --> 9 9 <utilities> 10 <utility name="throughput" units="kbps" goal="max" target="125 " />10 <utility name="throughput" units="kbps" goal="max" target="125000" /> 11 11 <utility name="spectral_efficiency" units="b/s/Hz" goal="max" /> 12 12 <utility name="log10_ber" units="none" goal="min" target="-3" /> -
vtcross/branches/trnewman/CR_shell/src/main_cognitive_radio.cpp
r82 r85 238 238 int n; 239 239 240 message.append("\0 000");240 message.append("\0"); 241 241 // Write message back to client 242 242 n = write(socketfd,message.c_str(),(message.size()+1)); … … 245 245 if(n == 0) 246 246 printf("Client closed the socket.\n"); 247 247 248 printf("SendMessage:%s %d\n",message.c_str(),n); 248 249 return n; 249 250 } … … 333 334 } 334 335 335 void LoadCEExperience(){ 336 337 } 338 339 void UpdateCEExperience() { 336 void UpdateCEExperience(float * exp[]) { 340 337 341 338 } … … 396 393 Parameter * pList[], Observable * oList[], 397 394 CE_Info * ce_info) { 398 399 // Set fake past environment - 400 LoadCEExperience(); 401 395 396 float **past_exp; 397 402 398 // Set fake current environment params = current environment 403 399 //RequestCEOptimization(); … … 409 405 410 406 // Send back fake utility values 411 UpdateCEExperience( );407 UpdateCEExperience(past_exp); 412 408 } 413 409 414 410 void StartMessaging(int socketfd, Utility * uList[], Parameter * pList[], Observable * oList[], CE_Info * ce_info) { 415 411 412 float **past_exp; 413 416 414 LoadCEConfiguration(socketfd, uList, pList, oList, ce_info); 415 416 UpdateCEExperience(past_exp); 417 417 418 418 RunSimulator(socketfd, uList, pList, oList, ce_info);