diff options
author | Håkon Vågsether <haakonsv@gmail.com> | 2017-09-24 12:16:22 +0200 |
---|---|---|
committer | Håkon Vågsether <haakonsv@gmail.com> | 2017-10-10 10:49:36 +0200 |
commit | baf7eaf8f29d5a490f2580917362cf5b3db47281 (patch) | |
tree | 7afab4ee2dfa6439ecf95d47aa68996020ea04c5 /gr-analog/grc | |
parent | 6fa9d33246251f44a0e78682e50e9a1cb0b03171 (diff) |
Added auto-generated YAML blocks
Diffstat (limited to 'gr-analog/grc')
71 files changed, 1271 insertions, 1877 deletions
diff --git a/gr-analog/grc/CMakeLists.txt b/gr-analog/grc/CMakeLists.txt index 1251af5b83..35456cee31 100644 --- a/gr-analog/grc/CMakeLists.txt +++ b/gr-analog/grc/CMakeLists.txt @@ -17,5 +17,5 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -file(GLOB xml_files "*.xml") -install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR}) +file(GLOB yml_files "*.yml") +install(FILES ${yml_files} DESTINATION ${GRC_BLOCKS_DIR}) diff --git a/gr-analog/grc/analog.tree.yml b/gr-analog/grc/analog.tree.yml new file mode 100644 index 0000000000..44a88bd5c5 --- /dev/null +++ b/gr-analog/grc/analog.tree.yml @@ -0,0 +1,39 @@ +'[Core]': +- Level Controllers: + - analog_agc_xx + - analog_agc2_xx + - analog_agc3_xx + - analog_feedforward_agc_cc + - analog_ctcss_squelch_ff + - analog_pwr_squelch_xx + - analog_simple_squelch_cc + - analog_standard_squelch + - analog_rail_ff +- Modulators: + - analog_frequency_modulator_fc + - analog_phase_modulator_fc + - analog_quadrature_demod_cf + - analog_nbfm_tx + - analog_nbfm_rx + - analog_wfm_tx + - analog_wfm_rcv + - analog_wfm_rcv_pll + - analog_am_demod_cf + - analog_fm_demod_cf + - analog_fm_deemph + - analog_fm_preemph +- Waveform Generators: + - analog_sig_source_x + - analog_const_source_x + - analog_noise_source_x + - analog_fastnoise_source_x + - analog_random_source_x + - analog_random_uniform_source_x +- Synchronizers: + - analog_pll_carriertracking_cc + - analog_pll_freqdet_cf + - analog_pll_refout_cc +- Peak Detectors: + - analog_dpll_bb +- Measurement Tools: + - analog_probe_avg_mag_sqrd_x diff --git a/gr-analog/grc/analog_agc2_xx.block.yml b/gr-analog/grc/analog_agc2_xx.block.yml new file mode 100644 index 0000000000..93990b5c3b --- /dev/null +++ b/gr-analog/grc/analog_agc2_xx.block.yml @@ -0,0 +1,53 @@ +id: analog_agc2_xx +label: AGC2 + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float] + option_attributes: + fcn: [cc, ff] + hide: part +- id: attack_rate + label: Attack Rate + dtype: real + default: 1e-1 +- id: decay_rate + label: Decay Rate + dtype: real + default: 1e-2 +- id: reference + label: Reference + dtype: real + default: '1.0' +- id: gain + label: Gain + dtype: real + default: '1.0' +- id: max_gain + label: Max Gain + dtype: real + default: '65536' + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import analog + make: |- + analog.agc2_${type.fcn}(${attack_rate}, ${decay_rate}, ${reference}, ${gain}) + self.${id}.set_max_gain(${max_gain}) + callbacks: + - set_attack_rate(${attack_rate}) + - set_decay_rate(${decay_rate}) + - set_reference(${reference}) + - set_gain(${gain}) + - set_max_gain(${max_gain}) + +file_format: 1 diff --git a/gr-analog/grc/analog_agc2_xx.xml b/gr-analog/grc/analog_agc2_xx.xml deleted file mode 100644 index cafd6a09b5..0000000000 --- a/gr-analog/grc/analog_agc2_xx.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##AGC2 -################################################### - --> -<block> - <name>AGC2</name> - <key>analog_agc2_xx</key> - <import>from gnuradio import analog</import> - <make>analog.agc2_$(type.fcn)($attack_rate, $decay_rate, $reference, $gain) -self.$(id).set_max_gain($max_gain)</make> - <callback>set_attack_rate($attack_rate)</callback> - <callback>set_decay_rate($decay_rate)</callback> - <callback>set_reference($reference)</callback> - <callback>set_gain($gain)</callback> - <callback>set_max_gain($max_gain)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - </param> - <param> - <name>Attack Rate</name> - <key>attack_rate</key> - <value>1e-1</value> - <type>real</type> - </param> - <param> - <name>Decay Rate</name> - <key>decay_rate</key> - <value>1e-2</value> - <type>real</type> - </param> - <param> - <name>Reference</name> - <key>reference</key> - <value>1.0</value> - <type>real</type> - </param> - <param> - <name>Gain</name> - <key>gain</key> - <value>1.0</value> - <type>real</type> - </param> - <param> - <name>Max Gain</name> - <key>max_gain</key> - <value>65536</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-analog/grc/analog_agc3_xx.block.yml b/gr-analog/grc/analog_agc3_xx.block.yml new file mode 100644 index 0000000000..17a03f6771 --- /dev/null +++ b/gr-analog/grc/analog_agc3_xx.block.yml @@ -0,0 +1,57 @@ +id: analog_agc3_xx +label: AGC3 + +parameters: +- id: type + label: Type + dtype: enum + options: [complex] + option_attributes: + fcn: [cc] + hide: part +- id: attack_rate + label: Attack Rate + dtype: real + default: 1e-3 +- id: decay_rate + label: Decay Rate + dtype: real + default: 1e-4 +- id: reference + label: Reference + dtype: real + default: '1.0' +- id: gain + label: Gain + dtype: real + default: '1.0' +- id: max_gain + label: Max Gain + dtype: real + default: '65536' +- id: iir_update_decim + label: IIR Update Decimation + dtype: real + default: '1' + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import analog + make: |- + analog.agc3_${type.fcn}(${attack_rate}, ${decay_rate}, ${reference}, ${gain}, ${iir_update_decim}) + self.${id}.set_max_gain(${max_gain}) + callbacks: + - set_attack_rate(${attack_rate}) + - set_decay_rate(${decay_rate}) + - set_reference(${reference}) + - set_gain(${gain}) + - set_max_gain(${max_gain}) + +file_format: 1 diff --git a/gr-analog/grc/analog_agc3_xx.xml b/gr-analog/grc/analog_agc3_xx.xml deleted file mode 100644 index 1e6b9fd382..0000000000 --- a/gr-analog/grc/analog_agc3_xx.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##AGC3 -################################################### - --> -<block> - <name>AGC3</name> - <key>analog_agc3_xx</key> - <import>from gnuradio import analog</import> - <make>analog.agc3_$(type.fcn)($attack_rate, $decay_rate, $reference, $gain, $iir_update_decim) -self.$(id).set_max_gain($max_gain)</make> - <callback>set_attack_rate($attack_rate)</callback> - <callback>set_decay_rate($decay_rate)</callback> - <callback>set_reference($reference)</callback> - <callback>set_gain($gain)</callback> - <callback>set_max_gain($max_gain)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> -<!-- <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> --> - </param> - <param> - <name>Attack Rate</name> - <key>attack_rate</key> - <value>1e-3</value> - <type>real</type> - </param> - <param> - <name>Decay Rate</name> - <key>decay_rate</key> - <value>1e-4</value> - <type>real</type> - </param> - <param> - <name>Reference</name> - <key>reference</key> - <value>1.0</value> - <type>real</type> - </param> - <param> - <name>Gain</name> - <key>gain</key> - <value>1.0</value> - <type>real</type> - </param> - <param> - <name>Max Gain</name> - <key>max_gain</key> - <value>65536</value> - <type>real</type> - </param> - <param> - <name>IIR Update Decimation</name> - <key>iir_update_decim</key> - <value>1</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-analog/grc/analog_agc_xx.block.yml b/gr-analog/grc/analog_agc_xx.block.yml new file mode 100644 index 0000000000..52ef26f79f --- /dev/null +++ b/gr-analog/grc/analog_agc_xx.block.yml @@ -0,0 +1,48 @@ +id: analog_agc_xx +label: AGC + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float] + option_attributes: + fcn: [cc, ff] + hide: part +- id: rate + label: Rate + dtype: real + default: 1e-4 +- id: reference + label: Reference + dtype: real + default: '1.0' +- id: gain + label: Gain + dtype: real + default: '1.0' +- id: max_gain + label: Max Gain + dtype: real + default: '65536' + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import analog + make: |- + analog.agc_${type.fcn}(${rate}, ${reference}, ${gain}) + self.${id}.set_max_gain(${max_gain}) + callbacks: + - set_rate(${rate}) + - set_reference(${reference}) + - set_gain(${gain}) + - set_max_gain(${max_gain}) + +file_format: 1 diff --git a/gr-analog/grc/analog_agc_xx.xml b/gr-analog/grc/analog_agc_xx.xml deleted file mode 100644 index 085ded3d8c..0000000000 --- a/gr-analog/grc/analog_agc_xx.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##AGC -################################################### - --> -<block> - <name>AGC</name> - <key>analog_agc_xx</key> - <import>from gnuradio import analog</import> - <make>analog.agc_$(type.fcn)($rate, $reference, $gain) -self.$(id).set_max_gain($max_gain)</make> - <callback>set_rate($rate)</callback> - <callback>set_reference($reference)</callback> - <callback>set_gain($gain)</callback> - <callback>set_max_gain($max_gain)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - </param> - <param> - <name>Rate</name> - <key>rate</key> - <value>1e-4</value> - <type>real</type> - </param> - <param> - <name>Reference</name> - <key>reference</key> - <value>1.0</value> - <type>real</type> - </param> - <param> - <name>Gain</name> - <key>gain</key> - <value>1.0</value> - <type>real</type> - </param> - <param> - <name>Max Gain</name> - <key>max_gain</key> - <value>65536</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-analog/grc/analog_am_demod_cf.block.yml b/gr-analog/grc/analog_am_demod_cf.block.yml new file mode 100644 index 0000000000..8bc6cc1c31 --- /dev/null +++ b/gr-analog/grc/analog_am_demod_cf.block.yml @@ -0,0 +1,33 @@ +id: analog_am_demod_cf +label: AM Demod + +parameters: +- id: chan_rate + label: Channel Rate + dtype: real +- id: audio_decim + label: Audio Decimation + dtype: int +- id: audio_pass + label: Audio Pass + dtype: real + default: '5000' +- id: audio_stop + label: Audio Stop + dtype: real + default: '5500' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: "analog.am_demod_cf(\n\tchannel_rate=${chan_rate},\n\taudio_decim=${audio_decim},\n\ + \taudio_pass=${audio_pass},\n\taudio_stop=${audio_stop},\n)" + +file_format: 1 diff --git a/gr-analog/grc/analog_am_demod_cf.xml b/gr-analog/grc/analog_am_demod_cf.xml deleted file mode 100644 index b066882bda..0000000000 --- a/gr-analog/grc/analog_am_demod_cf.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##AM Demod -################################################### - --> -<block> - <name>AM Demod</name> - <key>analog_am_demod_cf</key> - <import>from gnuradio import analog</import> - <make>analog.am_demod_cf( - channel_rate=$chan_rate, - audio_decim=$audio_decim, - audio_pass=$audio_pass, - audio_stop=$audio_stop, -)</make> - <param> - <name>Channel Rate</name> - <key>chan_rate</key> - <type>real</type> - </param> - <param> - <name>Audio Decimation</name> - <key>audio_decim</key> - <type>int</type> - </param> - <param> - <name>Audio Pass</name> - <key>audio_pass</key> - <value>5000</value> - <type>real</type> - </param> - <param> - <name>Audio Stop</name> - <key>audio_stop</key> - <value>5500</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_block_tree.xml b/gr-analog/grc/analog_block_tree.xml deleted file mode 100644 index 7337c34c3e..0000000000 --- a/gr-analog/grc/analog_block_tree.xml +++ /dev/null @@ -1,81 +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 Analog blocks. -################################################### - --> -<cat> - <name>[Core]</name> - <cat> - <name>Level Controllers</name> - <block>analog_agc_xx</block> - <block>analog_agc2_xx</block> - <block>analog_agc3_xx</block> - <block>analog_feedforward_agc_cc</block> - <block>analog_ctcss_squelch_ff</block> - <block>analog_pwr_squelch_xx</block> - <block>analog_simple_squelch_cc</block> - <block>analog_standard_squelch</block> - <block>analog_rail_ff</block> - </cat> - <cat> - <name>Modulators</name> - <block>analog_frequency_modulator_fc</block> - <block>analog_phase_modulator_fc</block> - <block>analog_quadrature_demod_cf</block> - <block>analog_nbfm_tx</block> - <block>analog_nbfm_rx</block> - <block>analog_wfm_tx</block> - <block>analog_wfm_rcv</block> - <block>analog_wfm_rcv_pll</block> - <block>analog_am_demod_cf</block> - <block>analog_fm_demod_cf</block> - <block>analog_fm_deemph</block> - <block>analog_fm_preemph</block> - </cat> - <cat> - <name>Waveform Generators</name> - <block>analog_sig_source_x</block> - <block>analog_const_source_x</block> - <block>analog_noise_source_x</block> - <block>analog_fastnoise_source_x</block> - <block>analog_random_source_x</block> - <block>analog_random_uniform_source_x</block> - </cat> - <cat> - <name>Synchronizers</name> - <block>analog_pll_carriertracking_cc</block> - <block>analog_pll_freqdet_cf</block> - <block>analog_pll_refout_cc</block> - </cat> - <cat> - <name>Peak Detectors</name> - <block>analog_dpll_bb</block> - </cat> - <cat> - <name>Measurement Tools</name> - <block>analog_probe_avg_mag_sqrd_x</block> - </cat> -</cat> diff --git a/gr-analog/grc/analog_const_source_x.block.yml b/gr-analog/grc/analog_const_source_x.block.yml new file mode 100644 index 0000000000..ac676b7ac4 --- /dev/null +++ b/gr-analog/grc/analog_const_source_x.block.yml @@ -0,0 +1,28 @@ +id: analog_const_source_x +label: Constant Source + +parameters: +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + const_type: [complex, real, int, int] + fcn: [c, f, i, s] + hide: part +- id: const + label: Constant + dtype: ${ type.const_type } + default: '0' + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import analog + make: analog.sig_source_${type.fcn}(0, analog.GR_CONST_WAVE, 0, 0, ${const}) + callbacks: + - set_offset(${const}) + +file_format: 1 diff --git a/gr-analog/grc/analog_const_source_x.xml b/gr-analog/grc/analog_const_source_x.xml deleted file mode 100644 index de8c306264..0000000000 --- a/gr-analog/grc/analog_const_source_x.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Constant Source: Custom wrapper -################################################### - --> -<block> - <name>Constant Source</name> - <key>analog_const_source_x</key> - <import>from gnuradio import analog</import> - <make>analog.sig_source_$(type.fcn)(0, analog.GR_CONST_WAVE, 0, 0, $const)</make> - <callback>set_offset($const)</callback> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:c</opt> - <opt>const_type:complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:f</opt> - <opt>const_type:real</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - <opt>const_type:int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - <opt>const_type:int</opt> - </option> - </param> - <param> - <name>Constant</name> - <key>const</key> - <value>0</value> - <type>$type.const_type</type> - </param> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-analog/grc/analog_cpfsk_bc.block.yml b/gr-analog/grc/analog_cpfsk_bc.block.yml new file mode 100644 index 0000000000..c9ccbaac27 --- /dev/null +++ b/gr-analog/grc/analog_cpfsk_bc.block.yml @@ -0,0 +1,31 @@ +id: analog_cpfsk_bc +label: CPFSK +category: '[Core]/Deprecated' + +parameters: +- id: k + label: K + dtype: real +- id: amplitude + label: Amplitude + dtype: real +- id: samples_per_symbol + label: Samples/Symbol + dtype: int + default: '2' + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import analog + make: analog.cpfsk_bc(${k}, ${amplitude}, ${samples_per_symbol}) + callbacks: + - set_amplitude(${amplitude}) + +file_format: 1 diff --git a/gr-analog/grc/analog_cpfsk_bc.xml b/gr-analog/grc/analog_cpfsk_bc.xml deleted file mode 100644 index 5108ff61f9..0000000000 --- a/gr-analog/grc/analog_cpfsk_bc.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##CPFSK -################################################### - --> -<block> - <name>CPFSK</name> - <key>analog_cpfsk_bc</key> - <category>[Core]/Deprecated</category> - <import>from gnuradio import analog</import> - <make>analog.cpfsk_bc($k, $amplitude, $samples_per_symbol)</make> - <callback>set_amplitude($amplitude)</callback> - <param> - <name>K</name> - <key>k</key> - <type>real</type> - </param> - <param> - <name>Amplitude</name> - <key>amplitude</key> - <type>real</type> - </param> - <param> - <name>Samples/Symbol</name> - <key>samples_per_symbol</key> - <value>2</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>byte</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-analog/grc/analog_ctcss_squelch_ff.block.yml b/gr-analog/grc/analog_ctcss_squelch_ff.block.yml new file mode 100644 index 0000000000..a3dd89f1f6 --- /dev/null +++ b/gr-analog/grc/analog_ctcss_squelch_ff.block.yml @@ -0,0 +1,45 @@ +id: analog_ctcss_squelch_ff +label: CTCSS Squelch + +parameters: +- id: rate + label: Sampling Rate (Hz) + dtype: real + default: samp_rate +- id: freq + label: Tone Frequency + dtype: real + default: '100.0' +- id: level + label: Level + dtype: real + default: '0.01' +- id: len + label: Length + dtype: int + default: '0' +- id: ramp + label: Ramp + dtype: int + default: '0' +- id: gate + label: Gate + dtype: bool + default: 'False' + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: analog.ctcss_squelch_ff(${rate}, ${freq}, ${level}, ${len}, ${ramp}, ${gate}) + callbacks: + - set_level(${level}) + - set_frequency(${freq}) + +file_format: 1 diff --git a/gr-analog/grc/analog_ctcss_squelch_ff.xml b/gr-analog/grc/analog_ctcss_squelch_ff.xml deleted file mode 100644 index 7a2248aa7e..0000000000 --- a/gr-analog/grc/analog_ctcss_squelch_ff.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0"?> -<!-- -# -# Copyright 2011 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. ---> - -<!-- -################################################### -##CTCSS Squelch -################################################### - --> -<block> - <name>CTCSS Squelch</name> - <key>analog_ctcss_squelch_ff</key> - <import>from gnuradio import analog</import> - <make>analog.ctcss_squelch_ff($rate, $freq, $level, $len, $ramp, $gate)</make> - <callback>set_level($level)</callback> - <callback>set_frequency($freq)</callback> - <param> - <name>Sampling Rate (Hz)</name> - <key>rate</key> - <value>samp_rate</value> - <type>real</type> - </param> - <param> - <name>Tone Frequency</name> - <key>freq</key> - <value>100.0</value> - <type>real</type> - </param> - <param> - <name>Level</name> - <key>level</key> - <value>0.01</value> - <type>real</type> - </param> - <param> - <name>Length</name> - <key>len</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>Ramp</name> - <key>ramp</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>Gate</name> - <key>gate</key> - <value>False</value> - <type>bool</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_dpll_bb.block.yml b/gr-analog/grc/analog_dpll_bb.block.yml new file mode 100644 index 0000000000..289f3a283d --- /dev/null +++ b/gr-analog/grc/analog_dpll_bb.block.yml @@ -0,0 +1,26 @@ +id: analog_dpll_bb +label: Detect Peak + +parameters: +- id: period + label: Period + dtype: real +- id: gain + label: Gain + dtype: real + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import analog + make: analog.dpll_bb(${period}, ${gain}) + callbacks: + - set_gain(${gain}) + +file_format: 1 diff --git a/gr-analog/grc/analog_dpll_bb.xml b/gr-analog/grc/analog_dpll_bb.xml deleted file mode 100644 index 65a489414d..0000000000 --- a/gr-analog/grc/analog_dpll_bb.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Detect Peak -################################################### - --> -<block> - <name>Detect Peak</name> - <key>analog_dpll_bb</key> - <import>from gnuradio import analog</import> - <make>analog.dpll_bb($period, $gain)</make> - <callback>set_gain($gain)</callback> - <param> - <name>Period</name> - <key>period</key> - <type>real</type> - </param> - <param> - <name>Gain</name> - <key>gain</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>byte</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> -</block> diff --git a/gr-analog/grc/analog_fastnoise_source_x.block.yml b/gr-analog/grc/analog_fastnoise_source_x.block.yml new file mode 100644 index 0000000000..21c4366074 --- /dev/null +++ b/gr-analog/grc/analog_fastnoise_source_x.block.yml @@ -0,0 +1,45 @@ +id: analog_fastnoise_source_x +label: Fast Noise Source + +parameters: +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [c, f, i, s] + hide: part +- id: noise_type + label: Noise Type + dtype: int + default: analog.GR_GAUSSIAN + options: [analog.GR_UNIFORM, analog.GR_GAUSSIAN, analog.GR_LAPLACIAN, analog.GR_IMPULSE] + option_labels: [Uniform, Gaussian, Laplacian, Impulse] +- id: amp + label: Amplitude + dtype: real + default: '1' +- id: seed + label: Seed + dtype: int + default: '0' +- id: samples + label: Variate Pool Size + dtype: int + default: '8192' + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import analog + make: analog.fastnoise_source_${type.fcn}(${noise_type}, ${amp}, ${seed}, ${samples}) + callbacks: + - set_type(${noise_type}) + - set_amplitude(${amp}) + +documentation: |- + The fast noise source works by pre-generating a pool of random variates taken from the specified distribution. At runtime, samples are then uniform randomly chosen from this pool which is a very fast operation. + +file_format: 1 diff --git a/gr-analog/grc/analog_fastnoise_source_x.xml b/gr-analog/grc/analog_fastnoise_source_x.xml deleted file mode 100644 index f18c8c2f54..0000000000 --- a/gr-analog/grc/analog_fastnoise_source_x.xml +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Fast Noise Source -################################################### - --> -<block> - <name>Fast Noise Source</name> - <key>analog_fastnoise_source_x</key> - <import>from gnuradio import analog</import> - <make>analog.fastnoise_source_$(type.fcn)($noise_type, $amp, $seed, $samples)</make> - <callback>set_type($noise_type)</callback> - <callback>set_amplitude($amp)</callback> - <param> - <name>Output 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> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - </option> - </param> - <param> - <name>Noise Type</name> - <key>noise_type</key> - <value>analog.GR_GAUSSIAN</value> - <type>int</type> - <option> - <name>Uniform</name> - <key>analog.GR_UNIFORM</key> - </option> - <option> - <name>Gaussian</name> - <key>analog.GR_GAUSSIAN</key> - </option> - <option> - <name>Laplacian</name> - <key>analog.GR_LAPLACIAN</key> - </option> - <option> - <name>Impulse</name> - <key>analog.GR_IMPULSE</key> - </option> - </param> - <param> - <name>Amplitude</name> - <key>amp</key> - <value>1</value> - <type>real</type> - </param> - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>Variate Pool Size</name> - <key>samples</key> - <value>8192</value> - <type>int</type> - </param> - <source> - <name>out</name> - <type>$type</type> - </source> - <doc> -The fast noise source works by pre-generating a pool of random variates taken from the specified distribution. At runtime, samples are then uniform randomly chosen from this pool which is a very fast operation. - </doc> -</block> diff --git a/gr-analog/grc/analog_feedforward_agc_cc.block.yml b/gr-analog/grc/analog_feedforward_agc_cc.block.yml new file mode 100644 index 0000000000..fd49a654a8 --- /dev/null +++ b/gr-analog/grc/analog_feedforward_agc_cc.block.yml @@ -0,0 +1,26 @@ +id: analog_feedforward_agc_cc +label: Feed Forward AGC + +parameters: +- id: num_samples + label: Num Samples + dtype: int + default: '1024' +- id: reference + label: Reference + dtype: real + default: '1.0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import analog + make: analog.feedforward_agc_cc(${num_samples}, ${reference}) + +file_format: 1 diff --git a/gr-analog/grc/analog_feedforward_agc_cc.xml b/gr-analog/grc/analog_feedforward_agc_cc.xml deleted file mode 100644 index 66d200a847..0000000000 --- a/gr-analog/grc/analog_feedforward_agc_cc.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Feed Forward AGC -################################################### - --> -<block> - <name>Feed Forward AGC</name> - <key>analog_feedforward_agc_cc</key> - <import>from gnuradio import analog</import> - <make>analog.feedforward_agc_cc($num_samples, $reference)</make> - <param> - <name>Num Samples</name> - <key>num_samples</key> - <value>1024</value> - <type>int</type> - </param> - <param> - <name>Reference</name> - <key>reference</key> - <value>1.0</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-analog/grc/analog_fm_deemph.block.yml b/gr-analog/grc/analog_fm_deemph.block.yml new file mode 100644 index 0000000000..b9c11a6842 --- /dev/null +++ b/gr-analog/grc/analog_fm_deemph.block.yml @@ -0,0 +1,25 @@ +id: analog_fm_deemph +label: FM Deemphasis + +parameters: +- id: samp_rate + label: Sample Rate + dtype: real +- id: tau + label: Tau + dtype: real + default: 75e-6 + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: analog.fm_deemph(fs=${samp_rate}, tau=${tau}) + +file_format: 1 diff --git a/gr-analog/grc/analog_fm_deemph.xml b/gr-analog/grc/analog_fm_deemph.xml deleted file mode 100644 index 0fcb5a87d4..0000000000 --- a/gr-analog/grc/analog_fm_deemph.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##FM Deemphasis -################################################### - --> -<block> - <name>FM Deemphasis</name> - <key>analog_fm_deemph</key> - <import>from gnuradio import analog</import> - <make>analog.fm_deemph(fs=$samp_rate, tau=$tau)</make> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <type>real</type> - </param> - <param> - <name>Tau</name> - <key>tau</key> - <value>75e-6</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_fm_demod_cf.block.yml b/gr-analog/grc/analog_fm_demod_cf.block.yml new file mode 100644 index 0000000000..a558253a2c --- /dev/null +++ b/gr-analog/grc/analog_fm_demod_cf.block.yml @@ -0,0 +1,46 @@ +id: analog_fm_demod_cf +label: FM Demod + +parameters: +- id: chan_rate + label: Channel Rate + dtype: real +- id: audio_decim + label: Audio Decimation + dtype: int +- id: deviation + label: Deviation + dtype: real + default: '75000' +- id: audio_pass + label: Audio Pass + dtype: real + default: '15000' +- id: audio_stop + label: Audio Stop + dtype: real + default: '16000' +- id: gain + label: Gain + dtype: real + default: '1.0' +- id: tau + label: Tau + dtype: real + default: 75e-6 + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: "analog.fm_demod_cf(\n\tchannel_rate=${chan_rate},\n\taudio_decim=${audio_decim},\n\ + \tdeviation=${deviation},\n\taudio_pass=${audio_pass},\n\taudio_stop=${audio_stop},\n\ + \tgain=${gain},\n\ttau=${tau},\n)" + +file_format: 1 diff --git a/gr-analog/grc/analog_fm_demod_cf.xml b/gr-analog/grc/analog_fm_demod_cf.xml deleted file mode 100644 index c903ddfc73..0000000000 --- a/gr-analog/grc/analog_fm_demod_cf.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##FM Demod -################################################### - --> -<block> - <name>FM Demod</name> - <key>analog_fm_demod_cf</key> - <import>from gnuradio import analog</import> - <make>analog.fm_demod_cf( - channel_rate=$chan_rate, - audio_decim=$audio_decim, - deviation=$deviation, - audio_pass=$audio_pass, - audio_stop=$audio_stop, - gain=$gain, - tau=$tau, -)</make> - <param> - <name>Channel Rate</name> - <key>chan_rate</key> - <type>real</type> - </param> - <param> - <name>Audio Decimation</name> - <key>audio_decim</key> - <type>int</type> - </param> - <param> - <name>Deviation</name> - <key>deviation</key> - <value>75000</value> - <type>real</type> - </param> - <param> - <name>Audio Pass</name> - <key>audio_pass</key> - <value>15000</value> - <type>real</type> - </param> - <param> - <name>Audio Stop</name> - <key>audio_stop</key> - <value>16000</value> - <type>real</type> - </param> - <param> - <name>Gain</name> - <key>gain</key> - <value>1.0</value> - <type>real</type> - </param> - <param> - <name>Tau</name> - <key>tau</key> - <value>75e-6</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_fm_preemph.block.yml b/gr-analog/grc/analog_fm_preemph.block.yml new file mode 100644 index 0000000000..d3f05d3164 --- /dev/null +++ b/gr-analog/grc/analog_fm_preemph.block.yml @@ -0,0 +1,29 @@ +id: analog_fm_preemph +label: FM Preemphasis + +parameters: +- id: samp_rate + label: Sample Rate + dtype: real +- id: tau + label: Tau + dtype: real + default: 75e-6 +- id: fh + label: High Corner Freq + dtype: real + default: '-1.0' + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: analog.fm_preemph(fs=${samp_rate}, tau=${tau}, fh=${fh}) + +file_format: 1 diff --git a/gr-analog/grc/analog_fm_preemph.xml b/gr-analog/grc/analog_fm_preemph.xml deleted file mode 100644 index a754ce9c6f..0000000000 --- a/gr-analog/grc/analog_fm_preemph.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##FM Preemphasis -################################################### - --> -<block> - <name>FM Preemphasis</name> - <key>analog_fm_preemph</key> - <import>from gnuradio import analog</import> - <make>analog.fm_preemph(fs=$samp_rate, tau=$tau, fh=$fh)</make> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <type>real</type> - </param> - <param> - <name>Tau</name> - <key>tau</key> - <value>75e-6</value> - <type>real</type> - </param> - <param> - <name>High Corner Freq</name> - <key>fh</key> - <value>-1.0</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_fmdet_cf.block.yml b/gr-analog/grc/analog_fmdet_cf.block.yml new file mode 100644 index 0000000000..ee8661b80f --- /dev/null +++ b/gr-analog/grc/analog_fmdet_cf.block.yml @@ -0,0 +1,31 @@ +id: analog_fmdet_cf +label: FM Detector + +parameters: +- id: samplerate + label: Sample rate + dtype: real +- id: freq_low + label: Lowest frequency + dtype: real +- id: freq_high + label: Highest frequency + dtype: real +- id: scl + label: Scale factor + dtype: real + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: "analog.fmdet_cf(\n\tsamplerate=${samplerate},\n\tfreq_low=${freq_low},\n\ + \tfreq_high=${freq_high},\n\tscl=${scl}\n)" + +file_format: 1 diff --git a/gr-analog/grc/analog_fmdet_cf.xml b/gr-analog/grc/analog_fmdet_cf.xml deleted file mode 100644 index 26688b2893..0000000000 --- a/gr-analog/grc/analog_fmdet_cf.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##FM Detector -################################################### - --> -<block> - <name>FM Detector</name> - <key>analog_fmdet_cf</key> - <import>from gnuradio import analog</import> - <make>analog.fmdet_cf( - samplerate=$samplerate, - freq_low=$freq_low, - freq_high=$freq_high, - scl=$scl -)</make> - <param> - <name>Sample rate</name> - <key>samplerate</key> - <type>real</type> - </param> - <param> - <name>Lowest frequency</name> - <key>freq_low</key> - <type>real</type> - </param> - <param> - <name>Highest frequency</name> - <key>freq_high</key> - <type>real</type> - </param> - <param> - <name>Scale factor</name> - <key>scl</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_frequency_modulator_fc.block.yml b/gr-analog/grc/analog_frequency_modulator_fc.block.yml new file mode 100644 index 0000000000..09f3e807f3 --- /dev/null +++ b/gr-analog/grc/analog_frequency_modulator_fc.block.yml @@ -0,0 +1,23 @@ +id: analog_frequency_modulator_fc +label: Frequency Mod + +parameters: +- id: sensitivity + label: Sensitivity + dtype: real + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import analog + make: analog.frequency_modulator_fc(${sensitivity}) + callbacks: + - set_sensitivity(${sensitivity}) + +file_format: 1 diff --git a/gr-analog/grc/analog_frequency_modulator_fc.xml b/gr-analog/grc/analog_frequency_modulator_fc.xml deleted file mode 100644 index 3b6cd159a1..0000000000 --- a/gr-analog/grc/analog_frequency_modulator_fc.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Frequency Modulator -################################################### - --> -<block> - <name>Frequency Mod</name> - <key>analog_frequency_modulator_fc</key> - <import>from gnuradio import analog</import> - <make>analog.frequency_modulator_fc($sensitivity)</make> - <callback>set_sensitivity($sensitivity)</callback> - <param> - <name>Sensitivity</name> - <key>sensitivity</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-analog/grc/analog_nbfm_rx.block.yml b/gr-analog/grc/analog_nbfm_rx.block.yml new file mode 100644 index 0000000000..8bb3da7684 --- /dev/null +++ b/gr-analog/grc/analog_nbfm_rx.block.yml @@ -0,0 +1,38 @@ +id: analog_nbfm_rx +label: NBFM Receive + +parameters: +- id: audio_rate + label: Audio Rate + dtype: int +- id: quad_rate + label: Quadrature Rate + dtype: int +- id: tau + label: Tau + dtype: real + default: 75e-6 +- id: max_dev + label: Max Deviation + dtype: real + default: 5e3 + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: float + +asserts: +- ${ (quad_rate)%(audio_rate) == 0 } + +templates: + imports: from gnuradio import analog + make: "analog.nbfm_rx(\n\taudio_rate=${audio_rate},\n\tquad_rate=${quad_rate},\n\ + \ttau=${tau},\n\tmax_dev=${max_dev},\n )" + callbacks: + - set_max_deviation(${max_dev}) + +file_format: 1 diff --git a/gr-analog/grc/analog_nbfm_rx.xml b/gr-analog/grc/analog_nbfm_rx.xml deleted file mode 100644 index 9250b77b5e..0000000000 --- a/gr-analog/grc/analog_nbfm_rx.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##NBFM Receive -################################################### - --> -<block> - <name>NBFM Receive</name> - <key>analog_nbfm_rx</key> - <import>from gnuradio import analog</import> - <make>analog.nbfm_rx( - audio_rate=$audio_rate, - quad_rate=$quad_rate, - tau=$tau, - max_dev=$max_dev, - )</make> - <callback>set_max_deviation($max_dev)</callback> - - <param> - <name>Audio Rate</name> - <key>audio_rate</key> - <type>int</type> - </param> - - <param> - <name>Quadrature Rate</name> - <key>quad_rate</key> - <type>int</type> - </param> - - <param> - <name>Tau</name> - <key>tau</key> - <value>75e-6</value> - <type>real</type> - </param> - - <param> - <name>Max Deviation</name> - <key>max_dev</key> - <value>5e3</value> - <type>real</type> - </param> - - <check>($quad_rate)%($audio_rate) == 0</check> - - <sink> - <name>in</name> - <type>complex</type> - </sink> - - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_nbfm_tx.block.yml b/gr-analog/grc/analog_nbfm_tx.block.yml new file mode 100644 index 0000000000..00f63f8d64 --- /dev/null +++ b/gr-analog/grc/analog_nbfm_tx.block.yml @@ -0,0 +1,42 @@ +id: analog_nbfm_tx +label: NBFM Transmit + +parameters: +- id: audio_rate + label: Audio Rate + dtype: int +- id: quad_rate + label: Quadrature Rate + dtype: int +- id: tau + label: Tau + dtype: real + default: 75e-6 +- id: max_dev + label: Max Deviation + dtype: real + default: 5e3 +- id: fh + label: Preemphasis High Corner Freq + dtype: real + default: '-1.0' + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: complex + +asserts: +- ${ (quad_rate)%(audio_rate) == 0 } + +templates: + imports: from gnuradio import analog + make: "analog.nbfm_tx(\n\taudio_rate=${audio_rate},\n\tquad_rate=${quad_rate},\n\ + \ttau=${tau},\n\tmax_dev=${max_dev},\n\tfh=${fh},\n )" + callbacks: + - set_max_deviation(${max_dev}) + +file_format: 1 diff --git a/gr-analog/grc/analog_nbfm_tx.xml b/gr-analog/grc/analog_nbfm_tx.xml deleted file mode 100644 index bc80fffbcb..0000000000 --- a/gr-analog/grc/analog_nbfm_tx.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##NBFM Transmit -################################################### - --> -<block> - <name>NBFM Transmit</name> - <key>analog_nbfm_tx</key> - <import>from gnuradio import analog</import> - <make>analog.nbfm_tx( - audio_rate=$audio_rate, - quad_rate=$quad_rate, - tau=$tau, - max_dev=$max_dev, - fh=$fh, - )</make> - <callback>set_max_deviation($max_dev)</callback> - - <param> - <name>Audio Rate</name> - <key>audio_rate</key> - <type>int</type> - </param> - - <param> - <name>Quadrature Rate</name> - <key>quad_rate</key> - <type>int</type> - </param> - - <param> - <name>Tau</name> - <key>tau</key> - <value>75e-6</value> - <type>real</type> - </param> - - <param> - <name>Max Deviation</name> - <key>max_dev</key> - <value>5e3</value> - <type>real</type> - </param> - - <param> - <name>Preemphasis High Corner Freq</name> - <key>fh</key> - <value>-1.0</value> - <type>real</type> - </param> - - <check>($quad_rate)%($audio_rate) == 0</check> - - <sink> - <name>in</name> - <type>float</type> - </sink> - - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-analog/grc/analog_noise_source_x.block.yml b/gr-analog/grc/analog_noise_source_x.block.yml new file mode 100644 index 0000000000..bb3f67209e --- /dev/null +++ b/gr-analog/grc/analog_noise_source_x.block.yml @@ -0,0 +1,38 @@ +id: analog_noise_source_x +label: Noise Source + +parameters: +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [c, f, i, s] + hide: part +- id: noise_type + label: Noise Type + dtype: int + default: analog.GR_GAUSSIAN + options: [analog.GR_UNIFORM, analog.GR_GAUSSIAN, analog.GR_LAPLACIAN, analog.GR_IMPULSE] + option_labels: [Uniform, Gaussian, Laplacian, Impulse] +- id: amp + label: Amplitude + dtype: real + default: '1' +- id: seed + label: Seed + dtype: int + default: '0' + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import analog + make: analog.noise_source_${type.fcn}(${noise_type}, ${amp}, ${seed}) + callbacks: + - set_type(${noise_type}) + - set_amplitude(${amp}) + +file_format: 1 diff --git a/gr-analog/grc/analog_noise_source_x.xml b/gr-analog/grc/analog_noise_source_x.xml deleted file mode 100644 index 5404e78960..0000000000 --- a/gr-analog/grc/analog_noise_source_x.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Noise Source -################################################### - --> -<block> - <name>Noise Source</name> - <key>analog_noise_source_x</key> - <import>from gnuradio import analog</import> - <make>analog.noise_source_$(type.fcn)($noise_type, $amp, $seed)</make> - <callback>set_type($noise_type)</callback> - <callback>set_amplitude($amp)</callback> - <param> - <name>Output 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> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - </option> - </param> - <param> - <name>Noise Type</name> - <key>noise_type</key> - <value>analog.GR_GAUSSIAN</value> - <type>int</type> - <option> - <name>Uniform</name> - <key>analog.GR_UNIFORM</key> - </option> - <option> - <name>Gaussian</name> - <key>analog.GR_GAUSSIAN</key> - </option> - <option> - <name>Laplacian</name> - <key>analog.GR_LAPLACIAN</key> - </option> - <option> - <name>Impulse</name> - <key>analog.GR_IMPULSE</key> - </option> - </param> - <param> - <name>Amplitude</name> - <key>amp</key> - <value>1</value> - <type>real</type> - </param> - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-analog/grc/analog_phase_modulator_fc.block.yml b/gr-analog/grc/analog_phase_modulator_fc.block.yml new file mode 100644 index 0000000000..6d38ddd010 --- /dev/null +++ b/gr-analog/grc/analog_phase_modulator_fc.block.yml @@ -0,0 +1,23 @@ +id: analog_phase_modulator_fc +label: Phase Mod + +parameters: +- id: sensitivity + label: Sensitivity + dtype: real + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import analog + make: analog.phase_modulator_fc(${sensitivity}) + callbacks: + - set_sensitivity(${sensitivity}) + +file_format: 1 diff --git a/gr-analog/grc/analog_phase_modulator_fc.xml b/gr-analog/grc/analog_phase_modulator_fc.xml deleted file mode 100644 index c13af769c9..0000000000 --- a/gr-analog/grc/analog_phase_modulator_fc.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Phase Modulator -################################################### - --> -<block> - <name>Phase Mod</name> - <key>analog_phase_modulator_fc</key> - <import>from gnuradio import analog</import> - <make>analog.phase_modulator_fc($sensitivity)</make> - <callback>set_sensitivity($sensitivity)</callback> - <param> - <name>Sensitivity</name> - <key>sensitivity</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-analog/grc/analog_pll_carriertracking_cc.block.yml b/gr-analog/grc/analog_pll_carriertracking_cc.block.yml new file mode 100644 index 0000000000..1a66aca0a7 --- /dev/null +++ b/gr-analog/grc/analog_pll_carriertracking_cc.block.yml @@ -0,0 +1,31 @@ +id: analog_pll_carriertracking_cc +label: PLL Carrier Tracking + +parameters: +- id: w + label: Loop Bandwidth + dtype: real +- id: max_freq + label: Max Freq + dtype: real +- id: min_freq + label: Min Freq + dtype: real + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import analog + make: analog.pll_carriertracking_cc(${w}, ${max_freq}, ${min_freq}) + callbacks: + - set_loop_bandwidth(${w}) + - set_max_freq(${max_freq}) + - set_min_freq(${min_freq}) + +file_format: 1 diff --git a/gr-analog/grc/analog_pll_carriertracking_cc.xml b/gr-analog/grc/analog_pll_carriertracking_cc.xml deleted file mode 100644 index 95ec4b415b..0000000000 --- a/gr-analog/grc/analog_pll_carriertracking_cc.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##PLL Carrier Tracking -################################################### - --> -<block> - <name>PLL Carrier Tracking</name> - <key>analog_pll_carriertracking_cc</key> - <import>from gnuradio import analog</import> - <make>analog.pll_carriertracking_cc($w, $max_freq, $min_freq)</make> - <callback>set_loop_bandwidth($w)</callback> - <callback>set_max_freq($max_freq)</callback> - <callback>set_min_freq($min_freq)</callback> - <param> - <name>Loop Bandwidth</name> - <key>w</key> - <type>real</type> - </param> - <param> - <name>Max Freq</name> - <key>max_freq</key> - <type>real</type> - </param> - <param> - <name>Min Freq</name> - <key>min_freq</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-analog/grc/analog_pll_freqdet_cf.block.yml b/gr-analog/grc/analog_pll_freqdet_cf.block.yml new file mode 100644 index 0000000000..b9fe199dd2 --- /dev/null +++ b/gr-analog/grc/analog_pll_freqdet_cf.block.yml @@ -0,0 +1,31 @@ +id: analog_pll_freqdet_cf +label: PLL Freq Det + +parameters: +- id: w + label: Loop Bandwidth + dtype: real +- id: max_freq + label: Max Freq + dtype: real +- id: min_freq + label: Min Freq + dtype: real + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: analog.pll_freqdet_cf(${w}, ${max_freq}, ${min_freq}) + callbacks: + - set_loop_bandwidth(${w}) + - set_max_freq(${max_freq}) + - set_min_freq(${min_freq}) + +file_format: 1 diff --git a/gr-analog/grc/analog_pll_freqdet_cf.xml b/gr-analog/grc/analog_pll_freqdet_cf.xml deleted file mode 100644 index 0d44c160bd..0000000000 --- a/gr-analog/grc/analog_pll_freqdet_cf.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##PLL Frequency Det -################################################### - --> -<block> - <name>PLL Freq Det</name> - <key>analog_pll_freqdet_cf</key> - <import>from gnuradio import analog</import> - <make>analog.pll_freqdet_cf($w, $max_freq, $min_freq)</make> - <callback>set_loop_bandwidth($w)</callback> - <callback>set_max_freq($max_freq)</callback> - <callback>set_min_freq($min_freq)</callback> - <param> - <name>Loop Bandwidth</name> - <key>w</key> - <type>real</type> - </param> - <param> - <name>Max Freq</name> - <key>max_freq</key> - <type>real</type> - </param> - <param> - <name>Min Freq</name> - <key>min_freq</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_pll_refout_cc.block.yml b/gr-analog/grc/analog_pll_refout_cc.block.yml new file mode 100644 index 0000000000..5acd85c3b6 --- /dev/null +++ b/gr-analog/grc/analog_pll_refout_cc.block.yml @@ -0,0 +1,31 @@ +id: analog_pll_refout_cc +label: PLL Ref Out + +parameters: +- id: w + label: Loop Bandwidth + dtype: real +- id: max_freq + label: Max Freq + dtype: real +- id: min_freq + label: Min Freq + dtype: real + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import analog + make: analog.pll_refout_cc(${w}, ${max_freq}, ${min_freq}) + callbacks: + - set_loop_bandwidth(${w}) + - set_max_freq(${max_freq}) + - set_min_freq(${min_freq}) + +file_format: 1 diff --git a/gr-analog/grc/analog_pll_refout_cc.xml b/gr-analog/grc/analog_pll_refout_cc.xml deleted file mode 100644 index eb2d752b27..0000000000 --- a/gr-analog/grc/analog_pll_refout_cc.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##PLL Reference Out -################################################### - --> -<block> - <name>PLL Ref Out</name> - <key>analog_pll_refout_cc</key> - <import>from gnuradio import analog</import> - <make>analog.pll_refout_cc($w, $max_freq, $min_freq)</make> - <callback>set_loop_bandwidth($w)</callback> - <callback>set_max_freq($max_freq)</callback> - <callback>set_min_freq($min_freq)</callback> - <param> - <name>Loop Bandwidth</name> - <key>w</key> - <type>real</type> - </param> - <param> - <name>Max Freq</name> - <key>max_freq</key> - <type>real</type> - </param> - <param> - <name>Min Freq</name> - <key>min_freq</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-analog/grc/analog_probe_avg_mag_sqrd_x.block.yml b/gr-analog/grc/analog_probe_avg_mag_sqrd_x.block.yml new file mode 100644 index 0000000000..ad128c1521 --- /dev/null +++ b/gr-analog/grc/analog_probe_avg_mag_sqrd_x.block.yml @@ -0,0 +1,47 @@ +id: analog_probe_avg_mag_sqrd_x +label: Probe Avg Mag^2 + +parameters: +- id: type + label: Type + dtype: enum + options: [c, f, cf] + option_labels: [Complex, Float, Complex->Float] + option_attributes: + hide: [all, all, ''] + input: [complex, float, complex] + optional: ['1', '1', '0'] + hide: part +- id: threshold + label: Threshold (dB) + dtype: real + default: '0' +- id: alpha + label: Alpha + dtype: real + default: '1' + +inputs: +- domain: stream + dtype: ${ type.input } + +outputs: +- domain: stream + dtype: float + optional: true + hide: ${ type.hide } + +templates: + imports: from gnuradio import analog + make: analog.probe_avg_mag_sqrd_${type}(${threshold}, ${alpha}) + callbacks: + - set_alpha(${alpha}) + - set_threshold(${threshold}) + - reset() + +documentation: |- + Available functions to probe: level() + + Use with the function probe block. + +file_format: 1 diff --git a/gr-analog/grc/analog_probe_avg_mag_sqrd_x.xml b/gr-analog/grc/analog_probe_avg_mag_sqrd_x.xml deleted file mode 100644 index 98e6702ffd..0000000000 --- a/gr-analog/grc/analog_probe_avg_mag_sqrd_x.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Probe Average Magnitude Squared -################################################### - --> -<block> - <name>Probe Avg Mag^2</name> - <key>analog_probe_avg_mag_sqrd_x</key> - <import>from gnuradio import analog</import> - <make>analog.probe_avg_mag_sqrd_$(type)($threshold, $alpha)</make> - <callback>set_alpha($alpha)</callback> - <callback>set_threshold($threshold)</callback> - <callback>reset()</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>c</key> - <opt>input:complex</opt> - <opt>optional:1</opt> - <opt>hide:all</opt> - </option> - <option> - <name>Float</name> - <key>f</key> - <opt>input:float</opt> - <opt>optional:1</opt> - <opt>hide:all</opt> - </option> - <option> - <name>Complex->Float</name> - <key>cf</key> - <opt>input:complex</opt> - <opt>optional:0</opt> - <opt>hide:</opt> - </option> - </param> - <param> - <name>Threshold (dB)</name> - <key>threshold</key> - <value>0</value> - <type>real</type> - </param> - <param> - <name>Alpha</name> - <key>alpha</key> - <value>1</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>$type.input</type> - </sink> - <source> - <name>out</name> - <type>float</type> - <optional>$type.optional</optional> - <hide>$type.hide</hide> - </source> - <doc> -Available functions to probe: level() - -Use with the function probe block. - </doc> -</block> diff --git a/gr-analog/grc/analog_pwr_squelch_xx.block.yml b/gr-analog/grc/analog_pwr_squelch_xx.block.yml new file mode 100644 index 0000000000..20bcfa923e --- /dev/null +++ b/gr-analog/grc/analog_pwr_squelch_xx.block.yml @@ -0,0 +1,44 @@ +id: analog_pwr_squelch_xx +label: Power Squelch + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float] + option_attributes: + fcn: [cc, ff] + hide: part +- id: threshold + label: Threshold (dB) + dtype: real +- id: alpha + label: Alpha + dtype: real + default: 1e-4 +- id: ramp + label: Ramp + dtype: int + default: '0' +- id: gate + label: Gate + dtype: enum + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import analog + make: analog.pwr_squelch_${type.fcn}(${threshold}, ${alpha}, ${ramp}, ${gate}) + callbacks: + - set_threshold(${threshold}) + - set_alpha(${alpha}) + +file_format: 1 diff --git a/gr-analog/grc/analog_pwr_squelch_xx.xml b/gr-analog/grc/analog_pwr_squelch_xx.xml deleted file mode 100644 index a75f85cf10..0000000000 --- a/gr-analog/grc/analog_pwr_squelch_xx.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Power Squelch -################################################### - --> -<block> - <name>Power Squelch</name> - <key>analog_pwr_squelch_xx</key> - <import>from gnuradio import analog</import> - <make>analog.pwr_squelch_$(type.fcn)($threshold, $alpha, $ramp, $gate)</make> - <callback>set_threshold($threshold)</callback> - <callback>set_alpha($alpha)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - </param> - <param> - <name>Threshold (dB)</name> - <key>threshold</key> - <type>real</type> - </param> - <param> - <name>Alpha</name> - <key>alpha</key> - <value>1e-4</value> - <type>real</type> - </param> - <param> - <name>Ramp</name> - <key>ramp</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>Gate</name> - <key>gate</key> - <type>enum</type> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-analog/grc/analog_quadrature_demod_cf.block.yml b/gr-analog/grc/analog_quadrature_demod_cf.block.yml new file mode 100644 index 0000000000..874b286c87 --- /dev/null +++ b/gr-analog/grc/analog_quadrature_demod_cf.block.yml @@ -0,0 +1,47 @@ +id: analog_quadrature_demod_cf +label: Quadrature Demod + +parameters: +- id: gain + label: Gain + dtype: real + default: samp_rate/(2*math.pi*fsk_deviation_hz/8.0) + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: float + +templates: + imports: |- + from gnuradio import analog + import math + make: analog.quadrature_demod_cf(${gain}) + callbacks: + - set_gain(${gain}) + +documentation: |- + This can be used to demod FM, FSK, GMSK, etc. The input is complex + baseband, output is the signal frequency in relation to the sample + rated, multiplied with the gain. + + Mathematically, this block calculates the product of the one-sample + delayed input and the conjugate undelayed signal, and then calculates + the argument of the resulting complex number: + + y[n] = \mathrm{arg}\left(x[n] \, \bar x [n-1]\right). + + Let x be a complex sinusoid with amplitude A>0, (absolute) + frequency f\in\mathbb R and phase \phi_0\in[0;2\pi] sampled at + f_s>0 so, without loss of generality, + + x[n]= A e^{j2\pi( \frac f{f_s} n + \phi_0)}\f + + then + + y[n] = \mathrm{arg}\left(A e^{j2\pi\left( \frac f{f_s} n + \phi_0\right)} \overline{A e^{j2\pi( \frac f{f_s} (n-1) + \phi_0)}}\right)\ = \mathrm{arg}\left(A^2 e^{j2\pi\left( \frac f{f_s} n + \phi_0\right)} e^{-j2\pi( \frac f{f_s} (n-1) + \phi_0)}\right)\ = \mathrm{arg}\left( A^2 e^{j2\pi\left( \frac f{f_s} n + \phi_0 - \frac f{f_s} (n-1) - \phi_0\right)}\right)\ = \mathrm{arg}\left( A^2 e^{j2\pi\left( \frac f{f_s} n - \frac f{f_s} (n-1)\right)}\right)\ = \mathrm{arg}\left( A^2 e^{j2\pi\left( \frac f{f_s} \left(n-(n-1)\right)\right)}\right)\ = \mathrm{arg}\left( A^2 e^{j2\pi \frac f{f_s}}\right) \intertext{$A$ is real, so is $A^2$ and hence only \textit{scales}, therefore $\mathrm{arg}(\cdot)$ is invariant:} = \mathrm{arg}\left(e^{j2\pi \frac f{f_s}}\right)\= \frac f{f_s}\\ + +file_format: 1 diff --git a/gr-analog/grc/analog_quadrature_demod_cf.xml b/gr-analog/grc/analog_quadrature_demod_cf.xml deleted file mode 100644 index 447acf2ed8..0000000000 --- a/gr-analog/grc/analog_quadrature_demod_cf.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Quadrature Demodulator -################################################### - --> -<block> - <name>Quadrature Demod</name> - <key>analog_quadrature_demod_cf</key> - <import>from gnuradio import analog</import> - <import>import math</import> - <make>analog.quadrature_demod_cf($gain)</make> - <callback>set_gain($gain)</callback> - <param> - <name>Gain</name> - <key>gain</key> - <value>samp_rate/(2*math.pi*fsk_deviation_hz/8.0)</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> - <doc> -This can be used to demod FM, FSK, GMSK, etc. The input is complex -baseband, output is the signal frequency in relation to the sample -rated, multiplied with the gain. - -Mathematically, this block calculates the product of the one-sample -delayed input and the conjugate undelayed signal, and then calculates -the argument of the resulting complex number: - -y[n] = \mathrm{arg}\left(x[n] \, \bar x [n-1]\right). - -Let x be a complex sinusoid with amplitude A>0, (absolute) -frequency f\in\mathbb R and phase \phi_0\in[0;2\pi] sampled at -f_s>0 so, without loss of generality, - -x[n]= A e^{j2\pi( \frac f{f_s} n + \phi_0)}\f - -then - -y[n] = \mathrm{arg}\left(A e^{j2\pi\left( \frac f{f_s} n + \phi_0\right)} \overline{A e^{j2\pi( \frac f{f_s} (n-1) + \phi_0)}}\right)\\ - = \mathrm{arg}\left(A^2 e^{j2\pi\left( \frac f{f_s} n + \phi_0\right)} e^{-j2\pi( \frac f{f_s} (n-1) + \phi_0)}\right)\\ - = \mathrm{arg}\left( A^2 e^{j2\pi\left( \frac f{f_s} n + \phi_0 - \frac f{f_s} (n-1) - \phi_0\right)}\right)\\ - = \mathrm{arg}\left( A^2 e^{j2\pi\left( \frac f{f_s} n - \frac f{f_s} (n-1)\right)}\right)\\ - = \mathrm{arg}\left( A^2 e^{j2\pi\left( \frac f{f_s} \left(n-(n-1)\right)\right)}\right)\\ - = \mathrm{arg}\left( A^2 e^{j2\pi \frac f{f_s}}\right) \intertext{$A$ is real, so is $A^2$ and hence only \textit{scales}, therefore $\mathrm{arg}(\cdot)$ is invariant:} = \mathrm{arg}\left(e^{j2\pi \frac f{f_s}}\right)\\ -= \frac f{f_s}\\ - </doc> -</block> diff --git a/gr-analog/grc/analog_rail_ff.block.yml b/gr-analog/grc/analog_rail_ff.block.yml new file mode 100644 index 0000000000..8a2d2e8a54 --- /dev/null +++ b/gr-analog/grc/analog_rail_ff.block.yml @@ -0,0 +1,27 @@ +id: analog_rail_ff +label: Rail + +parameters: +- id: lo + label: Low clipping + dtype: real +- id: hi + label: Hi clipping + dtype: real + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: analog.rail_ff(${lo}, ${hi}) + callbacks: + - set_lo(${lo}) + - set_hi(${hi}) + +file_format: 1 diff --git a/gr-analog/grc/analog_rail_ff.xml b/gr-analog/grc/analog_rail_ff.xml deleted file mode 100644 index 87dff09771..0000000000 --- a/gr-analog/grc/analog_rail_ff.xml +++ /dev/null @@ -1,54 +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. ---> - -<!-- -################################################### -##Rail -################################################### - --> -<block> - <name>Rail</name> - <key>analog_rail_ff</key> - <import>from gnuradio import analog</import> - <make>analog.rail_ff($lo, $hi)</make> - <callback>set_lo($lo)</callback> - <callback>set_hi($hi)</callback> - <param> - <name>Low clipping</name> - <key>lo</key> - <type>real</type> - </param> - <param> - <name>Hi clipping</name> - <key>hi</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_random_source_x.block.yml b/gr-analog/grc/analog_random_source_x.block.yml new file mode 100644 index 0000000000..595aa81b6d --- /dev/null +++ b/gr-analog/grc/analog_random_source_x.block.yml @@ -0,0 +1,47 @@ +id: analog_random_source_x +label: Random Source + +parameters: +- id: type + label: Output Type + dtype: enum + options: [int, short, byte] + option_attributes: + fcn: [i, s, b] + hide: part +- id: min + label: Minimum + dtype: int + default: '0' +- id: max + label: Maximum + dtype: int + default: '2' +- id: num_samps + label: Num Samples + dtype: int + default: '1000' +- id: repeat + label: Repeat + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: |- + from gnuradio import blocks + import numpy + make: blocks.vector_source_${type.fcn}(map(int, numpy.random.randint(${min}, ${max}, + ${num_samps})), ${repeat}) + +documentation: |- + Generate num samples of random numbers of [min, max). Repeat samples if specified. + + Ex: With min=0 and max=2, the sequence 01110101... will be generated. + +file_format: 1 diff --git a/gr-analog/grc/analog_random_source_x.xml b/gr-analog/grc/analog_random_source_x.xml deleted file mode 100644 index e466c02fbe..0000000000 --- a/gr-analog/grc/analog_random_source_x.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Random Source: -## Custom block -################################################### - --> -<block> - <name>Random Source</name> - <key>analog_random_source_x</key> - <import>from gnuradio import blocks</import> - <import>import numpy</import> - <make>blocks.vector_source_$(type.fcn)(map(int, numpy.random.randint($min, $max, $num_samps)), $repeat)</make> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:b</opt> - </option> - </param> - <param> - <name>Minimum</name> - <key>min</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>Maximum</name> - <key>max</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Num Samples</name> - <key>num_samps</key> - <value>1000</value> - <type>int</type> - </param> - <param> - <name>Repeat</name> - <key>repeat</key> - <value>True</value> - <type>enum</type> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <source> - <name>out</name> - <type>$type</type> - </source> - <doc> -Generate num samples of random numbers of [min, max). Repeat samples if specified. - -Ex: With min=0 and max=2, the sequence 01110101... will be generated. - </doc> -</block> diff --git a/gr-analog/grc/analog_random_uniform_source_x.block.yml b/gr-analog/grc/analog_random_uniform_source_x.block.yml new file mode 100644 index 0000000000..d76bc903a5 --- /dev/null +++ b/gr-analog/grc/analog_random_uniform_source_x.block.yml @@ -0,0 +1,32 @@ +id: analog_random_uniform_source_x +label: Random Uniform Source + +parameters: +- id: type + label: Output Type + dtype: enum + options: [int, short, byte] + option_attributes: + fcn: [i, s, b] + offset_type: [int, int, int] + hide: part +- id: minimum + label: Minimum + dtype: int +- id: maximum + label: Maximum + dtype: int +- id: seed + label: Seed + dtype: int + default: '0' + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import analog + make: analog.random_uniform_source_${type.fcn}(${minimum}, ${maximum}, ${seed}) + +file_format: 1 diff --git a/gr-analog/grc/analog_random_uniform_source_x.xml b/gr-analog/grc/analog_random_uniform_source_x.xml deleted file mode 100644 index c81b637f97..0000000000 --- a/gr-analog/grc/analog_random_uniform_source_x.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Random Uniform Source</name> - <key>analog_random_uniform_source_x</key> - <import>from gnuradio import analog</import> - <make>analog.random_uniform_source_$(type.fcn)($minimum, $maximum, $seed)</make> - - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - <opt>offset_type:int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - <opt>offset_type:int</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:b</opt> - <opt>offset_type:int</opt> - </option> - </param> - - <param> - <name>Minimum</name> - <key>minimum</key> - <type>int</type> - </param> - - <param> - <name>Maximum</name> - <key>maximum</key> - <type>int</type> - </param> - - <param> - <name>Seed</name> - <key>seed</key> - <value>0</value> - <type>int</type> - </param> - - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-analog/grc/analog_sig_source_x.block.yml b/gr-analog/grc/analog_sig_source_x.block.yml new file mode 100644 index 0000000000..2fbc853a9b --- /dev/null +++ b/gr-analog/grc/analog_sig_source_x.block.yml @@ -0,0 +1,57 @@ +id: analog_sig_source_x +label: Signal Source + +parameters: +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [c, f, i, s] + offset_type: [complex, real, int, int] + hide: part +- id: samp_rate + label: Sample Rate + dtype: real + default: samp_rate +- id: waveform + label: Waveform + dtype: int + default: analog.GR_COS_WAVE + options: [analog.GR_CONST_WAVE, analog.GR_SIN_WAVE, analog.GR_COS_WAVE, analog.GR_SQR_WAVE, + analog.GR_TRI_WAVE, analog.GR_SAW_WAVE] + option_labels: [Constant, Sine, Cosine, Square, Triangle, Saw Tooth] +- id: freq + label: Frequency + dtype: real + default: '1000' +- id: amp + label: Amplitude + dtype: real + default: '1' +- id: offset + label: Offset + dtype: ${ type.offset_type } + default: '0' + +inputs: +- domain: message + id: freq + optional: true + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import analog + make: analog.sig_source_${type.fcn}(${samp_rate}, ${waveform}, ${freq}, ${amp}, + ${offset}) + callbacks: + - set_sampling_freq(${samp_rate}) + - set_waveform(${waveform}) + - set_frequency(${freq}) + - set_amplitude(${amp}) + - set_offset(${offset}) + +file_format: 1 diff --git a/gr-analog/grc/analog_sig_source_x.xml b/gr-analog/grc/analog_sig_source_x.xml deleted file mode 100644 index e3c587b254..0000000000 --- a/gr-analog/grc/analog_sig_source_x.xml +++ /dev/null @@ -1,109 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Signal Source -################################################### - --> -<block> - <name>Signal Source</name> - <key>analog_sig_source_x</key> - <import>from gnuradio import analog</import> - <make>analog.sig_source_$(type.fcn)($samp_rate, $waveform, $freq, $amp, $offset)</make> - <callback>set_sampling_freq($samp_rate)</callback> - <callback>set_waveform($waveform)</callback> - <callback>set_frequency($freq)</callback> - <callback>set_amplitude($amp)</callback> - <callback>set_offset($offset)</callback> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:c</opt> - <opt>offset_type:complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:f</opt> - <opt>offset_type:real</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - <opt>offset_type:int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - <opt>offset_type:int</opt> - </option> - </param> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <value>samp_rate</value> - <type>real</type> - </param> - <param> - <name>Waveform</name> - <key>waveform</key> - <value>analog.GR_COS_WAVE</value> - <type>int</type> - <option> - <name>Constant</name> - <key>analog.GR_CONST_WAVE</key> - </option> - <option> - <name>Sine</name> - <key>analog.GR_SIN_WAVE</key> - </option> - <option> - <name>Cosine</name> - <key>analog.GR_COS_WAVE</key> - </option> - <option> - <name>Square</name> - <key>analog.GR_SQR_WAVE</key> - </option> - <option> - <name>Triangle</name> - <key>analog.GR_TRI_WAVE</key> - </option> - <option> - <name>Saw Tooth</name> - <key>analog.GR_SAW_WAVE</key> - </option> - </param> - <param> - <name>Frequency</name> - <key>freq</key> - <value>1000</value> - <type>real</type> - </param> - <param> - <name>Amplitude</name> - <key>amp</key> - <value>1</value> - <type>real</type> - </param> - <param> - <name>Offset</name> - <key>offset</key> - <value>0</value> - <type>$type.offset_type</type> - </param> - <sink> - <name>freq</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-analog/grc/analog_simple_squelch_cc.block.yml b/gr-analog/grc/analog_simple_squelch_cc.block.yml new file mode 100644 index 0000000000..17a98eb4ba --- /dev/null +++ b/gr-analog/grc/analog_simple_squelch_cc.block.yml @@ -0,0 +1,27 @@ +id: analog_simple_squelch_cc +label: Simple Squelch + +parameters: +- id: threshold + label: Threshold (dB) + dtype: real +- id: alpha + label: Alpha + dtype: real + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import analog + make: analog.simple_squelch_cc(${threshold}, ${alpha}) + callbacks: + - set_threshold(${threshold}) + - set_alpha(${alpha}) + +file_format: 1 diff --git a/gr-analog/grc/analog_simple_squelch_cc.xml b/gr-analog/grc/analog_simple_squelch_cc.xml deleted file mode 100644 index 648921a149..0000000000 --- a/gr-analog/grc/analog_simple_squelch_cc.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Simple Squelch -################################################### - --> -<block> - <name>Simple Squelch</name> - <key>analog_simple_squelch_cc</key> - <import>from gnuradio import analog</import> - <make>analog.simple_squelch_cc($threshold, $alpha)</make> - <callback>set_threshold($threshold)</callback> - <callback>set_alpha($alpha)</callback> - <param> - <name>Threshold (dB)</name> - <key>threshold</key> - <type>real</type> - </param> - <param> - <name>Alpha</name> - <key>alpha</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-analog/grc/analog_standard_squelch.block.yml b/gr-analog/grc/analog_standard_squelch.block.yml new file mode 100644 index 0000000000..d753dfaf01 --- /dev/null +++ b/gr-analog/grc/analog_standard_squelch.block.yml @@ -0,0 +1,28 @@ +id: analog_standard_squelch +label: Standard Squelch + +parameters: +- id: audio_rate + label: Audio Rate + dtype: real +- id: threshold + label: Threshold + dtype: real + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: |- + analog.standard_squelch(audio_rate=${audio_rate}) + self.${id}.set_threshold(${threshold}) + callbacks: + - set_threshold(${threshold}) + +file_format: 1 diff --git a/gr-analog/grc/analog_standard_squelch.xml b/gr-analog/grc/analog_standard_squelch.xml deleted file mode 100644 index 264c57ab56..0000000000 --- a/gr-analog/grc/analog_standard_squelch.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Standard Squelch -################################################### - --> -<block> - <name>Standard Squelch</name> - <key>analog_standard_squelch</key> - <import>from gnuradio import analog</import> - <make>analog.standard_squelch(audio_rate=$audio_rate) -self.$(id).set_threshold($threshold)</make> - <callback>set_threshold($threshold)</callback> - <param> - <name>Audio Rate</name> - <key>audio_rate</key> - <type>real</type> - </param> - <param> - <name>Threshold</name> - <key>threshold</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_wfm_rcv.block.yml b/gr-analog/grc/analog_wfm_rcv.block.yml new file mode 100644 index 0000000000..eb3a84893e --- /dev/null +++ b/gr-analog/grc/analog_wfm_rcv.block.yml @@ -0,0 +1,25 @@ +id: analog_wfm_rcv +label: WBFM Receive + +parameters: +- id: quad_rate + label: Quadrature Rate + dtype: real +- id: audio_decimation + label: Audio Decimation + dtype: int + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: "analog.wfm_rcv(\n\tquad_rate=${quad_rate},\n\taudio_decimation=${audio_decimation},\n\ + )" + +file_format: 1 diff --git a/gr-analog/grc/analog_wfm_rcv.xml b/gr-analog/grc/analog_wfm_rcv.xml deleted file mode 100644 index ce2abb92de..0000000000 --- a/gr-analog/grc/analog_wfm_rcv.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##WBFM Receive -################################################### - --> -<block> - <name>WBFM Receive</name> - <key>analog_wfm_rcv</key> - <import>from gnuradio import analog</import> - <make>analog.wfm_rcv( - quad_rate=$quad_rate, - audio_decimation=$audio_decimation, -)</make> - <param> - <name>Quadrature Rate</name> - <key>quad_rate</key> - <type>real</type> - </param> - <param> - <name>Audio Decimation</name> - <key>audio_decimation</key> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_wfm_rcv_pll.block.yml b/gr-analog/grc/analog_wfm_rcv_pll.block.yml new file mode 100644 index 0000000000..e5e3d76ccc --- /dev/null +++ b/gr-analog/grc/analog_wfm_rcv_pll.block.yml @@ -0,0 +1,29 @@ +id: analog_wfm_rcv_pll +label: WBFM Receive PLL + +parameters: +- id: quad_rate + label: Quadrature Rate + dtype: real +- id: audio_decimation + label: Audio Decimation + dtype: int + +inputs: +- domain: stream + dtype: complex + +outputs: +- label: Lout + domain: stream + dtype: float +- label: Rout + domain: stream + dtype: float + +templates: + imports: from gnuradio import analog + make: "analog.wfm_rcv_pll(\n\tdemod_rate=${quad_rate},\n\taudio_decimation=${audio_decimation},\n\ + )" + +file_format: 1 diff --git a/gr-analog/grc/analog_wfm_rcv_pll.xml b/gr-analog/grc/analog_wfm_rcv_pll.xml deleted file mode 100644 index db31ed9bee..0000000000 --- a/gr-analog/grc/analog_wfm_rcv_pll.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##WBFM Receive PLL -################################################### - --> -<block> - <name>WBFM Receive PLL</name> - <key>analog_wfm_rcv_pll</key> - <import>from gnuradio import analog</import> - <make>analog.wfm_rcv_pll( - demod_rate=$quad_rate, - audio_decimation=$audio_decimation, -)</make> - <param> - <name>Quadrature Rate</name> - <key>quad_rate</key> - <type>real</type> - </param> - <param> - <name>Audio Decimation</name> - <key>audio_decimation</key> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>Lout</name> - <type>float</type> - </source> - <source> - <name>Rout</name> - <type>float</type> - </source> -</block> diff --git a/gr-analog/grc/analog_wfm_tx.block.yml b/gr-analog/grc/analog_wfm_tx.block.yml new file mode 100644 index 0000000000..1e4346c41d --- /dev/null +++ b/gr-analog/grc/analog_wfm_tx.block.yml @@ -0,0 +1,40 @@ +id: analog_wfm_tx +label: WBFM Transmit + +parameters: +- id: audio_rate + label: Audio Rate + dtype: int +- id: quad_rate + label: Quadrature Rate + dtype: int +- id: tau + label: Tau + dtype: real + default: 75e-6 +- id: max_dev + label: Max Deviation + dtype: real + default: 75e3 +- id: fh + label: Preemphasis High Corner Freq + dtype: real + default: '-1.0' + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: complex + +asserts: +- ${ (quad_rate)%(audio_rate) == 0 } + +templates: + imports: from gnuradio import analog + make: "analog.wfm_tx(\n\taudio_rate=${audio_rate},\n\tquad_rate=${quad_rate},\n\ + \ttau=${tau},\n\tmax_dev=${max_dev},\n\tfh=${fh},\n)" + +file_format: 1 diff --git a/gr-analog/grc/analog_wfm_tx.xml b/gr-analog/grc/analog_wfm_tx.xml deleted file mode 100644 index 507c2ea894..0000000000 --- a/gr-analog/grc/analog_wfm_tx.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##WBFM Transmit -################################################### - --> -<block> - <name>WBFM Transmit</name> - <key>analog_wfm_tx</key> - <import>from gnuradio import analog</import> - <make>analog.wfm_tx( - audio_rate=$audio_rate, - quad_rate=$quad_rate, - tau=$tau, - max_dev=$max_dev, - fh=$fh, -)</make> - <param> - <name>Audio Rate</name> - <key>audio_rate</key> - <type>int</type> - </param> - <param> - <name>Quadrature Rate</name> - <key>quad_rate</key> - <type>int</type> - </param> - <param> - <name>Tau</name> - <key>tau</key> - <value>75e-6</value> - <type>real</type> - </param> - <param> - <name>Max Deviation</name> - <key>max_dev</key> - <value>75e3</value> - <type>real</type> - </param> - <param> - <name>Preemphasis High Corner Freq</name> - <key>fh</key> - <value>-1.0</value> - <type>real</type> - </param> - <check>($quad_rate)%($audio_rate) == 0</check> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> |