[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5708 - gnuradio/branches/features/ofdm/sync/gnuradio-
From: |
trondeau |
Subject: |
[Commit-gnuradio] r5708 - gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm |
Date: |
Tue, 5 Jun 2007 22:45:25 -0600 (MDT) |
Author: trondeau
Date: 2007-06-05 22:45:24 -0600 (Tue, 05 Jun 2007)
New Revision: 5708
Modified:
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/benchmark_ofdm_tx.py
Log:
mods to get ofdm transmitter working over the air
Modified:
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/benchmark_ofdm_tx.py
===================================================================
---
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/benchmark_ofdm_tx.py
2007-06-06 04:42:22 UTC (rev 5707)
+++
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/benchmark_ofdm_tx.py
2007-06-06 04:45:24 UTC (rev 5708)
@@ -31,7 +31,8 @@
# from current dir
from transmit_path import transmit_path
from pick_bitrate import pick_tx_bitrate
-import ofdm, fusb_options
+from gnuradio.blksimpl import ofdm_pkt
+import fusb_options
class usrp_graph(gr.flow_graph):
def __init__(self, options):
@@ -82,7 +83,7 @@
# Set the USRP for maximum transmit gain
# (Note that on the RFX cards this is a nop.)
- self.set_gain(self.subdev.gain_range()[0])
+ self.set_gain(self.subdev.gain_range()[1])
# enable Auto Transmit/Receive switching
self.set_auto_tr(True)
@@ -183,19 +184,19 @@
help="set megabytes to transmit [default=%default]")
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 mode")
usrp_graph.add_options(parser, expert_grp)
transmit_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 ()
- if(options.mtu < options.size):
- sys.stderr.write("MTU (%.0f) must be larger than the packet size
(%.0f)\n"
- % (options.mtu, options.size))
- sys.exit(1)
-
# build the graph
fg = usrp_graph(options)
@@ -215,8 +216,8 @@
send_pkt(struct.pack('!H', pktno) + (pkt_size - 2) * chr(pktno & 0xff))
n += pkt_size
sys.stderr.write('.')
- #if options.discontinuous and pktno % 5 == 4:
- # time.sleep(1)
+ if options.discontinuous and pktno % 5 == 1:
+ time.sleep(1)
pktno += 1
send_pkt(eof=True)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5708 - gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm,
trondeau <=