diff options
Diffstat (limited to 'grc/blocks')
188 files changed, 10508 insertions, 0 deletions
diff --git a/grc/blocks/CMakeLists.txt b/grc/blocks/CMakeLists.txt new file mode 100644 index 000000000..fce4a1907 --- /dev/null +++ b/grc/blocks/CMakeLists.txt @@ -0,0 +1,22 @@ +# 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. + +######################################################################## +file(GLOB xml_files "*.xml") +install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "grc") diff --git a/grc/blocks/band_pass_filter.xml b/grc/blocks/band_pass_filter.xml new file mode 100644 index 000000000..af083473d --- /dev/null +++ b/grc/blocks/band_pass_filter.xml @@ -0,0 +1,166 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Band Pass Filter: Custom wrapper +################################################### + --> +<block> + <name>Band Pass Filter</name> + <key>band_pass_filter</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.$(type)(#if str($type).startswith('interp') then $interp else $decim#, firdes.$(type.fcn)( + $gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))</make> + <callback>set_taps(firdes.$(type.fcn)($gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))</callback> + <param> + <name>FIR Type</name> + <key>type</key> + <type>enum</type> + <!-- Real Band Pass Taps --> + <option> + <name>Complex->Complex (Real Taps) (Decim)</name> + <key>fir_filter_ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>fcn:band_pass</opt> + </option> + <option> + <name>Complex->Complex (Real Taps) (Interp)</name> + <key>interp_fir_filter_ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>fcn:band_pass</opt> + </option> + <option> + <name>Float->Float (Real Taps) (Decim)</name> + <key>fir_filter_fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + <opt>fcn:band_pass</opt> + </option> + <option> + <name>Float->Float (Real Taps) (Interp)</name> + <key>interp_fir_filter_fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + <opt>fcn:band_pass</opt> + </option> + <!-- Complex Band Pass Taps --> + <option> + <name>Complex->Complex (Complex Taps) (Decim)</name> + <key>fir_filter_ccc</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>fcn:complex_band_pass</opt> + </option> + <option> + <name>Complex->Complex (Complex Taps) (Interp)</name> + <key>interp_fir_filter_ccc</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>fcn:complex_band_pass</opt> + </option> + <option> + <name>Float->Complex (Complex Taps) (Decim)</name> + <key>fir_filter_fcc</key> + <opt>input:float</opt> + <opt>output:complex</opt> + <opt>fcn:complex_band_pass</opt> + </option> + <option> + <name>Float->Complex (Complex Taps) (Interp)</name> + <key>interp_fir_filter_fcc</key> + <opt>input:float</opt> + <opt>output:complex</opt> + <opt>fcn:complex_band_pass</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + <hide>#if str($type).startswith('interp') then 'all' else 'none'#</hide> + </param> + <param> + <name>Interpolation</name> + <key>interp</key> + <value>1</value> + <type>int</type> + <hide>#if str($type).startswith('interp') then 'none' else 'all'#</hide> + </param> + <param> + <name>Gain</name> + <key>gain</key> + <value>1</value> + <type>real</type> + </param> + <param> + <name>Sample Rate</name> + <key>samp_rate</key> + <value>samp_rate</value> + <type>real</type> + </param> + <param> + <name>Low Cutoff Freq</name> + <key>low_cutoff_freq</key> + <type>real</type> + </param> + <param> + <name>High Cutoff Freq</name> + <key>high_cutoff_freq</key> + <type>real</type> + </param> + <param> + <name>Transition Width</name> + <key>width</key> + <type>real</type> + </param> + <param> + <name>Window</name> + <key>win</key> + <value>firdes.WIN_HAMMING</value> + <type>int</type> + <option> + <name>Hamming</name> + <key>firdes.WIN_HAMMING</key> + </option> + <option> + <name>Hann</name> + <key>firdes.WIN_HANN</key> + </option> + <option> + <name>Blackman</name> + <key>firdes.WIN_BLACKMAN</key> + </option> + <option> + <name>Rectangular</name> + <key>firdes.WIN_RECTANGULAR</key> + </option> + <option> + <name>Kaiser</name> + <key>firdes.WIN_KAISER</key> + </option> + </param> + <param> + <name>Beta</name> + <key>beta</key> + <value>6.76</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> + <doc> +This filter is a convenience wrapper for an fir filter and a firdes taps generating function. + +Sample rate, cutoff frequency, and transition width are in Hertz. + +The beta paramater only applies to the Kaiser window. + </doc> +</block> diff --git a/grc/blocks/band_reject_filter.xml b/grc/blocks/band_reject_filter.xml new file mode 100644 index 000000000..dd5e7a9d7 --- /dev/null +++ b/grc/blocks/band_reject_filter.xml @@ -0,0 +1,132 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Band Reject Filter: Custom wrapper +################################################### + --> +<block> + <name>Band Reject Filter</name> + <key>band_reject_filter</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.$(type)(#if str($type).startswith('interp') then $interp else $decim#, firdes.band_reject( + $gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))</make> + <callback>set_taps(firdes.band_reject($gain, $samp_rate, $low_cutoff_freq, $high_cutoff_freq, $width, $win, $beta))</callback> + <param> + <name>FIR Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Decimating)</name> + <key>fir_filter_ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + </option> + <option> + <name>Complex->Complex (Interpolating)</name> + <key>interp_fir_filter_ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + </option> + <option> + <name>Float->Float (Decimating)</name> + <key>fir_filter_fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + </option> + <option> + <name>Float->Float (Interpolating)</name> + <key>interp_fir_filter_fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + <hide>#if str($type).startswith('interp') then 'all' else 'none'#</hide> + </param> + <param> + <name>Interpolation</name> + <key>interp</key> + <value>1</value> + <type>int</type> + <hide>#if str($type).startswith('interp') then 'none' else 'all'#</hide> + </param> + <param> + <name>Gain</name> + <key>gain</key> + <value>1</value> + <type>real</type> + </param> + <param> + <name>Sample Rate</name> + <key>samp_rate</key> + <value>samp_rate</value> + <type>real</type> + </param> + <param> + <name>Low Cutoff Freq</name> + <key>low_cutoff_freq</key> + <type>real</type> + </param> + <param> + <name>High Cutoff Freq</name> + <key>high_cutoff_freq</key> + <type>real</type> + </param> + <param> + <name>Transition Width</name> + <key>width</key> + <type>real</type> + </param> + <param> + <name>Window</name> + <key>win</key> + <value>firdes.WIN_HAMMING</value> + <type>int</type> + <option> + <name>Hamming</name> + <key>firdes.WIN_HAMMING</key> + </option> + <option> + <name>Hann</name> + <key>firdes.WIN_HANN</key> + </option> + <option> + <name>Blackman</name> + <key>firdes.WIN_BLACKMAN</key> + </option> + <option> + <name>Rectangular</name> + <key>firdes.WIN_RECTANGULAR</key> + </option> + <option> + <name>Kaiser</name> + <key>firdes.WIN_KAISER</key> + </option> + </param> + <param> + <name>Beta</name> + <key>beta</key> + <value>6.76</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> + <doc> +This filter is a convenience wrapper for an fir filter and a firdes taps generating function. + +Sample rate, cutoff frequency, and transition width are in Hertz. + +The beta paramater only applies to the Kaiser window. + </doc> +</block> diff --git a/grc/blocks/blks2_am_demod_cf.xml b/grc/blocks/blks2_am_demod_cf.xml new file mode 100644 index 000000000..898c613be --- /dev/null +++ b/grc/blocks/blks2_am_demod_cf.xml @@ -0,0 +1,47 @@ +<?xml version="1.0"?> +<!-- +################################################### +##AM Demod +################################################### + --> +<block> + <name>AM Demod</name> + <key>blks2_am_demod_cf</key> + <import>from gnuradio import blks2</import> + <make>blks2.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/grc/blocks/blks2_analysis_filterbank.xml b/grc/blocks/blks2_analysis_filterbank.xml new file mode 100644 index 000000000..93cfa30af --- /dev/null +++ b/grc/blocks/blks2_analysis_filterbank.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Analysis Filterbank +################################################### + --> +<block> + <name>Analysis Filterbank</name> + <key>blks2_analysis_filterbank</key> + <import>from gnuradio import blks2</import> + <make>blks2.analysis_filterbank(mpoints=$mpoints, taps=$taps)</make> + <param> + <name>MPoints</name> + <key>mpoints</key> + <value>3</value> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>complex_vector</type> + </param> + <sink> + <name>in</name> + <type>complex</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + <nports>$mpoints</nports> + </source> +</block> diff --git a/grc/blocks/blks2_error_rate.xml b/grc/blocks/blks2_error_rate.xml new file mode 100644 index 000000000..91a303206 --- /dev/null +++ b/grc/blocks/blks2_error_rate.xml @@ -0,0 +1,69 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Error Rate: +## Custom blks2 block +################################################### + --> +<block> + <name>Error Rate</name> + <key>blks2_error_rate</key> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.error_rate( + type=$type, + win_size=$win_size, + bits_per_symbol=$bits_per_symbol, +)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Bit Error Rate</name> + <key>'BER'</key> + <opt>hide_bps:</opt> + </option> + <option> + <name>Symbol Error Rate</name> + <key>'SER'</key> + <opt>hide_bps:all</opt> + </option> + </param> + <param> + <name>Window Size</name> + <key>win_size</key> + <value>1000</value> + <type>int</type> + </param> + <param> + <name>Bits per Symbol</name> + <key>bits_per_symbol</key> + <value>2</value> + <type>int</type> + <hide>$type.hide_bps</hide> + </param> + <sink> + <name>ref</name> + <type>byte</type> + </sink> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>float</type> + </source> + <doc> +Calculate the bit error rate (BER) or the symbol error rate (SER) over a number of samples given by the window size. \ +The actual window size will start at size one and grow to the full window size as new samples arrive. \ +Once the window has reached full size, old samples are shifted out of the window and new samples shfited in. + +The error block compares the input byte stream to the reference byte stream. \ +For example, the reference byte stream could be the input to a modulator, \ +and the input byte stream could be the output of a modulator. + +Each byte in the incoming stream represents one symbol. \ +The bits per symbol parameter is only useful for calculating the BER. + </doc> +</block> diff --git a/grc/blocks/blks2_fm_deemph.xml b/grc/blocks/blks2_fm_deemph.xml new file mode 100644 index 000000000..6f38dab6d --- /dev/null +++ b/grc/blocks/blks2_fm_deemph.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!-- +################################################### +##FM Deemphasis +################################################### + --> +<block> + <name>FM Deemphasis</name> + <key>blks2_fm_deemph</key> + <import>from gnuradio import blks2</import> + <make>blks2.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/grc/blocks/blks2_fm_demod_cf.xml b/grc/blocks/blks2_fm_demod_cf.xml new file mode 100644 index 000000000..2ce1fb973 --- /dev/null +++ b/grc/blocks/blks2_fm_demod_cf.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!-- +################################################### +##FM Demod +################################################### + --> +<block> + <name>FM Demod</name> + <key>blks2_fm_demod_cf</key> + <import>from gnuradio import blks2</import> + <make>blks2.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/grc/blocks/blks2_fm_preemph.xml b/grc/blocks/blks2_fm_preemph.xml new file mode 100644 index 000000000..672a7a7b2 --- /dev/null +++ b/grc/blocks/blks2_fm_preemph.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!-- +################################################### +##FM Preemphasis +################################################### + --> +<block> + <name>FM Preemphasis</name> + <key>blks2_fm_preemph</key> + <import>from gnuradio import blks2</import> + <make>blks2.fm_preemph(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/grc/blocks/blks2_logpwrfft_x.xml b/grc/blocks/blks2_logpwrfft_x.xml new file mode 100644 index 000000000..79a3bfc4b --- /dev/null +++ b/grc/blocks/blks2_logpwrfft_x.xml @@ -0,0 +1,90 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Log Power FFT +################################################### + --> +<block> + <name>Log Power FFT</name> + <key>blks2_logpwrfft_x</key> + <import>from gnuradio import blks2</import> + <make>blks2.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> diff --git a/grc/blocks/blks2_nbfm_rx.xml b/grc/blocks/blks2_nbfm_rx.xml new file mode 100644 index 000000000..d332b9a6b --- /dev/null +++ b/grc/blocks/blks2_nbfm_rx.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- +################################################### +##NBFM Receive +################################################### + --> +<block> + <name>NBFM Receive</name> + <key>blks2_nbfm_rx</key> + <import>from gnuradio import blks2</import> + <make>blks2.nbfm_rx( + audio_rate=$audio_rate, + quad_rate=$quad_rate, + tau=$tau, + max_dev=$max_dev, +)</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>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/grc/blocks/blks2_nbfm_tx.xml b/grc/blocks/blks2_nbfm_tx.xml new file mode 100644 index 000000000..3aa7ede0e --- /dev/null +++ b/grc/blocks/blks2_nbfm_tx.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- +################################################### +##NBFM Transmit +################################################### + --> +<block> + <name>NBFM Transmit</name> + <key>blks2_nbfm_tx</key> + <import>from gnuradio import blks2</import> + <make>blks2.nbfm_tx( + audio_rate=$audio_rate, + quad_rate=$quad_rate, + tau=$tau, + max_dev=$max_dev, +)</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>5e3</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/grc/blocks/blks2_packet_decoder.xml b/grc/blocks/blks2_packet_decoder.xml new file mode 100644 index 000000000..07b0d1f2e --- /dev/null +++ b/grc/blocks/blks2_packet_decoder.xml @@ -0,0 +1,75 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Packet Decoder +################################################### + --> +<block> + <name>Packet Decoder</name> + <key>blks2_packet_decoder</key> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.packet_demod_$(type.fcn)(grc_blks2.packet_decoder( + access_code=$access_code, + threshold=$threshold, + callback=lambda ok, payload: self.$(id).recv_pkt(ok, payload), + ), +)</make> + <param> + <name>Output Type</name> + <key>type</key> + <value>float</value> + <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> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:b</opt> + </option> + </param> + <param> + <name>Access Code</name> + <key>access_code</key> + <value></value> + <type>string</type> + </param> + <param> + <name>Threshold</name> + <key>threshold</key> + <value>-1</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> + <doc> +Packet decoder block, for use with the gnuradio demodulator blocks: gmsk, psk, qam. + +Access Code: string of 1's and 0's, leave blank for automatic. + +Threshold: -1 for automatic. + </doc> +</block> diff --git a/grc/blocks/blks2_packet_encoder.xml b/grc/blocks/blks2_packet_encoder.xml new file mode 100644 index 000000000..b184ebd31 --- /dev/null +++ b/grc/blocks/blks2_packet_encoder.xml @@ -0,0 +1,110 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Packet Encoder +################################################### + --> +<block> + <name>Packet Encoder</name> + <key>blks2_packet_encoder</key> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.packet_mod_$(type.fcn)(grc_blks2.packet_encoder( + samples_per_symbol=$samples_per_symbol, + bits_per_symbol=$bits_per_symbol, + access_code=$access_code, + pad_for_usrp=$pad_for_usrp, + ), + payload_length=$payload_length, +)</make> + <param> + <name>Input Type</name> + <key>type</key> + <value>float</value> + <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> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:b</opt> + </option> + </param> + <param> + <name>Samples/Symbol</name> + <key>samples_per_symbol</key> + <type>int</type> + </param> + <param> + <name>Bits/Symbol</name> + <key>bits_per_symbol</key> + <type>int</type> + </param> + <param> + <name>Access Code</name> + <key>access_code</key> + <value></value> + <type>string</type> + </param> + <param> + <name>Pad for USRP</name> + <key>pad_for_usrp</key> + <type>enum</type> + <option> + <name>Yes</name> + <key>True</key> + </option> + <option> + <name>No</name> + <key>False</key> + </option> + </param> + <param> + <name>Payload Length</name> + <key>payload_length</key> + <value>0</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> + <doc> +Packet encoder block, for use with the gnuradio modulator blocks: gmsk, dpsk, qam. + +Access Code: string of 1's and 0's, leave blank for automatic. + +Payload Length: 0 for automatic. + +Bits/Symbol should be set accordingly: + gmsk -> 1 + dbpsk -> 1 + dqpsk -> 2 + d8psk -> 3 + qam8 -> 3 + qam16 -> 4 + qam64 -> 6 + qam256 -> 8 + </doc> +</block> diff --git a/grc/blocks/blks2_pfb_arb_resampler.xml b/grc/blocks/blks2_pfb_arb_resampler.xml new file mode 100644 index 000000000..b58e70f1c --- /dev/null +++ b/grc/blocks/blks2_pfb_arb_resampler.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Polyphase Arbitrary Resampler +################################################### + --> +<block> + <name>Polyphase Resampler</name> + <key>blks2_pfb_arb_resampler_ccf</key> + <import>from gnuradio import blks2</import> + <import>from gnuradio.gr import firdes</import> + <make>blks2.pfb_arb_resampler_ccf( + $rate, + $taps, + $size, +)</make> + <!-- Set taps not implemented yet + <callback>set_taps($taps)</callback> + --> + <callback>set_rate($rate)</callback> + <param> + <name>Resample Rate</name> + <key>rate</key> + <type>real</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>real_vector</type> + </param> + <param> + <name>Size (# phases)</name> + <key>size</key> + <value>32</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>complex</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/blks2_pfb_channelizer.xml b/grc/blocks/blks2_pfb_channelizer.xml new file mode 100644 index 000000000..5a93c0866 --- /dev/null +++ b/grc/blocks/blks2_pfb_channelizer.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Polyphase Channelizer +################################################### + --> +<block> + <name>Polyphase Channelizer</name> + <key>blks2_pfb_channelizer_ccf</key> + <import>from gnuradio import blks2</import> + <import>from gnuradio.gr import firdes</import> + <make>blks2.pfb_channelizer_ccf( + $nchans, + $taps, + $osr, + $atten) +self.$(id).set_channel_map($ch_map) + </make> + <!-- Set taps not implemented yet + <callback>set_taps($taps)</callback> + --> + <callback>set_channel_map($ch_map)</callback> + + <param> + <name>Channels</name> + <key>nchans</key> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <value>None</value> + <type>real_vector</type> + </param> + <param> + <name>Over Sample Ratio</name> + <key>osr</key> + <value>1.0</value> + <type>real</type> + </param> + <param> + <name>Attenuation</name> + <key>atten</key> + <value>100</value> + <type>real</type> + </param> + <param> + <name>Channel Map</name> + <key>ch_map</key> + <value>[]</value> + <type>int_vector</type> + </param> + <sink> + <name>in</name> + <type>complex</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + <nports>$nchans</nports> + </source> +</block> diff --git a/grc/blocks/blks2_rational_resampler_xxx.xml b/grc/blocks/blks2_rational_resampler_xxx.xml new file mode 100644 index 000000000..b92ec8ec2 --- /dev/null +++ b/grc/blocks/blks2_rational_resampler_xxx.xml @@ -0,0 +1,88 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Rational Resampler +################################################### + --> +<block> + <name>Rational Resampler</name> + <key>blks2_rational_resampler_xxx</key> + <import>from gnuradio import blks2</import> + <import>from gnuradio.gr import firdes</import> + <make>blks2.rational_resampler_$(type)( + interpolation=$interp, + decimation=$decim, +#if $taps() + taps=$taps, +#else + taps=None, +#end if +#if $fractional_bw() != 0 + fractional_bw=$fractional_bw, +#else + fractional_bw=None, +#end if +)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Complex Taps)</name> + <key>ccc</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Complex->Complex (Real Taps)</name> + <key>ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Float (Real Taps)</name> + <key>fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + <opt>taps:real_vector</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Interpolation</name> + <key>interp</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <value>[]</value> + <type>$type.taps</type> + </param> + <param> + <name>Fractional BW</name> + <key>fractional_bw</key> + <value>0</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> + <doc> +Leave taps empty for automatic value. +Leave fractional bandwidth 0 for automatic value. + </doc> +</block> diff --git a/grc/blocks/blks2_selector.xml b/grc/blocks/blks2_selector.xml new file mode 100644 index 000000000..2d89df186 --- /dev/null +++ b/grc/blocks/blks2_selector.xml @@ -0,0 +1,97 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Selector: +## Custom blks2 block +################################################### + --> +<block> + <name>Selector</name> + <key>blks2_selector</key> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.selector( + item_size=$type.size*$vlen, + num_inputs=$num_inputs, + num_outputs=$num_outputs, + input_index=$input_index, + output_index=$output_index, +)</make> + <callback>set_input_index(int($input_index))</callback> + <callback>set_output_index(int($output_index))</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Num Outputs</name> + <key>num_outputs</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Input Index</name> + <key>input_index</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Output Index</name> + <key>output_index</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_outputs</nports> + </source> + <doc> +Connect the sink at input index to the source at output index. Leave all other ports disconnected. + </doc> +</block> diff --git a/grc/blocks/blks2_standard_squelch.xml b/grc/blocks/blks2_standard_squelch.xml new file mode 100644 index 000000000..f0baeb662 --- /dev/null +++ b/grc/blocks/blks2_standard_squelch.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Standard Squelch +################################################### + --> +<block> + <name>Standard Squelch</name> + <key>blks2_standard_squelch</key> + <import>from gnuradio import blks2</import> + <make>blks2.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/grc/blocks/blks2_stream_to_vector_decimator.xml b/grc/blocks/blks2_stream_to_vector_decimator.xml new file mode 100644 index 000000000..25f8f7a62 --- /dev/null +++ b/grc/blocks/blks2_stream_to_vector_decimator.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Stream to Vector Decimator +################################################### + --> +<block> + <name>Stream to Vec Decim</name> + <key>blks2_stream_to_vector_decimator</key> + <import>from gnuradio import blks2</import> + <make>blks2.stream_to_vector_decimator( + item_size=$type.size, + sample_rate=$sample_rate, + vec_rate=$vec_rate, + vec_len=$vlen, +)</make> + <callback>set_sample_rate($sample_rate)</callback> + <callback>set_vec_rate($vec_rate)</callback> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Sample Rate</name> + <key>sample_rate</key> + <value>samp_rate</value> + <type>real</type> + </param> + <param> + <name>Vec Rate</name> + <key>vec_rate</key> + <value>30</value> + <type>real</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1024</value> + <type>int</type> + </param> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/blks2_synthesis_filterbank.xml b/grc/blocks/blks2_synthesis_filterbank.xml new file mode 100644 index 000000000..5979ed3f7 --- /dev/null +++ b/grc/blocks/blks2_synthesis_filterbank.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Synthesis Filterbank +################################################### + --> +<block> + <name>Synthesis Filterbank</name> + <key>blks2_synthesis_filterbank</key> + <import>from gnuradio import blks2</import> + <make>blks2.synthesis_filterbank(mpoints=$mpoints, taps=$taps)</make> + <param> + <name>MPoints</name> + <key>mpoints</key> + <value>3</value> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>complex_vector</type> + </param> + <sink> + <name>in</name> + <type>complex</type> + <nports>$mpoints</nports> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/blks2_tcp_sink.xml b/grc/blocks/blks2_tcp_sink.xml new file mode 100644 index 000000000..cfe7b42d8 --- /dev/null +++ b/grc/blocks/blks2_tcp_sink.xml @@ -0,0 +1,89 @@ +<?xml version="1.0"?> +<!-- +################################################### +##TCP Sink: Custom blks2 block +################################################### + --> +<block> + <name>TCP Sink</name> + <key>blks2_tcp_sink</key> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.tcp_sink( + itemsize=$type.size*$vlen, + addr=$addr, + port=$port, + server=$server, +)</make> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Address</name> + <key>addr</key> + <value>127.0.0.1</value> + <type>string</type> + </param> + <param> + <name>Port</name> + <key>port</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Mode</name> + <key>server</key> + <value>False</value> + <type>enum</type> + <option> + <name>Server</name> + <key>True</key> + </option> + <option> + <name>Client</name> + <key>False</key> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <doc> +In client mode, we attempt to connect to a server at the given address and port. \ +In server mode, we bind a socket to the given address and port and accept the first client. + </doc> +</block> diff --git a/grc/blocks/blks2_tcp_source.xml b/grc/blocks/blks2_tcp_source.xml new file mode 100644 index 000000000..6bf742aa0 --- /dev/null +++ b/grc/blocks/blks2_tcp_source.xml @@ -0,0 +1,89 @@ +<?xml version="1.0"?> +<!-- +################################################### +##TCP Source: Custom blks2 block +################################################### + --> +<block> + <name>TCP Source</name> + <key>blks2_tcp_source</key> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.tcp_source( + itemsize=$type.size*$vlen, + addr=$addr, + port=$port, + server=$server, +)</make> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Address</name> + <key>addr</key> + <value>127.0.0.1</value> + <type>string</type> + </param> + <param> + <name>Port</name> + <key>port</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Mode</name> + <key>server</key> + <value>True</value> + <type>enum</type> + <option> + <name>Server</name> + <key>True</key> + </option> + <option> + <name>Client</name> + <key>False</key> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> + <doc> +In client mode, we attempt to connect to a server at the given address and port. \ +In server mode, we bind a socket to the given address and port and accept the first client. + </doc> +</block> diff --git a/grc/blocks/blks2_valve.xml b/grc/blocks/blks2_valve.xml new file mode 100644 index 000000000..47c553523 --- /dev/null +++ b/grc/blocks/blks2_valve.xml @@ -0,0 +1,72 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Valve: +## Custom blks2 block +################################################### + --> +<block> + <name>Valve</name> + <key>blks2_valve</key> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.valve(item_size=$type.size*$vlen, open=bool($open))</make> + <callback>set_open(bool($open))</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Open</name> + <key>open</key> + <value>0</value> + <type>raw</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_outputs</nports> + </source> + <doc> +Connect output to input when valve is closed (not open). + </doc> +</block> diff --git a/grc/blocks/blks2_wfm_rcv.xml b/grc/blocks/blks2_wfm_rcv.xml new file mode 100644 index 000000000..37fb3ba8c --- /dev/null +++ b/grc/blocks/blks2_wfm_rcv.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!-- +################################################### +##WBFM Receive +################################################### + --> +<block> + <name>WBFM Receive</name> + <key>blks2_wfm_rcv</key> + <import>from gnuradio import blks2</import> + <make>blks2.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/grc/blocks/blks2_wfm_rcv_pll.xml b/grc/blocks/blks2_wfm_rcv_pll.xml new file mode 100644 index 000000000..2771350cf --- /dev/null +++ b/grc/blocks/blks2_wfm_rcv_pll.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<!-- +################################################### +##WBFM Receive PLL +################################################### + --> +<block> + <name>WBFM Receive PLL</name> + <key>blks2_wfm_rcv_pll</key> + <import>from gnuradio import blks2</import> + <make>blks2.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/grc/blocks/blks2_wfm_tx.xml b/grc/blocks/blks2_wfm_tx.xml new file mode 100644 index 000000000..cff92d819 --- /dev/null +++ b/grc/blocks/blks2_wfm_tx.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- +################################################### +##WBFM Transmit +################################################### + --> +<block> + <name>WBFM Transmit</name> + <key>blks2_wfm_tx</key> + <import>from gnuradio import blks2</import> + <make>blks2.wfm_tx( + audio_rate=$audio_rate, + quad_rate=$quad_rate, + tau=$tau, + max_dev=$max_dev, +)</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> + <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/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml new file mode 100644 index 000000000..dcd6c5448 --- /dev/null +++ b/grc/blocks/block_tree.xml @@ -0,0 +1,283 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Block Tree for platform gnuradio python. +################################################### + --> +<cat> + <name></name> <!-- Blank for Root Name --> + <cat> + <name>Sources</name> + <block>const_source_x</block> + <block>gr_sig_source_x</block> + <block>gr_noise_source_x</block> + <block>gr_vector_source_x</block> + <block>random_source_x</block> + <block>gr_glfsr_source_x</block> + <block>gr_null_source</block> + <block>gr_file_source</block> + <block>blks2_tcp_source</block> + <block>gr_udp_source</block> + <block>gr_wavfile_source</block> + <block>gr_message_source</block> + <block>gr_message_burst_source</block> + <block>pad_source</block> + <block>virtual_source</block> + </cat> + <cat> + <name>Sinks</name> + <block>gr_vector_sink_x</block> + <block>gr_null_sink</block> + <block>gr_file_sink</block> + <block>blks2_tcp_sink</block> + <block>gr_udp_sink</block> + <block>gr_wavfile_sink</block> + <block>gr_message_sink</block> + <block>pad_sink</block> + <block>virtual_sink</block> + <block>gr_tag_debug</block> + </cat> + <cat> + <name>Message Tools</name> + <block>gr_message_debug</block> + <block>gr_message_strobe</block> + <block>gr_pdu_to_tagged_stream</block> + <block>gr_tagged_stream_to_pdu</block> + <block>gr_tuntap_pdu</block> + <block>gr_socket_pdu</block> + <block>gr_random_pdu</block> + </cat> + <cat> + <name>Operators</name> + <block>gr_add_xx</block> + <block>gr_sub_xx</block> + <block>gr_multiply_xx</block> + <block>gr_divide_xx</block> + <block>gr_nlog10_ff</block> + <block>gr_transcendental</block> + <block>gr_add_const_vxx</block> + <block>gr_multiply_const_vxx</block> + <block>gr_and_const_xx</block> + + <block>gr_not_xx</block> + <block>gr_and_xx</block> + <block>gr_or_xx</block> + <block>gr_xor_xx</block> + + <block>gr_max_xx</block> + <block>gr_argmax_xx</block> + <block>gr_rms_xx</block> + <block>gr_integrate_xx</block> + + <block>gr_conjugate_cc</block> + + <block>gr_fft_vxx</block> + <block>blks2_logpwrfft_x</block> + <block>gr_vector_insert_x</block> + + <block>gr_endian_swap</block> + </cat> + <cat> + <name>Type Conversions</name> + <block>gr_complex_to_arg</block> + <block>gr_complex_to_mag</block> + <block>gr_complex_to_mag_squared</block> + <block>gr_complex_to_real</block> + <block>gr_complex_to_imag</block> + + <block>gr_complex_to_float</block> + <block>gr_float_to_complex</block> + + <block>gr_float_to_int</block> + <block>gr_float_to_short</block> + <block>gr_short_to_float</block> + <block>gr_short_to_char</block> + + <block>gr_int_to_float</block> + + <block>gr_float_to_char</block> + <block>gr_char_to_float</block> + <block>gr_char_to_short</block> + + <block>gr_float_to_uchar</block> + <block>gr_uchar_to_float</block> + + <block>gr_complex_to_interleaved_short</block> + <block>gr_interleaved_short_to_complex</block> + </cat> + <cat> + <name>Stream Conversions</name> + <block>gr_interleave</block> + <block>gr_deinterleave</block> + + <block>gr_streams_to_stream</block> + <block>gr_stream_to_streams</block> + + <block>gr_streams_to_vector</block> + <block>gr_vector_to_streams</block> + + <block>gr_stream_to_vector</block> + <block>gr_vector_to_stream</block> + + <block>blks2_stream_to_vector_decimator</block> + + <block>gr_stream_mux</block> + <block>gr_burst_tagger</block> + </cat> + <cat> + <name>Misc Conversions</name> + <block>gr_unpacked_to_packed_xx</block> + <block>gr_packed_to_unpacked_xx</block> + <block>gr_unpack_k_bits_bb</block> + <block>gr_pack_k_bits_bb</block> + <block>gr_chunks_to_symbols_xx</block> + <block>gr_map_bb</block> + </cat> + <cat> + <name>Synchronizers</name> + <block>gr_pfb_clock_sync_xxx</block> + + <block>gr_mpsk_sync_cc</block> + + <block>gr_pll_carriertracking_cc</block> + <block>gr_pll_freqdet_cf</block> + <block>gr_pll_refout_cc</block> + + <block>gr_pn_correlator_cc</block> + <block>gr_simple_correlator</block> + <block>gr_simple_framer</block> + + <block>blks2_packet_decoder</block> + <block>blks2_packet_encoder</block> + </cat> + <cat> + <name>Level Controls</name> + <block>gr_dpll_bb</block> + <block>gr_peak_detector_xb</block> + <block>gr_peak_detector2_fb</block> + <block>gr_sample_and_hold_xx</block> + + <block>gr_agc_xx</block> + <block>gr_agc2_xx</block> + <block>gr_feedforward_agc_cc</block> + + <block>gr_mute_xx</block> + <block>gr_simple_squelch_cc</block> + <block>blks2_standard_squelch</block> + <block>gr_pwr_squelch_xx</block> + <block>gr_ctcss_squelch_ff</block> + <block>gr_threshold_ff</block> + </cat> + <cat> + <name>Filters</name> + <!-- FIR convenience filters --> + <block>low_pass_filter</block> + <block>high_pass_filter</block> + <block>band_pass_filter</block> + <block>band_reject_filter</block> + <block>root_raised_cosine_filter</block> + <!-- Filters that take taps as arguments --> + <block>gr_fir_filter_xxx</block> + <block>gr_interp_fir_filter_xxx</block> + <block>gr_fft_filter_xxx</block> + <block>gr_freq_xlating_fir_filter_xxx</block> + <block>gr_iir_filter_ffd</block> + <block>gr_filter_delay_fc</block> + <block>gr_channel_model</block> + <!-- Filter banks --> + <block>blks2_synthesis_filterbank</block> + <block>blks2_analysis_filterbank</block> + <!-- Polyphase filters --> + <block>blks2_pfb_arb_resampler_ccf</block> + <block>blks2_pfb_channelizer_ccf</block> + <block>gr_pfb_synthesizer_ccf</block> + <!-- Other filters --> + <block>gr_single_pole_iir_filter_xx</block> + <block>gr_hilbert_fc</block> + <block>gr_goertzel_fc</block> + <block>gr_rational_resampler_base_xxx</block> + <block>blks2_rational_resampler_xxx</block> + <block>gr_fractional_interpolator_xx</block> + <block>gr_keep_one_in_n</block> + <block>gr_keep_m_in_n</block> + <block>gr_moving_average_xx</block> + <block>gr_iqcomp_cc</block> + <block>gr_dc_blocker</block> + </cat> + <cat> + <name>Modulators</name> + <block>gr_vco_f</block> + <block>gr_frequency_modulator_fc</block> + <block>gr_phase_modulator_fc</block> + <block>gr_quadrature_demod_cf</block> + <block>gr_cpfsk_bc</block> + + <block>gr_diff_phasor_cc</block> + + <block>gr_diff_encoder_bb</block> + <block>gr_diff_decoder_bb</block> + + <block>blks2_wfm_tx</block> + <block>blks2_wfm_rcv</block> + <block>blks2_wfm_rcv_pll</block> + + <block>blks2_nbfm_tx</block> + <block>blks2_nbfm_rx</block> + + <block>blks2_am_demod_cf</block> + <block>blks2_fm_demod_cf</block> + <block>blks2_fm_deemph</block> + <block>blks2_fm_preemph</block> + </cat> + <cat> + <name>Error Correction</name> + <cat> + <name>Trellis</name> + </cat> + + <block>gr_encode_ccsds_27_bb</block> + <block>gr_decode_ccsds_27_fb</block> + </cat> + <cat> + <name>Line Coding</name> + <block>gr_scrambler_bb</block> + <block>gr_descrambler_bb</block> + <block>gr_additive_scrambler_bb</block> + </cat> + <cat> + <name>Probes</name> + <block>gr_probe_avg_mag_sqrd_x</block> + <block>gr_probe_density_b</block> + <block>gr_probe_signal_f</block> + </cat> + <cat> + <name>Variables</name> + <block>variable</block> + <block>variable_config</block> + <block>variable_function_probe</block> + <block>parameter</block> + </cat> + <cat> + <name>Misc</name> + <block>note</block> + <block>import</block> + + <block>gr_throttle</block> + <block>gr_delay</block> + <block>gr_repeat</block> + + <block>blks2_selector</block> + <block>blks2_valve</block> + <block>blks2_error_rate</block> + + <block>gr_head</block> + <block>gr_skiphead</block> + + <block>gr_kludge_copy</block> + <block>gr_copy</block> + <block>gr_nop</block> + + <block>xmlrpc_server</block> + <block>xmlrpc_client</block> + </cat> +</cat> diff --git a/grc/blocks/const_source_x.xml b/grc/blocks/const_source_x.xml new file mode 100644 index 000000000..fe8e56ec4 --- /dev/null +++ b/grc/blocks/const_source_x.xml @@ -0,0 +1,52 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Constant Source: Custom wrapper +################################################### + --> +<block> + <name>Constant Source</name> + <key>const_source_x</key> + <import>from gnuradio import gr</import> + <make>gr.sig_source_$(type.fcn)(0, gr.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/grc/blocks/gr_add_const_vxx.xml b/grc/blocks/gr_add_const_vxx.xml new file mode 100644 index 000000000..9f1c545ab --- /dev/null +++ b/grc/blocks/gr_add_const_vxx.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Add Const Block: +## all types, 1 output, 1 input & const +################################################### + --> +<block> + <name>Add Const</name> + <key>gr_add_const_vxx</key> + <import>from gnuradio import gr</import> + <make>gr.add_const_v$(type.fcn)($const)</make> + <callback>set_k($const)</callback> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>const_type:complex_vector</opt> + <opt>fcn:cc</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>const_type:real_vector</opt> + <opt>fcn:ff</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>const_type:int_vector</opt> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>const_type:int_vector</opt> + <opt>fcn:ss</opt> + </option> + </param> + <param> + <name>Constant</name> + <key>const</key> + <value>0</value> + <type>$type.const_type</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>len($const) == $vlen</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_add_xx.xml b/grc/blocks/gr_add_xx.xml new file mode 100644 index 000000000..97ed9283c --- /dev/null +++ b/grc/blocks/gr_add_xx.xml @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Add Block: +## all types, 1 output, 2 to inf inputs +################################################### + --> +<block> + <name>Add</name> + <key>gr_add_xx</key> + <import>from gnuradio import gr</import> + <make>gr.add_v$(type.fcn)($vlen)</make> + <param> + <name>IO 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> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_inputs > 1</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_additive_scrambler_bb.xml b/grc/blocks/gr_additive_scrambler_bb.xml new file mode 100644 index 000000000..a15d6eefb --- /dev/null +++ b/grc/blocks/gr_additive_scrambler_bb.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Additive Scrambler +################################################### + --> +<block> + <name>Additive Scrambler</name> + <key>gr_additive_scrambler_bb</key> + <import>from gnuradio import gr</import> + <make>gr.additive_scrambler_bb($mask, $seed, $len, $count)</make> + <param> + <name>Mask</name> + <key>mask</key> + <value>0x8A</value> + <type>hex</type> + </param> + <param> + <name>Seed</name> + <key>seed</key> + <value>0x7F</value> + <type>hex</type> + </param> + <param> + <name>Length</name> + <key>len</key> + <value>7</value> + <type>int</type> + </param> + <param> + <name>Count</name> + <key>count</key> + <value>0</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_agc2_xx.xml b/grc/blocks/gr_agc2_xx.xml new file mode 100644 index 000000000..55b20d4e8 --- /dev/null +++ b/grc/blocks/gr_agc2_xx.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<!-- +################################################### +##AGC2 +################################################### + --> +<block> + <name>AGC2</name> + <key>gr_agc2_xx</key> + <import>from gnuradio import gr</import> + <make>gr.agc2_$(type.fcn)($attack_rate, $decay_rate, $reference, $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>0.0</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/grc/blocks/gr_agc_xx.xml b/grc/blocks/gr_agc_xx.xml new file mode 100644 index 000000000..c87d239ed --- /dev/null +++ b/grc/blocks/gr_agc_xx.xml @@ -0,0 +1,59 @@ +<?xml version="1.0"?> +<!-- +################################################### +##AGC +################################################### + --> +<block> + <name>AGC</name> + <key>gr_agc_xx</key> + <import>from gnuradio import gr</import> + <make>gr.agc_$(type.fcn)($rate, $reference, $gain, $max_gain)</make> + <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>0.0</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/grc/blocks/gr_and_const_xx.xml b/grc/blocks/gr_and_const_xx.xml new file mode 100644 index 000000000..dc9649311 --- /dev/null +++ b/grc/blocks/gr_and_const_xx.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- +################################################### +## And Const Block: +## all types, 1 output, 1 input & const +################################################### + --> +<block> + <name>And Const</name> + <key>gr_and_const_xx</key> + <import>from gnuradio import gr</import> + <make>gr.and_const_$(type.fcn)($const)</make> + <callback>set_k($const)</callback> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:bb</opt> + </option> + </param> + <param> + <name>Constant</name> + <key>const</key> + <value>0</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_and_xx.xml b/grc/blocks/gr_and_xx.xml new file mode 100644 index 000000000..9ed006090 --- /dev/null +++ b/grc/blocks/gr_and_xx.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Logical And Block +################################################### + --> +<block> + <name>And</name> + <key>gr_and_xx</key> + <import>from gnuradio import gr</import> + <make>gr.and_$(type.fcn)()</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:bb</opt> + </option> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <check>$num_inputs >= 2</check> + <sink> + <name>in</name> + <type>$type</type> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_argmax_xx.xml b/grc/blocks/gr_argmax_xx.xml new file mode 100644 index 000000000..95269292e --- /dev/null +++ b/grc/blocks/gr_argmax_xx.xml @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<!-- +################################################### +##ArgMax: +## 1 output, 2 to inf inputs +################################################### + --> +<block> + <name>Argmax</name> + <key>gr_argmax_xx</key> + <import>from gnuradio import gr</import> + <make>gr.argmax_$(type.fcn)($vlen)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Float</name> + <key>float</key> + <opt>fcn:fs</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:is</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:dd</opt> + </option> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_inputs >= 1</check> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> + <source> + <name>max_vec</name> + <type>short</type> + </source> + <source> + <name>max_inp</name> + <type>short</type> + </source> +</block> diff --git a/grc/blocks/gr_burst_tagger.xml b/grc/blocks/gr_burst_tagger.xml new file mode 100644 index 000000000..58c909999 --- /dev/null +++ b/grc/blocks/gr_burst_tagger.xml @@ -0,0 +1,87 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Burst tagger: +## all types, 1 output, 2 input: stream & trigger (short) +################################################### + --> +<block> + <name>Burst Tagger</name> + <key>gr_burst_tagger</key> + <import>from gnuradio import gr</import> + <make>gr.burst_tagger($type.size) +self.$(id).set_true_tag($true_key,$true_value) +self.$(id).set_false_tag($false_key,$false_value) + </make> + <callback>set_true_tag($true_key,$true_value)</callback> + <callback>set_false_tag($false_key,$false_value)</callback> + <param> + <name>Stream Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>True KeyID</name> + <key>true_key</key> + <value>burst</value> + <type>string</type> + </param> + <param> + <name>True Value</name> + <key>true_value</key> + <value>True</value> + <type>bool</type> + </param> + <param> + <name>False KeyID</name> + <key>false_key</key> + <value>burst</value> + <type>string</type> + </param> + <param> + <name>False Value</name> + <key>false_value</key> + <value>False</value> + <type>bool</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + <vlen>1</vlen> + </sink> + <sink> + <name>trigger</name> + <type>short</type> + <vlen>1</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>1</vlen> + </source> +</block> diff --git a/grc/blocks/gr_channel_model.xml b/grc/blocks/gr_channel_model.xml new file mode 100644 index 000000000..d0d178d34 --- /dev/null +++ b/grc/blocks/gr_channel_model.xml @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Channel Model +################################################### + --> +<block> + <name>Channel Model</name> + <key>gr_channel_model</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.channel_model( + noise_voltage=$noise_voltage, + frequency_offset=$freq_offset, + epsilon=$epsilon, + taps=$taps, + noise_seed=$seed, +)</make> + <callback>set_noise_voltage($noise_voltage)</callback> + <callback>set_frequency_offset($freq_offset)</callback> + <callback>set_taps($taps)</callback> + <callback>set_timing_offset($epsilon)</callback> + <param> + <name>Noise Voltage</name> + <key>noise_voltage</key> + <value>0.0</value> + <type>real</type> + </param> + <param> + <name>Frequency Offset</name> + <key>freq_offset</key> + <value>0.0</value> + <type>real</type> + </param> + <param> + <name>Epsilon</name> + <key>epsilon</key> + <value>1.0</value> + <type>real</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <value>1.0 + 1.0j</value> + <type>complex_vector</type> + </param> + <param> + <name>Seed</name> + <key>seed</key> + <value>0</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>complex</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/gr_char_to_float.xml b/grc/blocks/gr_char_to_float.xml new file mode 100644 index 000000000..838b6a203 --- /dev/null +++ b/grc/blocks/gr_char_to_float.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Char to Float: +################################################### + --> +<block> + <name>Char To Float</name> + <key>gr_char_to_float</key> + <import>from gnuradio import gr</import> + <make>gr.char_to_float($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>float</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_char_to_short.xml b/grc/blocks/gr_char_to_short.xml new file mode 100644 index 000000000..57261e084 --- /dev/null +++ b/grc/blocks/gr_char_to_short.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Char to Short: +################################################### + --> +<block> + <name>Char To Short</name> + <key>gr_char_to_short</key> + <import>from gnuradio import gr</import> + <make>gr.char_to_short($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>short</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_chunks_to_symbols.xml b/grc/blocks/gr_chunks_to_symbols.xml new file mode 100644 index 000000000..e9da38e9a --- /dev/null +++ b/grc/blocks/gr_chunks_to_symbols.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Chunks to Symbols +################################################### + --> +<block> + <name>Chunks to Symbols</name> + <key>gr_chunks_to_symbols_xx</key> + <import>from gnuradio import gr</import> + <make>gr.chunks_to_symbols_$(in_type.fcn)$(out_type.fcn)($symbol_table, $dimension)</make> + <param> + <name>Input Type</name> + <key>in_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>Output Type</name> + <key>out_type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>fcn:c</opt> + <opt>table:complex_vector</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>fcn:f</opt> + <opt>table:real_vector</opt> + </option> + </param> + <param> + <name>Symbol Table</name> + <key>symbol_table</key> + <type>$out_type.table</type> + </param> + <param> + <name>Dimension</name> + <key>dimension</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Num Ports</name> + <key>num_ports</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_ports > 0</check> + <sink> + <name>in</name> + <type>$in_type</type> + <nports>$num_ports</nports> + </sink> + <source> + <name>out</name> + <type>$out_type</type> + <nports>$num_ports</nports> + </source> +</block> diff --git a/grc/blocks/gr_complex_to_arg.xml b/grc/blocks/gr_complex_to_arg.xml new file mode 100644 index 000000000..a7bbacd74 --- /dev/null +++ b/grc/blocks/gr_complex_to_arg.xml @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Complex to Arg +################################################### + --> +<block> + <name>Complex to Arg</name> + <key>gr_complex_to_arg</key> + <import>from gnuradio import gr</import> + <make>gr.complex_to_arg($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>complex</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>float</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_complex_to_float.xml b/grc/blocks/gr_complex_to_float.xml new file mode 100644 index 000000000..05681b0b9 --- /dev/null +++ b/grc/blocks/gr_complex_to_float.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Complex to Float: +## one or two output streams +################################################### + --> +<block> + <name>Complex To Float</name> + <key>gr_complex_to_float</key> + <import>from gnuradio import gr</import> + <make>gr.complex_to_float($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>complex</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>re</name> + <type>float</type> + <vlen>$vlen</vlen> + </source> + <source> + <name>im</name> + <type>float</type> + <vlen>$vlen</vlen> + <optional>1</optional> + </source> +</block> diff --git a/grc/blocks/gr_complex_to_imag.xml b/grc/blocks/gr_complex_to_imag.xml new file mode 100644 index 000000000..7c120eedd --- /dev/null +++ b/grc/blocks/gr_complex_to_imag.xml @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Complex to Imaginary +################################################### + --> +<block> + <name>Complex to Imag</name> + <key>gr_complex_to_imag</key> + <import>from gnuradio import gr</import> + <make>gr.complex_to_imag($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>complex</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>float</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_complex_to_interleaved_short.xml b/grc/blocks/gr_complex_to_interleaved_short.xml new file mode 100644 index 000000000..5e999599a --- /dev/null +++ b/grc/blocks/gr_complex_to_interleaved_short.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Complex to Interleaved Short: +################################################### + --> +<block> + <name>Complex To IShort</name> + <key>gr_complex_to_interleaved_short</key> + <import>from gnuradio import gr</import> + <make>gr.complex_to_interleaved_short()</make> + <sink> + <name>in</name> + <type>complex</type> + </sink> + <source> + <name>out</name> + <type>short</type> + </source> +</block> diff --git a/grc/blocks/gr_complex_to_mag.xml b/grc/blocks/gr_complex_to_mag.xml new file mode 100644 index 000000000..adc95f207 --- /dev/null +++ b/grc/blocks/gr_complex_to_mag.xml @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Complex to Magnitude +################################################### + --> +<block> + <name>Complex to Mag</name> + <key>gr_complex_to_mag</key> + <import>from gnuradio import gr</import> + <make>gr.complex_to_mag($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>complex</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>float</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_complex_to_mag_squared.xml b/grc/blocks/gr_complex_to_mag_squared.xml new file mode 100644 index 000000000..cd23bfb5c --- /dev/null +++ b/grc/blocks/gr_complex_to_mag_squared.xml @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Complex to Magnitude Squared +################################################### + --> +<block> + <name>Complex to Mag^2</name> + <key>gr_complex_to_mag_squared</key> + <import>from gnuradio import gr</import> + <make>gr.complex_to_mag_squared($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>complex</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>float</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_complex_to_real.xml b/grc/blocks/gr_complex_to_real.xml new file mode 100644 index 000000000..ae9ec7b14 --- /dev/null +++ b/grc/blocks/gr_complex_to_real.xml @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Complex to Real +################################################### + --> +<block> + <name>Complex to Real</name> + <key>gr_complex_to_real</key> + <import>from gnuradio import gr</import> + <make>gr.complex_to_real($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>complex</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>float</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_conjugate_cc.xml b/grc/blocks/gr_conjugate_cc.xml new file mode 100644 index 000000000..0b4deb347 --- /dev/null +++ b/grc/blocks/gr_conjugate_cc.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Complex Conjugate +################################################### + --> +<block> + <name>Complex Conjugate</name> + <key>gr_conjugate_cc</key> + <import>from gnuradio import gr</import> + <make>gr.conjugate_cc()</make> + <sink> + <name>in</name> + <type>complex</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/gr_copy.xml b/grc/blocks/gr_copy.xml new file mode 100644 index 000000000..8b12eaca7 --- /dev/null +++ b/grc/blocks/gr_copy.xml @@ -0,0 +1,75 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Copy +################################################### + --> +<block> + <name>Copy</name> + <key>gr_copy</key> + <import>from gnuradio import gr</import> + <make>gr.copy($type.size*$vlen) +self.$(id).set_enabled($enabled)</make> + <callback>set_enabled($enabled)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Enabled</name> + <key>enabled</key> + <value>True</value> + <type>bool</type> + <option> + <name>Enabled</name> + <key>True</key> + </option> + <option> + <name>Disabled</name> + <key>False</key> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_cpfsk_bc.xml b/grc/blocks/gr_cpfsk_bc.xml new file mode 100644 index 000000000..d5549d933 --- /dev/null +++ b/grc/blocks/gr_cpfsk_bc.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<!-- +################################################### +##CPFSK +################################################### + --> +<block> + <name>CPFSK</name> + <key>gr_cpfsk_bc</key> + <import>from gnuradio import gr</import> + <make>gr.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/grc/blocks/gr_ctcss_squelch_ff.xml b/grc/blocks/gr_ctcss_squelch_ff.xml new file mode 100644 index 000000000..a34c75374 --- /dev/null +++ b/grc/blocks/gr_ctcss_squelch_ff.xml @@ -0,0 +1,79 @@ +<?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>gr_ctcss_squelch_ff</key> + <import>from gnuradio import gr</import> + <make>gr.ctcss_squelch_ff($rate, $freq, $level, $len, $ramp, $gate)</make> + <callback>set_level($level)</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/grc/blocks/gr_dc_blocker.xml b/grc/blocks/gr_dc_blocker.xml new file mode 100644 index 000000000..05c342074 --- /dev/null +++ b/grc/blocks/gr_dc_blocker.xml @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<!-- +################################################### +## DC Blocker +################################################### + --> +<block> + <name>DC Blocker</name> + <key>gr_dc_blocker</key> + <import>from gnuradio import gr</import> + <make>gr.dc_blocker_$(type)($length, $long_form)</make> + <!-- <callback>set_length($length)</callback> --> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex</name> + <key>cc</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + </option> + <option> + <name>Float->Float</name> + <key>ff</key> + <opt>input:float</opt> + <opt>output:float</opt> + </option> + </param> + <param> + <name>Length</name> + <key>length</key> + <value>32</value> + <type>int</type> + </param> + <param> + <name>Long Form</name> + <key>long_form</key> + <value>True</value> + <type>bool</type> + </param> + + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> +</block> diff --git a/grc/blocks/gr_decode_ccsds_27_fb.xml b/grc/blocks/gr_decode_ccsds_27_fb.xml new file mode 100644 index 000000000..03b31db83 --- /dev/null +++ b/grc/blocks/gr_decode_ccsds_27_fb.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Decode CCSDS 27 +################################################### + --> +<block> + <name>Decode CCSDS 27</name> + <key>gr_decode_ccsds_27_fb</key> + <import>from gnuradio import gr</import> + <make>gr.decode_ccsds_27_fb()</make> + <sink> + <name>in</name> + <type>float</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_deinterleave.xml b/grc/blocks/gr_deinterleave.xml new file mode 100644 index 000000000..a7482978c --- /dev/null +++ b/grc/blocks/gr_deinterleave.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Deinterleave +################################################### + --> +<block> + <name>Deinterleave</name> + <key>gr_deinterleave</key> + <import>from gnuradio import gr</import> + <make>gr.deinterleave($type.size*$vlen)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Streams</name> + <key>num_streams</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_streams > 0</check> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_streams</nports> + </source> +</block> diff --git a/grc/blocks/gr_delay.xml b/grc/blocks/gr_delay.xml new file mode 100644 index 000000000..5cc411a78 --- /dev/null +++ b/grc/blocks/gr_delay.xml @@ -0,0 +1,75 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Delay +################################################### + --> +<block> + <name>Delay</name> + <key>gr_delay</key> + <import>from gnuradio import gr</import> + <make>gr.delay($type.size*$vlen, $delay)</make> + <callback>set_delay($delay)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Delay</name> + <key>delay</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Num Ports</name> + <key>num_ports</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_ports > 0</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_ports</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_ports</nports> + </source> +</block> diff --git a/grc/blocks/gr_descrambler_bb.xml b/grc/blocks/gr_descrambler_bb.xml new file mode 100644 index 000000000..5cfbcc203 --- /dev/null +++ b/grc/blocks/gr_descrambler_bb.xml @@ -0,0 +1,38 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Descrambler +################################################### + --> +<block> + <name>Descrambler</name> + <key>gr_descrambler_bb</key> + <import>from gnuradio import gr</import> + <make>gr.descrambler_bb($mask, $seed, $len)</make> + <param> + <name>Mask</name> + <key>mask</key> + <value>0x8A</value> + <type>hex</type> + </param> + <param> + <name>Seed</name> + <key>seed</key> + <value>0x7F</value> + <type>hex</type> + </param> + <param> + <name>Length</name> + <key>len</key> + <value>7</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_diff_decoder_bb.xml b/grc/blocks/gr_diff_decoder_bb.xml new file mode 100644 index 000000000..ea7cf1734 --- /dev/null +++ b/grc/blocks/gr_diff_decoder_bb.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Differential Decoder +################################################### + --> +<block> + <name>Differential Decoder</name> + <key>gr_diff_decoder_bb</key> + <import>from gnuradio import gr</import> + <make>gr.diff_decoder_bb($modulus)</make> + <param> + <name>Modulus</name> + <key>modulus</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_diff_encoder_bb.xml b/grc/blocks/gr_diff_encoder_bb.xml new file mode 100644 index 000000000..21241eac2 --- /dev/null +++ b/grc/blocks/gr_diff_encoder_bb.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Differential Encoder +################################################### + --> +<block> + <name>Differential Encoder</name> + <key>gr_diff_encoder_bb</key> + <import>from gnuradio import gr</import> + <make>gr.diff_encoder_bb($modulus)</make> + <param> + <name>Modulus</name> + <key>modulus</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_diff_phasor_cc.xml b/grc/blocks/gr_diff_phasor_cc.xml new file mode 100644 index 000000000..2b2d7e372 --- /dev/null +++ b/grc/blocks/gr_diff_phasor_cc.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Differential Phasor +################################################### + --> +<block> + <name>Differential Phasor</name> + <key>gr_diff_phasor_cc</key> + <import>from gnuradio import gr</import> + <make>gr.diff_phasor_cc()</make> + <sink> + <name>in</name> + <type>complex</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/gr_divide_xx.xml b/grc/blocks/gr_divide_xx.xml new file mode 100644 index 000000000..04667bc2a --- /dev/null +++ b/grc/blocks/gr_divide_xx.xml @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Divide Block: +## all types, 1 output, 2 to inf inputs +################################################### + --> +<block> + <name>Divide</name> + <key>gr_divide_xx</key> + <import>from gnuradio import gr</import> + <make>gr.divide_$(type.fcn)($vlen)</make> + <param> + <name>IO 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> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <check>$num_inputs >= 2</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_dpll_bb.xml b/grc/blocks/gr_dpll_bb.xml new file mode 100644 index 000000000..044d398ff --- /dev/null +++ b/grc/blocks/gr_dpll_bb.xml @@ -0,0 +1,30 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Detect Peak +################################################### + --> +<block> + <name>Detect Peak</name> + <key>gr_dpll_bb</key> + <import>from gnuradio import gr</import> + <make>gr.dpll_bb($period, $gain)</make> + <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/grc/blocks/gr_encode_ccsds_27_bb.xml b/grc/blocks/gr_encode_ccsds_27_bb.xml new file mode 100644 index 000000000..f31e6b6c8 --- /dev/null +++ b/grc/blocks/gr_encode_ccsds_27_bb.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Encode CCSDS 27 +################################################### + --> +<block> + <name>Encode CCSDS 27</name> + <key>gr_encode_ccsds_27_bb</key> + <import>from gnuradio import gr</import> + <make>gr.encode_ccsds_27_bb()</make> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_endian_swap.xml b/grc/blocks/gr_endian_swap.xml new file mode 100644 index 000000000..aa564026c --- /dev/null +++ b/grc/blocks/gr_endian_swap.xml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Add Block: +## all types, 1 output, 2 to inf inputs +################################################### + --> +<block> + <name>Endian Swap</name> + <key>gr_endian_swap</key> + <import>from gnuradio import gr</import> + <make>gr.endian_swap($type.size)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:8</opt> + </option> + <option> + <name>Int</name> + <key>s32</key> + <opt>size:4</opt> + </option> + <option> + <name>Short</name> + <key>s16</key> + <opt>size:2</opt> + </option> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_feedforward_agc_cc.xml b/grc/blocks/gr_feedforward_agc_cc.xml new file mode 100644 index 000000000..24e80953f --- /dev/null +++ b/grc/blocks/gr_feedforward_agc_cc.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Feed Forward AGC +################################################### + --> +<block> + <name>Feed Forward AGC</name> + <key>gr_feedforward_agc_cc</key> + <import>from gnuradio import gr</import> + <make>gr.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/grc/blocks/gr_fft_filter_xxx.xml b/grc/blocks/gr_fft_filter_xxx.xml new file mode 100644 index 000000000..5b4cd83cc --- /dev/null +++ b/grc/blocks/gr_fft_filter_xxx.xml @@ -0,0 +1,59 @@ +<?xml version="1.0"?> +<!-- +################################################### +##FFT Filter +################################################### + --> +<block> + <name>FFT Filter</name> + <key>gr_fft_filter_xxx</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.fft_filter_$(type)($decim, $taps, $nthreads)</make> + <callback>set_taps($taps)</callback> + <callback>set_nthreads($nthreads)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Complex Taps)</name> + <key>ccc</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Float->Float (Real Taps)</name> + <key>fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + <opt>taps:real_vector</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>$type.taps</type> + </param> + <param> + <name>Num. Threads</name> + <key>nthreads</key> + <value>1</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> +</block> diff --git a/grc/blocks/gr_fft_vxx.xml b/grc/blocks/gr_fft_vxx.xml new file mode 100644 index 000000000..565354e41 --- /dev/null +++ b/grc/blocks/gr_fft_vxx.xml @@ -0,0 +1,88 @@ +<?xml version="1.0"?> +<!-- +################################################### +##FFT +################################################### + --> +<block> + <name>FFT</name> + <key>gr_fft_vxx</key> + <import>from gnuradio import gr</import> + <import>from gnuradio import window</import> + <make>#if $type() == "complex" +gr.fft_vcc($fft_size, $forward, $window, $shift, $nthreads) +#else +gr.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/grc/blocks/gr_file_sink.xml b/grc/blocks/gr_file_sink.xml new file mode 100644 index 000000000..d0a693900 --- /dev/null +++ b/grc/blocks/gr_file_sink.xml @@ -0,0 +1,78 @@ +<?xml version="1.0"?> +<!-- +################################################### +##File Sink +################################################### + --> +<block> + <name>File Sink</name> + <key>gr_file_sink</key> + <import>from gnuradio import gr</import> + <make>gr.file_sink($type.size*$vlen, $file) +self.$(id).set_unbuffered($unbuffered)</make> + <callback>set_unbuffered($unbuffered)</callback> + <callback>open($file)</callback> + <param> + <name>File</name> + <key>file</key> + <value></value> + <type>file_save</type> + </param> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Unbuffered</name> + <key>unbuffered</key> + <value>False</value> + <type>bool</type> + <option> + <name>Off</name> + <key>False</key> + </option> + <option> + <name>On</name> + <key>True</key> + </option> + </param> + + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> +</block> diff --git a/grc/blocks/gr_file_source.xml b/grc/blocks/gr_file_source.xml new file mode 100644 index 000000000..5f0e16b27 --- /dev/null +++ b/grc/blocks/gr_file_source.xml @@ -0,0 +1,75 @@ +<?xml version="1.0"?> +<!-- +################################################### +##File Source +################################################### + --> +<block> + <name>File Source</name> + <key>gr_file_source</key> + <import>from gnuradio import gr</import> + <make>gr.file_source($type.size*$vlen, $file, $repeat)</make> + <callback>open($file, $repeat)</callback> + <param> + <name>File</name> + <key>file</key> + <value></value> + <type>file_open</type> + </param> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </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> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_filter_delay_fc.xml b/grc/blocks/gr_filter_delay_fc.xml new file mode 100644 index 000000000..30d65bf82 --- /dev/null +++ b/grc/blocks/gr_filter_delay_fc.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Filter Delay +################################################### + --> +<block> + <name>Filter Delay</name> + <key>gr_filter_delay_fc</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.filter_delay_fc($taps)</make> + <param> + <name>Taps</name> + <key>taps</key> + <type>real_vector</type> + </param> + <sink> + <name>in</name> + <type>float</type> + </sink> + <sink> + <name>in</name> + <type>float</type> + <optional>1</optional> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/gr_fir_filter_xxx.xml b/grc/blocks/gr_fir_filter_xxx.xml new file mode 100644 index 000000000..c4de8f539 --- /dev/null +++ b/grc/blocks/gr_fir_filter_xxx.xml @@ -0,0 +1,80 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Decimating FIR Filter +################################################### + --> +<block> + <name>Decimating FIR Filter</name> + <key>gr_fir_filter_xxx</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.fir_filter_$(type)($decim, $taps)</make> + <callback>set_taps($taps)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Complex Taps)</name> + <key>ccc</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Complex->Complex (Real Taps)</name> + <key>ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Complex (Complex Taps)</name> + <key>fcc</key> + <opt>input:float</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Float->Float (Real Taps)</name> + <key>fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Short (Real Taps)</name> + <key>fsf</key> + <opt>input:float</opt> + <opt>output:short</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Short->Complex (Complex Taps)</name> + <key>scc</key> + <opt>input:short</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>$type.taps</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> +</block> diff --git a/grc/blocks/gr_float_to_char.xml b/grc/blocks/gr_float_to_char.xml new file mode 100644 index 000000000..1fa500e3c --- /dev/null +++ b/grc/blocks/gr_float_to_char.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Float to Char: +################################################### + --> +<block> + <name>Float To Char</name> + <key>gr_float_to_char</key> + <import>from gnuradio import gr</import> + <make>gr.float_to_char($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>float</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>byte</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_float_to_complex.xml b/grc/blocks/gr_float_to_complex.xml new file mode 100644 index 000000000..a42cff358 --- /dev/null +++ b/grc/blocks/gr_float_to_complex.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Float to Complex: +## one or two input streams +################################################### + --> +<block> + <name>Float To Complex</name> + <key>gr_float_to_complex</key> + <import>from gnuradio import gr</import> + <make>gr.float_to_complex($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>re</name> + <type>float</type> + <vlen>$vlen</vlen> + </sink> + <sink> + <name>im</name> + <type>float</type> + <vlen>$vlen</vlen> + <optional>1</optional> + </sink> + <source> + <name>out</name> + <type>complex</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_float_to_int.xml b/grc/blocks/gr_float_to_int.xml new file mode 100644 index 000000000..b43c208a5 --- /dev/null +++ b/grc/blocks/gr_float_to_int.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Float to Int: +################################################### + --> +<block> + <name>Float To Int</name> + <key>gr_float_to_int</key> + <import>from gnuradio import gr</import> + <make>gr.float_to_int($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>float</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>int</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_float_to_short.xml b/grc/blocks/gr_float_to_short.xml new file mode 100644 index 000000000..4f76b8f58 --- /dev/null +++ b/grc/blocks/gr_float_to_short.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Float to Short: +################################################### + --> +<block> + <name>Float To Short</name> + <key>gr_float_to_short</key> + <import>from gnuradio import gr</import> + <make>gr.float_to_short($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>float</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>short</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_float_to_uchar.xml b/grc/blocks/gr_float_to_uchar.xml new file mode 100644 index 000000000..aa804d7d9 --- /dev/null +++ b/grc/blocks/gr_float_to_uchar.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Float to Unsigned Char: +################################################### + --> +<block> + <name>Float To UChar</name> + <key>gr_float_to_uchar</key> + <import>from gnuradio import gr</import> + <make>gr.float_to_uchar()</make> + <sink> + <name>in</name> + <type>float</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_fractional_interpolator_xx.xml b/grc/blocks/gr_fractional_interpolator_xx.xml new file mode 100644 index 000000000..8d65ff8bf --- /dev/null +++ b/grc/blocks/gr_fractional_interpolator_xx.xml @@ -0,0 +1,46 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Fractional Interpolator +################################################### + --> +<block> + <name>Fractional Interpolator</name> + <key>gr_fractional_interpolator_xx</key> + <import>from gnuradio import gr</import> + <make>gr.fractional_interpolator_$(type.fcn)($phase_shift, $interp_ratio)</make> + <callback>set_interp_ratio($interp_ratio)</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>Phase Shift</name> + <key>phase_shift</key> + <type>real</type> + </param> + <param> + <name>Interpolation Ratio</name> + <key>interp_ratio</key> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_freq_xlating_fir_filter_xxx.xml b/grc/blocks/gr_freq_xlating_fir_filter_xxx.xml new file mode 100644 index 000000000..e3ee66977 --- /dev/null +++ b/grc/blocks/gr_freq_xlating_fir_filter_xxx.xml @@ -0,0 +1,93 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Frequency Xlating Filter +################################################### + --> +<block> + <name>Frequency Xlating FIR Filter</name> + <key>gr_freq_xlating_fir_filter_xxx</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.freq_xlating_fir_filter_$(type)($decim, $taps, $center_freq, $samp_rate)</make> + <callback>set_taps($taps)</callback> + <callback>set_center_freq($center_freq)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Complex Taps)</name> + <key>ccc</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Complex->Complex (Real Taps)</name> + <key>ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Complex (Complex Taps)</name> + <key>fcc</key> + <opt>input:float</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Float->Complex (Real Taps)</name> + <key>fcf</key> + <opt>input:float</opt> + <opt>output:complex</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Short->Complex (Complex Taps)</name> + <key>scc</key> + <opt>input:short</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Short->Complex (Real Taps)</name> + <key>scf</key> + <opt>input:short</opt> + <opt>output:complex</opt> + <opt>taps:real_vector</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>$type.taps</type> + </param> + <param> + <name>Center Frequency</name> + <key>center_freq</key> + <value>0</value> + <type>real</type> + </param> + <param> + <name>Sample Rate</name> + <key>samp_rate</key> + <value>samp_rate</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> +</block> diff --git a/grc/blocks/gr_frequency_modulator_fc.xml b/grc/blocks/gr_frequency_modulator_fc.xml new file mode 100644 index 000000000..d5f8fcfe3 --- /dev/null +++ b/grc/blocks/gr_frequency_modulator_fc.xml @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Frequency Modulator +################################################### + --> +<block> + <name>Frequency Mod</name> + <key>gr_frequency_modulator_fc</key> + <import>from gnuradio import gr</import> + <make>gr.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/grc/blocks/gr_glfsr_source_x.xml b/grc/blocks/gr_glfsr_source_x.xml new file mode 100644 index 000000000..88fb66797 --- /dev/null +++ b/grc/blocks/gr_glfsr_source_x.xml @@ -0,0 +1,59 @@ +<?xml version="1.0"?> +<!-- +################################################### +##GLFSR Source +################################################### + --> +<block> + <name>GLFSR Source</name> + <key>gr_glfsr_source_x</key> + <import>from gnuradio import gr</import> + <make>gr.glfsr_source_$(type.fcn)($degree, $repeat, $mask, $seed)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Float</name> + <key>float</key> + <opt>fcn:f</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:b</opt> + </option> + </param> + <param> + <name>Degree</name> + <key>degree</key> + <type>int</type> + </param> + <param> + <name>Repeat</name> + <key>repeat</key> + <type>enum</type> + <option> + <name>Yes</name> + <key>True</key> + </option> + <option> + <name>No</name> + <key>False</key> + </option> + </param> + <param> + <name>Mask</name> + <key>mask</key> + <type>int</type> + </param> + <param> + <name>Seed</name> + <key>seed</key> + <type>int</type> + </param> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_goertzel_fc.xml b/grc/blocks/gr_goertzel_fc.xml new file mode 100644 index 000000000..f27d9582e --- /dev/null +++ b/grc/blocks/gr_goertzel_fc.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Goertzel +################################################### + --> +<block> + <name>Goertzel</name> + <key>gr_goertzel_fc</key> + <import>from gnuradio import gr</import> + <make>gr.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/grc/blocks/gr_head.xml b/grc/blocks/gr_head.xml new file mode 100644 index 000000000..e5ff7f6aa --- /dev/null +++ b/grc/blocks/gr_head.xml @@ -0,0 +1,65 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Head +################################################### + --> +<block> + <name>Head</name> + <key>gr_head</key> + <import>from gnuradio import gr</import> + <make>gr.head($type.size*$vlen, $num_items)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Items</name> + <key>num_items</key> + <value>1024</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_hilbert_fc.xml b/grc/blocks/gr_hilbert_fc.xml new file mode 100644 index 000000000..165e8da23 --- /dev/null +++ b/grc/blocks/gr_hilbert_fc.xml @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Hilbert +################################################### + --> +<block> + <name>Hilbert</name> + <key>gr_hilbert_fc</key> + <import>from gnuradio import gr</import> + <make>gr.hilbert_fc($num_taps)</make> + <param> + <name>Num Taps</name> + <key>num_taps</key> + <value>64</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>float</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/gr_iir_filter_ffd.xml b/grc/blocks/gr_iir_filter_ffd.xml new file mode 100644 index 000000000..9799150e8 --- /dev/null +++ b/grc/blocks/gr_iir_filter_ffd.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!-- +################################################### +##IIR Filter +################################################### + --> +<block> + <name>IIR Filter</name> + <key>gr_iir_filter_ffd</key> + <import>from gnuradio import gr</import> + <make>gr.iir_filter_ffd($fftaps, $fbtaps)</make> + <callback>set_taps($fftaps, $fbtaps)</callback> + <param> + <name>Feed-forward Taps</name> + <key>fftaps</key> + <type>real_vector</type> + </param> + <param> + <name>Feedback Taps</name> + <key>fbtaps</key> + <type>real_vector</type> + </param> + <sink> + <name>in</name> + <type>float</type> + </sink> + <source> + <name>out</name> + <type>float</type> + </source> +</block> diff --git a/grc/blocks/gr_int_to_float.xml b/grc/blocks/gr_int_to_float.xml new file mode 100644 index 000000000..7430fec72 --- /dev/null +++ b/grc/blocks/gr_int_to_float.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Int to Float: +################################################### + --> +<block> + <name>Int To Float</name> + <key>gr_int_to_float</key> + <import>from gnuradio import gr</import> + <make>gr.int_to_float($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>int</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>float</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_integrate_xx.xml b/grc/blocks/gr_integrate_xx.xml new file mode 100644 index 000000000..d0ebd42e2 --- /dev/null +++ b/grc/blocks/gr_integrate_xx.xml @@ -0,0 +1,50 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Integrate +################################################### + --> +<block> + <name>Integrate</name> + <key>gr_integrate_xx</key> + <import>from gnuradio import gr</import> + <make>gr.integrate_$(type.fcn)($decim)</make> + <param> + <name>IO 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> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_interleave.xml b/grc/blocks/gr_interleave.xml new file mode 100644 index 000000000..3db16ab55 --- /dev/null +++ b/grc/blocks/gr_interleave.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Interleave +################################################### + --> +<block> + <name>Interleave</name> + <key>gr_interleave</key> + <import>from gnuradio import gr</import> + <make>gr.interleave($type.size*$vlen)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Streams</name> + <key>num_streams</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_streams > 0</check> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_streams</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_interleaved_short_to_complex.xml b/grc/blocks/gr_interleaved_short_to_complex.xml new file mode 100644 index 000000000..e3023e499 --- /dev/null +++ b/grc/blocks/gr_interleaved_short_to_complex.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Interleaved Short to Complex: +################################################### + --> +<block> + <name>IShort To Complex</name> + <key>gr_interleaved_short_to_complex</key> + <import>from gnuradio import gr</import> + <make>gr.interleaved_short_to_complex()</make> + <sink> + <name>in</name> + <type>short</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/gr_interp_fir_filter_xxx.xml b/grc/blocks/gr_interp_fir_filter_xxx.xml new file mode 100644 index 000000000..55375ae02 --- /dev/null +++ b/grc/blocks/gr_interp_fir_filter_xxx.xml @@ -0,0 +1,80 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Interpolating FIR Filter +################################################### + --> +<block> + <name>Interpolating FIR Filter</name> + <key>gr_interp_fir_filter_xxx</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.interp_fir_filter_$(type)($interp, $taps)</make> + <callback>set_taps($taps)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Complex Taps)</name> + <key>ccc</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Complex->Complex (Real Taps)</name> + <key>ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Complex (Complex Taps)</name> + <key>fcc</key> + <opt>input:float</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Float->Float (Real Taps)</name> + <key>fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Short (Real Taps)</name> + <key>fsf</key> + <opt>input:float</opt> + <opt>output:short</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Short->Complex (Complex Taps)</name> + <key>scc</key> + <opt>input:short</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + </param> + <param> + <name>Interpolation</name> + <key>interp</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>$type.taps</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> +</block> diff --git a/grc/blocks/gr_iqcomp_cc.xml b/grc/blocks/gr_iqcomp_cc.xml new file mode 100644 index 000000000..1603bdc42 --- /dev/null +++ b/grc/blocks/gr_iqcomp_cc.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!-- +################################################### +##IQ Comp +################################################### + --> +<block> + <name>IQ Comp</name> + <key>gr_iqcomp_cc</key> + <import>from gnuradio import gr</import> + <make>gr.iqcomp_cc($mu)</make> + <param> + <name>Mu</name> + <key>mu</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/grc/blocks/gr_keep_m_in_n.xml b/grc/blocks/gr_keep_m_in_n.xml new file mode 100644 index 000000000..35a156176 --- /dev/null +++ b/grc/blocks/gr_keep_m_in_n.xml @@ -0,0 +1,76 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Keep M in N +################################################### + --> +<block> + <name>Keep M in N</name> + <key>gr_keep_m_in_n</key> + <import>from gnuradio import gr</import> + <make>gr.keep_m_in_n($type.size, $m, $n, $offset)</make> + <callback>set_offset($offset)</callback> + <callback>set_m($m)</callback> + <callback>set_n($n)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>M</name> + <key>m</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>N</name> + <key>n</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>initial offset</name> + <key>offset</key> + <value>0</value> + <type>int</type> + </param> + <check>$n > 0</check> + <check>$m > 0</check> + <check>$m < $n</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>1</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>1</vlen> + </source> +</block> diff --git a/grc/blocks/gr_keep_one_in_n.xml b/grc/blocks/gr_keep_one_in_n.xml new file mode 100644 index 000000000..21595b755 --- /dev/null +++ b/grc/blocks/gr_keep_one_in_n.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Keep 1 in N +################################################### + --> +<block> + <name>Keep 1 in N</name> + <key>gr_keep_one_in_n</key> + <import>from gnuradio import gr</import> + <make>gr.keep_one_in_n($type.size*$vlen, $n)</make> + <callback>set_n($n)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>N</name> + <key>n</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$n > 0</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_kludge_copy.xml b/grc/blocks/gr_kludge_copy.xml new file mode 100644 index 000000000..8058b082d --- /dev/null +++ b/grc/blocks/gr_kludge_copy.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Kludge Copy +################################################### + --> +<block> + <name>Kludge Copy</name> + <key>gr_kludge_copy</key> + <import>from gnuradio import gr</import> + <make>gr.kludge_copy($type.size*$vlen)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Ports</name> + <key>num_ports</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_ports > 0</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_ports</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_ports</nports> + </source> +</block> diff --git a/grc/blocks/gr_map_bb.xml b/grc/blocks/gr_map_bb.xml new file mode 100644 index 000000000..20d6bd2b4 --- /dev/null +++ b/grc/blocks/gr_map_bb.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Map +################################################### + --> +<block> + <name>Map</name> + <key>gr_map_bb</key> + <import>from gnuradio import gr</import> + <make>gr.map_bb($map)</make> + <param> + <name>Map</name> + <key>map</key> + <type>int_vector</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_max_xx.xml b/grc/blocks/gr_max_xx.xml new file mode 100644 index 000000000..9dbbe60e5 --- /dev/null +++ b/grc/blocks/gr_max_xx.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Max: +## 1 output, 2 to inf inputs +################################################### + --> +<block> + <name>Max</name> + <key>gr_max_xx</key> + <import>from gnuradio import gr</import> + <make>gr.max_$(type.fcn)($vlen)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Float</name> + <key>float</key> + <opt>fcn:ff</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:dd</opt> + </option> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_inputs >= 2</check> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_message_burst_source.xml b/grc/blocks/gr_message_burst_source.xml new file mode 100644 index 000000000..e835d2a2c --- /dev/null +++ b/grc/blocks/gr_message_burst_source.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Message Burst Source (the sink port is a message) +################################################### + --> +<block> + <name>Message Burst Source</name> + <key>gr_message_burst_source</key> + <import>from gnuradio import gr</import> + <make>gr.message_burst_source($type.size*$vlen, $(id)_msgq_in)</make> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>msg</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_message_debug.xml b/grc/blocks/gr_message_debug.xml new file mode 100644 index 000000000..964f95756 --- /dev/null +++ b/grc/blocks/gr_message_debug.xml @@ -0,0 +1,27 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Message Debug +################################################### + --> +<block> + <name>Message Debug</name> + <key>gr_message_debug</key> + <import>from gnuradio import gr</import> + <make>gr.message_debug()</make> + <sink> + <name>print</name> + <type>message</type> + <optional>1</optional> + </sink> + <sink> + <name>store</name> + <type>message</type> + <optional>1</optional> + </sink> + <sink> + <name>print_pdu</name> + <type>message</type> + <optional>1</optional> + </sink> +</block> diff --git a/grc/blocks/gr_message_sink.xml b/grc/blocks/gr_message_sink.xml new file mode 100644 index 000000000..18e92adb9 --- /dev/null +++ b/grc/blocks/gr_message_sink.xml @@ -0,0 +1,72 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Message Sink (the source port is a message) +################################################### + --> +<block> + <name>Message Sink</name> + <key>gr_message_sink</key> + <import>from gnuradio import gr</import> + <make>gr.message_sink($type.size*$vlen, $(id)_msgq_out, $dont_block)</make> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Don't Block</name> + <key>dont_block</key> + <value>False</value> + <type>enum</type> + <option> + <name>Don't Block</name> + <key>True</key> + </option> + <option> + <name>Block</name> + <key>False</key> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>msg</type> + </source> +</block> diff --git a/grc/blocks/gr_message_source.xml b/grc/blocks/gr_message_source.xml new file mode 100644 index 000000000..72367b21b --- /dev/null +++ b/grc/blocks/gr_message_source.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Message Source (the sink port is a message) +################################################### + --> +<block> + <name>Message Source</name> + <key>gr_message_source</key> + <import>from gnuradio import gr</import> + <make>gr.message_source($type.size*$vlen, $(id)_msgq_in)</make> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>msg</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_message_strobe.xml b/grc/blocks/gr_message_strobe.xml new file mode 100644 index 000000000..60a7724df --- /dev/null +++ b/grc/blocks/gr_message_strobe.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Message Strobe +################################################### + --> +<block> + <name>Message Strobe</name> + <key>gr_message_strobe</key> + <import>from gnuradio import gr</import> + <import>from gruel import pmt</import> + <make>gr.message_strobe($msg, $period)</make> + <param> + <name>Message PMT</name> + <key>msg</key> + <value>pmt.pmt_intern("TEST")</value> + <type>raw</type> + </param> + <param> + <name>Period (ms)</name> + <key>period</key> + <value>1000</value> + <type>real</type> + </param> + <sink> + <name>set_msg</name> + <type>message</type> + <optional>1</optional> + </sink> + <source> + <name>strobe</name> + <type>message</type> + <optional>1</optional> + </source> +</block> diff --git a/grc/blocks/gr_moving_average_xx.xml b/grc/blocks/gr_moving_average_xx.xml new file mode 100644 index 000000000..b70943c78 --- /dev/null +++ b/grc/blocks/gr_moving_average_xx.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Moving Average +################################################### + --> +<block> + <name>Moving Average</name> + <key>gr_moving_average_xx</key> + <import>from gnuradio import gr</import> + <make>gr.moving_average_$(type.fcn)($length, $scale, $max_iter)</make> + <callback>set_length_and_scale($length, $scale)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>fcn:cc</opt> + <opt>scale:complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>fcn:ff</opt> + <opt>scale:real</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + <opt>scale:int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + <opt>scale:int</opt> + </option> + </param> + <param> + <name>Length</name> + <key>length</key> + <value>1000</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>$type.scale</type> + </param> + <param> + <name>Max Iter</name> + <key>max_iter</key> + <value>4000</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_mpsk_sync_cc.xml b/grc/blocks/gr_mpsk_sync_cc.xml new file mode 100644 index 000000000..fd08f8340 --- /dev/null +++ b/grc/blocks/gr_mpsk_sync_cc.xml @@ -0,0 +1,69 @@ +<?xml version="1.0"?> +<!-- +################################################### +##MPSK Sync +################################################### + --> +<block> + <name>MPSK Sync</name> + <key>gr_mpsk_sync_cc</key> + <import>from gnuradio import gr</import> + <make>gr.mpsk_sync_cc($alpha, $beta, $max_freq, $min_freq, $ref_phase, $omega, $gain_omega, $mu, $gain_mu)</make> + <callback>set_mu($mu)</callback> + <callback>set_gain_mu($gain_mu)</callback> + <callback>set_omega($omega)</callback> + <callback>set_gain_omega($gain_omega)</callback> + <param> + <name>Alpha</name> + <key>alpha</key> + <type>real</type> + </param> + <param> + <name>Beta</name> + <key>beta</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> + <param> + <name>Reference Phase</name> + <key>ref_phase</key> + <type>real</type> + </param> + <param> + <name>Omega</name> + <key>omega</key> + <type>real</type> + </param> + <param> + <name>Gain Omega</name> + <key>gain_omega</key> + <type>real</type> + </param> + <param> + <name>Mu</name> + <key>mu</key> + <type>real</type> + </param> + <param> + <name>Gain Mu</name> + <key>gain_mu</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/grc/blocks/gr_multiply_const_vxx.xml b/grc/blocks/gr_multiply_const_vxx.xml new file mode 100644 index 000000000..1309d75cd --- /dev/null +++ b/grc/blocks/gr_multiply_const_vxx.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Multiply Const Block: +## all types, 1 output, 1 input & const +################################################### + --> +<block> + <name>Multiply Const</name> + <key>gr_multiply_const_vxx</key> + <import>from gnuradio import gr</import> + <make>gr.multiply_const_v$(type.fcn)($const)</make> + <callback>set_k($const)</callback> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>const_type:complex_vector</opt> + <opt>fcn:cc</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>const_type:real_vector</opt> + <opt>fcn:ff</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>const_type:int_vector</opt> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>const_type:int_vector</opt> + <opt>fcn:ss</opt> + </option> + </param> + <param> + <name>Constant</name> + <key>const</key> + <value>0</value> + <type>$type.const_type</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>len($const) == $vlen</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_multiply_xx.xml b/grc/blocks/gr_multiply_xx.xml new file mode 100644 index 000000000..60f65c274 --- /dev/null +++ b/grc/blocks/gr_multiply_xx.xml @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Multiply Block: +## all types, 1 output, 2 to inf inputs +################################################### + --> +<block> + <name>Multiply</name> + <key>gr_multiply_xx</key> + <import>from gnuradio import gr</import> + <make>gr.multiply_v$(type.fcn)($vlen)</make> + <param> + <name>IO 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> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_inputs > 1</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_mute_xx.xml b/grc/blocks/gr_mute_xx.xml new file mode 100644 index 000000000..a9a857c6a --- /dev/null +++ b/grc/blocks/gr_mute_xx.xml @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Mute Block: +## Cast input to bool. +################################################### + --> +<block> + <name>Mute</name> + <key>gr_mute_xx</key> + <import>from gnuradio import gr</import> + <make>gr.mute_$(type.fcn)(bool($mute))</make> + <callback>set_mute(bool($mute))</callback> + <param> + <name>IO 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> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + </param> + <param> + <name>Mute</name> + <key>mute</key> + <value>False</value> + <type>raw</type> + <option> + <name>True</name> + <key>True</key> + </option> + <option> + <name>False</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/grc/blocks/gr_nlog10_ff.xml b/grc/blocks/gr_nlog10_ff.xml new file mode 100644 index 000000000..935078236 --- /dev/null +++ b/grc/blocks/gr_nlog10_ff.xml @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Log10 Block: +## float in/ float out +################################################### + --> +<block> + <name>Log10</name> + <key>gr_nlog10_ff</key> + <import>from gnuradio import gr</import> + <make>gr.nlog10_ff($n, $vlen, $k)</make> + <param> + <name>n</name> + <key>n</key> + <value>1</value> + <type>real</type> + </param> + <param> + <name>k</name> + <key>k</key> + <value>0</value> + <type>real</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>float</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>float</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_noise_source_x.xml b/grc/blocks/gr_noise_source_x.xml new file mode 100644 index 000000000..72daaaa20 --- /dev/null +++ b/grc/blocks/gr_noise_source_x.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Noise Source +################################################### + --> +<block> + <name>Noise Source</name> + <key>gr_noise_source_x</key> + <import>from gnuradio import gr</import> + <make>gr.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>gr.GR_GAUSSIAN</value> + <type>int</type> + <option> + <name>Uniform</name> + <key>gr.GR_UNIFORM</key> + </option> + <option> + <name>Gaussian</name> + <key>gr.GR_GAUSSIAN</key> + </option> + <option> + <name>Laplacian</name> + <key>gr.GR_LAPLACIAN</key> + </option> + <option> + <name>Impulse</name> + <key>gr.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/grc/blocks/gr_nop.xml b/grc/blocks/gr_nop.xml new file mode 100644 index 000000000..bd884d6b8 --- /dev/null +++ b/grc/blocks/gr_nop.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Nop +################################################### + --> +<block> + <name>Nop</name> + <key>gr_nop</key> + <import>from gnuradio import gr</import> + <make>gr.nop($type.size*$vlen)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Ports</name> + <key>num_ports</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_ports > 0</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_ports</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_ports</nports> + </source> +</block> diff --git a/grc/blocks/gr_not_xx.xml b/grc/blocks/gr_not_xx.xml new file mode 100644 index 000000000..1c2bb8709 --- /dev/null +++ b/grc/blocks/gr_not_xx.xml @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Logical Not Block +################################################### + --> +<block> + <name>Not</name> + <key>gr_not_xx</key> + <import>from gnuradio import gr</import> + <make>gr.not_$(type.fcn)()</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:bb</opt> + </option> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_null_sink.xml b/grc/blocks/gr_null_sink.xml new file mode 100644 index 000000000..ed106b495 --- /dev/null +++ b/grc/blocks/gr_null_sink.xml @@ -0,0 +1,54 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Null Sink +################################################### + --> +<block> + <name>Null Sink</name> + <key>gr_null_sink</key> + <import>from gnuradio import gr</import> + <make>gr.null_sink($type.size*$vlen)</make> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> +</block> diff --git a/grc/blocks/gr_null_source.xml b/grc/blocks/gr_null_source.xml new file mode 100644 index 000000000..6132eae3c --- /dev/null +++ b/grc/blocks/gr_null_source.xml @@ -0,0 +1,54 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Null Source +################################################### + --> +<block> + <name>Null Source</name> + <key>gr_null_source</key> + <import>from gnuradio import gr</import> + <make>gr.null_source($type.size*$vlen)</make> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_or_xx.xml b/grc/blocks/gr_or_xx.xml new file mode 100644 index 000000000..b374aa22a --- /dev/null +++ b/grc/blocks/gr_or_xx.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Logical Or Block +################################################### + --> +<block> + <name>Or</name> + <key>gr_or_xx</key> + <import>from gnuradio import gr</import> + <make>gr.or_$(type.fcn)()</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:bb</opt> + </option> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <check>$num_inputs >= 2</check> + <sink> + <name>in</name> + <type>$type</type> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_pack_k_bits_bb.xml b/grc/blocks/gr_pack_k_bits_bb.xml new file mode 100644 index 000000000..34e64a5d9 --- /dev/null +++ b/grc/blocks/gr_pack_k_bits_bb.xml @@ -0,0 +1,30 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Pack K Bits +################################################### + --> +<block> + <name>Pack K Bits</name> + <key>gr_pack_k_bits_bb</key> + <import>from gnuradio import gr</import> + <make>gr.pack_k_bits_bb($k)</make> + <param> + <name>K</name> + <key>k</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> + + <doc> + Pack K unpacked bits (one bit per byte) into a single packed byte containing k bits and 8 - k zeros. + </doc> + +</block> diff --git a/grc/blocks/gr_packed_to_unpacked_xx.xml b/grc/blocks/gr_packed_to_unpacked_xx.xml new file mode 100644 index 000000000..c1477dd9c --- /dev/null +++ b/grc/blocks/gr_packed_to_unpacked_xx.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Packed to Unpacked +################################################### + --> +<block> + <name>Packed to Unpacked</name> + <key>gr_packed_to_unpacked_xx</key> + <import>from gnuradio import gr</import> + <make>gr.packed_to_unpacked_$(type.fcn)($bits_per_chunk, $endianness)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:bb</opt> + </option> + </param> + <param> + <name>Bits per Chunk</name> + <key>bits_per_chunk</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Endianness</name> + <key>endianness</key> + <type>int</type> + <option> + <name>MSB</name> + <key>gr.GR_MSB_FIRST</key> + </option> + <option> + <name>LSB</name> + <key>gr.GR_LSB_FIRST</key> + </option> + </param> + <param> + <name>Num Ports</name> + <key>num_ports</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_ports > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <nports>$num_ports</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <nports>$num_ports</nports> + </source> +</block> diff --git a/grc/blocks/gr_pdu_to_tagged_stream.xml b/grc/blocks/gr_pdu_to_tagged_stream.xml new file mode 100644 index 000000000..6d2fea97e --- /dev/null +++ b/grc/blocks/gr_pdu_to_tagged_stream.xml @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<!-- +################################################### +## PDU Message to Tagged Stream +################################################### + --> +<block> + <name>PDU to Tagged Stream</name> + <key>gr_pdu_to_tagged_stream</key> + <import>from gnuradio import gr</import> + <make>gr.pdu_to_tagged_stream($type.tv)</make> + <param> + <name>Item Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Byte</name> + <key>byte</key> + <opt>tv:gr.pdu_byte</opt> + </option> + <option> + <name>Complex</name> + <key>complex</key> + <opt>tv:gr.pdu_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>tv:gr.pdu_float</opt> + </option> + </param> + <sink> + <name>pdus</name> + <type>message</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_peak_detector2_fb.xml b/grc/blocks/gr_peak_detector2_fb.xml new file mode 100644 index 000000000..128c6244f --- /dev/null +++ b/grc/blocks/gr_peak_detector2_fb.xml @@ -0,0 +1,38 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Peak Detector2 +################################################### + --> +<block> + <name>Peak Detector2</name> + <key>gr_peak_detector2_fb</key> + <import>from gnuradio import gr</import> + <make>gr.peak_detector2_fb($threshold_factor_rise, $look_ahead, $alpha)</make> + <callback>set_threshold_factor_rise($threshold_factor_rise)</callback> + <callback>set_look_ahead($look_ahead)</callback> + <callback>set_alpha($alpha)</callback> + <param> + <name>TH Factor Rise</name> + <key>threshold_factor_rise</key> + <type>real</type> + </param> + <param> + <name>Look Ahead</name> + <key>look_ahead</key> + <type>int</type> + </param> + <param> + <name>Alpha</name> + <key>alpha</key> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>float</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_peak_detector_xb.xml b/grc/blocks/gr_peak_detector_xb.xml new file mode 100644 index 000000000..394b0697f --- /dev/null +++ b/grc/blocks/gr_peak_detector_xb.xml @@ -0,0 +1,64 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Peak Detector +################################################### + --> +<block> + <name>Peak Detector</name> + <key>gr_peak_detector_xb</key> + <import>from gnuradio import gr</import> + <make>gr.peak_detector_$(type.fcn)b($threshold_factor_rise, $threshold_factor_fall, $look_ahead, $alpha)</make> + <callback>set_threshold_factor_rise($threshold_factor_rise)</callback> + <callback>set_threshold_factor_fall($threshold_factor_fall)</callback> + <callback>set_look_ahead($look_ahead)</callback> + <callback>set_alpha($alpha)</callback> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <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>TH Factor Rise</name> + <key>threshold_factor_rise</key> + <type>real</type> + </param> + <param> + <name>TH Factor Fall</name> + <key>threshold_factor_fall</key> + <type>real</type> + </param> + <param> + <name>Look Ahead</name> + <key>look_ahead</key> + <type>int</type> + </param> + <param> + <name>Alpha</name> + <key>alpha</key> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_pfb_clock_sync.xml b/grc/blocks/gr_pfb_clock_sync.xml new file mode 100644 index 000000000..3e5e65d12 --- /dev/null +++ b/grc/blocks/gr_pfb_clock_sync.xml @@ -0,0 +1,100 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Polyphase Filter based Clock Sync +################################################### + --> +<block> + <name>Polyphase Clock Sync</name> + <key>gr_pfb_clock_sync_xxx</key> + <import>from gnuradio import gr</import> + <make>gr.pfb_clock_sync_$(type)($sps, $alpha, $taps, $filter_size, $init_phase, $max_dev, $osps) +self.$(id).set_beta($beta)</make> + <callback>set_taps($taps)</callback> + <callback>set_alpha($alpha)</callback> + <callback>set_beta($beta)</callback> + + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Real Taps)</name> + <key>ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Float (Real Taps)</name> + <key>fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + <opt>taps:real_vector</opt> + </option> + </param> + + <param> + <name>Samples/Symbol</name> + <key>sps</key> + <type>real</type> + </param> + <param> + <name>Alpha</name> + <key>alpha</key> + <type>real</type> + </param> + <param> + <name>Beta</name> + <key>beta</key> + <type>real</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>real_vector</type> + </param> + <param> + <name>Filter Size</name> + <key>filter_size</key> + <type>int</type> + </param> + <param> + <name>Initial Phase</name> + <key>init_phase</key> + <type>real</type> + </param> + <param> + <name>Maximum Rate Deviation</name> + <key>max_dev</key> + <type>real</type> + </param> + <param> + <name>Output SPS</name> + <key>osps</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> + <source> + <name>err</name> + <type>float</type> + <optional>1</optional> + </source> + <source> + <name>rate</name> + <type>float</type> + <optional>1</optional> + </source> + <source> + <name>phase</name> + <type>float</type> + <optional>1</optional> + </source> +</block> diff --git a/grc/blocks/gr_pfb_synthesizer.xml b/grc/blocks/gr_pfb_synthesizer.xml new file mode 100644 index 000000000..49e5cb032 --- /dev/null +++ b/grc/blocks/gr_pfb_synthesizer.xml @@ -0,0 +1,57 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Polyphase Synthesis Filterbank +################################################### + --> +<block> + <name>Polyphase Synthesizer</name> + <key>gr_pfb_synthesizer_ccf</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.pfb_synthesizer_ccf( + $numchans, $taps, $twox) +self.$(id).set_channel_map($ch_map) + </make> + <callback>set_taps($taps)</callback> + <callback>set_channel_map($ch_map)</callback> + + <param> + <name>Channels</name> + <key>numchans</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Connections</name> + <key>connections</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>real_vector</type> + </param> + <param> + <name>2x Sample Rate</name> + <key>twox</key> + <value>False</value> + <type>bool</type> + </param> + <param> + <name>Channel Map</name> + <key>ch_map</key> + <value>[]</value> + <type>int_vector</type> + </param> + <sink> + <name>in</name> + <type>complex</type> + <nports>$connections</nports> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/gr_phase_modulator_fc.xml b/grc/blocks/gr_phase_modulator_fc.xml new file mode 100644 index 000000000..758c50863 --- /dev/null +++ b/grc/blocks/gr_phase_modulator_fc.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Phase Modulator +################################################### + --> +<block> + <name>Phase Mod</name> + <key>gr_phase_modulator_fc</key> + <import>from gnuradio import gr</import> + <make>gr.phase_modulator_fc($sensitivity)</make> + <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/grc/blocks/gr_pll_carriertracking_cc.xml b/grc/blocks/gr_pll_carriertracking_cc.xml new file mode 100644 index 000000000..27e673248 --- /dev/null +++ b/grc/blocks/gr_pll_carriertracking_cc.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- +################################################### +##PLL Carrier Tracking +################################################### + --> +<block> + <name>PLL Carrier Tracking</name> + <key>gr_pll_carriertracking_cc</key> + <import>from gnuradio import gr</import> + <make>gr.pll_carriertracking_cc($w, $max_freq, $min_freq)</make> + <callback>set_loop_bandwidth($w)</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/grc/blocks/gr_pll_freqdet_cf.xml b/grc/blocks/gr_pll_freqdet_cf.xml new file mode 100644 index 000000000..d6e4694f0 --- /dev/null +++ b/grc/blocks/gr_pll_freqdet_cf.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- +################################################### +##PLL Frequency Det +################################################### + --> +<block> + <name>PLL Freq Det</name> + <key>gr_pll_freqdet_cf</key> + <import>from gnuradio import gr</import> + <make>gr.pll_freqdet_cf($w, $max_freq, $min_freq)</make> + <callback>set_loop_bandwidth($w)</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/grc/blocks/gr_pll_refout_cc.xml b/grc/blocks/gr_pll_refout_cc.xml new file mode 100644 index 000000000..b231ddd19 --- /dev/null +++ b/grc/blocks/gr_pll_refout_cc.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- +################################################### +##PLL Reference Out +################################################### + --> +<block> + <name>PLL Ref Out</name> + <key>gr_pll_refout_cc</key> + <import>from gnuradio import gr</import> + <make>gr.pll_refout_cc($w, $max_freq, $min_freq)</make> + <callback>set_loop_bandwidth($w)</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/grc/blocks/gr_pn_correlator_cc.xml b/grc/blocks/gr_pn_correlator_cc.xml new file mode 100644 index 000000000..094f46cdf --- /dev/null +++ b/grc/blocks/gr_pn_correlator_cc.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##PN Correlator +################################################### + --> +<block> + <name>PN Correlator</name> + <key>gr_pn_correlator_cc</key> + <import>from gnuradio import gr</import> + <make>gr.pn_correlator_cc($degree, $mask, $seed)</make> + <param> + <name>Degree</name> + <key>degree</key> + <type>int</type> + </param> + <param> + <name>Mask</name> + <key>mask</key> + <type>int</type> + </param> + <param> + <name>Seed</name> + <key>seed</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>complex</type> + </sink> + <source> + <name>out</name> + <type>complex</type> + </source> +</block> diff --git a/grc/blocks/gr_probe_avg_mag_sqrd_x.xml b/grc/blocks/gr_probe_avg_mag_sqrd_x.xml new file mode 100644 index 000000000..6bf706ae1 --- /dev/null +++ b/grc/blocks/gr_probe_avg_mag_sqrd_x.xml @@ -0,0 +1,50 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Probe Average Magnitude Squared +################################################### + --> +<block> + <name>Probe Avg Mag^2</name> + <key>gr_probe_avg_mag_sqrd_x</key> + <import>from gnuradio import gr</import> + <make>gr.probe_avg_mag_sqrd_$(type)($threshold, $alpha)</make> + <callback>set_alpha($alpha)</callback> + <callback>set_threshold($threshold)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>c</key> + <opt>input:complex</opt> + </option> + <option> + <name>Float</name> + <key>f</key> + <opt>input:float</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> + <doc> +Available functions to probe: level() + +Use with the function probe block. + </doc> +</block> diff --git a/grc/blocks/gr_probe_density_b.xml b/grc/blocks/gr_probe_density_b.xml new file mode 100644 index 000000000..3a91256aa --- /dev/null +++ b/grc/blocks/gr_probe_density_b.xml @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Probe Density +################################################### + --> +<block> + <name>Probe Density</name> + <key>gr_probe_density_b</key> + <import>from gnuradio import gr</import> + <make>gr.probe_density_b($alpha)</make> + <callback>set_alpha($alpha)</callback> + <param> + <name>Alpha</name> + <key>alpha</key> + <value>1</value> + <type>real</type> + </param> + <param> + <name>Probe Rate</name> + <key>probe_rate</key> + <value>10</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <doc> +Available functions to probe: density() + +Use with the function probe block. + </doc> +</block> diff --git a/grc/blocks/gr_probe_signal_f.xml b/grc/blocks/gr_probe_signal_f.xml new file mode 100644 index 000000000..5c38e816f --- /dev/null +++ b/grc/blocks/gr_probe_signal_f.xml @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Probe Signal +################################################### + --> +<block> + <name>Probe Signal</name> + <key>gr_probe_signal_f</key> + <import>from gnuradio import gr</import> + <make>gr.probe_signal_f()</make> + <sink> + <name>in</name> + <type>float</type> + </sink> + <doc> +Available functions to probe: level() + +Use with the function probe block. + </doc> +</block> diff --git a/grc/blocks/gr_pwr_squelch_xx.xml b/grc/blocks/gr_pwr_squelch_xx.xml new file mode 100644 index 000000000..08d621177 --- /dev/null +++ b/grc/blocks/gr_pwr_squelch_xx.xml @@ -0,0 +1,65 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Power Squelch +################################################### + --> +<block> + <name>Power Squelch</name> + <key>gr_pwr_squelch_xx</key> + <import>from gnuradio import gr</import> + <make>gr.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> + <type>real</type> + </param> + <param> + <name>Ramp</name> + <key>ramp</key> + <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/grc/blocks/gr_quadrature_demod_cf.xml b/grc/blocks/gr_quadrature_demod_cf.xml new file mode 100644 index 000000000..fad0b3879 --- /dev/null +++ b/grc/blocks/gr_quadrature_demod_cf.xml @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Quadrature Demodulator +################################################### + --> +<block> + <name>Quadrature Demod</name> + <key>gr_quadrature_demod_cf</key> + <import>from gnuradio import gr</import> + <make>gr.quadrature_demod_cf($gain)</make> + <callback>set_gain($gain)</callback> + <param> + <name>Gain</name> + <key>gain</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/grc/blocks/gr_random_pdu.xml b/grc/blocks/gr_random_pdu.xml new file mode 100644 index 000000000..ed5a79a92 --- /dev/null +++ b/grc/blocks/gr_random_pdu.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Random PDU +################################################### + --> +<block> + <name>Random PDU Generator</name> + <key>gr_random_pdu</key> + <import>from gnuradio import gr</import> + <import>from gruel import pmt</import> + <make>gr.random_pdu($minsize, $maxsize)</make> + <param> + <name>Min Bytes</name> + <key>minsize</key> + <value>50</value> + <type>int</type> + </param> + <param> + <name>Max Bytes</name> + <key>maxsize</key> + <value>2000</value> + <type>int</type> + </param> + <sink> + <name>generate</name> + <type>message</type> + <optional>1</optional> + </sink> + <source> + <name>pdus</name> + <type>message</type> + <optional>1</optional> + </source> +</block> diff --git a/grc/blocks/gr_rational_resampler_base_xxx.xml b/grc/blocks/gr_rational_resampler_base_xxx.xml new file mode 100644 index 000000000..4b7720173 --- /dev/null +++ b/grc/blocks/gr_rational_resampler_base_xxx.xml @@ -0,0 +1,86 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Rational Resampler Base +################################################### + --> +<block> + <name>Rational Resampler Base</name> + <key>gr_rational_resampler_base_xxx</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.rational_resampler_base_$(type)($interp, $decim, $taps)</make> + <callback>set_taps($taps)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Complex Taps)</name> + <key>ccc</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Complex->Complex (Real Taps)</name> + <key>ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Complex (Complex Taps)</name> + <key>fcc</key> + <opt>input:float</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + <option> + <name>Float->Float (Real Taps)</name> + <key>fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Float->Short (Real Taps)</name> + <key>fsf</key> + <opt>input:float</opt> + <opt>output:short</opt> + <opt>taps:real_vector</opt> + </option> + <option> + <name>Short->Complex (Complex Taps)</name> + <key>scc</key> + <opt>input:short</opt> + <opt>output:complex</opt> + <opt>taps:complex_vector</opt> + </option> + </param> + <param> + <name>Interpolation</name> + <key>interp</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Taps</name> + <key>taps</key> + <type>$type.taps</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> +</block> diff --git a/grc/blocks/gr_repeat.xml b/grc/blocks/gr_repeat.xml new file mode 100644 index 000000000..ba652a4d7 --- /dev/null +++ b/grc/blocks/gr_repeat.xml @@ -0,0 +1,64 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Repeat +################################################### + --> +<block> + <name>Repeat</name> + <key>gr_repeat</key> + <import>from gnuradio import gr</import> + <make>gr.repeat($type.size*$vlen, $interp)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Interpolation</name> + <key>interp</key> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_rms_xx.xml b/grc/blocks/gr_rms_xx.xml new file mode 100644 index 000000000..1e0947192 --- /dev/null +++ b/grc/blocks/gr_rms_xx.xml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!-- +################################################### +##RMS +################################################### + --> +<block> + <name>RMS</name> + <key>gr_rms_xx</key> + <import>from gnuradio import gr</import> + <make>gr.rms_$(type.fcn)f($alpha)</make> + <callback>set_alpha($alpha)</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>Alpha</name> + <key>alpha</key> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>float</type> + </source> +</block> diff --git a/grc/blocks/gr_sample_and_hold_xx.xml b/grc/blocks/gr_sample_and_hold_xx.xml new file mode 100644 index 000000000..2a036c3fd --- /dev/null +++ b/grc/blocks/gr_sample_and_hold_xx.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Sample and Hold +################################################### + --> +<block> + <name>Sample and Hold</name> + <key>gr_sample_and_hold_xx</key> + <import>from gnuradio import gr</import> + <make>gr.sample_and_hold_$(type.fcn)()</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Float</name> + <key>float</key> + <opt>fcn:ff</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:bb</opt> + </option> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <sink> + <name>ctrl</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_scrambler_bb.xml b/grc/blocks/gr_scrambler_bb.xml new file mode 100644 index 000000000..d079c4015 --- /dev/null +++ b/grc/blocks/gr_scrambler_bb.xml @@ -0,0 +1,38 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Descrambler +################################################### + --> +<block> + <name>Scrambler</name> + <key>gr_scrambler_bb</key> + <import>from gnuradio import gr</import> + <make>gr.scrambler_bb($mask, $seed, $len)</make> + <param> + <name>Mask</name> + <key>mask</key> + <value>0x8A</value> + <type>hex</type> + </param> + <param> + <name>Seed</name> + <key>seed</key> + <value>0x7F</value> + <type>hex</type> + </param> + <param> + <name>Length</name> + <key>len</key> + <value>7</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_short_to_char.xml b/grc/blocks/gr_short_to_char.xml new file mode 100644 index 000000000..9c41da84e --- /dev/null +++ b/grc/blocks/gr_short_to_char.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Short to char: +################################################### + --> +<block> + <name>Short To Char</name> + <key>gr_short_to_char</key> + <import>from gnuradio import gr</import> + <make>gr.short_to_char($vlen)</make> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>short</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>byte</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_short_to_float.xml b/grc/blocks/gr_short_to_float.xml new file mode 100644 index 000000000..529f8c78c --- /dev/null +++ b/grc/blocks/gr_short_to_float.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Short to Float: +################################################### + --> +<block> + <name>Short To Float</name> + <key>gr_short_to_float</key> + <import>from gnuradio import gr</import> + <make>gr.short_to_float($vlen, $scale)</make> + <callback>set_scale($scale)</callback> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Scale</name> + <key>scale</key> + <value>1</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>short</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>float</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_sig_source_x.xml b/grc/blocks/gr_sig_source_x.xml new file mode 100644 index 000000000..644cf52d0 --- /dev/null +++ b/grc/blocks/gr_sig_source_x.xml @@ -0,0 +1,104 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Signal Source +################################################### + --> +<block> + <name>Signal Source</name> + <key>gr_sig_source_x</key> + <import>from gnuradio import gr</import> + <make>gr.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>gr.GR_COS_WAVE</value> + <type>int</type> + <option> + <name>Constant</name> + <key>gr.GR_CONST_WAVE</key> + </option> + <option> + <name>Sine</name> + <key>gr.GR_SIN_WAVE</key> + </option> + <option> + <name>Cosine</name> + <key>gr.GR_COS_WAVE</key> + </option> + <option> + <name>Square</name> + <key>gr.GR_SQR_WAVE</key> + </option> + <option> + <name>Triangle</name> + <key>gr.GR_TRI_WAVE</key> + </option> + <option> + <name>Saw Tooth</name> + <key>gr.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> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_simple_correlator.xml b/grc/blocks/gr_simple_correlator.xml new file mode 100644 index 000000000..820523a64 --- /dev/null +++ b/grc/blocks/gr_simple_correlator.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Simple Correlator +################################################### + --> +<block> + <name>Simple Correlator</name> + <key>gr_simple_correlator</key> + <import>from gnuradio import gr</import> + <make>gr.simple_correlator($payload_bytesize)</make> + <param> + <name>Payload Byte Size</name> + <key>payload_bytesize</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>float</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_simple_framer.xml b/grc/blocks/gr_simple_framer.xml new file mode 100644 index 000000000..2a0295c41 --- /dev/null +++ b/grc/blocks/gr_simple_framer.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Simple Framer +################################################### + --> +<block> + <name>Simple Framer</name> + <key>gr_simple_framer</key> + <import>from gnuradio import gr</import> + <make>gr.simple_framer($payload_bytesize)</make> + <param> + <name>Payload Byte Size</name> + <key>payload_bytesize</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_simple_squelch_cc.xml b/grc/blocks/gr_simple_squelch_cc.xml new file mode 100644 index 000000000..5c0727f5f --- /dev/null +++ b/grc/blocks/gr_simple_squelch_cc.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Simple Squelch +################################################### + --> +<block> + <name>Simple Squelch</name> + <key>gr_simple_squelch_cc</key> + <import>from gnuradio import gr</import> + <make>gr.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/grc/blocks/gr_single_pole_iir_filter_xx.xml b/grc/blocks/gr_single_pole_iir_filter_xx.xml new file mode 100644 index 000000000..50cf4a82d --- /dev/null +++ b/grc/blocks/gr_single_pole_iir_filter_xx.xml @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Single Pole IIR Filter +################################################### + --> +<block> + <name>Single Pole IIR Filter</name> + <key>gr_single_pole_iir_filter_xx</key> + <import>from gnuradio import gr</import> + <make>gr.single_pole_iir_filter_$(type.fcn)($alpha, $vlen)</make> + <callback>set_taps($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>Alpha</name> + <key>alpha</key> + <value>1.0</value> + <type>real</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_skiphead.xml b/grc/blocks/gr_skiphead.xml new file mode 100644 index 000000000..0849ad298 --- /dev/null +++ b/grc/blocks/gr_skiphead.xml @@ -0,0 +1,65 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Skip Head +################################################### + --> +<block> + <name>Skip Head</name> + <key>gr_skiphead</key> + <import>from gnuradio import gr</import> + <make>gr.skiphead($type.size*$vlen, $num_items)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Items</name> + <key>num_items</key> + <value>1024</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_socket_pdu.xml b/grc/blocks/gr_socket_pdu.xml new file mode 100644 index 000000000..a175c3699 --- /dev/null +++ b/grc/blocks/gr_socket_pdu.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Socket PDU Message source/sink +################################################### + --> +<block> + <name>Socket PDU</name> + <key>gr_socket_pdu</key> + <import>from gnuradio import gr</import> + <make>gr.socket_pdu($type, $host, $port, $mtu)</make> + <param> + <name>Type</name> + <key>type</key> + <value>TCP_SERVER</value> + <type>enum</type> + <option> + <name>TCP Server</name> + <key>"TCP_SERVER"</key> + </option> + <option> + <name>TCP Client</name> + <key>"TCP_CLIENT"</key> + </option> + <option> + <name>UDP Server</name> + <key>"UDP_SERVER"</key> + </option> + <option> + <name>UDP Client</name> + <key>"UDP_CLIENT"</key> + </option> + </param> + <param> + <name>Host</name> + <key>host</key> + <value></value> + <type>string</type> + </param> + <param> + <name>Port</name> + <key>port</key> + <value>52001</value> + <type>string</type> + </param> + <param> + <name>MTU</name> + <key>mtu</key> + <value>10000</value> + <type>int</type> + </param> + <sink> + <name>pdus</name> + <type>message</type> + <optional>1</optional> + </sink> + <source> + <name>pdus</name> + <type>message</type> + <optional>1</optional> + </source> +</block> diff --git a/grc/blocks/gr_stream_mux.xml b/grc/blocks/gr_stream_mux.xml new file mode 100644 index 000000000..8efe7b655 --- /dev/null +++ b/grc/blocks/gr_stream_mux.xml @@ -0,0 +1,75 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Stream Mux: +## all types, many inputs, only one output +################################################### + --> +<block> + <name>Stream Mux</name> + <key>gr_stream_mux</key> + <import>from gnuradio import gr</import> + <make>gr.stream_mux($type.size*$vlen, $lengths)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Lengths</name> + <key>lengths</key> + <value>1, 1</value> + <type>int_vector</type> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_inputs > 0</check> + <check>$num_inputs == len($lengths)</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_stream_to_streams.xml b/grc/blocks/gr_stream_to_streams.xml new file mode 100644 index 000000000..82542b8d4 --- /dev/null +++ b/grc/blocks/gr_stream_to_streams.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Stream to Streams +################################################### + --> +<block> + <name>Stream to Streams</name> + <key>gr_stream_to_streams</key> + <import>from gnuradio import gr</import> + <make>gr.stream_to_streams($type.size*$vlen, $num_streams)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Streams</name> + <key>num_streams</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_streams > 0</check> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_streams</nports> + </source> +</block> diff --git a/grc/blocks/gr_stream_to_vector.xml b/grc/blocks/gr_stream_to_vector.xml new file mode 100644 index 000000000..296d786f8 --- /dev/null +++ b/grc/blocks/gr_stream_to_vector.xml @@ -0,0 +1,66 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Stream to Vector +################################################### + --> +<block> + <name>Stream to Vector</name> + <key>gr_stream_to_vector</key> + <import>from gnuradio import gr</import> + <make>gr.stream_to_vector($type.size*$vlen, $num_items)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Items</name> + <key>num_items</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_items > 0</check> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen*$num_items</vlen> + </source> +</block> diff --git a/grc/blocks/gr_streams_to_stream.xml b/grc/blocks/gr_streams_to_stream.xml new file mode 100644 index 000000000..7aadd7eef --- /dev/null +++ b/grc/blocks/gr_streams_to_stream.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Streams to Stream +################################################### + --> +<block> + <name>Streams to Stream</name> + <key>gr_streams_to_stream</key> + <import>from gnuradio import gr</import> + <make>gr.streams_to_stream($type.size*$vlen, $num_streams)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Streams</name> + <key>num_streams</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_streams > 0</check> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_streams</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_streams_to_vector.xml b/grc/blocks/gr_streams_to_vector.xml new file mode 100644 index 000000000..4ecdcb2d4 --- /dev/null +++ b/grc/blocks/gr_streams_to_vector.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Streams to Vector +################################################### + --> +<block> + <name>Streams to Vector</name> + <key>gr_streams_to_vector</key> + <import>from gnuradio import gr</import> + <make>gr.streams_to_vector($type.size*$vlen, $num_streams)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Streams</name> + <key>num_streams</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_streams > 0</check> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_streams</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen*$num_streams</vlen> + </source> +</block> diff --git a/grc/blocks/gr_sub_xx.xml b/grc/blocks/gr_sub_xx.xml new file mode 100644 index 000000000..c677747da --- /dev/null +++ b/grc/blocks/gr_sub_xx.xml @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Subtract Block: +## all types, 1 output, 2 to inf inputs +################################################### + --> +<block> + <name>Subtract</name> + <key>gr_sub_xx</key> + <import>from gnuradio import gr</import> + <make>gr.sub_$(type.fcn)($vlen)</make> + <param> + <name>IO 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> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <check>$num_inputs >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_tag_debug.xml b/grc/blocks/gr_tag_debug.xml new file mode 100644 index 000000000..4af7729be --- /dev/null +++ b/grc/blocks/gr_tag_debug.xml @@ -0,0 +1,82 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Tag Debug +################################################### + --> +<block> + <name>Tag Debug</name> + <key>gr_tag_debug</key> + <import>from gnuradio import gr</import> + <make>gr.tag_debug($type.size*$vlen, $name)</make> + <callback>set_display($display)</callback> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Name</name> + <key>name</key> + <type>string</type> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Display</name> + <key>display</key> + <value>True</value> + <type>bool</type> + <option> + <name>On</name> + <key>True</key> + </option> + <option> + <name>Off</name> + <key>False</key> + </option> + </param> + <check>$num_inputs >= 1</check> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_inputs</nports> + </sink> +</block> diff --git a/grc/blocks/gr_tagged_stream_to_pdu.xml b/grc/blocks/gr_tagged_stream_to_pdu.xml new file mode 100644 index 000000000..e2f754c9e --- /dev/null +++ b/grc/blocks/gr_tagged_stream_to_pdu.xml @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Tagged Stream to PDU Message +################################################### + --> +<block> + <name>Tagged Stream to PDU</name> + <key>gr_tagged_stream_to_pdu</key> + <import>from gnuradio import gr</import> + <make>gr.tagged_stream_to_pdu($type.tv)</make> + <param> + <name>Item Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Byte</name> + <key>byte</key> + <opt>tv:gr.pdu_byte</opt> + </option> + <option> + <name>Complex</name> + <key>complex</key> + <opt>tv:gr.pdu_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>tv:gr.pdu_float</opt> + </option> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>pdus</name> + <type>message</type> + </source> +</block> diff --git a/grc/blocks/gr_threshold_ff.xml b/grc/blocks/gr_threshold_ff.xml new file mode 100644 index 000000000..740ce5794 --- /dev/null +++ b/grc/blocks/gr_threshold_ff.xml @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Threshold +################################################### + --> +<block> + <name>Threshold</name> + <key>gr_threshold_ff</key> + <import>from gnuradio import gr</import> + <make>gr.threshold_ff($low, $high, $init)</make> + <callback>set_hi($high)</callback> + <callback>set_lo($low)</callback> + <param> + <name>Low</name> + <key>low</key> + <value>-100</value> + <type>real</type> + </param> + <param> + <name>High</name> + <key>high</key> + <value>100</value> + <type>real</type> + </param> + <param> + <name>Initial State</name> + <key>init</key> + <value>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/grc/blocks/gr_throttle.xml b/grc/blocks/gr_throttle.xml new file mode 100644 index 000000000..e3a5a2ba1 --- /dev/null +++ b/grc/blocks/gr_throttle.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Throttle +################################################### + --> +<block> + <name>Throttle</name> + <key>gr_throttle</key> + <throttle>1</throttle> + <import>from gnuradio import gr</import> + <make>gr.throttle($type.size*$vlen, $samples_per_second)</make> + <callback>set_sample_rate($samples_per_second)</callback> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Sample Rate</name> + <key>samples_per_second</key> + <value>samp_rate</value> + <type>real</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_transcendental.xml b/grc/blocks/gr_transcendental.xml new file mode 100644 index 000000000..eede447f9 --- /dev/null +++ b/grc/blocks/gr_transcendental.xml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!-- +################################################### +##transcendental functions +################################################### + --> +<block> + <name>Transcendental</name> + <key>gr_transcendental</key> + <import>from gnuradio import gr</import> + <make>gr.transcendental($name, "$type")</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex_double</key> + <opt>type:complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>type:float</opt> + </option> + </param> + <param> + <name>Function Name</name> + <key>name</key> + <value>cos</value> + <type>string</type> + </param> + <sink> + <name>in</name> + <type>$type.type</type> + </sink> + <source> + <name>out</name> + <type>$type.type</type> + </source> +</block> diff --git a/grc/blocks/gr_tuntap_pdu.xml b/grc/blocks/gr_tuntap_pdu.xml new file mode 100644 index 000000000..f169345af --- /dev/null +++ b/grc/blocks/gr_tuntap_pdu.xml @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Tuntap PDU Message source/sink +################################################### + --> +<block> + <name>TunTap PDU</name> + <key>gr_tuntap_pdu</key> + <import>from gnuradio import gr</import> + <make>gr.tuntap_pdu($ifn, $mtu)</make> + <param> + <name>Interface Name</name> + <key>ifn</key> + <value>tun0</value> + <type>string</type> + </param> + <param> + <name>MTU</name> + <key>mtu</key> + <value>10000</value> + <type>int</type> + </param> + <sink> + <name>pdus</name> + <type>message</type> + <optional>1</optional> + </sink> + <source> + <name>pdus</name> + <type>message</type> + <optional>1</optional> + </source> +</block> diff --git a/grc/blocks/gr_uchar_to_float.xml b/grc/blocks/gr_uchar_to_float.xml new file mode 100644 index 000000000..0a5f7f96a --- /dev/null +++ b/grc/blocks/gr_uchar_to_float.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Unsigned Char to Float: +################################################### + --> +<block> + <name>UChar To Float</name> + <key>gr_uchar_to_float</key> + <import>from gnuradio import gr</import> + <make>gr.uchar_to_float()</make> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>float</type> + </source> +</block> diff --git a/grc/blocks/gr_udp_sink.xml b/grc/blocks/gr_udp_sink.xml new file mode 100644 index 000000000..45f81075f --- /dev/null +++ b/grc/blocks/gr_udp_sink.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<!-- +################################################### +##UDP Sink +################################################### + --> +<block> + <name>UDP Sink</name> + <key>gr_udp_sink</key> + <import>from gnuradio import gr</import> + <make>gr.udp_sink($type.size*$vlen, $ipaddr, $port, $psize, $eof)</make> + <callback>set_mtu($mtu)</callback> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Destination IP Address</name> + <key>ipaddr</key> + <type>string</type> + </param> + <param> + <name>Destination Port</name> + <key>port</key> + <type>int</type> + </param> + <param> + <name>Payload Size</name> + <key>psize</key> + <value>1472</value> + <type>int</type> + </param> + <param> + <name>Send Null Pkt as EOF</name> + <key>eof</key> + <value>True</value> + <type>bool</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> +</block> diff --git a/grc/blocks/gr_udp_source.xml b/grc/blocks/gr_udp_source.xml new file mode 100644 index 000000000..a1b961651 --- /dev/null +++ b/grc/blocks/gr_udp_source.xml @@ -0,0 +1,85 @@ +<?xml version="1.0"?> +<!-- +################################################### +##UDP Source +################################################### + --> +<block> + <name>UDP Source</name> + <key>gr_udp_source</key> + <import>from gnuradio import gr</import> + <make>gr.udp_source($type.size*$vlen, $ipaddr, $port, $psize, $eof, $wait)</make> + <callback>set_mtu($mtu)</callback> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>IP Address</name> + <key>ipaddr</key> + <value>127.0.0.1</value> + <type>string</type> + </param> + <param> + <name>Port</name> + <key>port</key> + <value>1234</value> + <type>int</type> + </param> + <param> + <name>Payload Size</name> + <key>psize</key> + <value>1472</value> + <type>int</type> + </param> + <param> + <name>Null Pkt is EOF</name> + <key>eof</key> + <value>True</value> + <type>bool</type> + </param> + <param> + <name>Wait for Data</name> + <key>wait</key> + <value>True</value> + <type>bool</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_unpack_k_bits_bb.xml b/grc/blocks/gr_unpack_k_bits_bb.xml new file mode 100644 index 000000000..9917644ab --- /dev/null +++ b/grc/blocks/gr_unpack_k_bits_bb.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Unpack K Bits +################################################### + --> +<block> + <name>Unpack K Bits</name> + <key>gr_unpack_k_bits_bb</key> + <import>from gnuradio import gr</import> + <make>gr.unpack_k_bits_bb($k)</make> + <param> + <name>K</name> + <key>k</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/gr_unpacked_to_packed_xx.xml b/grc/blocks/gr_unpacked_to_packed_xx.xml new file mode 100644 index 000000000..427c80082 --- /dev/null +++ b/grc/blocks/gr_unpacked_to_packed_xx.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Unpacked to Packed +################################################### + --> +<block> + <name>Unpacked to Packed</name> + <key>gr_unpacked_to_packed_xx</key> + <import>from gnuradio import gr</import> + <make>gr.unpacked_to_packed_$(type.fcn)($bits_per_chunk, $endianness)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:bb</opt> + </option> + </param> + <param> + <name>Bits per Chunk</name> + <key>bits_per_chunk</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Endianness</name> + <key>endianness</key> + <type>int</type> + <option> + <name>MSB</name> + <key>gr.GR_MSB_FIRST</key> + </option> + <option> + <name>LSB</name> + <key>gr.GR_LSB_FIRST</key> + </option> + </param> + <param> + <name>Num Ports</name> + <key>num_ports</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_ports > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <nports>$num_ports</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + <nports>$num_ports</nports> + </source> +</block> diff --git a/grc/blocks/gr_vco_f.xml b/grc/blocks/gr_vco_f.xml new file mode 100644 index 000000000..e49c53965 --- /dev/null +++ b/grc/blocks/gr_vco_f.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##VCO +################################################### + --> +<block> + <name>VCO</name> + <key>gr_vco_f</key> + <import>from gnuradio import gr</import> + <make>gr.vco_f($samp_rate, $sensitivity, $amplitude)</make> + <param> + <name>Sample Rate</name> + <key>samp_rate</key> + <type>real</type> + </param> + <param> + <name>Sensitivity</name> + <key>sensitivity</key> + <type>real</type> + </param> + <param> + <name>Amplitude</name> + <key>amplitude</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/grc/blocks/gr_vector_insert_x.xml b/grc/blocks/gr_vector_insert_x.xml new file mode 100644 index 000000000..f9ce1f654 --- /dev/null +++ b/grc/blocks/gr_vector_insert_x.xml @@ -0,0 +1,80 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Vector Source +################################################### + --> +<block> + <name>Vector Insert</name> + <key>gr_vector_insert_x</key> + <import>from gnuradio import gr</import> + <make>gr.vector_insert_$(type.fcn)($vector, $period, $offset)</make> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:b</opt> + <opt>vec_type:int_vector</opt> + </option> + <option> + <name>Complex</name> + <key>complex</key> + <opt>fcn:c</opt> + <opt>vec_type:complex_vector</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>fcn:f</opt> + <opt>vec_type:real_vector</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:i</opt> + <opt>vec_type:int_vector</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:s</opt> + <opt>vec_type:int_vector</opt> + </option> + </param> + <param> + <name>Vector</name> + <key>vector</key> + <value>0, 0, 0</value> + <type>$type.vec_type</type> + </param> + <param> + <name>Periodicity</name> + <key>period</key> + <value>100</value> + <type>int</type> + </param> + <param> + <name>Offset</name> + <key>offset</key> + <value>0</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> + + <doc> + Periodicity, the length of the periodicity at which the vector should be inserted at the output. + (i.e. one vector for every N output items) + + Offset sepcifies where in the cycle period we should begin at. + </doc> +</block> diff --git a/grc/blocks/gr_vector_sink_x.xml b/grc/blocks/gr_vector_sink_x.xml new file mode 100644 index 000000000..3bd998698 --- /dev/null +++ b/grc/blocks/gr_vector_sink_x.xml @@ -0,0 +1,54 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Vector sink +################################################### + --> +<block> + <name>Vector Sink</name> + <key>gr_vector_sink_x</key> + <import>from gnuradio import gr</import> + <make>gr.vector_sink_$(type.fcn)($vlen)</make> + <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> + <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>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> +</block> diff --git a/grc/blocks/gr_vector_source_x.xml b/grc/blocks/gr_vector_source_x.xml new file mode 100644 index 000000000..7a6a3aeff --- /dev/null +++ b/grc/blocks/gr_vector_source_x.xml @@ -0,0 +1,79 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Vector Source +################################################### + --> +<block> + <name>Vector Source</name> + <key>gr_vector_source_x</key> + <import>from gnuradio import gr</import> + <make>gr.vector_source_$(type.fcn)($vector, $repeat, $vlen)</make> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>fcn:c</opt> + <opt>vec_type:complex_vector</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>fcn:f</opt> + <opt>vec_type:real_vector</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:i</opt> + <opt>vec_type:int_vector</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>fcn:s</opt> + <opt>vec_type:int_vector</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:b</opt> + <opt>vec_type:int_vector</opt> + </option> + </param> + <param> + <name>Vector</name> + <key>vector</key> + <value>0, 0, 0</value> + <type>$type.vec_type</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> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$vlen > 0</check> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_vector_to_stream.xml b/grc/blocks/gr_vector_to_stream.xml new file mode 100644 index 000000000..d56d34067 --- /dev/null +++ b/grc/blocks/gr_vector_to_stream.xml @@ -0,0 +1,66 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Vector to Stream +################################################### + --> +<block> + <name>Vector to Stream</name> + <key>gr_vector_to_stream</key> + <import>from gnuradio import gr</import> + <make>gr.vector_to_stream($type.size*$vlen, $num_items)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Items</name> + <key>num_items</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_items > 0</check> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen*$num_items</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/grc/blocks/gr_vector_to_streams.xml b/grc/blocks/gr_vector_to_streams.xml new file mode 100644 index 000000000..86cb56813 --- /dev/null +++ b/grc/blocks/gr_vector_to_streams.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Vector to Streams +################################################### + --> +<block> + <name>Vector to Streams</name> + <key>gr_vector_to_streams</key> + <import>from gnuradio import gr</import> + <make>gr.vector_to_streams($type.size*$vlen, $num_streams)</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Num Streams</name> + <key>num_streams</key> + <value>2</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <check>$num_streams > 0</check> + <check>$vlen >= 1</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen*$num_streams</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + <nports>$num_streams</nports> + </source> +</block> diff --git a/grc/blocks/gr_wavfile_sink.xml b/grc/blocks/gr_wavfile_sink.xml new file mode 100644 index 000000000..651e16cb6 --- /dev/null +++ b/grc/blocks/gr_wavfile_sink.xml @@ -0,0 +1,43 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Wav File Sink +################################################### + --> +<block> + <name>Wav File Sink</name> + <key>gr_wavfile_sink</key> + <import>from gnuradio import gr</import> + <make>gr.wavfile_sink($file, $nchan, $samp_rate, $bits_per_sample)</make> + <callback>open($file)</callback> + <param> + <name>File</name> + <key>file</key> + <value></value> + <type>file_save</type> + </param> + <param> + <name>N Channels</name> + <key>nchan</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Sample Rate</name> + <key>samp_rate</key> + <value>samp_rate</value> + <type>int</type> + </param> + <param> + <name>Bits per Sample</name> + <key>bits_per_sample</key> + <value>8</value> + <type>int</type> + </param> + <check>1 <= $nchan</check> + <sink> + <name>in</name> + <type>float</type> + <nports>$nchan</nports> + </sink> +</block> diff --git a/grc/blocks/gr_wavfile_source.xml b/grc/blocks/gr_wavfile_source.xml new file mode 100644 index 000000000..433bb0af2 --- /dev/null +++ b/grc/blocks/gr_wavfile_source.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Wav File Source +################################################### + --> +<block> + <name>Wav File Source</name> + <key>gr_wavfile_source</key> + <import>from gnuradio import gr</import> + <make>gr.wavfile_source($file, $repeat)</make> + <param> + <name>File</name> + <key>file</key> + <value></value> + <type>file_open</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> + <param> + <name>N Channels</name> + <key>nchan</key> + <value>1</value> + <type>int</type> + </param> + <check>1 <= $nchan</check> + <source> + <name>out</name> + <type>float</type> + <nports>$nchan</nports> + </source> +</block> diff --git a/grc/blocks/gr_xor_xx.xml b/grc/blocks/gr_xor_xx.xml new file mode 100644 index 000000000..c014cbe57 --- /dev/null +++ b/grc/blocks/gr_xor_xx.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Logical Xor Block +################################################### + --> +<block> + <name>Xor</name> + <key>gr_xor_xx</key> + <import>from gnuradio import gr</import> + <make>gr.xor_$(type.fcn)()</make> + <param> + <name>IO Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>int</key> + <opt>fcn:ii</opt> + </option> + <option> + <name>Shxort</name> + <key>short</key> + <opt>fcn:ss</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>fcn:bb</opt> + </option> + </param> + <param> + <name>Num Inputs</name> + <key>num_inputs</key> + <value>2</value> + <type>int</type> + </param> + <check>$num_inputs >= 2</check> + <sink> + <name>in</name> + <type>$type</type> + <nports>$num_inputs</nports> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/high_pass_filter.xml b/grc/blocks/high_pass_filter.xml new file mode 100644 index 000000000..0e29cbb36 --- /dev/null +++ b/grc/blocks/high_pass_filter.xml @@ -0,0 +1,127 @@ +<?xml version="1.0"?> +<!-- +################################################### +##High Pass Filter: Custom wrapper +################################################### + --> +<block> + <name>High Pass Filter</name> + <key>high_pass_filter</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.$(type)(#if str($type).startswith('interp') then $interp else $decim#, firdes.high_pass( + $gain, $samp_rate, $cutoff_freq, $width, $win, $beta))</make> + <callback>set_taps(firdes.high_pass($gain, $samp_rate, $cutoff_freq, $width, $win, $beta))</callback> + <param> + <name>FIR Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Decimating)</name> + <key>fir_filter_ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + </option> + <option> + <name>Complex->Complex (Interpolating)</name> + <key>interp_fir_filter_ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + </option> + <option> + <name>Float->Float (Decimating)</name> + <key>fir_filter_fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + </option> + <option> + <name>Float->Float (Interpolating)</name> + <key>interp_fir_filter_fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + <hide>#if str($type).startswith('interp') then 'all' else 'none'#</hide> + </param> + <param> + <name>Interpolation</name> + <key>interp</key> + <value>1</value> + <type>int</type> + <hide>#if str($type).startswith('interp') then 'none' else 'all'#</hide> + </param> + <param> + <name>Gain</name> + <key>gain</key> + <value>1</value> + <type>real</type> + </param> + <param> + <name>Sample Rate</name> + <key>samp_rate</key> + <value>samp_rate</value> + <type>real</type> + </param> + <param> + <name>Cutoff Freq</name> + <key>cutoff_freq</key> + <type>real</type> + </param> + <param> + <name>Transition Width</name> + <key>width</key> + <type>real</type> + </param> + <param> + <name>Window</name> + <key>win</key> + <value>firdes.WIN_HAMMING</value> + <type>int</type> + <option> + <name>Hamming</name> + <key>firdes.WIN_HAMMING</key> + </option> + <option> + <name>Hann</name> + <key>firdes.WIN_HANN</key> + </option> + <option> + <name>Blackman</name> + <key>firdes.WIN_BLACKMAN</key> + </option> + <option> + <name>Rectangular</name> + <key>firdes.WIN_RECTANGULAR</key> + </option> + <option> + <name>Kaiser</name> + <key>firdes.WIN_KAISER</key> + </option> + </param> + <param> + <name>Beta</name> + <key>beta</key> + <value>6.76</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> + <doc> +This filter is a convenience wrapper for an fir filter and a firdes taps generating function. + +Sample rate, cutoff frequency, and transition width are in Hertz. + +The beta paramater only applies to the Kaiser window. + </doc> +</block> diff --git a/grc/blocks/import.xml b/grc/blocks/import.xml new file mode 100644 index 000000000..feea052d3 --- /dev/null +++ b/grc/blocks/import.xml @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Import python modules into the namespace +################################################### + --> +<block> + <name>Import</name> + <key>import</key> + <import>$import</import> + <make></make> + <param> + <name>Import</name> + <key>import</key> + <value></value> + <type>import</type> + </param> + <doc> +Import additional python modules into the namespace. + +Examples: +from gnuradio.gr import firdes +import math,cmath +from math import pi + </doc> +</block> diff --git a/grc/blocks/low_pass_filter.xml b/grc/blocks/low_pass_filter.xml new file mode 100644 index 000000000..26435fd4d --- /dev/null +++ b/grc/blocks/low_pass_filter.xml @@ -0,0 +1,127 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Low Pass Filter: Custom wrapper +################################################### + --> +<block> + <name>Low Pass Filter</name> + <key>low_pass_filter</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.$(type)(#if str($type).startswith('interp') then $interp else $decim#, firdes.low_pass( + $gain, $samp_rate, $cutoff_freq, $width, $win, $beta))</make> + <callback>set_taps(firdes.low_pass($gain, $samp_rate, $cutoff_freq, $width, $win, $beta))</callback> + <param> + <name>FIR Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Decimating)</name> + <key>fir_filter_ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + </option> + <option> + <name>Complex->Complex (Interpolating)</name> + <key>interp_fir_filter_ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + </option> + <option> + <name>Float->Float (Decimating)</name> + <key>fir_filter_fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + </option> + <option> + <name>Float->Float (Interpolating)</name> + <key>interp_fir_filter_fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + <hide>#if str($type).startswith('interp') then 'all' else 'none'#</hide> + </param> + <param> + <name>Interpolation</name> + <key>interp</key> + <value>1</value> + <type>int</type> + <hide>#if str($type).startswith('interp') then 'none' else 'all'#</hide> + </param> + <param> + <name>Gain</name> + <key>gain</key> + <value>1</value> + <type>real</type> + </param> + <param> + <name>Sample Rate</name> + <key>samp_rate</key> + <value>samp_rate</value> + <type>real</type> + </param> + <param> + <name>Cutoff Freq</name> + <key>cutoff_freq</key> + <type>real</type> + </param> + <param> + <name>Transition Width</name> + <key>width</key> + <type>real</type> + </param> + <param> + <name>Window</name> + <key>win</key> + <value>firdes.WIN_HAMMING</value> + <type>int</type> + <option> + <name>Hamming</name> + <key>firdes.WIN_HAMMING</key> + </option> + <option> + <name>Hann</name> + <key>firdes.WIN_HANN</key> + </option> + <option> + <name>Blackman</name> + <key>firdes.WIN_BLACKMAN</key> + </option> + <option> + <name>Rectangular</name> + <key>firdes.WIN_RECTANGULAR</key> + </option> + <option> + <name>Kaiser</name> + <key>firdes.WIN_KAISER</key> + </option> + </param> + <param> + <name>Beta</name> + <key>beta</key> + <value>6.76</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> + <doc> +This filter is a convenience wrapper for an fir filter and a firdes taps generating function. + +Sample rate, cutoff frequency, and transition width are in Hertz. + +The beta paramater only applies to the Kaiser window. + </doc> +</block> diff --git a/grc/blocks/note.xml b/grc/blocks/note.xml new file mode 100644 index 000000000..db6687c03 --- /dev/null +++ b/grc/blocks/note.xml @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Note Block (dummy) +################################################### + --> +<block> + <name>Note</name> + <key>note</key> + <make></make> + <param> + <name>Note</name> + <key>note</key> + <value></value> + <type>string</type> + </param> +</block> diff --git a/grc/blocks/options.xml b/grc/blocks/options.xml new file mode 100644 index 000000000..1cf0b7707 --- /dev/null +++ b/grc/blocks/options.xml @@ -0,0 +1,190 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Options Block: +## options for window size, +## and flow graph building. +################################################### + --> +<block> + <name>Options</name> + <key>options</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <import>#if $generate_options() == 'wx_gui' +from grc_gnuradio import wxgui as grc_wxgui +import wx +#end if +#if $generate_options() == 'qt_gui' +from PyQt4 import Qt +import sys +#end if +#if $generate_options() != 'hb' +from optparse import OptionParser +from gnuradio.eng_option import eng_option +from gnuradio import eng_notation +#end if</import> + <make></make> + <callback>if $run: self.start() +else: self.stop(); self.wait()</callback> + <param> + <name>Title</name> + <key>title</key> + <value></value> + <type>string</type> + <hide>#if $title() then 'none' else 'part'#</hide> + </param> + <param> + <name>Author</name> + <key>author</key> + <value></value> + <type>string</type> + <hide>#if $author() then 'none' else 'part'#</hide> + </param> + <param> + <name>Description</name> + <key>description</key> + <value></value> + <type>string</type> + <hide>#if $description() then 'none' else 'part'#</hide> + </param> + <param> + <name>Window Size</name> + <key>window_size</key> + <value>1280, 1024</value> + <type>int_vector</type> + <hide>part</hide> + </param> + <param> + <name>Generate Options</name> + <key>generate_options</key> + <value>wx_gui</value> + <type>enum</type> + <option> + <name>WX GUI</name> + <key>wx_gui</key> + </option> + <option> + <name>QT GUI</name> + <key>qt_gui</key> + </option> + <option> + <name>No GUI</name> + <key>no_gui</key> + </option> + <option> + <name>Hier Block</name> + <key>hb</key> + </option> + </param> + <param> + <name>Category</name> + <key>category</key> + <value>Custom</value> + <type>string</type> + <hide>#if $generate_options() == 'hb' then 'none' else 'all'#</hide> + </param> + <param> + <name>Run Options</name> + <key>run_options</key> + <value>prompt</value> + <type>enum</type> + <hide>#if $generate_options() == 'no_gui' then 'none' else 'all'#</hide> + <option> + <name>Run to Completion</name> + <key>run</key> + </option> + <option> + <name>Prompt for Exit</name> + <key>prompt</key> + </option> + </param> + <param> + <name>Run</name> + <key>run</key> + <value>True</value> + <type>bool</type> + <hide> +#if $generate_options() in ('qt_gui', 'wx_gui') + #if $run() + part + #else + none + #end if +#else + all +#end if + </hide> + <option> + <name>Autostart</name> + <key>True</key> + </option> + <option> + <name>Off</name> + <key>False</key> + </option> + </param> + <param> + <name>Max Number of Output</name> + <key>max_nouts</key> + <value>0</value> + <type>int</type> + <hide>#if $generate_options() == 'hb' +all#slurp +#elif $max_nouts() +none#slurp +#else +part#slurp +#end if</hide> + </param> + <param> + <name>Realtime Scheduling</name> + <key>realtime_scheduling</key> + <value></value> + <type>enum</type> + <hide>#if $generate_options() == 'hb' +all#slurp +#elif $realtime_scheduling() +none#slurp +#else +part#slurp +#end if</hide> + <option> + <name>Off</name> + <key></key> + </option> + <option> + <name>On</name> + <key>1</key> + </option> + </param> + <check>len($window_size) == 2</check> + <check>300 <= $(window_size)[0] <= 4096</check> + <check>300 <= $(window_size)[1] <= 4096</check> + <doc> +The options block sets special parameters for the flow graph. \ +Only one option block is allowed per flow graph. + +Title, author, and description parameters are for identification purposes. + +The window size controls the dimensions of the flow graph editor. \ +The window size (width, height) must be between (300, 300) and (4096, 4096). + +The generate options controls the type of code generated. \ +Non-graphical flow graphs should avoid using graphical sinks or graphical variable controls. + +In a graphical application, \ +run can be controlled by a variable to start and stop the flowgraph at runtime. + +The id of this block determines the name of the generated file and the name of the class. \ +For example, an id of my_block will generate the file my_block.py and class my_block(gr.... + +The category parameter determines the placement of the block in the block selection window. \ +The category only applies when creating hier blocks. \ +To put hier blocks into the root category, enter / for the category. + +The Max Number of Output is the maximum number of output items allowed for any block \ +in the flowgraph; to disable this set the max_nouts equal to 0.\ +Use this to adjust the maximum latency a flowgraph can exhibit. + </doc> +</block> diff --git a/grc/blocks/pad_sink.xml b/grc/blocks/pad_sink.xml new file mode 100644 index 000000000..f0e10a339 --- /dev/null +++ b/grc/blocks/pad_sink.xml @@ -0,0 +1,91 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Pad Sink: IO Pads +################################################### + --> +<block> + <name>Pad Sink</name> + <key>pad_sink</key> + <make>#if str($type) == "message" +None;self.message_port_register_hier_in($label) +#end if</make> + <param> + <name>Label</name> + <key>label</key> + <value>out</value> + <type>string</type> + </param> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + <option> + <name>Message</name> + <key>message</key> + <opt>size:0</opt> + </option> + <option> + <name>Wildcard</name> + <key></key> + <opt>size:0</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Optional</name> + <key>optional</key> + <value>False</value> + <type>bool</type> + <hide>part</hide> + <option> + <name>Optional</name> + <key>True</key> + </option> + <option> + <name>Required</name> + <key>False</key> + </option> + </param> + <check>$vlen > 0</check> + <sink> + <name>in</name> + <type>$type</type> + <vlen>$vlen</vlen> + </sink> + <doc> +The inputs of this block will become the outputs to this flow graph when it is instantiated as a hierarchical block. + +Pad sink will be ordered alphabetically by their ids. The first pad sink will have an index of 0. + </doc> +</block> diff --git a/grc/blocks/pad_source.xml b/grc/blocks/pad_source.xml new file mode 100644 index 000000000..a56a65dcc --- /dev/null +++ b/grc/blocks/pad_source.xml @@ -0,0 +1,91 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Pad Source: IO Pads +################################################### + --> +<block> + <name>Pad Source</name> + <key>pad_source</key> + <make>#if str($type) == "message" +None;self.message_port_register_hier_out($label) +#end if</make> + <param> + <name>Label</name> + <key>label</key> + <value>in</value> + <type>string</type> + </param> + <param> + <name>Output Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + <option> + <name>Message</name> + <key>message</key> + <opt>size:0</opt> + </option> + <option> + <name>Wildcard</name> + <key></key> + <opt>size:0</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Optional</name> + <key>optional</key> + <value>False</value> + <type>bool</type> + <hide>part</hide> + <option> + <name>Optional</name> + <key>True</key> + </option> + <option> + <name>Required</name> + <key>False</key> + </option> + </param> + <check>$vlen > 0</check> + <source> + <name>out</name> + <type>$type</type> + <vlen>$vlen</vlen> + </source> + <doc> +The outputs of this block will become the inputs to this flow graph when it is instantiated as a hierarchical block. + +Pad sources will be ordered alphabetically by their ids. The first pad source will have an index of 0. + </doc> +</block> diff --git a/grc/blocks/parameter.xml b/grc/blocks/parameter.xml new file mode 100644 index 000000000..e35b8f4d1 --- /dev/null +++ b/grc/blocks/parameter.xml @@ -0,0 +1,99 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Parameter block: a grc variable with key, value +################################################### + --> +<block> + <name>Parameter</name> + <key>parameter</key> + <var_make>self.$(id) = $(id)</var_make> + <make>$value</make> + <param> + <name>Label</name> + <key>label</key> + <value></value> + <type>string</type> + <hide>#if $label() then 'none' else 'part'#</hide> + </param> + <param> + <name>Value</name> + <key>value</key> + <value>0</value> + <type>$type.type</type> + </param> + <param> + <name>Type</name> + <key>type</key> + <value></value> + <type>enum</type> + <hide>#if $type() then 'none' else 'part'#</hide> + <option> + <name>None</name> + <key></key> + <opt>type:raw</opt> + </option> + <option> + <name>Complex</name> + <key>complex</key> + <opt>type:complex</opt> + </option> + <option> + <name>Float</name> + <key>eng_float</key> + <opt>type:real</opt> + </option> + <option> + <name>Int</name> + <key>intx</key> + <opt>type:int</opt> + </option> + <option> + <name>Long</name> + <key>long</key> + <opt>type:int</opt> + </option> + <option> + <name>String</name> + <key>string</key> + <opt>type:string</opt> + </option> + <!-- not supported yet in tmpl + <option> + <name>Boolean</name> + <key>bool</key> + <opt>type:bool</opt> + </option> + --> + </param> + <param> + <name>Short ID</name> + <key>short_id</key> + <value></value> + <type>string</type> + <hide>#if not $type() +all#slurp +#elif $short_id() +none#slurp +#else +part#slurp +#end if</hide> + </param> + <check>len($short_id) in (0, 1)</check> + <check>$short_id == '' or $(short_id).isalpha()</check> + <doc> +This block represents a parameter to the flow graph. \ +A parameter can be used to pass command line arguments into a top block. \ +Or, parameters can pass arguments into an instantiated hierarchical block. + +The paramater value cannot depend on any variables. + +Leave the label blank to use the parameter id as the label. + +When type is not None, this parameter also becomes a command line option of the form: + +-[short_id] --[id] [value] + +The Short ID field may be left blank. + </doc> +</block> diff --git a/grc/blocks/random_source_x.xml b/grc/blocks/random_source_x.xml new file mode 100644 index 000000000..800bae716 --- /dev/null +++ b/grc/blocks/random_source_x.xml @@ -0,0 +1,75 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Random Source: +## Custom block +################################################### + --> +<block> + <name>Random Source</name> + <key>random_source_x</key> + <import>from gnuradio import gr</import> + <import>import numpy</import> + <make>gr.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/grc/blocks/root_raised_cosine_filter.xml b/grc/blocks/root_raised_cosine_filter.xml new file mode 100644 index 000000000..81688d297 --- /dev/null +++ b/grc/blocks/root_raised_cosine_filter.xml @@ -0,0 +1,101 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Root Raised Cosine Filter: Custom wrapper +################################################### + --> +<block> + <name>Root Raised Cosine Filter</name> + <key>root_raised_cosine_filter</key> + <import>from gnuradio import gr</import> + <import>from gnuradio.gr import firdes</import> + <make>gr.$(type)(#if str($type).startswith('interp') then $interp else $decim#, firdes.root_raised_cosine( + $gain, $samp_rate, $sym_rate, $alpha, $ntaps))</make> + <callback>set_taps(firdes.root_raised_cosine($gain, $samp_rate, $sym_rate, $alpha, $ntaps))</callback> + <param> + <name>FIR Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex->Complex (Decimating)</name> + <key>fir_filter_ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + </option> + <option> + <name>Complex->Complex (Interpolating)</name> + <key>interp_fir_filter_ccf</key> + <opt>input:complex</opt> + <opt>output:complex</opt> + </option> + <option> + <name>Float->Float (Decimating)</name> + <key>fir_filter_fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + </option> + <option> + <name>Float->Float (Interpolating)</name> + <key>interp_fir_filter_fff</key> + <opt>input:float</opt> + <opt>output:float</opt> + </option> + </param> + <param> + <name>Decimation</name> + <key>decim</key> + <value>1</value> + <type>int</type> + <hide>#if str($type).startswith('interp') then 'all' else 'none'#</hide> + </param> + <param> + <name>Interpolation</name> + <key>interp</key> + <value>1</value> + <type>int</type> + <hide>#if str($type).startswith('interp') then 'none' else 'all'#</hide> + </param> + <param> + <name>Gain</name> + <key>gain</key> + <value>1</value> + <type>real</type> + </param> + <param> + <name>Sample Rate</name> + <key>samp_rate</key> + <value>samp_rate</value> + <type>real</type> + </param> + <param> + <name>Symbol Rate</name> + <key>sym_rate</key> + <value>1.0</value> + <type>real</type> + </param> + <param> + <name>Alpha</name> + <key>alpha</key> + <value>0.35</value> + <type>real</type> + </param> + <param> + <name>Num Taps</name> + <key>ntaps</key> + <value>11*samp_rate</value> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> + <doc> +This filter is a convenience wrapper for an fir filter and a firdes taps generating function. + +Sample rate in Hertz. + </doc> +</block> diff --git a/grc/blocks/variable.xml b/grc/blocks/variable.xml new file mode 100644 index 000000000..afee0f5d4 --- /dev/null +++ b/grc/blocks/variable.xml @@ -0,0 +1,23 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Variable block: a grc variable with key, value +################################################### + --> +<block> + <name>Variable</name> + <key>variable</key> + <var_make>self.$(id) = $(id) = $value</var_make> + <make></make> + <callback>self.set_$(id)($value)</callback> + <param> + <name>Value</name> + <key>value</key> + <value>0</value> + <type>raw</type> + </param> + <doc> +This block maps a value to a unique variable. \ +This variable block has no graphical representation. + </doc> +</block> diff --git a/grc/blocks/variable_config.xml b/grc/blocks/variable_config.xml new file mode 100644 index 000000000..11bff9edc --- /dev/null +++ b/grc/blocks/variable_config.xml @@ -0,0 +1,88 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Variable Config block: +## a variable that reads and writes to a config file +################################################### + --> +<block> + <name>Variable Config</name> + <key>variable_config</key> + <import>import ConfigParser</import> + <var_make>self._$(id)_config = ConfigParser.ConfigParser() +self._$(id)_config.read($config_file) +try: $(id) = self._$(id)_config.$(type.get)($section, $option) +except: $(id) = $value +self.$(id) = $(id)</var_make> + <make></make> + <callback>self.set_$(id)($value)</callback> + <callback>self._$(id)_config = ConfigParser.ConfigParser() +self._$(id)_config.read($config_file) +if not self._$(id)_config.has_section($section): + self._$(id)_config.add_section($section) +self._$(id)_config.set($section, $option, str($writeback)) +self._$(id)_config.write(open($config_file, 'w'))</callback> + <param> + <name>Default Value</name> + <key>value</key> + <value>0</value> + <type>$type</type> + </param> + <param> + <name>Type</name> + <key>type</key> + <value>real</value> + <type>enum</type> + <option> + <name>Float</name> + <key>real</key> + <opt>get:getfloat</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>get:getint</opt> + </option> + <option> + <name>Bool</name> + <key>bool</key> + <opt>get:getboolean</opt> + </option> + <option> + <name>String</name> + <key>string</key> + <opt>get:get</opt> + </option> + </param> + <param> + <name>Config File</name> + <key>config_file</key> + <value>default</value> + <type>file_open</type> + </param> + <param> + <name>Section</name> + <key>section</key> + <value>main</value> + <type>string</type> + </param> + <param> + <name>Option</name> + <key>option</key> + <value>key</value> + <type>string</type> + </param> + <param> + <name>WriteBack</name> + <key>writeback</key> + <value>None</value> + <type>raw</type> + </param> + <doc> +This block represents a variable that can be read from a config file. + +To save the value back into the config file: \ +enter the name of another variable into the writeback param. \ +When the other variable is changed at runtime, the config file will be re-written. + </doc> +</block> diff --git a/grc/blocks/variable_function_probe.xml b/grc/blocks/variable_function_probe.xml new file mode 100644 index 000000000..269966c70 --- /dev/null +++ b/grc/blocks/variable_function_probe.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Variable function probe +################################################### + --> +<block> + <name>Function Probe</name> + <key>variable_function_probe</key> + <import>import time</import> + <import>import threading</import> + <var_make>self.$(id) = $(id) = $value</var_make> + <make>#slurp +def _$(id)_probe(): + while True: + val = self.$(block_id()).$(function_name())($(function_args())) + try: self.set_$(id)(val) + except AttributeError, e: pass + time.sleep(1.0/($poll_rate)) +_$(id)_thread = threading.Thread(target=_$(id)_probe) +_$(id)_thread.daemon = True +_$(id)_thread.start()</make> + <callback>self.set_$(id)($value)</callback> + <param> + <name>Value</name> + <key>value</key> + <value>0</value> + <type>raw</type> + </param> + <param> + <name>Block ID</name> + <key>block_id</key> + <value>my_block_0</value> + <type>string</type> + </param> + <param> + <name>Function Name</name> + <key>function_name</key> + <value>get_number</value> + <type>string</type> + </param> + <param> + <name>Function Args</name> + <key>function_args</key> + <value></value> + <type>string</type> + <hide>#if $function_args() then 'none' else 'part'#</hide> + </param> + <param> + <name>Poll Rate (Hz)</name> + <key>poll_rate</key> + <value>10</value> + <type>real</type> + </param> + <doc> +Periodically probe a function and set its value to this variable. + +Set the values for block ID, function name, and function args appropriately: \ +Block ID should be the ID of another block in this flow graph. \ +Function name should be the name of a class method on that block. \ +Function args are the parameters passed into that function. \ +For a function with no arguments, leave function args blank. \ +When passing a string for the function arguments, quote the string literal: '"arg"'. + +The values will used literally, and generated into the following form: +self.block_id.function_name(function_args) + +To poll a stream for a level, use this with the probe signal block. + </doc> +</block> diff --git a/grc/blocks/virtual_sink.xml b/grc/blocks/virtual_sink.xml new file mode 100644 index 000000000..35fb27e67 --- /dev/null +++ b/grc/blocks/virtual_sink.xml @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Virtual Sink +################################################### + --> +<block> + <name>Virtual Sink</name> + <key>virtual_sink</key> + <make></make> + <param> + <name>Stream ID</name> + <key>stream_id</key> + <value></value> + <type>stream_id</type> + </param> + <sink> + <name>in</name> + <type></type> + </sink> +</block> diff --git a/grc/blocks/virtual_source.xml b/grc/blocks/virtual_source.xml new file mode 100644 index 000000000..e0c775449 --- /dev/null +++ b/grc/blocks/virtual_source.xml @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Virtual Source +################################################### + --> +<block> + <name>Virtual Source</name> + <key>virtual_source</key> + <make></make> + <param> + <name>Stream ID</name> + <key>stream_id</key> + <value></value> + <type>stream_id</type> + </param> + <source> + <name>out</name> + <type></type> + </source> +</block> diff --git a/grc/blocks/xmlrpc_client.xml b/grc/blocks/xmlrpc_client.xml new file mode 100644 index 000000000..dc4d154d1 --- /dev/null +++ b/grc/blocks/xmlrpc_client.xml @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Simple XMLRPC Client +################################################### + --> +<block> + <name>XMLRPC Client</name> + <key>xmlrpc_client</key> + <import>import xmlrpclib</import> + <make>xmlrpclib.Server('http://$(addr()):$(port)')</make> + <callback>$(callback())($variable)</callback> + <param> + <name>Address</name> + <key>addr</key> + <value>localhost</value> + <type>string</type> + </param> + <param> + <name>Port</name> + <key>port</key> + <value>8080</value> + <type>int</type> + </param> + <param> + <name>Callback</name> + <key>callback</key> + <value>set_</value> + <type>string</type> + </param> + <param> + <name>Variable</name> + <key>variable</key> + <type>raw</type> + </param> + <doc> +This block will create an XMLRPC client. \ +The client will execute the callback on the server when the variable is changed. \ +The callback should be a the name of a function registered on the server. \ +The variable should be an expression containing a the name of a variable in flow graph. + </doc> +</block> diff --git a/grc/blocks/xmlrpc_server.xml b/grc/blocks/xmlrpc_server.xml new file mode 100644 index 000000000..6c31bd1a9 --- /dev/null +++ b/grc/blocks/xmlrpc_server.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Simple XMLRPC Server +################################################### + --> +<block> + <name>XMLRPC Server</name> + <key>xmlrpc_server</key> + <import>import SimpleXMLRPCServer</import> + <import>import threading</import> + <make>SimpleXMLRPCServer.SimpleXMLRPCServer(($addr, $port), allow_none=True) +self.$(id).register_instance(self) +threading.Thread(target=self.$(id).serve_forever).start()</make> + <param> + <name>Address</name> + <key>addr</key> + <value>localhost</value> + <type>string</type> + </param> + <param> + <name>Port</name> + <key>port</key> + <value>8080</value> + <type>int</type> + </param> + <doc> +This block will start an XMLRPC server. \ +The server provides access to the run, start, stop, wait functions of the flow graph. \ +The server also provides access to the variable callbacks in the flow graph. \ +Ex: If the variable is called freq, the function provided by the server will be called set_freq(new_freq). + +Example client in python: + +import xmlrpclib +s = xmlrpclib.Server('http://localhost:8080') +s.set_freq(5000) + </doc> +</block> |