diff options
Diffstat (limited to 'gr-analog/grc/analog_sig_source_x.block.yml')
-rw-r--r-- | gr-analog/grc/analog_sig_source_x.block.yml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/gr-analog/grc/analog_sig_source_x.block.yml b/gr-analog/grc/analog_sig_source_x.block.yml new file mode 100644 index 0000000000..2fbc853a9b --- /dev/null +++ b/gr-analog/grc/analog_sig_source_x.block.yml @@ -0,0 +1,57 @@ +id: analog_sig_source_x +label: Signal Source + +parameters: +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [c, f, i, s] + offset_type: [complex, real, int, int] + hide: part +- id: samp_rate + label: Sample Rate + dtype: real + default: samp_rate +- id: waveform + label: Waveform + dtype: int + default: analog.GR_COS_WAVE + options: [analog.GR_CONST_WAVE, analog.GR_SIN_WAVE, analog.GR_COS_WAVE, analog.GR_SQR_WAVE, + analog.GR_TRI_WAVE, analog.GR_SAW_WAVE] + option_labels: [Constant, Sine, Cosine, Square, Triangle, Saw Tooth] +- id: freq + label: Frequency + dtype: real + default: '1000' +- id: amp + label: Amplitude + dtype: real + default: '1' +- id: offset + label: Offset + dtype: ${ type.offset_type } + default: '0' + +inputs: +- domain: message + id: freq + optional: true + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import analog + make: analog.sig_source_${type.fcn}(${samp_rate}, ${waveform}, ${freq}, ${amp}, + ${offset}) + callbacks: + - set_sampling_freq(${samp_rate}) + - set_waveform(${waveform}) + - set_frequency(${freq}) + - set_amplitude(${amp}) + - set_offset(${offset}) + +file_format: 1 |