commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r4200 - gnuradio/branches/developers/trondeau/digital-


From: trondeau
Subject: [Commit-gnuradio] r4200 - gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital
Date: Tue, 26 Dec 2006 20:58:11 -0700 (MST)

Author: trondeau
Date: 2006-12-26 20:58:10 -0700 (Tue, 26 Dec 2006)
New Revision: 4200

Modified:
   
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path.py
   
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/transmit_path.py
Log:
moving transmit and receive paths to use heir_block2 -- needs testing with USRP

Modified: 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path.py
    2006-12-26 22:47:47 UTC (rev 4199)
+++ 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path.py
    2006-12-27 03:58:10 UTC (rev 4200)
@@ -20,7 +20,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
 import copy
@@ -34,7 +34,10 @@
 # /////////////////////////////////////////////////////////////////////////////
 
 class receive_path(gr.hier_block):
-    def __init__(self, fg, demod_class, rx_callback, options):
+    def __init__(self, demod_class, rx_callback, options):
+        gr.hier_block2.__init__(self, "receive_path",
+                                gr.io_signature(0,0,0), # Input signature
+                                gr.io_signature(0,0,0)) # Output signature
 
         options = copy.copy(options)    # make a copy so we can destructively 
modify
 
@@ -111,9 +114,20 @@
         if self._verbose:
             self._print_verbage()
             
-        fg.connect(self.u, self.chan_filt, self.packet_receiver)
-        gr.hier_block.__init__(self, fg, None, None)
+        # Define the components
+        self.define_component("usrp", self.u)
+        self.define_component("channel_filter", gr.fft_filter_ccc(sw_decim, 
chan_coeffs))
+        self.define_component("channel_probe", self.probe)
+        self.define_component("packet_receiver", self.packet_receiver)
 
+        # connect the channel input filter to the carrier power detector
+        self.connect("usrp", 0, "channel_filter", 0)
+        self.connect("channel_filter", 0, "channel_probe", 0)
+
+        # connect channel filter to the packet receiver
+        self.connect("channel_filter", 0, "packet_receiver", 0)
+        
+
     def _setup_usrp_source(self):
         self.u = usrp.source_c (fusb_block_size=self._fusb_block_size,
                                 fusb_nblocks=self._fusb_nblocks)

Modified: 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/transmit_path.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/transmit_path.py
   2006-12-26 22:47:47 UTC (rev 4199)
+++ 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/transmit_path.py
   2006-12-27 03:58:10 UTC (rev 4200)
@@ -38,6 +38,10 @@
         '''
         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(0,0,0)) # Output signature
 
         options = copy.copy(options)    # make a copy so we can destructively 
modify
 
@@ -97,10 +101,16 @@
         if self._verbose:
             self._print_verbage()
 
-        # Create and setup transmit path flow graph
-        fg.connect(self.packet_transmitter, self.amp, self.u)
-        gr.hier_block.__init__(self, fg, None, None)
+        # Define the components
+        self.define_component("packet_transmitter", self.packet_transmitter)
+        self.define_component("amp", self.amp)
+        self.define_component("usrp", self.u)
 
+        # Connect components in the flowgraph; set amp component to the output 
of this block
+        self.connect("packet_transmitter", 0, "amp", 0)
+        self.connect("amp", 0, "usrp", 0)
+
+
     def _setup_usrp_sink(self):
         """
         Creates a USRP sink, determines the settings for best bitrate,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]