Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # auto-generated by grc.converter
- 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})
- cpp_templates:
- includes: '#include <gnuradio/analog/sig_source_${type.fcn}.h>'
- make: analog::sig_source_${type.fcn}::make(${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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement