From e692e71305ecd71d3681fe37f3d76f350d67e276 Mon Sep 17 00:00:00 2001
From: jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Date: Tue, 18 Sep 2007 18:59:00 +0000
Subject: 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
---
 .../python/digital/transmit_path_lb.py             | 27 ++++++++++++----------
 1 file changed, 15 insertions(+), 12 deletions(-)

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

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