Revision 12, 1.0 KB
(checked in by jgaeddert, 16 years ago)
|
initial import of cactus files
|
Rev | Line | |
---|
[12] | 1 | // |
---|
| 2 | // Cognitive radio simulator |
---|
| 3 | // |
---|
| 4 | |
---|
| 5 | #ifndef __COGNITIVE_RADIO_TEST_H__ |
---|
| 6 | #define __COGNITIVE_RADIO_TEST_H__ |
---|
| 7 | |
---|
| 8 | #include <stdio.h> |
---|
| 9 | #include <stdlib.h> |
---|
| 10 | #include <math.h> |
---|
| 11 | #include <sigprocc/sigprocc.h> |
---|
| 12 | |
---|
| 13 | typedef struct metadata_t * metadata; |
---|
| 14 | |
---|
| 15 | // transmitter thread |
---|
| 16 | void execute_tx( |
---|
| 17 | metadata _md, |
---|
| 18 | char *_msg_in, |
---|
| 19 | unsigned int _msg_len, |
---|
| 20 | float * _I, |
---|
| 21 | float *_Q, |
---|
| 22 | unsigned int *_sym_len); |
---|
| 23 | |
---|
| 24 | // channel thread |
---|
| 25 | void execute_channel(metadata _md, float _std, float * _I, float *_Q, unsigned int _len); |
---|
| 26 | |
---|
| 27 | // receiver thread |
---|
| 28 | void execute_rx( |
---|
| 29 | metadata _md, |
---|
| 30 | float * _I, |
---|
| 31 | float *_Q, |
---|
| 32 | unsigned int _sym_len, |
---|
| 33 | char *_msg_out, |
---|
| 34 | unsigned int *_msg_len); |
---|
| 35 | |
---|
| 36 | // count bit errors |
---|
| 37 | unsigned int count_errors(char * _msg_in, char * _msg_out, unsigned int _num_bits); |
---|
| 38 | |
---|
| 39 | struct metadata_t { |
---|
| 40 | modulation_scheme mod_scheme; |
---|
| 41 | unsigned int mod_bps; |
---|
| 42 | float tx_power_dBW; |
---|
| 43 | //unsigned int packet_size; |
---|
| 44 | float symbol_rate; |
---|
| 45 | }; |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | #endif // __COGNITIVE_RADIO_TEST_H__ |
---|