diff options
Diffstat (limited to 'gsm-tvoid/src/lib')
-rwxr-xr-x | gsm-tvoid/src/lib/gsm.i | 2 | ||||
-rwxr-xr-x | gsm-tvoid/src/lib/gsm_burst.cc | 43 | ||||
-rwxr-xr-x | gsm-tvoid/src/lib/gsm_burst.h | 13 | ||||
-rwxr-xr-x | gsm-tvoid/src/lib/gsm_burst_cf.cc | 3 | ||||
-rwxr-xr-x | gsm-tvoid/src/lib/gsm_burst_ff.cc | 5 |
5 files changed, 28 insertions, 38 deletions
diff --git a/gsm-tvoid/src/lib/gsm.i b/gsm-tvoid/src/lib/gsm.i index 76eb189..9d653ac 100755 --- a/gsm-tvoid/src/lib/gsm.i +++ b/gsm-tvoid/src/lib/gsm.i @@ -31,6 +31,8 @@ #define PRINT_DUMMY 0x00000100 #define PRINT_NORMAL 0x00000200 +#define PRINT_GSM_DECODE 0x00000400 + #define PRINT_HEX 0x00001000 //Timing/clock options diff --git a/gsm-tvoid/src/lib/gsm_burst.cc b/gsm-tvoid/src/lib/gsm_burst.cc index 162e12b..4203f26 100755 --- a/gsm-tvoid/src/lib/gsm_burst.cc +++ b/gsm-tvoid/src/lib/gsm_burst.cc @@ -14,21 +14,16 @@ gsm_burst::gsm_burst (gr_feval_ll *t) : + p_tuner(t), d_clock_options(DEFAULT_CLK_OPTS), d_print_options(0), d_equalizer_type(EQ_FIXED_DFE) { - fprintf(stderr,"gsm_burst: enter constructor (t=%8.8x)\n",(unsigned int)t); +// fprintf(stderr,"gsm_burst: enter constructor (t=%8.8x)\n",(unsigned int)t); // M_PI = M_PI; //4.0 * atan(1.0); - //p_stat_func = 0; - //stat_func_data = 0; - - //p_callback = 0; - p_tuner = t; - full_reset(); //encode sync bits @@ -228,22 +223,26 @@ void gsm_burst::print_burst(void) fprintf(stderr," "); } - /* - * Pass information to GSM stack. GSM stack will try to extract - * information (fn, layer 2 messages, ...) - */ - - char buf[156]; - /* In hardbits include the 3 trial bits */ - /* FIXME: access burst has 8 trail bits? what is d_burst_start - * set to? make sure we start at the right position here. - */ - soft2hardbit(buf, d_burst_buffer + d_burst_start - 3, 156); - /* GS_process will differentially decode the data and then - * extract SCH infos (and later bcch infos). - */ - GS_process(&d_gs_ctx, d_ts, d_burst_type, buf); + if ( PRINT_GSM_DECODE == d_print_options ) { + + /* + * Pass information to GSM stack. GSM stack will try to extract + * information (fn, layer 2 messages, ...) + */ + + char buf[156]; + /* In hardbits include the 3 trial bits */ + /* FIXME: access burst has 8 trail bits? what is d_burst_start + * set to? make sure we start at the right position here. + */ + soft2hardbit(buf, d_burst_buffer + d_burst_start - 3, 156); + /* GS_process will differentially decode the data and then + * extract SCH infos (and later bcch infos). + */ + GS_process(&d_gs_ctx, d_ts, d_burst_type, buf); + } + if (print) { fprintf(stderr,"%d/%d/%+d/%lu/%lu ", diff --git a/gsm-tvoid/src/lib/gsm_burst.h b/gsm-tvoid/src/lib/gsm_burst.h index 080899a..f1fb26e 100755 --- a/gsm-tvoid/src/lib/gsm_burst.h +++ b/gsm-tvoid/src/lib/gsm_burst.h @@ -29,6 +29,8 @@ #define PRINT_DUMMY 0x00000100 #define PRINT_NORMAL 0x00000200 +#define PRINT_GSM_DECODE 0x00000400 + #define PRINT_HEX 0x00001000 //Timing/clock options @@ -144,17 +146,6 @@ protected: public: ~gsm_burst (); - //Set status callback function, needed for quick tune() - //void py_set_status_callback(PyObject *pyfunc); - //void set_status_callback(PSTAT_FUNC func, void *clientdata); - - //void set_tuner_callback(gr_feval_ll *t); - - //use swig directors to privide a python override - //virtual void notify_status(int status); - - //void set_tuner_callback(gsm_tuner_callback *f); - ////// General Stats //TODO: Maybe there should be a burst_stats class? long d_sync_loss_count; diff --git a/gsm-tvoid/src/lib/gsm_burst_cf.cc b/gsm-tvoid/src/lib/gsm_burst_cf.cc index 45b8e3a..08ff7ba 100755 --- a/gsm-tvoid/src/lib/gsm_burst_cf.cc +++ b/gsm-tvoid/src/lib/gsm_burst_cf.cc @@ -20,16 +20,15 @@ static const int MIN_OUT = 1; // minimum number of output streams static const int MAX_OUT = 1; // maximum number of output streams gsm_burst_cf::gsm_burst_cf (gr_feval_ll *t, float sample_rate) : + gsm_burst(t), gr_block ( "burst_cf", gr_make_io_signature (MIN_IN, MAX_IN, sizeof (gr_complex)), gr_make_io_signature (MIN_OUT, MAX_OUT, USEFUL_BITS * sizeof (float))), - gsm_burst(t), d_clock_counter(0.0), d_last_sample(0.0,0.0), d_interp(new gri_mmse_fir_interpolator_cc()) { - printf("gsm_burst_cf: enter constructor\n"); //clocking parameters d_sample_interval = 1.0 / sample_rate; diff --git a/gsm-tvoid/src/lib/gsm_burst_ff.cc b/gsm-tvoid/src/lib/gsm_burst_ff.cc index 57f104a..d73e73d 100755 --- a/gsm-tvoid/src/lib/gsm_burst_ff.cc +++ b/gsm-tvoid/src/lib/gsm_burst_ff.cc @@ -20,12 +20,11 @@ static const int MIN_OUT = 1; // minimum number of output streams static const int MAX_OUT = 1; // maximum number of output streams gsm_burst_ff::gsm_burst_ff (gr_feval_ll *t) : + gsm_burst(t), gr_block( "burst_ff", gr_make_io_signature (MIN_IN, MAX_IN, sizeof (float)), - gr_make_io_signature (MIN_OUT, MAX_OUT, USEFUL_BITS * sizeof (float))), - gsm_burst(t) + gr_make_io_signature (MIN_OUT, MAX_OUT, USEFUL_BITS * sizeof (float))) { - printf("gsm_burst_ff: enter constructor\n"); set_history(1); |