summaryrefslogtreecommitdiff
path: root/gr-utils/src/python/usrp_test_loopback.py
diff options
context:
space:
mode:
authorjcorgan2007-09-18 18:59:00 +0000
committerjcorgan2007-09-18 18:59:00 +0000
commite692e71305ecd71d3681fe37f3d76f350d67e276 (patch)
treedc320c9261303aa9a92f4d12bdba85f82720d1bf /gr-utils/src/python/usrp_test_loopback.py
parent6ad04a094ced626e46c210b9847eae46a1ae8e67 (diff)
downloadgnuradio-e692e71305ecd71d3681fe37f3d76f350d67e276.tar.gz
gnuradio-e692e71305ecd71d3681fe37f3d76f350d67e276.tar.bz2
gnuradio-e692e71305ecd71d3681fe37f3d76f350d67e276.zip
Merge r6461:6464 from jcorgan/t162-staging into trunk.
* Final gr.top_block and gr.hier_block2 implementation inside gnuradio-core/src/lib/runtime * Implementation of gr.hier_block2 versions of all the old-style blocks in blks. These live in blks2. * Addition of gr.hier_block2 based versions of gr-wxgui blocks * Conversion of all the example code in gnuradio-examples to use this new code * Conversion of all the gr-utils scripts to use the new code The OFDM examples and related hierarchical blocks have not yet been converted. Code in the rest of the tree that is outside the core and example components has also not yet been converted. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6466 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-utils/src/python/usrp_test_loopback.py')
-rwxr-xr-xgr-utils/src/python/usrp_test_loopback.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/gr-utils/src/python/usrp_test_loopback.py b/gr-utils/src/python/usrp_test_loopback.py
index 51a705a05..b58ac06ae 100755
--- a/gr-utils/src/python/usrp_test_loopback.py
+++ b/gr-utils/src/python/usrp_test_loopback.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -29,7 +29,7 @@ from gnuradio import gr
from gnuradio import usrp
-def ramp_source (fg):
+def ramp_source (tb):
period = 2**16
src = gr.vector_source_s (range (-period/2, period/2, 1), True)
return src
@@ -38,26 +38,26 @@ def build_graph ():
tx_interp = 32 # tx should be twice rx
rx_decim = 16
- fg = gr.flow_graph ()
+ tb = gr.top_block ()
- data_src = ramp_source (fg)
+ data_src = ramp_source (tb)
# usrp_tx = usrp.sink_s (0, tx_interp, 1, 0x98)
usrp_tx = usrp.sink_s (0, tx_interp)
- fg.connect (data_src, usrp_tx)
+ tb.connect (data_src, usrp_tx)
usrp_rx = usrp.source_s (0, rx_decim, 1, 0x32103210, usrp.FPGA_MODE_LOOPBACK)
sink = gr.check_counting_s ()
- fg.connect (usrp_rx, sink)
+ tb.connect (usrp_rx, sink)
# file_sink = gr.file_sink (gr.sizeof_short, "loopback.dat")
- # fg.connect (usrp_rx, file_sink)
+ # tb.connect (usrp_rx, file_sink)
- return fg
+ return tb
def main ():
- fg = build_graph ()
+ tb = build_graph ()
try:
- fg.run()
+ tb.run()
except KeyboardInterrupt:
pass