From 43819f0f33498239970b4479684f12aa080859e6 Mon Sep 17 00:00:00 2001
From: jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Date: Thu, 26 Apr 2007 22:51:48 +0000
Subject: Merged r4518:5130 from developer branch n4hy/ofdm into trunk, passes
 distcheck.

Adds incomplete OFDM implementation, further work to be completed in the
features/ofdm branch.


git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5131 221aa14e-8319-0410-a670-987f0aec2ac5
---
 .../python/digital/benchmark_loopback.py           | 25 ++++++++++++++++------
 1 file changed, 18 insertions(+), 7 deletions(-)

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

diff --git a/gnuradio-examples/python/digital/benchmark_loopback.py b/gnuradio-examples/python/digital/benchmark_loopback.py
index d036f63aab..2b1e965fad 100755
--- a/gnuradio-examples/python/digital/benchmark_loopback.py
+++ b/gnuradio-examples/python/digital/benchmark_loopback.py
@@ -1,7 +1,6 @@
 #!/usr/bin/env python
-#!/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
 # 
@@ -77,10 +76,23 @@ class my_graph(gr.flow_graph):
         self.rxpath = receive_path(self, demod_class, rx_callback, options)
 
         if channelon:
-            self.channel = awgn_channel(self, options.sample_rate, noise_voltage, frequency_offset, options.seed)
+            self.channel = awgn_channel(self, options.sample_rate, noise_voltage,
+                                        frequency_offset, options.seed)
+
+            if options.discontinuous:
+                z = 20000*[0,]
+                self.zeros = gr.vector_source_c(z, True)
+                packet_size = 5*((4+8+4+1500+4) * 8)
+                self.mux = gr.stream_mux(gr.sizeof_gr_complex, [packet_size-0, int(9e5)])
+
+                # Connect components
+                self.connect(self.txpath, (self.mux,0))
+                self.connect(self.zeros, (self.mux,1))
+                self.connect(self.mux, self.channel, self.rxpath)
+
+            else:
+                self.connect(self.txpath, self.channel, self.rxpath)
 
-            # Connect components
-            self.connect(self.txpath, self.throttle, self.channel, self.rxpath)
         else:
             # Connect components
             self.connect(self.txpath, self.throttle, self.rxpath)
@@ -106,6 +118,7 @@ def main():
 
         print "ok = %5s  pktno = %4d  n_rcvd = %4d  n_right = %4d" % (
             ok, pktno, n_rcvd, n_right)
+        # print payload[2:len(payload)]
 
     def send_pkt(payload='', eof=False):
         return fg.txpath.send_pkt(payload, eof)
@@ -170,8 +183,6 @@ def main():
     while n < nbytes:
         send_pkt(struct.pack('!H', pktno) + (pkt_size - 2) * chr(pktno & 0xff))
         n += pkt_size
-        if options.discontinuous and pktno % 5 == 4:
-            time.sleep(1)
         pktno += 1
         
     send_pkt(eof=True)
-- 
cgit v1.2.3