commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r5127 - gnuradio/branches/developers/n4hy/ofdm/gnuradi


From: trondeau
Subject: [Commit-gnuradio] r5127 - gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm
Date: Thu, 26 Apr 2007 13:35:08 -0600 (MDT)

Author: trondeau
Date: 2007-04-26 13:35:08 -0600 (Thu, 26 Apr 2007)
New Revision: 5127

Modified:
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/benchmark_ofdm.py
Log:
added discontinuous capabilities to OFDM loopback; promising results but needs 
work

Modified: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/benchmark_ofdm.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/benchmark_ofdm.py
      2007-04-26 19:22:37 UTC (rev 5126)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/benchmark_ofdm.py
      2007-04-26 19:35:08 UTC (rev 5127)
@@ -79,11 +79,25 @@
         if channel_on:
             self.channel = awgn_channel(self, options.sample_rate, 
noise_voltage, frequency_offset)
             self.multipath = multipath_channel(self)
+
+            if options.discontinuous:
+                z = 20000*[0,]
+                self.zeros = gr.vector_source_c(z, True)
+                packet_size = 15*((4+8+4+1500+4) * 8)
+                self.mux = gr.stream_mux(gr.sizeof_gr_complex, [packet_size-0, 
int(10e5)])
+
+                # Connect components
+                self.connect(self.txpath, (self.mux,0))
+                self.connect(self.zeros, (self.mux,1))
+                self.connect(self.mux, self.throttle, self.channel, 
self.rxpath)
+                self.connect(self.mux, gr.file_sink(gr.sizeof_gr_complex, 
"tx_ofdm.dat"))
+
+            else:
+                #self.connect(self.txpath, self.throttle, self.multipath, 
self.channel)
+                self.connect(self.txpath, self.throttle, self.channel)
+                self.connect(self.channel, self.rxpath)
+                self.connect(self.txpath, gr.file_sink(gr.sizeof_gr_complex, 
"tx_ofdm.dat"))
             
-            #self.connect(self.txpath, self.throttle, self.multipath, 
self.channel)
-            self.connect(self.txpath, self.throttle, self.channel)
-            self.connect(self.channel, self.rxpath)
-            self.connect(self.txpath, gr.file_sink(gr.sizeof_gr_complex, 
"tx_ofdm.dat"))
         else:
             self.connect(self.txpath, self.throttle, self.rxpath)
             self.connect(self.txpath, gr.file_sink(gr.sizeof_gr_complex, "tx"))
@@ -123,6 +137,9 @@
                       help="set the SNR of the channel in dB 
[default=%default]")
     parser.add_option("", "--frequency-offset", type="eng_float", default=0,
                       help="set frequency offset introduced by channel 
[default=%default]")
+    parser.add_option("","--discontinuous", action="store_true", default=False,
+                      help="enable discontinous transmission (bursts of 5 
packets)")
+
     transmit_path.add_options(parser, expert_grp)
     receive_path.add_options(parser, expert_grp)
     ofdm.ofdm_mod.add_options(parser, expert_grp)





reply via email to

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