- added callbacks for dynamic parameter change git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@535 b431acfa-c32f-4a4a-93f1-934dc6c82436
119 lines
2.9 KiB
XML
119 lines
2.9 KiB
XML
<?xml version="1.0"?>
|
|
<block>
|
|
<name>Jay's Peak Detector</name>
|
|
<key>jay_peak_detect</key>
|
|
<category>[jay]</category>
|
|
<import>import jay</import>
|
|
<make>jay.peak_detect($vlen, $framerate, $bandwidth, $fcenter, $peak_thresh, $peak_hysteresis, $peak_width_min, $peak_width_max, $alpha_s, $alpha_m)</make>
|
|
<callback>set_bandwidth($bandwidth)</callback>
|
|
<callback>set_centerFrequency($fcenter)</callback>
|
|
<callback>set_peakThresh($peak_thresh)</callback>
|
|
<callback>set_peakHysteresis($peak_hysteresis)</callback>
|
|
<callback>set_peakWidthMin($peak_width_min)</callback>
|
|
<callback>set_peakWidthMax($peak_width_max)</callback>
|
|
<!-- Make one 'param' node for every Parameter you want settable from the GUI.
|
|
Sub-nodes:
|
|
* name
|
|
* key (makes the value accessible as $keyname, e.g. in the make node)
|
|
* type -->
|
|
<param>
|
|
<name>Vector Length</name>
|
|
<key>vlen</key>
|
|
<value>1024</value>
|
|
<type>int</type>
|
|
</param>
|
|
<param>
|
|
<name>Frame Rate</name>
|
|
<key>framerate</key>
|
|
<value>30</value>
|
|
<type>float</type>
|
|
</param>
|
|
<param>
|
|
<name>Bandwidth (Hz)</name>
|
|
<key>bandwidth</key>
|
|
<value>samp_rate</value>
|
|
<type>float</type>
|
|
</param>
|
|
<param>
|
|
<name>Center Frequency (Hz)</name>
|
|
<key>fcenter</key>
|
|
<value>0</value>
|
|
<type>float</type>
|
|
</param>
|
|
<param>
|
|
<name>Peak Threshold [dB]</name>
|
|
<key>peak_thresh</key>
|
|
<value>20</value>
|
|
<type>float</type>
|
|
</param>
|
|
<param>
|
|
<name>Peak Hysteresis [dB]</name>
|
|
<key>peak_hysteresis</key>
|
|
<value>3</value>
|
|
<type>float</type>
|
|
</param>
|
|
<param>
|
|
<name>Peak BW Minimum [Hz]</name>
|
|
<key>peak_width_min</key>
|
|
<value>2000</value>
|
|
<type>float</type>
|
|
</param>
|
|
<param>
|
|
<name>Peak BW Maximum [Hz]</name>
|
|
<key>peak_width_max</key>
|
|
<value>3000</value>
|
|
<type>float</type>
|
|
</param>
|
|
<param>
|
|
<name>Alpha Short</name>
|
|
<key>alpha_s</key>
|
|
<value>0.2</value>
|
|
<type>float</type>
|
|
</param>
|
|
<param>
|
|
<name>Alpha Medium</name>
|
|
<key>alpha_m</key>
|
|
<value>0.04</value>
|
|
<type>float</type>
|
|
</param>
|
|
|
|
<!-- Make one 'sink' node per input. Sub-nodes:
|
|
* name (an identifier for the GUI)
|
|
* type
|
|
* vlen
|
|
* optional (set to 1 for optional inputs) -->
|
|
<sink>
|
|
<name>in</name>
|
|
<type>float</type>
|
|
<vlen>$vlen</vlen>
|
|
</sink>
|
|
<sink>
|
|
<name>control</name>
|
|
<type>message</type>
|
|
<optional>1</optional>
|
|
</sink>
|
|
|
|
<!-- Make one 'source' node per output. Sub-nodes:
|
|
* name (an identifier for the GUI)
|
|
* type
|
|
* vlen
|
|
* optional (set to 1 for optional inputs) -->
|
|
<source>
|
|
<name>out</name>
|
|
<type>float</type>
|
|
<vlen>$vlen</vlen>
|
|
<optional>1</optional>
|
|
</source>
|
|
<source>
|
|
<name>pbox</name>
|
|
<type>float</type>
|
|
<vlen>$vlen</vlen>
|
|
<optional>1</optional>
|
|
</source>
|
|
<source>
|
|
<name>status</name>
|
|
<type>message</type>
|
|
<optional>1</optional>
|
|
</source>
|
|
</block>
|