diff --git a/grc/receiver/gsm_input.xml b/grc/receiver/gsm_input.xml
index 8ecf696c..52445daa 100644
--- a/grc/receiver/gsm_input.xml
+++ b/grc/receiver/gsm_input.xml
@@ -47,7 +47,7 @@
1
- ppm_in
+ ctrl_in
message
True
diff --git a/hier_blocks/receiver/gsm_input.grc b/hier_blocks/receiver/gsm_input.grc
index 685f0b2f..300dff5e 100644
--- a/hier_blocks/receiver/gsm_input.grc
+++ b/hier_blocks/receiver/gsm_input.grc
@@ -1,41 +1,69 @@
-
-
+
+
Thu Nov 6 14:41:06 2014
options
- id
- gsm_input
+ author
+ Piotr Krysik
- _enabled
- True
+ window_size
+ 1280, 1024
- title
- GSM input adaptor
+ category
+
- author
- Piotr Krysik
+ comment
+
description
Adaptor of input stream for the GSM receiver. Contains frequency ofset corrector doing also resampling to integer multiplies of GSM sample rate and LP filter filtering GSM channel.
- window_size
- 1280, 1024
+ _enabled
+ True
+
+
+ _coordinate
+ (10, 10)
+
+
+ _rotation
+ 0
generate_options
hb
- category
+ hier_block_src_path
+ .:
+
+
+ id
+ gsm_input
+
+
+ max_nouts
+ 0
+
+
+ qt_qss_theme
+
+
+
+ realtime_scheduling
+
+ run_command
+ {python} -u {filename}
+
run_options
prompt
@@ -45,214 +73,254 @@
True
- max_nouts
- 0
+ thread_safe_setters
+
- realtime_scheduling
-
+ title
+ GSM input adaptor
+
+
+ variable
- alias
+ comment
+
+ _enabled
+ True
+
_coordinate
- (10, 10)
+ (632, 19)
_rotation
0
-
-
- variable
id
samp_rate_out
-
- _enabled
- True
-
value
1625000.0/6.0*osr
+
+
+ pad_source
- alias
+ comment
+
+ _enabled
+ True
+
_coordinate
- (632, 19)
+ (56, 188)
_rotation
0
-
-
- parameter
id
- ppm
+ ctrl_in
- _enabled
- True
+ label
+ ctrl_in
- label
- ppm
+ num_streams
+ 1
- value
- 0
+ optional
+ True
type
- eng_float
+ message
- short_id
-
+ vlen
+ 1
+
+
+ parameter
alias
+
+ comment
+
+
+
+ _enabled
+ True
+
_coordinate
- (453, 22)
+ (231, 22)
_rotation
0
-
-
- parameter
id
- osr
+ fc
- _enabled
- True
+ label
+ fc
- label
- OSR
+ short_id
+
+
+
+ type
+ eng_float
value
- 4
+ 940e6
+
+
+ fractional_resampler_xx
- type
- intx
+ alias
+
- short_id
+ comment
- alias
+ affinity
+
+ _enabled
+ True
+
_coordinate
- (541, 23)
+ (488, 217)
_rotation
0
-
-
- parameter
id
- fc
+ fractional_resampler_xx_0
- _enabled
- True
+ maxoutbuf
+ 0
- label
- fc
+ minoutbuf
+ 0
- value
- 940e6
+ phase_shift
+ 0
+
+
+ resamp_ratio
+ samp_rate_in/samp_rate_out
type
- eng_float
+ complex
+
+
+ gsm_clock_offset_corrector_tagged
- short_id
+ alias
- alias
+ comment
+
+ affinity
+
+
+
+ _enabled
+ True
+
_coordinate
- (231, 22)
+ (224, 198)
_rotation
0
-
-
- parameter
id
- samp_rate_in
+ gsm_clock_offset_corrector_tagged_0
- _enabled
- True
+ maxoutbuf
+ 0
- label
- samp_rate_in
+ minoutbuf
+ 0
- value
- 1e6
+ fc
+ fc
- type
- eng_float
+ ppm
+ ppm
- short_id
-
+ samp_rate_in
+ samp_rate_in
+
+
+
+ low_pass_filter
+
+ beta
+ 6.76
alias
- _coordinate
- (328, 22)
+ comment
+
- _rotation
- 0
+ affinity
+
-
-
- low_pass_filter
- id
- low_pass_filter_0_0
+ cutoff_freq
+ 125e3
+
+
+ decim
+ 1
_enabled
@@ -263,24 +331,36 @@
fir_filter_ccf
- decim
+ _coordinate
+ (712, 186)
+
+
+ _rotation
+ 0
+
+
+ gain
1
+
+ id
+ low_pass_filter_0_0
+
interp
1
- gain
- 1
+ maxoutbuf
+ 0
- samp_rate
- samp_rate_out
+ minoutbuf
+ 0
- cutoff_freq
- 125e3
+ samp_rate
+ samp_rate_out
width
@@ -290,143 +370,119 @@
win
firdes.WIN_HAMMING
-
- beta
- 6.76
-
+
+
+ parameter
alias
- affinity
+ comment
- minoutbuf
- 0
-
-
- maxoutbuf
- 0
+ _enabled
+ True
_coordinate
- (704, 179)
+ (541, 23)
_rotation
0
-
-
- pad_sink
id
- pad_sink_0
+ osr
- _enabled
- True
+ label
+ OSR
- label
- out
+ short_id
+
type
- complex
+ intx
- vlen
- 1
+ value
+ 4
+
+
+ pad_sink
- num_streams
- 1
+ comment
+
- optional
- False
+ _enabled
+ True
_coordinate
- (904, 227)
+ (904, 228)
_rotation
0
-
-
- fractional_resampler_xx
id
- fractional_resampler_xx_0
-
-
- _enabled
- True
+ pad_sink_0
type
complex
- phase_shift
- 0
+ label
+ out
- resamp_ratio
- samp_rate_in/samp_rate_out
+ num_streams
+ 1
- alias
-
+ optional
+ False
- affinity
-
+ vlen
+ 1
+
+
+ pad_source
- minoutbuf
- 0
+ comment
+
- maxoutbuf
- 0
+ _enabled
+ True
_coordinate
- (488, 216)
+ (56, 236)
_rotation
0
-
-
- pad_source
id
pad_source_0
-
- _enabled
- True
-
label
in
-
- type
- complex
-
-
- vlen
- 1
-
num_streams
1
@@ -436,105 +492,105 @@
False
- _coordinate
- (56, 179)
+ type
+ complex
- _rotation
- 0
+ vlen
+ 1
- pad_source
+ parameter
- id
- ppm_in
+ alias
+
+
+
+ comment
+
_enabled
True
- label
- ppm_in
+ _coordinate
+ (453, 22)
- type
- message
+ _rotation
+ 0
- vlen
- 1
+ id
+ ppm
- num_streams
- 1
+ label
+ ppm
- optional
- True
+ short_id
+
- _coordinate
- (56, 243)
+ type
+ eng_float
- _rotation
+ value
0
- gsm_clock_offset_corrector
+ parameter
- id
- gsm_clock_offset_corrector_0
+ alias
+
+
+
+ comment
+
_enabled
True
- fc
- fc
+ _coordinate
+ (328, 22)
- ppm
- ppm
+ _rotation
+ 0
- samp_rate_in
+ id
samp_rate_in
- alias
-
+ label
+ samp_rate_in
- affinity
+ short_id
- minoutbuf
- 0
-
-
- maxoutbuf
- 0
-
-
- _coordinate
- (280, 195)
+ type
+ eng_float
- _rotation
- 0
+ value
+ 1e6
- low_pass_filter_0_0
- pad_sink_0
- 0
- 0
+ ctrl_in
+ gsm_clock_offset_corrector_tagged_0
+ out
+ ctrl
fractional_resampler_xx_0
@@ -543,21 +599,21 @@
0
- gsm_clock_offset_corrector_0
+ gsm_clock_offset_corrector_tagged_0
fractional_resampler_xx_0
0
0
- pad_source_0
- gsm_clock_offset_corrector_0
+ low_pass_filter_0_0
+ pad_sink_0
0
0
- ppm_in
- gsm_clock_offset_corrector_0
+ pad_source_0
+ gsm_clock_offset_corrector_tagged_0
0
- ppm_in
+ 0
diff --git a/python/receiver/gsm_input.py b/python/receiver/gsm_input.py
index 97ab633a..b18a6316 100644
--- a/python/receiver/gsm_input.py
+++ b/python/receiver/gsm_input.py
@@ -38,11 +38,11 @@ def __init__(self, ppm=0, osr=4, fc=940e6, samp_rate_in=1e6):
##################################################
# Blocks
##################################################
- self.message_port_register_hier_in("ppm_in")
+ self.message_port_register_hier_in("ctrl_in")
self.low_pass_filter_0_0 = filter.fir_filter_ccf(1, firdes.low_pass(
1, samp_rate_out, 125e3, 5e3, firdes.WIN_HAMMING, 6.76))
- self.gsm_clock_offset_corrector_0 = grgsm.clock_offset_corrector(
+ self.gsm_clock_offset_corrector_tagged_0 = grgsm.clock_offset_corrector_tagged(
fc=fc,
ppm=ppm,
samp_rate_in=samp_rate_in,
@@ -54,21 +54,17 @@ def __init__(self, ppm=0, osr=4, fc=940e6, samp_rate_in=1e6):
##################################################
self.connect((self.low_pass_filter_0_0, 0), (self, 0))
self.connect((self.fractional_resampler_xx_0, 0), (self.low_pass_filter_0_0, 0))
- self.connect((self.gsm_clock_offset_corrector_0, 0), (self.fractional_resampler_xx_0, 0))
- self.connect((self, 0), (self.gsm_clock_offset_corrector_0, 0))
+ self.connect((self.gsm_clock_offset_corrector_tagged_0, 0), (self.fractional_resampler_xx_0, 0))
+ self.connect((self, 0), (self.gsm_clock_offset_corrector_tagged_0, 0))
##################################################
# Asynch Message Connections
##################################################
- self.msg_connect(self, "ppm_in", self.gsm_clock_offset_corrector_0, "ppm_in")
+ self.msg_connect((self, 'ctrl_in'), (self.gsm_clock_offset_corrector_tagged_0, 'ctrl'))
-
- def get_ppm(self):
- return self.ppm
-
- def set_ppm(self, ppm):
- self.ppm = ppm
- self.gsm_clock_offset_corrector_0.set_ppm(self.ppm)
+ def set_fc(self, fc):
+ self.fc = fc
+ self.gsm_clock_offset_corrector_tagged_0.set_fc(self.fc)
def get_osr(self):
return self.osr
@@ -77,26 +73,25 @@ def set_osr(self, osr):
self.osr = osr
self.set_samp_rate_out(1625000.0/6.0*self.osr)
- def get_fc(self):
- return self.fc
+ def get_ppm(self):
+ return self.ppm
- def set_fc(self, fc):
- self.fc = fc
- self.gsm_clock_offset_corrector_0.set_fc(self.fc)
+ def set_ppm(self, ppm):
+ self.ppm = ppm
+ self.gsm_clock_offset_corrector_tagged_0.set_ppm(self.ppm)
def get_samp_rate_in(self):
return self.samp_rate_in
def set_samp_rate_in(self, samp_rate_in):
self.samp_rate_in = samp_rate_in
+ self.gsm_clock_offset_corrector_tagged_0.set_samp_rate_in(self.samp_rate_in)
self.fractional_resampler_xx_0.set_resamp_ratio(self.samp_rate_in/self.samp_rate_out)
- self.gsm_clock_offset_corrector_0.set_samp_rate_in(self.samp_rate_in)
def get_samp_rate_out(self):
return self.samp_rate_out
def set_samp_rate_out(self, samp_rate_out):
self.samp_rate_out = samp_rate_out
- self.low_pass_filter_0_0.set_taps(firdes.low_pass(1, self.samp_rate_out, 125e3, 5e3, firdes.WIN_HAMMING, 6.76))
self.fractional_resampler_xx_0.set_resamp_ratio(self.samp_rate_in/self.samp_rate_out)
-
+ self.low_pass_filter_0_0.set_taps(firdes.low_pass(1, self.samp_rate_out, 125e3, 5e3, firdes.WIN_HAMMING, 6.76))