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/receive_path_lb.py              | 30 ++++++++++++----------
 1 file changed, 17 insertions(+), 13 deletions(-)

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

diff --git a/gnuradio-examples/python/digital/receive_path_lb.py b/gnuradio-examples/python/digital/receive_path_lb.py
index 17643c6c01..a6bffeeac4 100644
--- a/gnuradio-examples/python/digital/receive_path_lb.py
+++ b/gnuradio-examples/python/digital/receive_path_lb.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
 # 
@@ -20,7 +20,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
 import sys
@@ -29,8 +29,12 @@ import sys
 #                              receive path
 # /////////////////////////////////////////////////////////////////////////////
 
-class receive_path(gr.hier_block):
-    def __init__(self, fg, demod_class, rx_callback, options):
+class receive_path(gr.hier_block2):
+    def __init__(self, demod_class, rx_callback, options):
+	gr.hier_block2.__init__(self, "receive_path",
+				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+				gr.io_signature(0, 0, 0))                    # Output signature
+
         
         options = copy.copy(options)    # make a copy so we can destructively modify
 
@@ -55,11 +59,10 @@ class receive_path(gr.hier_block):
         
         # receiver
         self.packet_receiver = \
-            blks.demod_pkts(fg,
-                            self._demod_class(fg, **demod_kwargs),
-                            access_code=None,
-                            callback=self._rx_callback,
-                            threshold=-1)
+            blks2.demod_pkts(self._demod_class(**demod_kwargs),
+                             access_code=None,
+                             callback=self._rx_callback,
+                             threshold=-1)
 
         # Carrier Sensing Blocks
         alpha = 0.001
@@ -70,13 +73,14 @@ class receive_path(gr.hier_block):
         if self._verbose:
             self._print_verbage()
 
+	# connect block input to channel filter
+	self.connect(self, self.channel_filter)
+
         # connect the channel input filter to the carrier power detector
-        fg.connect(self.channel_filter, self.probe)
+        self.connect(self.channel_filter, self.probe)
 
         # connect channel filter to the packet receiver
-        fg.connect(self.channel_filter, self.packet_receiver)
-
-        gr.hier_block.__init__(self, fg, self.channel_filter, None)
+        self.connect(self.channel_filter, self.packet_receiver)
 
     def bitrate(self):
         return self._bitrate
-- 
cgit v1.2.3