blob: b27ea900ccb31fbf36cdb1860ceb2d4187b416f2 (
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
|
<?xml version="1.0"?>
<!--
###################################################
##Options Block:
## options for window size,
## and flow graph building.
###################################################
-->
<block>
<name>Options</name>
<key>options</key>
<import>from gnuradio import gr</import>
<import>from gnuradio.gr import firdes</import>
<import>#if $generate_options() == 'wx_gui'
from grc_gnuradio import wxgui as grc_wxgui
import wx
#end if
#if $generate_options() == 'qt_gui'
from PyQt4 import Qt
import sys
#end if
#if $generate_options() != 'hb'
from optparse import OptionParser
from gnuradio.eng_option import eng_option
from gnuradio import eng_notation
#end if</import>
<make></make>
<callback>if $run: self.start()
else: self.stop(); self.wait()</callback>
<param>
<name>Title</name>
<key>title</key>
<value></value>
<type>string</type>
<hide>#if $title() then 'none' else 'part'#</hide>
</param>
<param>
<name>Author</name>
<key>author</key>
<value></value>
<type>string</type>
<hide>#if $author() then 'none' else 'part'#</hide>
</param>
<param>
<name>Description</name>
<key>description</key>
<value></value>
<type>string</type>
<hide>#if $description() then 'none' else 'part'#</hide>
</param>
<param>
<name>Window Size</name>
<key>window_size</key>
<value>1280, 1024</value>
<type>int_vector</type>
<hide>part</hide>
</param>
<param>
<name>Generate Options</name>
<key>generate_options</key>
<value>wx_gui</value>
<type>enum</type>
<option>
<name>WX GUI</name>
<key>wx_gui</key>
</option>
<option>
<name>QT GUI</name>
<key>qt_gui</key>
</option>
<option>
<name>No GUI</name>
<key>no_gui</key>
</option>
<option>
<name>Hier Block</name>
<key>hb</key>
</option>
</param>
<param>
<name>Category</name>
<key>category</key>
<value>Custom</value>
<type>string</type>
<hide>#if $generate_options() == 'hb' then 'none' else 'all'#</hide>
</param>
<param>
<name>Run Options</name>
<key>run_options</key>
<value>prompt</value>
<type>enum</type>
<hide>#if $generate_options() == 'no_gui' then 'none' else 'all'#</hide>
<option>
<name>Run to Completion</name>
<key>run</key>
</option>
<option>
<name>Prompt for Exit</name>
<key>prompt</key>
</option>
</param>
<param>
<name>Run</name>
<key>run</key>
<value>True</value>
<type>bool</type>
<hide>
#if $generate_options() in ('qt_gui', 'wx_gui')
#if $run()
part
#else
none
#end if
#else
all
#end if
</hide>
<option>
<name>Autostart</name>
<key>True</key>
</option>
<option>
<name>Off</name>
<key>False</key>
</option>
</param>
<param>
<name>Realtime Scheduling</name>
<key>realtime_scheduling</key>
<value></value>
<type>enum</type>
<hide>#if $generate_options() == 'hb'
all#slurp
#elif $realtime_scheduling()
none#slurp
#else
part#slurp
#end if</hide>
<option>
<name>Off</name>
<key></key>
</option>
<option>
<name>On</name>
<key>1</key>
</option>
</param>
<check>len($window_size) == 2</check>
<check>300 <= $(window_size)[0] <= 4096</check>
<check>300 <= $(window_size)[1] <= 4096</check>
<doc>
The options block sets special parameters for the flow graph. \
Only one option block is allowed per flow graph.
Title, author, and description parameters are for identification purposes.
The window size controls the dimensions of the flow graph editor. \
The window size (width, height) must be between (300, 300) and (4096, 4096).
The generate options controls the type of code generated. \
Non-graphical flow graphs should avoid using graphical sinks or graphical variable controls.
In a graphical application, \
run can be controlled by a variable to start and stop the flowgraph at runtime.
The id of this block determines the name of the generated file and the name of the class. \
For example, an id of my_block will generate the file my_block.py and class my_block(gr....
The category parameter determines the placement of the block in the block selection window. \
The category only applies when creating hier blocks. \
To put hier blocks into the root category, enter / for the category.
</doc>
</block>
|