summaryrefslogtreecommitdiff
path: root/gr-uhd/apps
diff options
context:
space:
mode:
authorJohnathan Corgan2012-04-04 18:22:02 -0700
committerJohnathan Corgan2012-04-04 18:22:02 -0700
commit2f73fe22c5e1591242a9556221ec8487170a7b00 (patch)
treead3920b28720ab845ccffa817be66d4bddbd63ff /gr-uhd/apps
parent29c887da604206aa6f3ad1859f70958231a7a1cb (diff)
parent71195397a2624cbc0cd144418fe958f436657be5 (diff)
downloadgnuradio-2f73fe22c5e1591242a9556221ec8487170a7b00.tar.gz
gnuradio-2f73fe22c5e1591242a9556221ec8487170a7b00.tar.bz2
gnuradio-2f73fe22c5e1591242a9556221ec8487170a7b00.zip
Merge remote branch 'tom/cmake_builds' into next
Diffstat (limited to 'gr-uhd/apps')
-rw-r--r--gr-uhd/apps/CMakeLists.txt17
-rwxr-xr-xgr-uhd/apps/uhd_fft (renamed from gr-uhd/apps/uhd_fft.py)0
-rwxr-xr-xgr-uhd/apps/uhd_rx_cfile (renamed from gr-uhd/apps/uhd_rx_cfile.py)0
-rwxr-xr-xgr-uhd/apps/uhd_rx_nogui (renamed from gr-uhd/apps/uhd_rx_nogui.py)0
-rwxr-xr-xgr-uhd/apps/uhd_siggen51
-rw-r--r--[-rwxr-xr-x]gr-uhd/apps/uhd_siggen_base.py (renamed from gr-uhd/apps/uhd_siggen.py)4
-rwxr-xr-xgr-uhd/apps/uhd_siggen_gui (renamed from gr-uhd/apps/uhd_siggen_gui.py)2
7 files changed, 66 insertions, 8 deletions
diff --git a/gr-uhd/apps/CMakeLists.txt b/gr-uhd/apps/CMakeLists.txt
index 20ae8993f..1d68c00ac 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/uhd
+ 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 9e2554768..9e2554768 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..26e0d79a4
--- /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.uhd import uhd_siggen_base as 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 ff36b4f4d..02f98facf 100755..100644
--- a/gr-uhd/apps/uhd_siggen.py
+++ b/gr-uhd/apps/uhd_siggen_base.py
@@ -364,7 +364,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"
@@ -388,4 +388,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 1f6a73c2c..7e0fdc041 100755
--- a/gr-uhd/apps/uhd_siggen_gui.py
+++ b/gr-uhd/apps/uhd_siggen_gui
@@ -24,7 +24,7 @@ import wx
from gnuradio import gr, uhd
from gnuradio.gr.pubsub import pubsub
from gnuradio.wxgui import gui, forms
-import uhd_siggen
+from gnuradio.uhd import uhd_siggen_base as uhd_siggen
import sys, math
class app_gui(pubsub):