<?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>