commit-gnuradio
[Top][All Lists]
Advanced

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

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


From: trondeau
Subject: [Commit-gnuradio] r4208 - gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital
Date: Mon, 1 Jan 2007 12:43:27 -0700 (MST)

Author: trondeau
Date: 2007-01-01 12:43:26 -0700 (Mon, 01 Jan 2007)
New Revision: 4208

Modified:
   
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/benchmark_loopback.py
Log:
updates to control channel and TX and RX paths better

Modified: 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/benchmark_loopback.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/benchmark_loopback.py
      2007-01-01 19:41:54 UTC (rev 4207)
+++ 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/benchmark_loopback.py
      2007-01-01 19:43:26 UTC (rev 4208)
@@ -49,7 +49,8 @@
         self.define_component("adder", gr.add_cc())
 
         # Create the frequency offset
-        self.define_component("offset", gr.sig_source_c((sample_rate*1.0), 
gr.GR_SIN_WAVE, frequency_offset, 1.0, 0.0))
+        self.define_component("offset", gr.sig_source_c((sample_rate*1.0), 
gr.GR_SIN_WAVE,
+                                                        frequency_offset, 1.0, 
0.0))
         self.define_component("mixer", gr.multiply_cc())
 
         # Connect the components
@@ -66,6 +67,8 @@
                                 gr.io_signature(0,0,0), # Input signature
                                 gr.io_signature(0,0,0)) # Output signature
 
+        channelon = True;
+
         SNR = 10.0**(options.snr/10.0)
         frequency_offset = options.frequency_offset
         
@@ -75,19 +78,30 @@
 
         self.txpath = transmit_path(mod_class, options)
         self.throttle = gr.throttle(gr.sizeof_gr_complex, options.sample_rate)
-        self.channel = awgn_channel(options.sample_rate, noise_voltage, 
frequency_offset, options.seed)
         self.rxpath = receive_path(demod_class, rx_callback, options)
 
-        # Define the components
-        self.define_component("txpath", self.txpath)
-        self.define_component("throttle", self.throttle)
-        self.define_component("channel", self.channel)
-        self.define_component("rxpath", self.rxpath)
+        if channelon:
+            self.channel = awgn_channel(options.sample_rate, noise_voltage, 
frequency_offset, options.seed)
+
+            # Define the components
+            self.define_component("txpath", self.txpath)
+            self.define_component("throttle", self.throttle)
+            self.define_component("channel", self.channel)
+            self.define_component("rxpath", self.rxpath)
+            
+            # Connect components
+            self.connect("txpath", 0, "throttle", 0)
+            self.connect("throttle", 0, "channel", 0)
+            self.connect("channel", 0, "rxpath", 0)
+        else:
+            # Define the components
+            self.define_component("txpath", self.txpath)
+            self.define_component("throttle", self.throttle)
+            self.define_component("rxpath", self.rxpath)
         
-        # Connect components
-        self.connect("txpath", 0, "throttle", 0)
-        self.connect("throttle", 0, "channel", 0)
-        self.connect("channel", 0, "rxpath", 0)
+            # Connect components
+            self.connect("txpath", 0, "throttle", 0)
+            self.connect("throttle", 0, "rxpath", 0)
 
 
 # /////////////////////////////////////////////////////////////////////////////





reply via email to

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