summaryrefslogtreecommitdiff
path: root/gr-howto-write-a-block
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-02-24 19:44:25 -0500
committerTom Rondeau <trondeau@vt.edu>2013-02-24 19:44:25 -0500
commitd858f1402b4fb4e302d0b488eec0e4628b62296d (patch)
tree18f07dbb6c7731089a9c59449559f53b94a81001 /gr-howto-write-a-block
parent6f8b8e99eb10d8e282232275553a368dc19b1c65 (diff)
blocks: removing throttle, threshold, stretch from gnuradio-core.
Diffstat (limited to 'gr-howto-write-a-block')
-rw-r--r--gr-howto-write-a-block/apps/howto_square.grc2
-rwxr-xr-xgr-howto-write-a-block/apps/howto_square.py3
-rw-r--r--gr-howto-write-a-block/apps/howto_square_qt.grc12
-rwxr-xr-xgr-howto-write-a-block/apps/howto_square_qt.py11
4 files changed, 15 insertions, 13 deletions
diff --git a/gr-howto-write-a-block/apps/howto_square.grc b/gr-howto-write-a-block/apps/howto_square.grc
index 98f73774e3..1f3324e4eb 100644
--- a/gr-howto-write-a-block/apps/howto_square.grc
+++ b/gr-howto-write-a-block/apps/howto_square.grc
@@ -178,7 +178,7 @@
</param>
</block>
<block>
- <key>gr_throttle</key>
+ <key>blocks_throttle</key>
<param>
<key>id</key>
<value>thr</value>
diff --git a/gr-howto-write-a-block/apps/howto_square.py b/gr-howto-write-a-block/apps/howto_square.py
index 0b293b882f..140067b59f 100755
--- a/gr-howto-write-a-block/apps/howto_square.py
+++ b/gr-howto-write-a-block/apps/howto_square.py
@@ -7,6 +7,7 @@
from gnuradio import eng_notation
from gnuradio import gr
+from gnuradio import blocks
from gnuradio.eng_option import eng_option
from gnuradio.gr import firdes
from gnuradio.wxgui import scopesink2
@@ -28,7 +29,7 @@ class howto_square(grc_wxgui.top_block_gui):
##################################################
# Blocks
##################################################
- self.thr = gr.throttle(gr.sizeof_float*1, samp_rate)
+ self.thr = blocks.throttle(gr.sizeof_float*1, samp_rate)
self.src = gr.vector_source_f(([float(n)-50 for n in range(100)]), True, 1)
self.sqr = howto.square_ff()
self.sink2 = scopesink2.scope_sink_f(
diff --git a/gr-howto-write-a-block/apps/howto_square_qt.grc b/gr-howto-write-a-block/apps/howto_square_qt.grc
index 6281c3a310..c4c72adca0 100644
--- a/gr-howto-write-a-block/apps/howto_square_qt.grc
+++ b/gr-howto-write-a-block/apps/howto_square_qt.grc
@@ -173,10 +173,10 @@
</param>
</block>
<block>
- <key>gr_throttle</key>
+ <key>blocks_throttle</key>
<param>
<key>id</key>
- <value>gr_throttle_0</value>
+ <value>blocks_throttle_0</value>
</param>
<param>
<key>_enabled</key>
@@ -253,19 +253,19 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_throttle_0</source_block_id>
+ <source_block_id>blocks_throttle_0</source_block_id>
<sink_block_id>howto_square2_ff_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_throttle_0</source_block_id>
+ <source_block_id>blocks_throttle_0</source_block_id>
<sink_block_id>howto_square_ff_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_throttle_0</source_block_id>
+ <source_block_id>blocks_throttle_0</source_block_id>
<sink_block_id>qtgui_time_sink_x_0</sink_block_id>
<source_key>0</source_key>
<sink_key>1</sink_key>
@@ -278,7 +278,7 @@
</connection>
<connection>
<source_block_id>analog_sig_source_x_0</source_block_id>
- <sink_block_id>gr_throttle_0</sink_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
diff --git a/gr-howto-write-a-block/apps/howto_square_qt.py b/gr-howto-write-a-block/apps/howto_square_qt.py
index 986f1c7585..3215ea8ab4 100755
--- a/gr-howto-write-a-block/apps/howto_square_qt.py
+++ b/gr-howto-write-a-block/apps/howto_square_qt.py
@@ -7,6 +7,7 @@
from PyQt4 import Qt
from gnuradio import analog
+from gnuradio import blocks
from gnuradio import eng_notation
from gnuradio import gr
from gnuradio import qtgui
@@ -59,18 +60,18 @@ class howto_square_qt(gr.top_block, Qt.QWidget):
self.top_layout.addWidget(self._qtgui_time_sink_x_0_win)
self.howto_square_ff_0 = howto.square_ff()
self.howto_square2_ff_0 = howto.square2_ff()
- self.gr_throttle_0 = gr.throttle(gr.sizeof_float*1, samp_rate)
+ self.blocks_throttle_0 = blocks.throttle(gr.sizeof_float*1, samp_rate)
self.analog_sig_source_x_0 = analog.sig_source_f(samp_rate, analog.GR_COS_WAVE, 1000, 1, 0)
##################################################
# Connections
##################################################
self.connect((self.howto_square2_ff_0, 0), (self.qtgui_time_sink_x_0, 0))
- self.connect((self.gr_throttle_0, 0), (self.howto_square2_ff_0, 0))
- self.connect((self.gr_throttle_0, 0), (self.howto_square_ff_0, 0))
- self.connect((self.gr_throttle_0, 0), (self.qtgui_time_sink_x_0, 1))
+ self.connect((self.blocks_throttle_0, 0), (self.howto_square2_ff_0, 0))
+ self.connect((self.blocks_throttle_0, 0), (self.howto_square_ff_0, 0))
+ self.connect((self.blocks_throttle_0, 0), (self.qtgui_time_sink_x_0, 1))
self.connect((self.howto_square_ff_0, 0), (self.qtgui_time_sink_x_0, 2))
- self.connect((self.analog_sig_source_x_0, 0), (self.gr_throttle_0, 0))
+ self.connect((self.analog_sig_source_x_0, 0), (self.blocks_throttle_0, 0))
# QT sink close method reimplementation
def closeEvent(self, event):