#ifndef _STATS_H #define _STATS_H int stat_numbits,stat_output,stat_pattern,stat_tti,stat_printbits,stat_fixoffset; int stnumbits=0; int tti; int pattern,print_bits,fixed_offset; /** undef to disable reading file at init */ #define PAT_FILENAME "data/rfc793.txt" #define PAT_ZEROS 0 #define PAT_ONES 1 #define PAT_FIXED 2 #define PAT_RANDOM 3 #define PAT_FILE 4 struct utils_param params[] = { {"numbits",STAT_TYPE_INT,1,&stnumbits}, /** Bit-pattern options: * 0 zeros * 1 ones * 2 fixed sequence * 3 random * 4 file (defined at PAT_FILENAME) */ {"pattern",STAT_TYPE_INT,1,&pattern}, {"tti",STAT_TYPE_INT,1,&tti}, {"print_bits",STAT_TYPE_INT,1,&print_bits}, {"fixed_offset",STAT_TYPE_INT,1,&fixed_offset}, /** should be same as binsource */ {NULL, 0, 0, 0}}; struct utils_stat stats[] = { {"numbits", STAT_TYPE_INT, 1, &stat_numbits, (void*)&stnumbits, READ}, {"fixed_offset", STAT_TYPE_INT, 1, &stat_fixoffset, (void*)&fixed_offset, READ}, {"print_bits", STAT_TYPE_INT, 1, &stat_printbits, (void*)&print_bits, READ}, {"pattern", STAT_TYPE_INT, 1, &stat_pattern, (void*)&pattern, READ}, {"tti", STAT_TYPE_INT, 1, &stat_tti, (void*)&tti, READ}, {NULL, 0, 0, 0, 0, 0}}; #endif /* _STATS_H */