diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-03-17 12:24:38 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-03-17 15:40:32 -0400 |
commit | d4f6b86a9bdea09c2c158b9982559a727f8c6a0b (patch) | |
tree | 60b452d387bd494b461ee78b2b0faec1fbf6e5fe /gr-filter/examples/reconstruction.py | |
parent | ee2b700f72503d6e7f62adbfb7dff9997b9cb003 (diff) |
blocks: converting references to vector source/sink, null source/sink, nop, copy, head, skiphead, vector_map, and annotator blocks to use gr-blocks.
Diffstat (limited to 'gr-filter/examples/reconstruction.py')
-rwxr-xr-x | gr-filter/examples/reconstruction.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gr-filter/examples/reconstruction.py b/gr-filter/examples/reconstruction.py index 75c224e79c..85704bda2b 100755 --- a/gr-filter/examples/reconstruction.py +++ b/gr-filter/examples/reconstruction.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2010,2012 Free Software Foundation, Inc. +# Copyright 2010,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -22,6 +22,7 @@ from gnuradio import gr, digital from gnuradio import filter +from gnuradio import blocks try: from gnuradio import channels @@ -68,7 +69,7 @@ def main(): data = scipy.random.randint(0, 256, N) rrc_taps = filter.firdes.root_raised_cosine(1, 2, 1, 0.35, 41) - src = gr.vector_source_b(data.astype(scipy.uint8).tolist(), False) + src = blocks.vector_source_b(data.astype(scipy.uint8).tolist(), False) mod = digital.bpsk_mod(samples_per_symbol=2) chan = filter.channel_model(npwr) rrc = filter.fft_filter_ccc(1, rrc_taps) @@ -79,8 +80,8 @@ def main(): # Put the pieces back together again syn_taps = [nchans*t for t in proto_taps] synthesizer = filter.pfb_synthesizer_ccf(nchans, syn_taps, True) - src_snk = gr.vector_sink_c() - snk = gr.vector_sink_c() + src_snk = blocks.vector_sink_c() + snk = blocks.vector_sink_c() # Remap the location of the channels # Can be done in synth or channelizer (watch out for rotattions in @@ -96,7 +97,7 @@ def main(): for i in xrange(nchans): tb.connect((channelizer,i), (synthesizer, i)) - vsnk.append(gr.vector_sink_c()) + vsnk.append(blocks.vector_sink_c()) tb.connect((channelizer,i), vsnk[i]) tb.connect(synthesizer, snk) |