summaryrefslogtreecommitdiff
path: root/gr-filter
diff options
context:
space:
mode:
authoraru31 <guptarpit1997@gmail.com>2019-01-29 03:31:33 +0530
committerAndrej Rode <mail@andrejro.de>2019-03-31 22:40:41 +0200
commit0cb3f2a03d4e9320b7882251ed14876db07249d2 (patch)
tree8975bb2735b225b890c9b7c03fdadd88e3345a96 /gr-filter
parent30ebb60790514d0fe59f2e823b5a4ad222a9bd73 (diff)
Add C++ generation support to gr-filter
Diffstat (limited to 'gr-filter')
-rw-r--r--gr-filter/grc/filter_band_pass_filter.block.yml20
-rw-r--r--gr-filter/grc/filter_band_reject_filter.block.yml20
-rw-r--r--gr-filter/grc/filter_dc_blocker_xx.block.yml10
-rw-r--r--gr-filter/grc/filter_fft_filter_xxx.block.yml20
-rw-r--r--gr-filter/grc/filter_filter_delay_fc.block.yml10
-rw-r--r--gr-filter/grc/filter_filterbank_vcvcf.block.yml11
-rw-r--r--gr-filter/grc/filter_fir_filter_xxx.block.yml18
-rw-r--r--gr-filter/grc/filter_freq_xlating_fft_filter_ccc.block.yml1
-rw-r--r--gr-filter/grc/filter_freq_xlating_fir_filter_xxx.block.yml1
-rw-r--r--gr-filter/grc/filter_high_pass_filter.block.yml19
-rw-r--r--gr-filter/grc/filter_hilbert_fc.block.yml11
-rw-r--r--gr-filter/grc/filter_iir_filter_xxx.block.yml23
-rw-r--r--gr-filter/grc/filter_interp_fir_filter_xxx.block.yml1
-rw-r--r--gr-filter/grc/filter_low_pass_filter.block.yml19
-rw-r--r--gr-filter/grc/filter_low_pass_xlating_filter.block.yml1
-rw-r--r--gr-filter/grc/filter_mmse_interpolator_xx.block.yml12
-rw-r--r--gr-filter/grc/filter_mmse_resampler_xx.block.yml12
-rw-r--r--gr-filter/grc/filter_pfb_arb_resampler.block.yml20
-rw-r--r--gr-filter/grc/filter_pfb_channelizer.block.yml18
-rw-r--r--gr-filter/grc/filter_pfb_channelizer_hier.block.yml1
-rw-r--r--gr-filter/grc/filter_pfb_decimator.block.yml22
-rw-r--r--gr-filter/grc/filter_pfb_interpolator.block.yml15
-rw-r--r--gr-filter/grc/filter_pfb_synthesizer.block.yml21
-rw-r--r--gr-filter/grc/filter_rational_resampler_base_xxx.block.yml1
-rw-r--r--gr-filter/grc/filter_rational_resampler_xxx.block.yml1
-rw-r--r--gr-filter/grc/filter_root_raised_cosine_filter.block.yml18
-rw-r--r--gr-filter/grc/filter_single_pole_iir_filter_xx.block.yml9
-rw-r--r--gr-filter/grc/variable_band_pass_filter_taps.block.yml9
-rw-r--r--gr-filter/grc/variable_band_reject_filter_taps.block.yml9
-rw-r--r--gr-filter/grc/variable_high_pass_filter_taps.block.yml9
-rw-r--r--gr-filter/grc/variable_low_pass_filter_taps.block.yml9
-rw-r--r--gr-filter/grc/variable_rrc_filter_taps.block.yml9
32 files changed, 380 insertions, 0 deletions
diff --git a/gr-filter/grc/filter_band_pass_filter.block.yml b/gr-filter/grc/filter_band_pass_filter.block.yml
index ff881b5e45..7ba1a72b15 100644
--- a/gr-filter/grc/filter_band_pass_filter.block.yml
+++ b/gr-filter/grc/filter_band_pass_filter.block.yml
@@ -1,5 +1,6 @@
id: band_pass_filter
label: Band Pass Filter
+flags: [ python, cpp ]
parameters:
- id: type
@@ -83,6 +84,25 @@ templates:
- set_taps(firdes.${type.fcn}(${gain}, ${samp_rate}, ${low_cutoff_freq}, ${high_cutoff_freq},
${width}, ${win}, ${beta}))
+cpp_templates:
+ includes: ['#include <gnuradio/filter/firdes.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ make: |-
+ this->${id} = filter::${type}::make(
+ ${ interp if str(type).startswith('interp') else decim },
+ firdes.${type.fcn}(
+ ${gain},
+ ${samp_rate},
+ ${low_cutoff_freq},
+ ${high_cutoff_freq},
+ ${width},
+ ${win},
+ ${beta}));
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(firdes::${type.fcn}(${gain}, ${samp_rate}, ${low_cutoff_freq}, ${high_cutoff_freq},
+ ${width}, ${win}, ${beta}))
+
documentation: |-
This filter is a convenience wrapper for an fir filter and a firdes taps generating function.
diff --git a/gr-filter/grc/filter_band_reject_filter.block.yml b/gr-filter/grc/filter_band_reject_filter.block.yml
index 4d1c889a1e..ca665c7dd3 100644
--- a/gr-filter/grc/filter_band_reject_filter.block.yml
+++ b/gr-filter/grc/filter_band_reject_filter.block.yml
@@ -1,5 +1,6 @@
id: band_reject_filter
label: Band Reject Filter
+flags: [ python, cpp ]
parameters:
- id: type
@@ -78,6 +79,25 @@ templates:
- set_taps(firdes.band_reject(${gain}, ${samp_rate}, ${low_cutoff_freq}, ${high_cutoff_freq},
${width}, ${win}, ${beta}))
+cpp_templates:
+ includes: ['#include <gnuradio/filter/firdes.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ make: |-
+ this->${id} = filter::${type}::make(
+ ${ interp if str(type).startswith('interp') else decim },
+ firdes.band_reject(
+ ${gain},
+ ${samp_rate},
+ ${low_cutoff_freq},
+ ${high_cutoff_freq},
+ ${width},
+ ${win},
+ ${beta}));
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(firdes::band_reject(${gain}, ${samp_rate}, ${low_cutoff_freq}, ${high_cutoff_freq},
+ ${width}, ${win}, ${beta}))
+
documentation: |-
This filter is a convenience wrapper for an fir filter and a firdes taps generating function.
diff --git a/gr-filter/grc/filter_dc_blocker_xx.block.yml b/gr-filter/grc/filter_dc_blocker_xx.block.yml
index 2187624ff3..703cb75f56 100644
--- a/gr-filter/grc/filter_dc_blocker_xx.block.yml
+++ b/gr-filter/grc/filter_dc_blocker_xx.block.yml
@@ -1,5 +1,6 @@
id: dc_blocker_xx
label: DC Blocker
+flags: [ python, cpp ]
parameters:
- id: type
@@ -32,4 +33,13 @@ templates:
imports: from gnuradio import filter
make: filter.dc_blocker_${type}(${length}, ${long_form})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/dc_blocker_${type}.h>']
+ declarations: 'filter::dc_blocker_${type}::sptr ${id};'
+ make: 'this->${id} = filter::dc_blocker_${type}::make(${length}, ${long_form});'
+ link: ['gnuradio-filter']
+ translations:
+ 'True': 'true'
+ 'False': 'false'
+
file_format: 1
diff --git a/gr-filter/grc/filter_fft_filter_xxx.block.yml b/gr-filter/grc/filter_fft_filter_xxx.block.yml
index 8a668c1c04..d9c0a4f4de 100644
--- a/gr-filter/grc/filter_fft_filter_xxx.block.yml
+++ b/gr-filter/grc/filter_fft_filter_xxx.block.yml
@@ -1,5 +1,6 @@
id: fft_filter_xxx
label: FFT Filter
+flags: [ python, cpp ]
parameters:
- id: type
@@ -49,4 +50,23 @@ templates:
- set_taps(${taps})
- set_nthreads(${nthreads})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/fft_filter_${type}.h>']
+ declarations: 'filter::fft_filter_${type}::sptr ${id};'
+ make: |-
+ % if str(type.taps) == "complex_vector":
+ std::vector<gr_complex> taps = {${str(taps)[1:-1]}};
+ % else:
+ std::vector<float> taps = {${str(taps)[1:-1]}};
+ % endif
+ this->${id} = filter::fft_filter_${type}::make(
+ ${decim},
+ taps,
+ ${nthreads});
+ this->${id}.declare_sample_delay(${samp_delay});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(taps)
+ - set_nthreads(${nthreads})
+
file_format: 1
diff --git a/gr-filter/grc/filter_filter_delay_fc.block.yml b/gr-filter/grc/filter_filter_delay_fc.block.yml
index 5c220ccca6..4cbdddfc33 100644
--- a/gr-filter/grc/filter_filter_delay_fc.block.yml
+++ b/gr-filter/grc/filter_filter_delay_fc.block.yml
@@ -1,5 +1,6 @@
id: filter_delay_fc
label: Filter Delay
+flags: [ python, cpp ]
parameters:
- id: taps
@@ -23,4 +24,13 @@ templates:
from gnuradio.filter import firdes
make: filter.filter_delay_fc(${taps})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/filter_delay_fc.h>']
+ declarations: 'filter::filter_delay_fc::sptr ${id};'
+ make: |-
+ std::vector<float> taps = {${str(taps)[1:-1]}};
+ this->${id} = filter::fft_filter_${type}::make(
+ taps);
+ link: ['gnuradio-filter']
+
file_format: 1
diff --git a/gr-filter/grc/filter_filterbank_vcvcf.block.yml b/gr-filter/grc/filter_filterbank_vcvcf.block.yml
index 7ced5e27cb..291299b807 100644
--- a/gr-filter/grc/filter_filterbank_vcvcf.block.yml
+++ b/gr-filter/grc/filter_filterbank_vcvcf.block.yml
@@ -1,5 +1,6 @@
id: filterbank_vcvcf
label: Generic Filterbank
+flags: [ python, cpp ]
parameters:
- id: taps
@@ -23,4 +24,14 @@ templates:
callbacks:
- set_taps(${taps})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/filterbank_vcvcf.h>']
+ declarations: 'filter::filterbank_vcvcf::sptr ${id};'
+ make: |-
+ this->${id} = filter::filterbank_vcvcf::make(
+ ${taps});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(${taps})
+
file_format: 1
diff --git a/gr-filter/grc/filter_fir_filter_xxx.block.yml b/gr-filter/grc/filter_fir_filter_xxx.block.yml
index cd6b0af929..f1b2465a14 100644
--- a/gr-filter/grc/filter_fir_filter_xxx.block.yml
+++ b/gr-filter/grc/filter_fir_filter_xxx.block.yml
@@ -1,5 +1,6 @@
id: fir_filter_xxx
label: Decimating FIR Filter
+flags: [ python, cpp ]
parameters:
- id: type
@@ -46,4 +47,21 @@ templates:
callbacks:
- set_taps(${taps})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/fir_filter_${type}.h>']
+ declarations: 'filter::fir_filter_${type}::sptr ${id};'
+ make: |-
+ % if str(type.taps) == "complex_vector":
+ std::vector<gr_complex> taps = {${str(taps)[1:-1]}};
+ % else:
+ std::vector<float> taps = {${str(taps)[1:-1]}};
+ % endif
+ this->${id} = filter::fir_filter_${type}::make(
+ ${decim},
+ taps);
+ this->${id}.declare_sample_delay(${samp_delay});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(taps)
+
file_format: 1
diff --git a/gr-filter/grc/filter_freq_xlating_fft_filter_ccc.block.yml b/gr-filter/grc/filter_freq_xlating_fft_filter_ccc.block.yml
index 734f1aa909..a03920dfac 100644
--- a/gr-filter/grc/filter_freq_xlating_fft_filter_ccc.block.yml
+++ b/gr-filter/grc/filter_freq_xlating_fft_filter_ccc.block.yml
@@ -1,5 +1,6 @@
id: freq_xlating_fft_filter_ccc
label: Frequency Xlating FFT Filter
+flags: [ python ]
parameters:
- id: decim
diff --git a/gr-filter/grc/filter_freq_xlating_fir_filter_xxx.block.yml b/gr-filter/grc/filter_freq_xlating_fir_filter_xxx.block.yml
index aece398e29..51eaa7eafa 100644
--- a/gr-filter/grc/filter_freq_xlating_fir_filter_xxx.block.yml
+++ b/gr-filter/grc/filter_freq_xlating_fir_filter_xxx.block.yml
@@ -1,5 +1,6 @@
id: freq_xlating_fir_filter_xxx
label: Frequency Xlating FIR Filter
+flags: [ python ]
parameters:
- id: type
diff --git a/gr-filter/grc/filter_high_pass_filter.block.yml b/gr-filter/grc/filter_high_pass_filter.block.yml
index a0d836415e..49962d2b19 100644
--- a/gr-filter/grc/filter_high_pass_filter.block.yml
+++ b/gr-filter/grc/filter_high_pass_filter.block.yml
@@ -1,5 +1,6 @@
id: high_pass_filter
label: High Pass Filter
+flags: [ python, cpp ]
parameters:
- id: type
@@ -74,6 +75,24 @@ templates:
- set_taps(firdes.high_pass(${gain}, ${samp_rate}, ${cutoff_freq}, ${width}, ${win},
${beta}))
+cpp_templates:
+ includes: ['#include <gnuradio/filter/firdes.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ make: |-
+ this->${id} = filter::${type}::make(
+ ${ interp if str(type).startswith('interp') else decim },
+ firdes.high_pass(
+ ${gain},
+ ${samp_rate},
+ ${cutoff_freq},
+ ${width},
+ ${win},
+ ${beta}));
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(firdes::high_pass(${gain}, ${samp_rate}, ${cutoff_freq}, ${width}, ${win},
+ ${beta}))
+
documentation: |-
This filter is a convenience wrapper for an fir filter and a firdes taps generating function.
diff --git a/gr-filter/grc/filter_hilbert_fc.block.yml b/gr-filter/grc/filter_hilbert_fc.block.yml
index 0d835c388d..0c984ef7c4 100644
--- a/gr-filter/grc/filter_hilbert_fc.block.yml
+++ b/gr-filter/grc/filter_hilbert_fc.block.yml
@@ -1,5 +1,6 @@
id: hilbert_fc
label: Hilbert
+flagss: [ python, cpp ]
parameters:
- id: num_taps
@@ -32,4 +33,14 @@ templates:
imports: from gnuradio import filter
make: filter.hilbert_fc(${num_taps}, ${win}, ${beta})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/hilbert_fc.h>']
+ declarations: 'filter::hilbert_fc::sptr ${id};'
+ make: |-
+ this->${id} = filter::hilbert_fc::make(
+ ${num_taps},
+ ${win},
+ ${beta});
+ link: ['gnuradio-filter']
+
file_format: 1
diff --git a/gr-filter/grc/filter_iir_filter_xxx.block.yml b/gr-filter/grc/filter_iir_filter_xxx.block.yml
index 4dfef2b0d6..62cf39caed 100644
--- a/gr-filter/grc/filter_iir_filter_xxx.block.yml
+++ b/gr-filter/grc/filter_iir_filter_xxx.block.yml
@@ -1,5 +1,6 @@
id: iir_filter_xxx
label: IIR Filter
+flags: [ python, cpp ]
parameters:
- id: type
@@ -41,4 +42,26 @@ templates:
callbacks:
- set_taps(${fftaps}, ${fbtaps})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/iir_filter_${type}.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ make: |-
+ % if str(type.taps) == "complex_vector":
+ std::vector<gr_complex> fftaps = {${str(fftaps)[1:-1]}};
+ std::vector<gr_complex> fbtaps = {${str(fbtaps)[1:-1]}};
+ % else:
+ std::vector<float> fftaps = {${str(fftaps)[1:-1]}};
+ std::vector<float> fbtaps = {${str(fbtaps)[1:-1]}};
+ % endif
+ this->${id} = filter::iir_filter_${type}::make(
+ fftaps,
+ fbtaps,
+ ${oldstyle});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(fftaps, fbtaps)
+ translations:
+ 'True': 'true'
+ 'False': 'false'
+
file_format: 1
diff --git a/gr-filter/grc/filter_interp_fir_filter_xxx.block.yml b/gr-filter/grc/filter_interp_fir_filter_xxx.block.yml
index 16f2265f2e..25a70a53f6 100644
--- a/gr-filter/grc/filter_interp_fir_filter_xxx.block.yml
+++ b/gr-filter/grc/filter_interp_fir_filter_xxx.block.yml
@@ -1,5 +1,6 @@
id: interp_fir_filter_xxx
label: Interpolating FIR Filter
+flags: [ python ]
parameters:
- id: type
diff --git a/gr-filter/grc/filter_low_pass_filter.block.yml b/gr-filter/grc/filter_low_pass_filter.block.yml
index 489b59a513..b90a18abbe 100644
--- a/gr-filter/grc/filter_low_pass_filter.block.yml
+++ b/gr-filter/grc/filter_low_pass_filter.block.yml
@@ -1,5 +1,6 @@
id: low_pass_filter
label: Low Pass Filter
+flags: [ python, cpp ]
parameters:
- id: type
@@ -74,6 +75,24 @@ templates:
- set_taps(firdes.low_pass(${gain}, ${samp_rate}, ${cutoff_freq}, ${width}, ${win},
${beta}))
+cpp_templates:
+ includes: ['#include <gnuradio/filter/firdes.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ make: |-
+ this->${id} = filter::${type}::make(
+ ${ interp if str(type).startswith('interp') else decim },
+ firdes.low_pass(
+ ${gain},
+ ${samp_rate},
+ ${cutoff_freq},
+ ${width},
+ ${win},
+ ${beta}));
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(firdes::low_pass(${gain}, ${samp_rate}, ${cutoff_freq}, ${width}, ${win},
+ ${beta}))
+
documentation: |-
This filter is a convenience wrapper for an fir filter and a firdes taps generating function.
diff --git a/gr-filter/grc/filter_low_pass_xlating_filter.block.yml b/gr-filter/grc/filter_low_pass_xlating_filter.block.yml
index b3c9daf2e1..a6327e1fe7 100644
--- a/gr-filter/grc/filter_low_pass_xlating_filter.block.yml
+++ b/gr-filter/grc/filter_low_pass_xlating_filter.block.yml
@@ -1,5 +1,6 @@
id: xlating_low_pass_filter
label: Xlating Low Pass Filter
+flags: [ python ]
parameters:
- id: type
diff --git a/gr-filter/grc/filter_mmse_interpolator_xx.block.yml b/gr-filter/grc/filter_mmse_interpolator_xx.block.yml
index 2eb0a3aa46..342ecfcbcc 100644
--- a/gr-filter/grc/filter_mmse_interpolator_xx.block.yml
+++ b/gr-filter/grc/filter_mmse_interpolator_xx.block.yml
@@ -1,5 +1,6 @@
id: mmse_interpolator_xx
label: Fractional Interpolator
+flags: [ python, cpp ]
parameters:
- id: type
@@ -30,4 +31,15 @@ templates:
callbacks:
- set_interp_ratio(${interp_ratio})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/mmse_interpolator_${type.fcn}.h>']
+ declarations: 'filter::mmse_interpolator_${type.fcn}::sptr ${id};'
+ make: |-
+ this->${id} = filter::mmse_interpolator_${type.fcn}::make(
+ ${phase_shift},
+ ${interp_ratio});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_interp_ratio(${interp_ratio})
+
file_format: 1
diff --git a/gr-filter/grc/filter_mmse_resampler_xx.block.yml b/gr-filter/grc/filter_mmse_resampler_xx.block.yml
index d2ea3bdfe7..1fa31910b7 100644
--- a/gr-filter/grc/filter_mmse_resampler_xx.block.yml
+++ b/gr-filter/grc/filter_mmse_resampler_xx.block.yml
@@ -1,5 +1,6 @@
id: mmse_resampler_xx
label: Fractional Resampler
+flags: [ python, cpp ]
parameters:
- id: type
@@ -37,4 +38,15 @@ templates:
callbacks:
- set_resamp_ratio(${resamp_ratio})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/mmse_resampler_${type.fcn}.h>']
+ declarations: 'filter::mmse_resampler_${type.fcn}::sptr ${id};'
+ make: |-
+ this->${id} = filter::mmse_resampler_${type.fcn}::make(
+ ${phase_shift},
+ ${resamp_ratio});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_resamp_ratio(${resamp_ratio})
+
file_format: 1
diff --git a/gr-filter/grc/filter_pfb_arb_resampler.block.yml b/gr-filter/grc/filter_pfb_arb_resampler.block.yml
index 8faa349189..ca54124157 100644
--- a/gr-filter/grc/filter_pfb_arb_resampler.block.yml
+++ b/gr-filter/grc/filter_pfb_arb_resampler.block.yml
@@ -1,5 +1,6 @@
id: pfb_arb_resampler_xxx
label: Polyphase Arbitrary Resampler
+flags: [ python, cpp ]
parameters:
- id: type
@@ -55,4 +56,23 @@ templates:
- set_taps(${taps})
- set_rate(${rrate})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/pfb.arb_resampler_${type}.h>']
+ declarations: 'pfb::arb_resampler_${type}::sptr ${id};'
+ make: |-
+ % if str(type.taps) == "complex_vector":
+ std::vector<gr_complex> taps = {${str(taps)[1:-1]}};
+ % else:
+ std::vector<float> taps = {${str(taps)[1:-1]}};
+ % endif
+ this->${id} =pfb::arb_resampler_${type}::make(
+ ${rrate},
+ taps=${ taps if taps else 'None' },
+ flt_size=${nfilts});
+ this->${id}.declare_sample_delay(${samp_delay});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(taps)
+ - set_rate(${rrate})
+
file_format: 1
diff --git a/gr-filter/grc/filter_pfb_channelizer.block.yml b/gr-filter/grc/filter_pfb_channelizer.block.yml
index 57aed84c53..c0a800c989 100644
--- a/gr-filter/grc/filter_pfb_channelizer.block.yml
+++ b/gr-filter/grc/filter_pfb_channelizer.block.yml
@@ -1,5 +1,6 @@
id: pfb_channelizer_ccf
label: Polyphase Channelizer
+flags: [ python, cpp ]
parameters:
- id: nchans
@@ -57,4 +58,21 @@ templates:
- set_taps(${taps})
- set_channel_map(${ch_map})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/pfb_channelizer_ccf.h>']
+ declarations: 'pfb::channelizer_ccf::sptr ${id};'
+ make: |-
+ std::vector<float> taps = {${str(taps)[1:-1]}};
+ this->${id} = pfb::channelizer_ccf::make(
+ ${nchans},
+ taps,
+ ${osr},
+ ${atten});
+ this->${id}.set_channel_map(${ch_map});
+ this->${id}.declare_sample_delay(${samp_delay});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(taps)
+ - set_channel_map(${ch_map})
+
file_format: 1
diff --git a/gr-filter/grc/filter_pfb_channelizer_hier.block.yml b/gr-filter/grc/filter_pfb_channelizer_hier.block.yml
index d94b2c22ce..07a0cb99f7 100644
--- a/gr-filter/grc/filter_pfb_channelizer_hier.block.yml
+++ b/gr-filter/grc/filter_pfb_channelizer_hier.block.yml
@@ -1,5 +1,6 @@
id: pfb_channelizer_hier_ccf
label: Hierarchical Polyphase Channelizer
+flags: [ python ]
parameters:
- id: nchans
diff --git a/gr-filter/grc/filter_pfb_decimator.block.yml b/gr-filter/grc/filter_pfb_decimator.block.yml
index 8cc7d15bb2..b4946629f8 100644
--- a/gr-filter/grc/filter_pfb_decimator.block.yml
+++ b/gr-filter/grc/filter_pfb_decimator.block.yml
@@ -1,5 +1,6 @@
id: pfb_decimator_ccf
label: Polyphase Decimator
+flags: [ python, cpp ]
parameters:
- id: decim
@@ -59,4 +60,25 @@ templates:
- set_taps(${taps})
- set_channel(int(${channel}))
+cpp_templates:
+ includes: ['#include <gnuradio/filter/pfb_decimator_ccf.h>']
+ declarations: 'pfb::decimator_ccf::sptr ${id};'
+ make: |-
+ std::vector<float> taps = {${str(taps)[1:-1]}};
+ this->${id} = pfb::decimator_ccf::make(
+ ${decim},
+ taps,
+ ${channel},
+ ${atten},
+ ${fft_rot},
+ ${fft_filts});
+ this->${id}.declare_sample_delay(${samp_delay});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(taps)
+ - set_channel(int(${channel}))
+ translations:
+ 'True': 'true'
+ 'False': 'false'
+
file_format: 1
diff --git a/gr-filter/grc/filter_pfb_interpolator.block.yml b/gr-filter/grc/filter_pfb_interpolator.block.yml
index 6b2d306f61..ae7f7ba083 100644
--- a/gr-filter/grc/filter_pfb_interpolator.block.yml
+++ b/gr-filter/grc/filter_pfb_interpolator.block.yml
@@ -1,5 +1,6 @@
id: pfb_interpolator_ccf
label: Polyphase Interpolator
+flags: [ python, cpp ]
parameters:
- id: interp
@@ -39,4 +40,18 @@ templates:
callbacks:
- set_taps(${taps})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/pfb_interpolator_ccf.h>']
+ declarations: 'pfb::interpolator_ccf::sptr ${id};'
+ make: |-
+ std::vector<float> taps = {${str(taps)[1:-1]}};
+ this->${id} = pfb::interpolator_ccf::make(
+ ${interp},
+ taps,
+ ${atten});
+ this->${id}.declare_sample_delay(${samp_delay});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(taps)
+
file_format: 1
diff --git a/gr-filter/grc/filter_pfb_synthesizer.block.yml b/gr-filter/grc/filter_pfb_synthesizer.block.yml
index ccbba04ee1..5b384ef87b 100644
--- a/gr-filter/grc/filter_pfb_synthesizer.block.yml
+++ b/gr-filter/grc/filter_pfb_synthesizer.block.yml
@@ -1,5 +1,6 @@
id: pfb_synthesizer_ccf
label: Polyphase Synthesizer
+flags: [ python, cpp ]
parameters:
- id: numchans
@@ -57,4 +58,24 @@ templates:
- set_taps(${taps})
- set_channel_map(${ch_map})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/pfb_synthesizer_ccf.h>']
+ declarations: 'pfb::synthesizer_ccf::sptr ${id};'
+ make: |-
+ std::vector<float> taps = {${str(taps)[1:-1]}};
+ std::vector<int> ch_map = {${str(ch_map)[1:-1]}};
+ this->${id} = pfb::synthesizer_ccf::make(
+ ${numchans},
+ taps,
+ ${twox});
+ this->${id}.set_channel_map(${ch_map});
+ this->${id}.declare_sample_delay(${samp_delay});
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(taps)
+ - set_channel_map(ch_map)
+ translations:
+ 'True': 'true'
+ 'False': 'false'
+
file_format: 1
diff --git a/gr-filter/grc/filter_rational_resampler_base_xxx.block.yml b/gr-filter/grc/filter_rational_resampler_base_xxx.block.yml
index e8fc797d9b..9e81d59557 100644
--- a/gr-filter/grc/filter_rational_resampler_base_xxx.block.yml
+++ b/gr-filter/grc/filter_rational_resampler_base_xxx.block.yml
@@ -1,5 +1,6 @@
id: rational_resampler_base_xxx
label: Rational Resampler Base
+flags: [ python ]
parameters:
- id: type
diff --git a/gr-filter/grc/filter_rational_resampler_xxx.block.yml b/gr-filter/grc/filter_rational_resampler_xxx.block.yml
index 695306479d..27c48a72d8 100644
--- a/gr-filter/grc/filter_rational_resampler_xxx.block.yml
+++ b/gr-filter/grc/filter_rational_resampler_xxx.block.yml
@@ -1,5 +1,6 @@
id: rational_resampler_xxx
label: Rational Resampler
+flags: [ python ]
parameters:
- id: type
diff --git a/gr-filter/grc/filter_root_raised_cosine_filter.block.yml b/gr-filter/grc/filter_root_raised_cosine_filter.block.yml
index 37dca275bb..a7abab1659 100644
--- a/gr-filter/grc/filter_root_raised_cosine_filter.block.yml
+++ b/gr-filter/grc/filter_root_raised_cosine_filter.block.yml
@@ -1,5 +1,6 @@
id: root_raised_cosine_filter
label: Root Raised Cosine Filter
+flags: [ python, cpp ]
parameters:
- id: type
@@ -68,6 +69,23 @@ templates:
- set_taps(firdes.root_raised_cosine(${gain}, ${samp_rate}, ${sym_rate}, ${alpha},
${ntaps}))
+cpp_templates:
+ includes: ['#include <gnuradio/filter/firdes.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ make: |-
+ this->${id} = filter::${type}::make(
+ ${ interp if str(type).startswith('interp') else decim },
+ firdes.${type.fcn}(
+ ${gain},
+ ${samp_rate},
+ ${sym_rate},
+ ${alpha},
+ ${ntaps}));
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(firdes::root_raised_cosine(${gain}, ${samp_rate}, ${sym_rate}, ${alpha},
+ ${ntaps}))
+
documentation: |-
This filter is a convenience wrapper for an fir filter and a firdes taps generating function.
diff --git a/gr-filter/grc/filter_single_pole_iir_filter_xx.block.yml b/gr-filter/grc/filter_single_pole_iir_filter_xx.block.yml
index 09561d7109..a2f1fbe91e 100644
--- a/gr-filter/grc/filter_single_pole_iir_filter_xx.block.yml
+++ b/gr-filter/grc/filter_single_pole_iir_filter_xx.block.yml
@@ -1,5 +1,6 @@
id: single_pole_iir_filter_xx
label: Single Pole IIR Filter
+flags: [ python, cpp ]
parameters:
- id: type
@@ -35,4 +36,12 @@ templates:
callbacks:
- set_taps(${alpha})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/single_pole_iir_filter_${type.fcn}.h>']
+ declarations: 'filter::single_pole_iir_filter_${type.fcn}::sptr ${id};'
+ make: 'this->${id} = filter::single_pole_iir_filter_${type.fcn}::make(${alpha}, ${vlen});'
+ link: ['gnuradio-filter']
+ callbacks:
+ - set_taps(${alpha})
+
file_format: 1
diff --git a/gr-filter/grc/variable_band_pass_filter_taps.block.yml b/gr-filter/grc/variable_band_pass_filter_taps.block.yml
index b352b91145..345093a093 100644
--- a/gr-filter/grc/variable_band_pass_filter_taps.block.yml
+++ b/gr-filter/grc/variable_band_pass_filter_taps.block.yml
@@ -1,5 +1,6 @@
id: variable_band_pass_filter_taps
label: Band-pass Filter Taps
+flags: [ python, cpp ]
parameters:
- id: type
@@ -43,6 +44,14 @@ templates:
self.${id} = ${id} = firdes.${type}(${gain}, ${samp_rate}, ${low_cutoff_freq}, \
${high_cutoff_freq}, ${width}, ${win}, ${beta})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/firdes.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ var_make: |-
+ this->${id} = ${id} = firdes.${type}(${gain}, ${samp_rate}, ${low_cutoff_freq}, \
+ ${high_cutoff_freq}, ${width}, ${win}, ${beta});
+ link: ['gnuradio-filter']
+
documentation: |-
This is a convenience wrapper for calling firdes.band_pass() or firdes.complex_band_pass()
diff --git a/gr-filter/grc/variable_band_reject_filter_taps.block.yml b/gr-filter/grc/variable_band_reject_filter_taps.block.yml
index 81095982f3..f5e563f572 100644
--- a/gr-filter/grc/variable_band_reject_filter_taps.block.yml
+++ b/gr-filter/grc/variable_band_reject_filter_taps.block.yml
@@ -1,5 +1,6 @@
id: variable_band_reject_filter_taps
label: Band-reject Filter Taps
+flags: [ python, cpp ]
parameters:
- id: gain
@@ -39,6 +40,14 @@ templates:
self.${id} = ${id} = firdes.band_reject(${gain}, ${samp_rate}, ${low_cutoff_freq},\
${high_cutoff_freq}, ${width}, ${win}, ${beta})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/firdes.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ var_make: |-
+ this->${id} = ${id} = firdes.band_reject(${gain}, ${samp_rate}, ${low_cutoff_freq},\
+ ${high_cutoff_freq}, ${width}, ${win}, ${beta});
+ link: ['gnuradio-filter']
+
documentation: |-
This is a convenience wrapper for calling firdes.band_reject().
diff --git a/gr-filter/grc/variable_high_pass_filter_taps.block.yml b/gr-filter/grc/variable_high_pass_filter_taps.block.yml
index 68a4fdbec8..aea5cd92b4 100644
--- a/gr-filter/grc/variable_high_pass_filter_taps.block.yml
+++ b/gr-filter/grc/variable_high_pass_filter_taps.block.yml
@@ -1,5 +1,6 @@
id: variable_high_pass_filter_taps
label: High-pass Filter Taps
+flags: [ python ]
parameters:
- id: gain
@@ -35,6 +36,14 @@ templates:
self.${id} = ${id} = firdes.high_pass(${gain}, ${samp_rate}, ${cutoff_freq},\
${width}, ${win}, ${beta})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/firdes.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ var_make: |-
+ this->${id} = ${id} = firdes.high_pass(${gain}, ${samp_rate}, ${cutoff_freq},\
+ ${width}, ${win}, ${beta});
+ link: ['gnuradio-filter']
+
documentation: |-
This variable is a convenience wrapper around a call to firdes.high_pass(...).
diff --git a/gr-filter/grc/variable_low_pass_filter_taps.block.yml b/gr-filter/grc/variable_low_pass_filter_taps.block.yml
index d4e1dc07b4..0d8364a9e7 100644
--- a/gr-filter/grc/variable_low_pass_filter_taps.block.yml
+++ b/gr-filter/grc/variable_low_pass_filter_taps.block.yml
@@ -1,5 +1,6 @@
id: variable_low_pass_filter_taps
label: Low-pass Filter Taps
+flags: [ python ]
parameters:
- id: gain
@@ -35,6 +36,14 @@ templates:
self.${id} = ${id} = firdes.low_pass(${gain}, ${samp_rate}, ${cutoff_freq},\
${width}, ${win}, ${beta})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/firdes.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ var_make: |-
+ this->${id} = ${id} = firdes.low_pass(${gain}, ${samp_rate}, ${cutoff_freq},\
+ ${width}, ${win}, ${beta});
+ link: ['gnuradio-filter']
+
documentation: |-
This variable is a convenience wrapper around a call to firdes.low_pass(...).
diff --git a/gr-filter/grc/variable_rrc_filter_taps.block.yml b/gr-filter/grc/variable_rrc_filter_taps.block.yml
index 738c084b0d..60f5420ee3 100644
--- a/gr-filter/grc/variable_rrc_filter_taps.block.yml
+++ b/gr-filter/grc/variable_rrc_filter_taps.block.yml
@@ -1,5 +1,6 @@
id: variable_rrc_filter_taps
label: RRC Filter Taps
+flags: [ python, cpp ]
parameters:
- id: gain
@@ -29,6 +30,14 @@ templates:
self.${id} = ${id} = firdes.root_raised_cosine(${gain}, ${samp_rate},\
${sym_rate}, ${alpha}, ${ntaps})
+cpp_templates:
+ includes: ['#include <gnuradio/filter/firdes.h>']
+ declarations: 'filter::firdes::sptr ${id};'
+ var_make: |-
+ this->${id} = ${id} = firdes.root_raised_cosine(${gain}, ${samp_rate},\
+ ${sym_rate}, ${alpha}, ${ntaps});
+ link: ['gnuradio-filter']
+
documentation: |-
This is a convenience wrapper for calling firdes.root_raised_cosine(...).