[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] gnuradio-examples/python/gmsk2 benchmark_gmsk_r...
From: |
Thomas W. Rondeau |
Subject: |
[Commit-gnuradio] gnuradio-examples/python/gmsk2 benchmark_gmsk_r... |
Date: |
Thu, 29 Jun 2006 16:01:49 +0000 |
CVSROOT: /sources/gnuradio
Module name: gnuradio-examples
Changes by: Thomas W. Rondeau <trondeau1122> 06/06/29 16:01:49
Modified files:
python/gmsk2 : benchmark_gmsk_rx.py benchmark_gmsk_tx.py
Log message:
fixed problem (that I created) with options passed to GMSK blocks.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnuradio-examples/python/gmsk2/benchmark_gmsk_rx.py?cvsroot=gnuradio&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/gnuradio-examples/python/gmsk2/benchmark_gmsk_tx.py?cvsroot=gnuradio&r1=1.18&r2=1.19
Patches:
Index: benchmark_gmsk_rx.py
===================================================================
RCS file:
/sources/gnuradio/gnuradio-examples/python/gmsk2/benchmark_gmsk_rx.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- benchmark_gmsk_rx.py 21 Jun 2006 00:55:01 -0000 1.21
+++ benchmark_gmsk_rx.py 29 Jun 2006 16:01:49 -0000 1.22
@@ -41,11 +41,12 @@
class my_graph(gr.flow_graph):
def __init__(self, demod_class, rx_subdev_spec,
- bitrate, decim_rate, spb, rx_callback, options):
+ bitrate, decim_rate, spb,
+ rx_callback, options, demod_kwargs):
gr.flow_graph.__init__(self)
self.rxpath = receive_path(self, demod_class, rx_subdev_spec,
bitrate, decim_rate, spb,
- rx_callback, options)
+ rx_callback, options, demod_kwargs)
# /////////////////////////////////////////////////////////////////////////////
# main
@@ -73,12 +74,14 @@
parser.add_option("-R", "--rx-subdev-spec", type="subdev", default=None,
help="select USRP Rx side A or B")
parser.add_option("-f", "--freq", type="eng_float", default=423.1e6,
- help="set Rx frequency to FREQ [default=%default]",
metavar="FREQ")
+ help="set Rx frequency to FREQ [default=%default]",
+ metavar="FREQ")
parser.add_option("-r", "--bitrate", type="eng_float", default=None,
help="specify bitrate. spb and interp will be derived.")
parser.add_option("-g", "--rx-gain", type="eng_float", default=27,
help="set rx gain")
- parser.add_option("-S", "--spb", type="int", default=None, help="set
samples/baud [default=%default]")
+ parser.add_option("-S", "--spb", type="int", default=None,
+ help="set samples/baud [default=%default]")
parser.add_option("-d", "--decim", type="intx", default=None,
help="set fpga decim rate to DECIM [default=%default]")
fusb_options.add_options(parser)
@@ -91,11 +94,13 @@
if options.freq < 1e6:
options.freq *= 1e6
+ demod_kwargs = { } # placeholder
+
# build the graph
fg = my_graph(blks.gmsk2_demod,
options.rx_subdev_spec, options.bitrate,
options.decim, options.spb, rx_callback,
- options)
+ options, demod_kwargs)
print "bitrate: %sb/sec" % (eng_notation.num_to_str(fg.rxpath.bitrate()),)
print "spb: %3d" % (fg.rxpath.spb(),)
Index: benchmark_gmsk_tx.py
===================================================================
RCS file:
/sources/gnuradio/gnuradio-examples/python/gmsk2/benchmark_gmsk_tx.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- benchmark_gmsk_tx.py 28 Jun 2006 18:15:23 -0000 1.18
+++ benchmark_gmsk_tx.py 29 Jun 2006 16:01:49 -0000 1.19
@@ -43,10 +43,11 @@
class my_graph(gr.flow_graph):
def __init__(self, mod_class, tx_subdev_spec,
- bitrate, interp_rate, spb, bt, options):
+ bitrate, interp_rate, spb, gain,
+ options, mod_kwargs):
gr.flow_graph.__init__(self)
self.txpath = transmit_path(self, mod_class, tx_subdev_spec,
- bitrate, interp_rate, spb, gain, m_arity,
+ bitrate, interp_rate, spb, gain,
options, mod_kwargs)
@@ -96,11 +97,14 @@
pkt_size = int(options.size)
+ mod_kwargs = {
+ 'bt' : options.bt,
+ }
+
# build the graph
- fg = my_graph(blks.gmsk2_mod,
- options.tx_subdev_spec,
- options.bitrate, options.interp, options.spb,
- options.bt, options)
+ fg = my_graph(blks.gmsk2_mod, options.tx_subdev_spec,
+ options.bitrate, options.interp, options.spb, options.gain,
+ options, mod_kwargs)
print "bitrate: %sb/sec" % (eng_notation.num_to_str(fg.txpath.bitrate()),)
print "spb: %3d" % (fg.txpath.spb(),)