diff options
author | jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-09-18 18:59:00 +0000 |
---|---|---|
committer | jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-09-18 18:59:00 +0000 |
commit | e692e71305ecd71d3681fe37f3d76f350d67e276 (patch) | |
tree | dc320c9261303aa9a92f4d12bdba85f82720d1bf /gnuradio-examples/python/digital/transmit_path_lb.py | |
parent | 6ad04a094ced626e46c210b9847eae46a1ae8e67 (diff) |
Merge r6461:6464 from jcorgan/t162-staging into trunk.
* Final gr.top_block and gr.hier_block2 implementation inside
gnuradio-core/src/lib/runtime
* Implementation of gr.hier_block2 versions of all the old-style blocks
in blks. These live in blks2.
* Addition of gr.hier_block2 based versions of gr-wxgui blocks
* Conversion of all the example code in gnuradio-examples to use this
new code
* Conversion of all the gr-utils scripts to use the new code
The OFDM examples and related hierarchical blocks have not yet been
converted. Code in the rest of the tree that is outside the core
and example components has also not yet been converted.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6466 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/python/digital/transmit_path_lb.py')
-rw-r--r-- | gnuradio-examples/python/digital/transmit_path_lb.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/gnuradio-examples/python/digital/transmit_path_lb.py b/gnuradio-examples/python/digital/transmit_path_lb.py index 322d46af3c..49f53076e6 100644 --- a/gnuradio-examples/python/digital/transmit_path_lb.py +++ b/gnuradio-examples/python/digital/transmit_path_lb.py @@ -1,5 +1,5 @@ # -# Copyright 2005,2006 Free Software Foundation, Inc. +# Copyright 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -19,7 +19,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gru, blks +from gnuradio import gr, gru, blks2 from gnuradio import eng_notation import copy @@ -29,11 +29,14 @@ import sys # transmit path # ///////////////////////////////////////////////////////////////////////////// -class transmit_path(gr.hier_block): - def __init__(self, fg, modulator_class, options): +class transmit_path(gr.hier_block2): + def __init__(self, modulator_class, options): ''' See below for what options should hold ''' + gr.hier_block2.__init__(self, "transmit_path", + gr.io_signature(0, 0, 0), # Input signature + gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature options = copy.copy(options) # make a copy so we can destructively modify @@ -48,12 +51,14 @@ class transmit_path(gr.hier_block): mod_kwargs = self._modulator_class.extract_kwargs_from_options(options) # transmitter + print self._modulator_class + print mod_kwargs + modulator = self._modulator_class(**mod_kwargs) self.packet_transmitter = \ - blks.mod_pkts(fg, - self._modulator_class(fg, **mod_kwargs), - access_code=None, - msgq_limit=4, - pad_for_usrp=True) + blks2.mod_pkts(modulator, + access_code=None, + msgq_limit=4, + pad_for_usrp=True) self.amp = gr.multiply_const_cc(1) self.set_tx_amplitude(self._tx_amplitude) @@ -63,9 +68,7 @@ class transmit_path(gr.hier_block): self._print_verbage() # Connect components in the flowgraph - fg.connect(self.packet_transmitter, self.amp) - - gr.hier_block.__init__(self, fg, None, self.amp) + self.connect(self.packet_transmitter, self.amp, self) def set_tx_amplitude(self, ampl): """ |