Changeset 28 for vtcross/trunk/src/main_cbr.c
- Timestamp:
- 11/13/08 15:40:16 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/main_cbr.c
r25 r28 7 7 8 8 int main() { 9 unsigned int num_cols = 7; 10 char * cols[] = { 9 unsigned int num_cols = 7; 10 unsigned int i; 11 12 ezxml_t f1 = ezxml_parse_file("another.xml"), engine, column; 13 char * cols[num_cols]; 14 15 for (engine = ezxml_child(f1, "engine"); engine; engine = engine->next){ 16 i = 0; 17 for (column = ezxml_child(engine, "column"); column; column = column->next){ 18 cols[i] = ezxml_child(column, "name")->txt; 19 i++; 20 } 21 } 22 23 24 free(f1); 25 26 /* char * cols[] = { 11 27 "BER", "throughput", 12 28 "mod_scheme", "tx_power", 13 29 "noise_power", "path_loss", 14 30 "utility" 15 }; 31 };*/ 32 33 for (i = 0; i<num_cols; i++){ 34 printf(" %s",cols[i]); 35 } 36 printf("\n"); 37 16 38 float vals[num_cols]; 17 39 vals[0] = 1e-3f; // BER … … 40 62 float retvals[num_cols]; 41 63 rc = cbr_search(mycbr, search_names, search_ops, search_vals, 2, retvals); 42 if (rc)43 printf("solution found!\n");44 else45 printf("warning! no solution found\n");46 64 47 65 // clean up