summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorPiotr Krysik <perper@o2.pl>2009-06-22 17:22:07 +0200
committerPiotr Krysik <perper@o2.pl>2009-06-22 17:22:07 +0200
commit9b2c992cf1055afb35780e1eba799243d8be2dae (patch)
tree23ca9813402de8ae394f7c110717972e0f3f6e95 /src/lib
parentb14ed29e21ed7fc8be9a5b7ba779877df7331bf1 (diff)
added first step towards correction of USRP's clock offset
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/gsm.i4
-rw-r--r--src/lib/gsm_receiver_cf.cc6
-rw-r--r--src/lib/gsm_receiver_cf.h9
3 files changed, 9 insertions, 10 deletions
diff --git a/src/lib/gsm.i b/src/lib/gsm.i
index 8c4d79a..b5a33f2 100644
--- a/src/lib/gsm.i
+++ b/src/lib/gsm.i
@@ -38,12 +38,12 @@
GR_SWIG_BLOCK_MAGIC(gsm,receiver_cf);
-gsm_receiver_cf_sptr gsm_make_receiver_cf ( gr_feval_dd *tuner, int osr);
+gsm_receiver_cf_sptr gsm_make_receiver_cf ( gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr);
class gsm_receiver_cf : public gr_block
{
private:
- gsm_receiver_cf ( gr_feval_dd *tuner, int osr);
+ gsm_receiver_cf ( gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr);
};
// ----------------------------------------------------------------
diff --git a/src/lib/gsm_receiver_cf.cc b/src/lib/gsm_receiver_cf.cc
index c9ef010..e314381 100644
--- a/src/lib/gsm_receiver_cf.cc
+++ b/src/lib/gsm_receiver_cf.cc
@@ -72,9 +72,9 @@ typedef std::vector<float> vector_float;
typedef boost::circular_buffer<float> circular_buffer_float;
gsm_receiver_cf_sptr
-gsm_make_receiver_cf(gr_feval_dd *tuner, int osr)
+gsm_make_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr)
{
- return gsm_receiver_cf_sptr(new gsm_receiver_cf(tuner, osr));
+ return gsm_receiver_cf_sptr(new gsm_receiver_cf(tuner, synchronizer, osr));
}
static const int MIN_IN = 1; // mininum number of input streams
@@ -85,7 +85,7 @@ static const int MAX_OUT = 1; // maximum number of output streams
/*
* The private constructor
*/
-gsm_receiver_cf::gsm_receiver_cf(gr_feval_dd *tuner, int osr)
+gsm_receiver_cf::gsm_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr)
: gr_block("gsm_receiver",
gr_make_io_signature(MIN_IN, MAX_IN, sizeof(gr_complex)),
gr_make_io_signature(MIN_OUT, MAX_OUT, 142 * sizeof(float))),
diff --git a/src/lib/gsm_receiver_cf.h b/src/lib/gsm_receiver_cf.h
index 070f9cf..9454997 100644
--- a/src/lib/gsm_receiver_cf.h
+++ b/src/lib/gsm_receiver_cf.h
@@ -37,7 +37,7 @@ class gsm_receiver_cf;
typedef boost::shared_ptr<gsm_receiver_cf> gsm_receiver_cf_sptr;
typedef std::vector<gr_complex> vector_complex;
-gsm_receiver_cf_sptr gsm_make_receiver_cf(gr_feval_dd *tuner, int osr);
+gsm_receiver_cf_sptr gsm_make_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr);
/** GSM Receiver GNU Radio block
*
@@ -61,6 +61,7 @@ class gsm_receiver_cf : public gr_block
gr_complex d_norm_training_seq[TRAIN_SEQ_NUM][N_TRAIN_BITS]; ///<encoded training sequences of a normal bursts and dummy bursts
gr_feval_dd *d_tuner; ///<callback to a python object which is used for frequency tunning
+ gr_feval_dd *d_synchronizer; ///<callback to a python object which is used to correct offset of USRP's internal clock
/** Countes samples consumed by the receiver
*
@@ -103,8 +104,8 @@ class gsm_receiver_cf : public gr_block
// GSM Stack
GS_CTX d_gs_ctx;//TODO: remove it! it'a not right place for a decoder
- friend gsm_receiver_cf_sptr gsm_make_receiver_cf(gr_feval_dd *tuner, int osr);
- gsm_receiver_cf(gr_feval_dd *tuner, int osr);
+ friend gsm_receiver_cf_sptr gsm_make_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr);
+ gsm_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr);
/** Function whis is used to search a FCCH burst and to compute frequency offset before
* "synchronized" state of the receiver
@@ -212,8 +213,6 @@ class gsm_receiver_cf : public gr_block
/**
*
- * @param burst_nr
- * @param burst_binary
*/
void process_normal_burst(burst_counter burst_nr, const unsigned char * burst_binary);
personal git repositories of Harald Welte. Your mileage may vary