summaryrefslogtreecommitdiff
path: root/gr-wxgui/grc/wxgui_fftsink2.xml
blob: 9b35ab848fa0f5433ca4e86af4aaaf2b66e2cb15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<?xml version="1.0"?>
<!--
###################################################
##FFT Sink
###################################################
 -->
<block>
	<name>WX GUI FFT Sink</name>
	<key>wxgui_fftsink2</key>
	<category>WX GUI Widgets</category>
	<import>from gnuradio import window</import>
	<import>from gnuradio.wxgui import fftsink2</import>
	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
fftsink2.$(type.fcn)(
	$(parent).GetWin(),
	baseband_freq=$baseband_freq,
	y_per_div=$y_per_div,
	y_divs=$y_divs,
	ref_level=$ref_level,
	ref_scale=$ref_scale,
	sample_rate=$samp_rate,
	fft_size=$fft_size,
	fft_rate=$fft_rate,
	average=$average,
	avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
	title=$title,
	peak_hold=$peak_hold,
#if $win()
	win=$win,
#end if
#if $win_size()
	size=$win_size,
#end if
)
#if not $grid_pos()
$(parent).Add(self.$(id).win)
#else
$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
#end if</make>
	<callback>set_baseband_freq($baseband_freq)</callback>
	<callback>set_sample_rate($samp_rate)</callback>
	<param>
		<name>Type</name>
		<key>type</key>
		<value>complex</value>
		<type>enum</type>
		<option>
			<name>Complex</name>
			<key>complex</key>
			<opt>fcn:fft_sink_c</opt>
		</option>
		<option>
			<name>Float</name>
			<key>float</key>
			<opt>fcn:fft_sink_f</opt>
		</option>
	</param>
	<param>
		<name>Title</name>
		<key>title</key>
		<value>FFT Plot</value>
		<type>string</type>
	</param>
	<param>
		<name>Sample Rate</name>
		<key>samp_rate</key>
		<value>samp_rate</value>
		<type>real</type>
	</param>
	<param>
		<name>Baseband Freq</name>
		<key>baseband_freq</key>
		<value>0</value>
		<type>real</type>
	</param>
	<param>
		<name>Y per Div</name>
		<key>y_per_div</key>
		<value>10</value>
		<type>enum</type>
		<option>
			<name>1 dB</name>
			<key>1</key>
		</option>
		<option>
			<name>2 dB</name>
			<key>2</key>
		</option>
		<option>
			<name>5 dB</name>
			<key>5</key>
		</option>
		<option>
			<name>10 dB</name>
			<key>10</key>
		</option>
		<option>
			<name>20 dB</name>
			<key>20</key>
		</option>
	</param>
	<param>
		<name>Y Divs</name>
		<key>y_divs</key>
		<value>10</value>
		<type>int</type>
	</param>
	<param>
		<name>Ref Level (dB)</name>
		<key>ref_level</key>
		<value>50</value>
		<type>real</type>
	</param>
	<param>
		<name>Ref Scale (p2p)</name>
		<key>ref_scale</key>
		<value>2.0</value>
		<type>real</type>
	</param>
	<param>
		<name>FFT Size</name>
		<key>fft_size</key>
		<value>1024</value>
		<type>int</type>
	</param>
	<param>
		<name>Refresh Rate</name>
		<key>fft_rate</key>
		<value>30</value>
		<type>int</type>
	</param>
	<param>
		<name>Peak Hold</name>
		<key>peak_hold</key>
		<value>False</value>
		<type>enum</type>
		<hide>#if $peak_hold() == 'True' then 'none' else 'part'#</hide>
		<option>
			<name>On</name>
			<key>True</key>
		</option>
		<option>
			<name>Off</name>
			<key>False</key>
		</option>
	</param>
	<param>
		<name>Average</name>
		<key>average</key>
		<value>False</value>
		<type>enum</type>
		<hide>part</hide>
		<option>
			<name>On</name>
			<key>True</key>
		</option>
		<option>
			<name>Off</name>
			<key>False</key>
		</option>
	</param>
	<param>
		<name>Average Alpha</name>
		<key>avg_alpha</key>
		<value>0</value>
		<type>real</type>
		<hide>#if $average() == 'True' then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Window</name>
		<key>win</key>
		<value>None</value>
		<type>raw</type>
		<hide>#if $win() is None then 'part' else 'none'#</hide>
		<option>
			<name>Automatic</name>
			<key>None</key>
		</option>
		<option>
			<name>Blackman-Harris</name>
			<key>window.blackmanharris</key>
		</option>
		<option>
			<name>Hamming</name>
			<key>window.hamming</key>
		</option>
		<option>
			<name>Hanning</name>
			<key>window.hanning</key>
		</option>
		<option>
			<name>Rectangular</name>
			<key>window.rectangular</key>
		</option>
		<option>
			<name>Flattop</name>
			<key>window.flattop</key>
		</option>
	</param>
	<param>
		<name>Window Size</name>
		<key>win_size</key>
		<value></value>
		<type>int_vector</type>
		<hide>#if $win_size() then 'none' else 'part'#</hide>
	</param>
	<param>
		<name>Grid Position</name>
		<key>grid_pos</key>
		<value></value>
		<type>grid_pos</type>
	</param>
	<param>
		<name>Notebook</name>
		<key>notebook</key>
		<value></value>
		<type>notebook</type>
	</param>
	<check>not $win_size or len($win_size) == 2</check>
	<sink>
		<name>in</name>
		<type>$type</type>
	</sink>
	<doc>
Set Average Alpha to 0 for automatic setting.

Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.

Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.

Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
	</doc>
</block>