summaryrefslogtreecommitdiff
path: root/gr-fft/grc
diff options
context:
space:
mode:
Diffstat (limited to 'gr-fft/grc')
-rw-r--r--gr-fft/grc/CMakeLists.txt26
-rw-r--r--gr-fft/grc/fft_block_tree.xml36
-rw-r--r--gr-fft/grc/fft_vxx.xml88
-rw-r--r--gr-fft/grc/goertzel_fc.xml37
4 files changed, 187 insertions, 0 deletions
diff --git a/gr-fft/grc/CMakeLists.txt b/gr-fft/grc/CMakeLists.txt
new file mode 100644
index 000000000..632a9aaad
--- /dev/null
+++ b/gr-fft/grc/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Copyright 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.
+
+install(FILES
+ fft_block_tree.xml
+ fft_vxx.xml
+ goertzel_fc.xml
+ DESTINATION ${GRC_BLOCKS_DIR}
+ COMPONENT "fft_python"
+)
diff --git a/gr-fft/grc/fft_block_tree.xml b/gr-fft/grc/fft_block_tree.xml
new file mode 100644
index 000000000..3bda77eae
--- /dev/null
+++ b/gr-fft/grc/fft_block_tree.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 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.
+-->
+
+<!--
+###################################################
+##Block Tree for GR FFT blocks.
+###################################################
+ -->
+<cat>
+ <name></name> <!-- Blank for Root Name -->
+ <cat>
+ <name>FFT</name>
+ <block>fft_vxx</block>
+ <block>goertzel_fc</block>
+ </cat>
+</cat>
diff --git a/gr-fft/grc/fft_vxx.xml b/gr-fft/grc/fft_vxx.xml
new file mode 100644
index 000000000..69f12ace7
--- /dev/null
+++ b/gr-fft/grc/fft_vxx.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##FFT
+###################################################
+ -->
+<block>
+ <name>FFT</name>
+ <key>fft_vxx</key>
+ <import>from gnuradio import fft</import>
+ <import>from gnuradio import window</import>
+ <make>#if $type() == "complex"
+fft.fft_vcc($fft_size, $forward, $window, $shift, $nthreads)
+#else
+fft.fft_vfc($fft_size, $forward, $window, $nthreads)
+#end if</make>
+ <callback>set_nthreads($nthreads)</callback>
+ <param>
+ <name>Input Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>hide_shift:</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>hide_shift:all</opt>
+ </option>
+ </param>
+ <param>
+ <name>FFT Size</name>
+ <key>fft_size</key>
+ <value>1024</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Forward/Reverse</name>
+ <key>forward</key>
+ <type>enum</type>
+ <option>
+ <name>Forward</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>Reverse</name>
+ <key>False</key>
+ </option>
+ </param>
+ <param>
+ <name>Window</name>
+ <key>window</key>
+ <value>window.blackmanharris(1024)</value>
+ <type>real_vector</type>
+ </param>
+ <param>
+ <name>Shift</name>
+ <key>shift</key>
+ <type>enum</type>
+ <hide>$type.hide_shift</hide>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ </param>
+ <param>
+ <name>Num. Threads</name>
+ <key>nthreads</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>$type</type>
+ <vlen>$fft_size</vlen>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ <vlen>$fft_size</vlen>
+ </source>
+</block>
diff --git a/gr-fft/grc/goertzel_fc.xml b/gr-fft/grc/goertzel_fc.xml
new file mode 100644
index 000000000..371284358
--- /dev/null
+++ b/gr-fft/grc/goertzel_fc.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Goertzel
+###################################################
+ -->
+<block>
+ <name>Goertzel</name>
+ <key>goertzel_fc</key>
+ <import>from gnuradio import fft</import>
+ <make>fft.goertzel_fc($rate, $len, $freq)</make>
+ <callback>set_freq($freq)</callback>
+ <callback>set_rate($rate)</callback>
+ <param>
+ <name>Rate</name>
+ <key>rate</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Length</name>
+ <key>len</key>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Frequency</name>
+ <key>freq</key>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>