- Timestamp:
- 11/24/08 20:32:52 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/branches/trnewman/CR_shell/src/main_cognitive_radio.cpp
r81 r82 257 257 } 258 258 259 // Update operating settings260 // This function will interact with the hardware "drivers"261 void UpdateRadioSettings() {262 263 }264 259 265 260 void LoadCEConfiguration(int socketfd,Utility * uList[], Parameter * pList[], Observable * oList[], CE_Info * ce_info){ … … 267 262 char counter[55]; 268 263 char var[50]; 269 int total_bytes;264 //int total_bytes; 270 265 271 266 printf("Sending configuration to CE.\n"); … … 350 345 } 351 346 352 void RequestCEOptimization() { 353 354 } 355 356 int UpdateRadioSettings(int sockfd, Utility *uList[], 347 // Update operating settings 348 // This function will interact with the hardware "drivers" 349 void UpdateRadioSettings() { 350 351 } 352 353 int RequestCEOptimization(int sockfd, Utility *uList[], 357 354 Parameter *pList[], Observable *oList[], 358 355 CE_Info *ce_info) … … 363 360 float var; 364 361 365 // utility 366 // numUtilities 362 /*// utility 367 363 for (i = 0; i < ce_info->numUtilities; i++){ 368 364 bzero(buffer,256); … … 372 368 printf("utility %s, value %f\n" 373 369 , uList[i]->name.c_str(), uList[i]->value); 374 } 370 }*/ 375 371 376 372 // paramter 377 // numparameters378 373 for (i = 0; i < ce_info->numParameters; i++){ 379 374 bzero(buffer,256); … … 385 380 } 386 381 387 // observable 388 // numObservables 382 /*// observable 389 383 for (i = 0; i < ce_info->numObservables; i++){ 390 384 bzero(buffer,256); … … 394 388 printf("observable %s, value %f\n" 395 389 , oList[i]->name.c_str(), oList[i]->value); 396 } 390 }*/ 391 397 392 return 1; 398 393 } … … 406 401 407 402 // Set fake current environment params = current environment 408 RequestCEOptimization(); 403 //RequestCEOptimization(); 404 RequestCEOptimization(socketfd, uList, pList, oList, ce_info); 409 405 410 406 // Act like we are updating the hardware tranmission settings 411 UpdateRadioSettings(socketfd, uList, pList, oList, ce_info); 407 //UpdateRadioSettings(socketfd, uList, pList, oList, ce_info); 408 UpdateRadioSettings(); 412 409 413 410 // Send back fake utility values … … 494 491 } else { 495 492 // In parent process - open cognitive engine port. 496 StartShell(3000 2,uList, pList, oList, &ce_info);493 StartShell(30001,uList, pList, oList, &ce_info); 497 494 } 498 495