summaryrefslogtreecommitdiff
path: root/gnuradio-examples/python/ofdm/transmit_path.py
diff options
context:
space:
mode:
authortrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>2008-01-02 17:35:35 +0000
committertrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>2008-01-02 17:35:35 +0000
commitce16514534e5d7ebbc4fe46e2b09a25ccc5fdafd (patch)
tree2d9ae1179cb26f213125accabaea8eb05d63f109 /gnuradio-examples/python/ofdm/transmit_path.py
parent481636b7be1462dc9f1909ac4700002af63dc8c0 (diff)
Merging ofdm2 branch -r7047:7321 into trunk. This updates the OFDM code to hier_block2 in blks2impl and removed from blksimpl. The new code
implements a decision feedback sync loop to lock the phase/freq, removes two unnecessary premables and performs frame sync and equalization off single preamble symbol. Also adds/updates Python plotting tools and a branchless clip algorithm in gr_math.h. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7324 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/python/ofdm/transmit_path.py')
-rw-r--r--gnuradio-examples/python/ofdm/transmit_path.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/gnuradio-examples/python/ofdm/transmit_path.py b/gnuradio-examples/python/ofdm/transmit_path.py
index f15845b007..44c7331b05 100644
--- a/gnuradio-examples/python/ofdm/transmit_path.py
+++ b/gnuradio-examples/python/ofdm/transmit_path.py
@@ -19,7 +19,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gru, blks
+from gnuradio import gr, gru, blks2
from gnuradio import usrp
from gnuradio import eng_notation
@@ -30,19 +30,23 @@ import sys
# transmit path
# /////////////////////////////////////////////////////////////////////////////
-class transmit_path(gr.hier_block):
- def __init__(self, fg, options):
+class transmit_path(gr.hier_block2):
+ def __init__(self, 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
- self._verbose = options.verbose
+ self._verbose = options.verbose # turn verbose mode on/off
self._tx_amplitude = options.tx_amplitude # digital amplitude sent to USRP
self.ofdm_tx = \
- blks.ofdm_mod(fg, options, msgq_limit=4, pad_for_usrp=False)
+ blks2.ofdm_mod(options, msgq_limit=4, pad_for_usrp=False)
self.amp = gr.multiply_const_cc(1)
self.set_tx_amplitude(self._tx_amplitude)
@@ -52,8 +56,7 @@ class transmit_path(gr.hier_block):
self._print_verbage()
# Create and setup transmit path flow graph
- fg.connect(self.ofdm_tx, self.amp)
- gr.hier_block.__init__(self, fg, None, self.amp)
+ self.connect(self.ofdm_tx, self.amp, self)
def set_tx_amplitude(self, ampl):
"""