commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r5707 - gnuradio/branches/features/ofdm/sync/gnuradio-


From: trondeau
Subject: [Commit-gnuradio] r5707 - gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm
Date: Tue, 5 Jun 2007 22:42:22 -0600 (MDT)

Author: trondeau
Date: 2007-06-05 22:42:22 -0600 (Tue, 05 Jun 2007)
New Revision: 5707

Modified:
   
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/benchmark_ofdm_rx.py
Log:
mods to allow ofdm receiver to work with new code and USRP

Modified: 
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/benchmark_ofdm_rx.py
===================================================================
--- 
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/benchmark_ofdm_rx.py
     2007-06-06 04:41:44 UTC (rev 5706)
+++ 
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/benchmark_ofdm_rx.py
     2007-06-06 04:42:22 UTC (rev 5707)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2005, 2006 Free Software Foundation, Inc.
+# Copyright 2006, 2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -25,12 +25,13 @@
 from gnuradio import eng_notation
 from gnuradio.eng_option import eng_option
 from optparse import OptionParser
+from gnuradio.blksimpl import ofdm_pkt
 
 import random, time, struct, sys, math
 
 # from current dir
 from receive_path import receive_path
-import ofdm, fusb_options
+import fusb_options
 
 class usrp_graph(gr.flow_graph):
     def __init__(self, callback, options):
@@ -118,9 +119,6 @@
         Adds usrp-specific options to the Options Parser
         """
         add_freq_option(normal)
-        if not normal.has_option("--bitrate"):
-            normal.add_option("-r", "--bitrate", type="eng_float", 
default=None,
-                              help="specify bitrate.  samples-per-symbol and 
interp/decim will be derived.")
         normal.add_option("-R", "--rx-subdev-spec", type="subdev", 
default=None,
                           help="select USRP Rx side A or B")
         normal.add_option("", "--rx-gain", type="eng_float", default=None, 
metavar="GAIN",
@@ -129,8 +127,6 @@
                           help="print min and max Rx gain available on 
selected daughterboard")
         normal.add_option("-v", "--verbose", action="store_true", 
default=False)
 
-        expert.add_option("-S", "--samples-per-symbol", type="int", 
default=None,
-                          help="set samples/symbol [default=%default]")
         expert.add_option("", "--rx-freq", type="eng_float", default=None,
                           help="set Rx frequency to FREQ [default=%default]", 
metavar="FREQ")
         expert.add_option("-d", "--decim", type="intx", default=32,
@@ -175,14 +171,31 @@
             n_right += 1
         print "ok: %r \t pktno: %d \t n_rcvd: %d \t n_right: %d" % (ok, pktno, 
n_rcvd, n_right)
 
+        if 0:
+            printlst = list()
+            for x in payload[2:]:
+                t = hex(ord(x)).replace('0x', '')
+                if(len(t) == 1):
+                    t = '0' + t
+                printlst.append(t)
+            printable = ''.join(printlst)
+
+            print printable
+            print "\n"
+
     parser = OptionParser(option_class=eng_option, conflict_handler="resolve")
     expert_grp = parser.add_option_group("Expert")
     parser.add_option("-r", "--sample-rate", type="eng_float", default=1e5,
                       help="set sample rate to RATE (%default)") 
+    parser.add_option("", "--snr", type="eng_float", default=30,
+                      help="set the SNR of the channel in dB 
[default=%default]")
+    parser.add_option("","--discontinuous", action="store_true", default=False,
+                      help="enable discontinuous")
 
     usrp_graph.add_options(parser, expert_grp)
     receive_path.add_options(parser, expert_grp)
-    ofdm.ofdm_mod.add_options(parser, expert_grp)
+    ofdm_pkt.mod_ofdm_pkts.add_options(parser, expert_grp)
+    ofdm_pkt.demod_ofdm_pkts.add_options(parser, expert_grp)
     fusb_options.add_options(expert_grp)
 
     (options, args) = parser.parse_args ()





reply via email to

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