aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2016-07-17 11:33:50 +0200
committerPiotr Krysik <ptrkrysik@gmail.com>2016-07-17 11:33:50 +0200
commitd1ca389dbfcec29e647aaeb2010081a07ad83997 (patch)
tree0ea92fb55da0389b7680289e1484905d69542560
parent6ed59d0fb7eb83397df95ac215766d3a17ca11f1 (diff)
Corrections to clock offset corrector that uses tags
-rw-r--r--grc/misc_utils/gsm_clock_offset_corrector_tagged.xml2
-rw-r--r--hier_blocks/misc_utils/gsm_clock_offset_corrector_tagged.grc46
-rw-r--r--python/misc_utils/clock_offset_corrector_tagged.py16
3 files changed, 32 insertions, 32 deletions
diff --git a/grc/misc_utils/gsm_clock_offset_corrector_tagged.xml b/grc/misc_utils/gsm_clock_offset_corrector_tagged.xml
index 4f91b4b..25d2132 100644
--- a/grc/misc_utils/gsm_clock_offset_corrector_tagged.xml
+++ b/grc/misc_utils/gsm_clock_offset_corrector_tagged.xml
@@ -1,7 +1,7 @@
<block>
<name>Clock Offset Corrector Tagged</name>
<key>gsm_clock_offset_corrector_tagged</key>
- <import>from clock_offset_corrector_tagged import clock_offset_corrector_tagged # grc-generated hier_block</import>
+ <import>import grgsm</import>
<make>grgsm.clock_offset_corrector_tagged(
fc=$fc,
ppm=$ppm,
diff --git a/hier_blocks/misc_utils/gsm_clock_offset_corrector_tagged.grc b/hier_blocks/misc_utils/gsm_clock_offset_corrector_tagged.grc
index 61d8db7..79c21c0 100644
--- a/hier_blocks/misc_utils/gsm_clock_offset_corrector_tagged.grc
+++ b/hier_blocks/misc_utils/gsm_clock_offset_corrector_tagged.grc
@@ -195,7 +195,7 @@
</param>
</block>
<block>
- <key>grgsm_controlled_fractional_resampler_cc</key>
+ <key>gsm_controlled_fractional_resampler_cc</key>
<param>
<key>alias</key>
<value></value>
@@ -222,7 +222,7 @@
</param>
<param>
<key>id</key>
- <value>grgsm_controlled_fractional_resampler_cc_0</value>
+ <value>gsm_controlled_fractional_resampler_cc_0</value>
</param>
<param>
<key>maxoutbuf</key>
@@ -242,7 +242,7 @@
</param>
</block>
<block>
- <key>grgsm_msg_to_tag</key>
+ <key>gsm_controlled_rotator_cc</key>
<param>
<key>alias</key>
<value></value>
@@ -261,7 +261,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(192, 193)</value>
+ <value>(608, 209)</value>
</param>
<param>
<key>_rotation</key>
@@ -269,7 +269,7 @@
</param>
<param>
<key>id</key>
- <value>grgsm_msg_to_tag_0</value>
+ <value>gsm_controlled_rotator_cc_0</value>
</param>
<param>
<key>maxoutbuf</key>
@@ -279,9 +279,17 @@
<key>minoutbuf</key>
<value>0</value>
</param>
+ <param>
+ <key>phase_inc</key>
+ <value>ppm/1.0e6*2*math.pi*fc/samp_rate_in</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate_out</value>
+ </param>
</block>
<block>
- <key>gsm_controlled_rotator_cc</key>
+ <key>gsm_msg_to_tag</key>
<param>
<key>alias</key>
<value></value>
@@ -300,7 +308,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(608, 209)</value>
+ <value>(192, 193)</value>
</param>
<param>
<key>_rotation</key>
@@ -308,7 +316,7 @@
</param>
<param>
<key>id</key>
- <value>gsm_controlled_rotator_cc_0</value>
+ <value>gsm_msg_to_tag_0</value>
</param>
<param>
<key>maxoutbuf</key>
@@ -318,14 +326,6 @@
<key>minoutbuf</key>
<value>0</value>
</param>
- <param>
- <key>phase_inc</key>
- <value>ppm/1.0e6*2*math.pi*fc/samp_rate_in</value>
- </param>
- <param>
- <key>samp_rate</key>
- <value>samp_rate_out</value>
- </param>
</block>
<block>
<key>import</key>
@@ -575,31 +575,31 @@
</block>
<connection>
<source_block_id>ctrl</source_block_id>
- <sink_block_id>grgsm_msg_to_tag_0</sink_block_id>
+ <sink_block_id>gsm_msg_to_tag_0</sink_block_id>
<source_key>out</source_key>
<sink_key>msg</sink_key>
</connection>
<connection>
- <source_block_id>grgsm_controlled_fractional_resampler_cc_0</source_block_id>
+ <source_block_id>gsm_controlled_fractional_resampler_cc_0</source_block_id>
<sink_block_id>gsm_controlled_rotator_cc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>grgsm_msg_to_tag_0</source_block_id>
- <sink_block_id>grgsm_controlled_fractional_resampler_cc_0</sink_block_id>
+ <source_block_id>gsm_controlled_rotator_cc_0</source_block_id>
+ <sink_block_id>pad_sink_1</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gsm_controlled_rotator_cc_0</source_block_id>
- <sink_block_id>pad_sink_1</sink_block_id>
+ <source_block_id>gsm_msg_to_tag_0</source_block_id>
+ <sink_block_id>gsm_controlled_fractional_resampler_cc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>pad_source_0</source_block_id>
- <sink_block_id>grgsm_msg_to_tag_0</sink_block_id>
+ <sink_block_id>gsm_msg_to_tag_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
diff --git a/python/misc_utils/clock_offset_corrector_tagged.py b/python/misc_utils/clock_offset_corrector_tagged.py
index 5d198b0..4f2045c 100644
--- a/python/misc_utils/clock_offset_corrector_tagged.py
+++ b/python/misc_utils/clock_offset_corrector_tagged.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
-# Title: Clock offset corrector
+# Title: Clock offset corrector tagged
# Author: Piotr Krysik
# Description: Clock offset corrector with blocks that use tags to switch offsets
-# Generated: Fri Jul 15 10:09:22 2016
+# Generated: Sun Jul 17 11:30:51 2016
##################################################
from gnuradio import gr
@@ -38,18 +38,18 @@ class clock_offset_corrector_tagged(grgsm.hier_block):
##################################################
# Blocks
##################################################
+ self.gsm_msg_to_tag_0 = grgsm.msg_to_tag()
self.gsm_controlled_rotator_cc_0 = grgsm.controlled_rotator_cc(ppm/1.0e6*2*math.pi*fc/samp_rate_in,samp_rate_out)
- self.grgsm_msg_to_tag_0 = grgsm.msg_to_tag()
- self.grgsm_controlled_fractional_resampler_cc_0 = grgsm.controlled_fractional_resampler_cc(0, 1.0)
+ self.gsm_controlled_fractional_resampler_cc_0 = grgsm.controlled_fractional_resampler_cc(0, 1.0)
##################################################
# Connections
##################################################
- self.msg_connect((self, 'ctrl'), (self.grgsm_msg_to_tag_0, 'msg'))
- self.connect((self.grgsm_controlled_fractional_resampler_cc_0, 0), (self.gsm_controlled_rotator_cc_0, 0))
- self.connect((self.grgsm_msg_to_tag_0, 0), (self.grgsm_controlled_fractional_resampler_cc_0, 0))
+ self.msg_connect((self, 'ctrl'), (self.gsm_msg_to_tag_0, 'msg'))
+ self.connect((self.gsm_controlled_fractional_resampler_cc_0, 0), (self.gsm_controlled_rotator_cc_0, 0))
self.connect((self.gsm_controlled_rotator_cc_0, 0), (self, 0))
- self.connect((self, 0), (self.grgsm_msg_to_tag_0, 0))
+ self.connect((self.gsm_msg_to_tag_0, 0), (self.gsm_controlled_fractional_resampler_cc_0, 0))
+ self.connect((self, 0), (self.gsm_msg_to_tag_0, 0))
def get_fc(self):
return self.fc