Show
Ignore:
Timestamp:
10/17/08 17:06:55 (16 years ago)
Author:
ahe
Message:

adding search statement

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/main_cbr.c

    r18 r20  
    1515    }; 
    1616    float vals[num_cols]; 
    17     unsigned int i; 
    18     for (i=0; i<num_cols; i++) 
    19         vals[i] = 0.0f; 
     17    vals[0] = 1e-3f;    // BER 
     18    vals[1] = 10e3f;    // throughput 
     19    vals[2] = 1;        // mod_scheme 
     20    vals[3] = -3.0f;    // tx_power 
     21    vals[4] = -50.0f;   // noise_power 
     22    vals[5] = 125.0f;   // path_loss 
     23    vals[6] = 0.762;    // utility 
    2024    int rc; 
    2125 
     
    2933    cbr_print(mycbr); 
    3034 
     35    // simple search: find entry where... 
     36    //   BER < 1e-2 and path_loss > 100 
     37    char * search_names[] = {"BER", "path_loss"}; 
     38    int search_ops[] = {LT, GT}; 
     39    float search_vals[] = {1e-2f, 100.f}; 
     40    float retvals[num_cols]; 
     41    rc = cbr_search(mycbr, search_names, search_ops, search_vals, 2, retvals); 
     42 
    3143    // clean up 
    3244    cbr_free(mycbr);