summaryrefslogtreecommitdiff
path: root/gr-fft/grc
diff options
context:
space:
mode:
Diffstat (limited to 'gr-fft/grc')
-rw-r--r--gr-fft/grc/CMakeLists.txt10
-rw-r--r--gr-fft/grc/fft.tree.yml7
-rw-r--r--gr-fft/grc/fft_block_tree.xml41
-rw-r--r--gr-fft/grc/fft_ctrlport_probe_psd.block.yml31
-rw-r--r--gr-fft/grc/fft_ctrlport_probe_psd.xml63
-rw-r--r--gr-fft/grc/fft_fft_vxx.block.yml60
-rw-r--r--gr-fft/grc/fft_fft_vxx.xml88
-rw-r--r--gr-fft/grc/fft_goertzel_fc.block.yml30
-rw-r--r--gr-fft/grc/fft_goertzel_fc.xml37
-rw-r--r--gr-fft/grc/fft_logpwrfft_x.block.yml59
-rw-r--r--gr-fft/grc/fft_logpwrfft_x.xml90
11 files changed, 192 insertions, 324 deletions
diff --git a/gr-fft/grc/CMakeLists.txt b/gr-fft/grc/CMakeLists.txt
index 8eeb431c3e..d0432c4281 100644
--- a/gr-fft/grc/CMakeLists.txt
+++ b/gr-fft/grc/CMakeLists.txt
@@ -18,10 +18,10 @@
# Boston, MA 02110-1301, USA.
install(FILES
- fft_block_tree.xml
- fft_fft_vxx.xml
- fft_goertzel_fc.xml
- fft_logpwrfft_x.xml
- fft_ctrlport_probe_psd.xml
+ fft.tree.yml
+ fft_fft_vxx.block.yml
+ fft_goertzel_fc.block.yml
+ fft_logpwrfft_x.block.yml
+ fft_ctrlport_probe_psd.block.yml
DESTINATION ${GRC_BLOCKS_DIR}
)
diff --git a/gr-fft/grc/fft.tree.yml b/gr-fft/grc/fft.tree.yml
new file mode 100644
index 0000000000..c198bc4573
--- /dev/null
+++ b/gr-fft/grc/fft.tree.yml
@@ -0,0 +1,7 @@
+'[Core]':
+- Fourier Analysis:
+ - fft_vxx
+ - goertzel_fc
+ - logpwrfft_x
+- Control Port:
+ - fft_ctrlport_probe_psd
diff --git a/gr-fft/grc/fft_block_tree.xml b/gr-fft/grc/fft_block_tree.xml
deleted file mode 100644
index e844d837b4..0000000000
--- a/gr-fft/grc/fft_block_tree.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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>[Core]</name> <!-- Blank for Root Name -->
- <cat>
- <name>Fourier Analysis</name>
- <block>fft_vxx</block>
- <block>goertzel_fc</block>
- <block>logpwrfft_x</block>
- </cat>
- <cat>
- <name>Control Port</name>
- <block>fft_ctrlport_probe_psd</block>
- </cat>
-</cat>
diff --git a/gr-fft/grc/fft_ctrlport_probe_psd.block.yml b/gr-fft/grc/fft_ctrlport_probe_psd.block.yml
new file mode 100644
index 0000000000..3349f42639
--- /dev/null
+++ b/gr-fft/grc/fft_ctrlport_probe_psd.block.yml
@@ -0,0 +1,31 @@
+id: fft_ctrlport_probe_psd
+label: Ctrlport Probe PSD
+
+parameters:
+- id: name
+ label: Name
+ dtype: string
+ default: psd
+- id: desc
+ label: Description
+ dtype: string
+ default: PSD Plot
+- id: len
+ label: Length
+ dtype: int
+ default: '1024'
+
+inputs:
+- domain: stream
+ dtype: complex
+
+templates:
+ imports: from gnuradio import fft
+ make: fft.ctrlport_probe_psd(${name}, ${desc}, ${len})
+ callbacks:
+ - set_length(${len})
+
+documentation: |-
+ Place this in a graph to export PSD values to a GRCP port probe.
+
+file_format: 1
diff --git a/gr-fft/grc/fft_ctrlport_probe_psd.xml b/gr-fft/grc/fft_ctrlport_probe_psd.xml
deleted file mode 100644
index f50144ba92..0000000000
--- a/gr-fft/grc/fft_ctrlport_probe_psd.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?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>
- <name>Ctrlport Probe PSD</name>
- <key>fft_ctrlport_probe_psd</key>
- <import>from gnuradio import fft</import>
- <make>fft.ctrlport_probe_psd($name, $desc, $len)</make>
- <callback>set_length($len)</callback>
-
- <param>
- <name>Name</name>
- <key>name</key>
- <value>psd</value>
- <type>string</type>
- </param>
-
- <param>
- <name>Description</name>
- <key>desc</key>
- <value>PSD Plot</value>
- <type>string</type>
- </param>
-
- <param>
- <name>Length</name>
- <key>len</key>
- <value>1024</value>
- <type>int</type>
- </param>
-
-
- <sink>
- <name>in</name>
- <type>complex</type>
- </sink>
-
- <doc>
- Place this in a graph to export PSD values to a GRCP port probe.
- </doc>
-
-</block>
-
diff --git a/gr-fft/grc/fft_fft_vxx.block.yml b/gr-fft/grc/fft_fft_vxx.block.yml
new file mode 100644
index 0000000000..33143f688a
--- /dev/null
+++ b/gr-fft/grc/fft_fft_vxx.block.yml
@@ -0,0 +1,60 @@
+id: fft_vxx
+label: FFT
+
+parameters:
+- id: type
+ label: Input Type
+ dtype: enum
+ options: [complex, float]
+ option_attributes:
+ hide_shift: ['', all]
+ hide: part
+- id: fft_size
+ label: FFT Size
+ dtype: int
+ default: '1024'
+ hide: ${ 'part' if vlen == 1 else 'none' }
+- id: forward
+ label: Forward/Reverse
+ dtype: enum
+ options: ['True', 'False']
+ option_labels: [Forward, Reverse]
+- id: window
+ label: Window
+ dtype: real_vector
+ default: window.blackmanharris(1024)
+- id: shift
+ label: Shift
+ dtype: enum
+ options: ['True', 'False']
+ option_labels: ['Yes', 'No']
+ hide: ${ type.hide_shift }
+- id: nthreads
+ label: Num. Threads
+ dtype: int
+ default: '1'
+
+inputs:
+- domain: stream
+ dtype: ${ type }
+ vlen: ${ fft_size }
+
+outputs:
+- domain: stream
+ dtype: complex
+ vlen: ${ fft_size }
+
+templates:
+ imports: |-
+ from gnuradio import fft
+ from gnuradio.fft import window
+ make: |-
+ % if type == "complex":
+ fft.fft_vcc(${fft_size}, ${forward}, ${window}, ${shift}, ${nthreads})
+ % else:
+ fft.fft_vfc(${fft_size}, ${forward}, ${window}, ${nthreads})
+ % endif
+ callbacks:
+ - set_nthreads(${nthreads})
+
+file_format: 1
diff --git a/gr-fft/grc/fft_fft_vxx.xml b/gr-fft/grc/fft_fft_vxx.xml
deleted file mode 100644
index 028721fe25..0000000000
--- a/gr-fft/grc/fft_fft_vxx.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##FFT
-###################################################
- -->
-<block>
- <name>FFT</name>
- <key>fft_vxx</key>
- <import>from gnuradio import fft</import>
- <import>from gnuradio.fft 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/fft_goertzel_fc.block.yml b/gr-fft/grc/fft_goertzel_fc.block.yml
new file mode 100644
index 0000000000..6ea74e7f53
--- /dev/null
+++ b/gr-fft/grc/fft_goertzel_fc.block.yml
@@ -0,0 +1,30 @@
+id: goertzel_fc
+label: Goertzel
+
+parameters:
+- id: rate
+ label: Rate
+ dtype: int
+- id: len
+ label: Length
+ dtype: int
+- id: freq
+ label: Frequency
+ dtype: real
+
+inputs:
+- domain: stream
+ dtype: float
+
+outputs:
+- domain: stream
+ dtype: complex
+
+templates:
+ imports: from gnuradio import fft
+ make: fft.goertzel_fc(${rate}, ${len}, ${freq})
+ callbacks:
+ - set_freq(${freq})
+ - set_rate(${rate})
+
+file_format: 1
diff --git a/gr-fft/grc/fft_goertzel_fc.xml b/gr-fft/grc/fft_goertzel_fc.xml
deleted file mode 100644
index 3712843586..0000000000
--- a/gr-fft/grc/fft_goertzel_fc.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?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>
diff --git a/gr-fft/grc/fft_logpwrfft_x.block.yml b/gr-fft/grc/fft_logpwrfft_x.block.yml
new file mode 100644
index 0000000000..1046fe81aa
--- /dev/null
+++ b/gr-fft/grc/fft_logpwrfft_x.block.yml
@@ -0,0 +1,59 @@
+id: logpwrfft_x
+label: Log Power FFT
+
+parameters:
+- id: type
+ label: Input Type
+ dtype: enum
+ options: [complex, float]
+ option_attributes:
+ fcn: [c, f]
+ hide: part
+- id: sample_rate
+ label: Sample Rate
+ dtype: real
+ default: samp_rate
+- id: fft_size
+ label: FFT Size
+ dtype: int
+ default: '1024'
+ hide: ${ 'part' if vlen == 1 else 'none' }
+- id: ref_scale
+ label: Reference Scale
+ dtype: real
+ default: '2'
+- id: frame_rate
+ label: Frame Rate
+ dtype: real
+ default: '30'
+- id: average
+ label: Average
+ dtype: bool
+ default: 'False'
+ options: ['True', 'False']
+ option_labels: ['On', 'Off']
+- id: avg_alpha
+ label: Average Alpha
+ dtype: real
+ default: '1.0'
+
+inputs:
+- domain: stream
+ dtype: ${ type }
+
+outputs:
+- domain: stream
+ dtype: float
+ vlen: ${ fft_size }
+
+templates:
+ imports: from gnuradio.fft import logpwrfft
+ make: "logpwrfft.logpwrfft_${type.fcn}(\n\tsample_rate=${sample_rate},\n\tfft_size=${fft_size},\n\
+ \tref_scale=${ref_scale},\n\tframe_rate=${frame_rate},\n\tavg_alpha=${avg_alpha},\n\
+ \taverage=${average},\n)"
+ callbacks:
+ - set_sample_rate(${sample_rate})
+ - set_avg_alpha(${avg_alpha})
+ - set_average(${average})
+
+file_format: 1
diff --git a/gr-fft/grc/fft_logpwrfft_x.xml b/gr-fft/grc/fft_logpwrfft_x.xml
deleted file mode 100644
index ee45b577d8..0000000000
--- a/gr-fft/grc/fft_logpwrfft_x.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Log Power FFT
-###################################################
- -->
-<block>
- <name>Log Power FFT</name>
- <key>logpwrfft_x</key>
- <import>from gnuradio.fft import logpwrfft</import>
- <make>logpwrfft.logpwrfft_$(type.fcn)(
- sample_rate=$sample_rate,
- fft_size=$fft_size,
- ref_scale=$ref_scale,
- frame_rate=$frame_rate,
- avg_alpha=$avg_alpha,
- average=$average,
-)</make>
- <callback>set_sample_rate($sample_rate)</callback>
- <callback>set_avg_alpha($avg_alpha)</callback>
- <callback>set_average($average)</callback>
- <param>
- <name>Input Type</name>
- <key>type</key>
- <type>enum</type>
- <option>
- <name>Complex</name>
- <key>complex</key>
- <opt>fcn:c</opt>
- </option>
- <option>
- <name>Float</name>
- <key>float</key>
- <opt>fcn:f</opt>
- </option>
- </param>
- <param>
- <name>Sample Rate</name>
- <key>sample_rate</key>
- <value>samp_rate</value>
- <type>real</type>
- </param>
- <param>
- <name>FFT Size</name>
- <key>fft_size</key>
- <value>1024</value>
- <type>int</type>
- </param>
- <param>
- <name>Reference Scale</name>
- <key>ref_scale</key>
- <value>2</value>
- <type>real</type>
- </param>
- <param>
- <name>Frame Rate</name>
- <key>frame_rate</key>
- <value>30</value>
- <type>real</type>
- </param>
- <param>
- <name>Average</name>
- <key>average</key>
- <value>False</value>
- <type>bool</type>
- <option>
- <name>On</name>
- <key>True</key>
- </option>
- <option>
- <name>Off</name>
- <key>False</key>
- </option>
- </param>
- <param>
- <name>Average Alpha</name>
- <key>avg_alpha</key>
- <value>1.0</value>
- <type>real</type>
- </param>
- <sink>
- <name>in</name>
- <type>$type</type>
- </sink>
- <source>
- <name>out</name>
- <type>float</type>
- <vlen>$fft_size</vlen>
- </source>
-</block>