From b26ea69676c09f5366a9e2f33b11ae5a7521ffe5 Mon Sep 17 00:00:00 2001
From: jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Date: Sat, 28 Apr 2007 02:20:28 +0000
Subject: 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
---
 gnuradio-examples/python/hier/digital/benchmark_tx.py | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

(limited to 'gnuradio-examples/python/hier/digital/benchmark_tx.py')

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)
-- 
cgit v1.2.3