Revision 16, 0.6 KB
(checked in by ahe, 16 years ago)
|
adding sqlite3 source (sorry such a huge file), cbr test
|
Line | |
---|
1 | // |
---|
2 | // |
---|
3 | // |
---|
4 | |
---|
5 | #include <stdio.h> |
---|
6 | #include "cbr.h" |
---|
7 | |
---|
8 | int main() { |
---|
9 | unsigned int num_cols = 7; |
---|
10 | char * cols[] = { |
---|
11 | "BER", "throughput", |
---|
12 | "mod_scheme", "tx_power", |
---|
13 | "noise_power", "path_loss", |
---|
14 | "utility" |
---|
15 | }; |
---|
16 | float vals[num_cols]; |
---|
17 | unsigned int i; |
---|
18 | for (i=0; i<num_cols; i++) |
---|
19 | vals[i] = 0.0f; |
---|
20 | int rc; |
---|
21 | |
---|
22 | cbr mycbr = cbr_create("ex1", "data", cols, num_cols); |
---|
23 | |
---|
24 | // add row here |
---|
25 | rc = cbr_add_row(mycbr, cols, vals, num_cols); |
---|
26 | |
---|
27 | // print |
---|
28 | cbr_print(mycbr); |
---|
29 | |
---|
30 | // clean up |
---|
31 | cbr_free(mycbr); |
---|
32 | |
---|
33 | printf("done.\n"); |
---|
34 | return 0; |
---|
35 | } |
---|
36 | |
---|