Advertisement
Guest User

analog_sig_source_x.block.yml

a guest
Aug 13th, 2017
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.74 KB | None | 0 0
  1. # auto-generated by grc.converter
  2.  
  3. id: analog_sig_source_x
  4. label: Signal Source
  5.  
  6. parameters:
  7. -   id: type
  8.     label: Output Type
  9.     dtype: enum
  10.     options: [complex, float, int, short]
  11.     option_attributes:
  12.         fcn: [c, f, i, s]
  13.         offset_type: [complex, real, int, int]
  14.     hide: part
  15. -   id: samp_rate
  16.     label: Sample Rate
  17.     dtype: real
  18.     default: samp_rate
  19. -   id: waveform
  20.     label: Waveform
  21.     dtype: int
  22.     default: analog.GR_COS_WAVE
  23.     options: [analog.GR_CONST_WAVE, analog.GR_SIN_WAVE, analog.GR_COS_WAVE, analog.GR_SQR_WAVE,
  24.         analog.GR_TRI_WAVE, analog.GR_SAW_WAVE]
  25.     option_labels: [Constant, Sine, Cosine, Square, Triangle, Saw Tooth]
  26. -   id: freq
  27.     label: Frequency
  28.     dtype: real
  29.     default: '1000'
  30. -   id: amp
  31.     label: Amplitude
  32.     dtype: real
  33.     default: '1'
  34. -   id: offset
  35.     label: Offset
  36.     dtype: ${ type.offset_type }
  37.     default: '0'
  38.  
  39. inputs:
  40. -   domain: message
  41.     id: freq
  42.     optional: true
  43.  
  44. outputs:
  45. -   domain: stream
  46.     dtype: ${ type }
  47.  
  48. templates:
  49.     imports: from gnuradio import analog
  50.     make: analog.sig_source_${type.fcn}(${samp_rate}, ${waveform}, ${freq}, ${amp},
  51.         ${offset})
  52.     callbacks:
  53.    - set_sampling_freq(${samp_rate})
  54.     - set_waveform(${waveform})
  55.     - set_frequency(${freq})
  56.     - set_amplitude(${amp})
  57.     - set_offset(${offset})
  58.  
  59. cpp_templates:
  60.     includes: '#include <gnuradio/analog/sig_source_${type.fcn}.h>'
  61.     make: analog::sig_source_${type.fcn}::make(${samp_rate}, ${waveform}, ${freq}, ${amp},
  62.         ${offset});
  63.     callbacks:
  64.    - set_sampling_freq(${samp_rate})
  65.     - set_waveform(${waveform})
  66.     - set_frequency(${freq})
  67.     - set_amplitude(${amp})
  68.     - set_offset(${offset})
  69.  
  70. file_format: 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement