diff options
Diffstat (limited to 'gr-uhd/apps')
-rw-r--r-- | gr-uhd/apps/CMakeLists.txt | 17 | ||||
-rwxr-xr-x | gr-uhd/apps/uhd_fft (renamed from gr-uhd/apps/uhd_fft.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/apps/uhd_rx_cfile (renamed from gr-uhd/apps/uhd_rx_cfile.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/apps/uhd_rx_nogui (renamed from gr-uhd/apps/uhd_rx_nogui.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/apps/uhd_siggen | 51 | ||||
-rw-r--r--[-rwxr-xr-x] | gr-uhd/apps/uhd_siggen_base.py (renamed from gr-uhd/apps/uhd_siggen.py) | 4 | ||||
-rwxr-xr-x | gr-uhd/apps/uhd_siggen_gui (renamed from gr-uhd/apps/uhd_siggen_gui.py) | 0 |
7 files changed, 65 insertions, 7 deletions
diff --git a/gr-uhd/apps/CMakeLists.txt b/gr-uhd/apps/CMakeLists.txt index 20ae8993f..9ffc22a21 100644 --- a/gr-uhd/apps/CMakeLists.txt +++ b/gr-uhd/apps/CMakeLists.txt @@ -23,12 +23,19 @@ include(GrPython) # Install some uhd apps ######################################################################## GR_PYTHON_INSTALL( + FILES + uhd_siggen_base.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio + COMPONENT "uhd_python" +) + +GR_PYTHON_INSTALL( PROGRAMS - uhd_fft.py - uhd_rx_cfile.py - uhd_siggen.py - uhd_siggen_gui.py - uhd_rx_nogui.py + uhd_fft + uhd_rx_cfile + uhd_siggen + uhd_siggen_gui + uhd_rx_nogui DESTINATION ${GR_RUNTIME_DIR} COMPONENT "uhd_python" ) diff --git a/gr-uhd/apps/uhd_fft.py b/gr-uhd/apps/uhd_fft index 39ba3838e..39ba3838e 100755 --- a/gr-uhd/apps/uhd_fft.py +++ b/gr-uhd/apps/uhd_fft diff --git a/gr-uhd/apps/uhd_rx_cfile.py b/gr-uhd/apps/uhd_rx_cfile index a61361e43..a61361e43 100755 --- a/gr-uhd/apps/uhd_rx_cfile.py +++ b/gr-uhd/apps/uhd_rx_cfile diff --git a/gr-uhd/apps/uhd_rx_nogui.py b/gr-uhd/apps/uhd_rx_nogui index bcb52c619..bcb52c619 100755 --- a/gr-uhd/apps/uhd_rx_nogui.py +++ b/gr-uhd/apps/uhd_rx_nogui diff --git a/gr-uhd/apps/uhd_siggen b/gr-uhd/apps/uhd_siggen new file mode 100755 index 000000000..8abcabbf3 --- /dev/null +++ b/gr-uhd/apps/uhd_siggen @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# +# Copyright 2008,2009,2011,2012 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +from gnuradio import gr +from gnuradio import uhd_siggen +import sys + +def main(): + if gr.enable_realtime_scheduling() != gr.RT_OK: + print "Note: failed to enable realtime scheduling, continuing" + + # Grab command line options and create top block + try: + (options, args) = uhd_siggen.get_options() + tb = uhd_siggen.top_block(options, args) + + except RuntimeError, e: + print e + sys.exit(1) + + tb.start() + raw_input('Press Enter to quit: ') + tb.stop() + tb.wait() + +# Make sure to create the top block (tb) within a function: +# That code in main will allow tb to go out of scope on return, +# which will call the decontructor on usrp and stop transmit. +# Whats odd is that grc works fine with tb in the __main__, +# perhaps its because the try/except clauses around tb. +if __name__ == "__main__": + main() diff --git a/gr-uhd/apps/uhd_siggen.py b/gr-uhd/apps/uhd_siggen_base.py index e1af586ae..5ec4fc5fb 100755..100644 --- a/gr-uhd/apps/uhd_siggen.py +++ b/gr-uhd/apps/uhd_siggen_base.py @@ -344,7 +344,7 @@ def get_options(): # If this script is executed, the following runs. If it is imported, # the below does not run. -def main(): +def test_main(): if gr.enable_realtime_scheduling() != gr.RT_OK: print "Note: failed to enable realtime scheduling, continuing" @@ -368,4 +368,4 @@ def main(): # Whats odd is that grc works fine with tb in the __main__, # perhaps its because the try/except clauses around tb. if __name__ == "__main__": - main() + test_main() diff --git a/gr-uhd/apps/uhd_siggen_gui.py b/gr-uhd/apps/uhd_siggen_gui index 2ef6ea40f..2ef6ea40f 100755 --- a/gr-uhd/apps/uhd_siggen_gui.py +++ b/gr-uhd/apps/uhd_siggen_gui |