From 5707c2b01ef772a6cba95b305b3fff616f62f12b Mon Sep 17 00:00:00 2001 From: Steve Glass Date: Sun, 28 Feb 2016 10:28:14 +1000 Subject: [PATCH] Make band user-selectable in gsm_wideband_input --- grc/receiver/gsm_wideband_input.xml | 41 +++++++++++++++++++++++++++ python/receiver/gsm_wideband_input.py | 4 +-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/grc/receiver/gsm_wideband_input.xml b/grc/receiver/gsm_wideband_input.xml index f2f9520..f05c4b6 100644 --- a/grc/receiver/gsm_wideband_input.xml +++ b/grc/receiver/gsm_wideband_input.xml @@ -9,6 +9,7 @@ fc=$fc, samp_rate_in=$samp_rate_in, ca=$cell_allocation, + band=$band, ) set_ppm($ppm) set_osr($osr) @@ -35,6 +36,45 @@ float part + + Band + band + E-GSM + string + part + + + + + + + + + Cell allocation cell_allocation @@ -57,6 +97,7 @@ part $num_streams >= 0 + $cell_allocation and all(grgsm.arfcn.is_valid_arfcn(c, $band) for c in $cell_allocation) in complex diff --git a/python/receiver/gsm_wideband_input.py b/python/receiver/gsm_wideband_input.py index 5898e3d..bff7cb7 100644 --- a/python/receiver/gsm_wideband_input.py +++ b/python/receiver/gsm_wideband_input.py @@ -15,7 +15,7 @@ import grgsm.arfcn as arfcn import grgsm class gsm_wideband_input(grgsm.hier_block): - def __init__(self, ppm=0, osr=4, fc=925.2e6, samp_rate_in=20e6, ca=[]): + def __init__(self, ppm=0, osr=4, fc=925.2e6, samp_rate_in=20e6, ca=[], band='P-GSM'): self.num_streams = len(ca) grgsm.hier_block.__init__( self, "GSM wideband input adaptor", @@ -34,7 +34,7 @@ class gsm_wideband_input(grgsm.hier_block): self.blocks_fir_filters = {} self.blocks_resamplers = {} self.blocks_ocs = {} - self.band = band = 'E-GSM' # TODO make selectable + self.band = band ################################################## # Variables