diff options
author | jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-04-28 02:20:28 +0000 |
---|---|---|
committer | jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-04-28 02:20:28 +0000 |
commit | b26ea69676c09f5366a9e2f33b11ae5a7521ffe5 (patch) | |
tree | 0641c1c25d6e827f70941e07f4611d0a2b6b83cd /gnuradio-examples/python/hier/digital/benchmark_tx.py | |
parent | 00696b9f754338de9362932c1ecfb1e144a38786 (diff) |
Merged -r 5137:5174 from developer branch jcorgan/hb. Trunk passes distcheck. Converts gr.hier_block2 API to not use 'define_component' methodology anymore.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5177 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/python/hier/digital/benchmark_tx.py')
-rwxr-xr-x | gnuradio-examples/python/hier/digital/benchmark_tx.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/gnuradio-examples/python/hier/digital/benchmark_tx.py b/gnuradio-examples/python/hier/digital/benchmark_tx.py index 627c92b3a0..df4a2005df 100755 --- a/gnuradio-examples/python/hier/digital/benchmark_tx.py +++ b/gnuradio-examples/python/hier/digital/benchmark_tx.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2005, 2006 Free Software Foundation, Inc. +# Copyright 2005, 2006,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -36,15 +36,6 @@ import fusb_options #print os.getpid() #raw_input('Attach and press enter') -class my_graph(gr.hier_block2): - def __init__(self, mod_class, options): - gr.hier_block2.__init__(self, "my_graph", - gr.io_signature(0,0,0), # Input signature - gr.io_signature(0,0,0)) # Output signature - self.txpath = transmit_path(mod_class, options) - self.define_component("txpath", self.txpath) - - # ///////////////////////////////////////////////////////////////////////////// # main # ///////////////////////////////////////////////////////////////////////////// @@ -52,7 +43,7 @@ class my_graph(gr.hier_block2): def main(): def send_pkt(payload='', eof=False): - return top_block.txpath.send_pkt(payload, eof) + return top_block.send_pkt(payload, eof) def rx_callback(ok, payload): print "ok = %r, payload = '%s'" % (ok, payload) @@ -96,7 +87,7 @@ def main(): print "Warning: failed to enable realtime scheduling" # Create an instance of a hierarchical block - top_block = my_graph(mods[options.modulation], options) + top_block = transmit_path(mods[options.modulation], options) # Create an instance of a runtime, passing it the top block runtime = gr.runtime(top_block) |