Imported Upstream version 3.2.2
[debian/gnuradio] / grc / blocks / options.xml
1 <?xml version="1.0"?>
2 <!--
3 ###################################################
4 ##Options Block:
5 ## options for window size,
6 ## and flow graph building.
7 ###################################################
8  -->
9 <block>
10         <name>Options</name>
11         <key>options</key>
12         <import>from gnuradio import gr
13 #if $generate_options() == 'wx_gui'
14 from grc_gnuradio import wxgui as grc_wxgui
15 import wx
16 #end if
17 #if $generate_options() != 'hb'
18 from optparse import OptionParser
19 from gnuradio.eng_option import eng_option
20 #end if
21 </import>
22         <make></make>
23         <callback>if $run: self.start()
24 else: self.stop(); self.wait()</callback>
25         <param>
26                 <name>Title</name>
27                 <key>title</key>
28                 <value></value>
29                 <type>string</type>
30                 <hide>#if $title() then 'none' else 'part'#</hide>
31         </param>
32         <param>
33                 <name>Author</name>
34                 <key>author</key>
35                 <value></value>
36                 <type>string</type>
37                 <hide>#if $author() then 'none' else 'part'#</hide>
38         </param>
39         <param>
40                 <name>Description</name>
41                 <key>description</key>
42                 <value></value>
43                 <type>string</type>
44                 <hide>#if $description() then 'none' else 'part'#</hide>
45         </param>
46         <param>
47                 <name>Window Size</name>
48                 <key>window_size</key>
49                 <value>1280, 1024</value>
50                 <type>int_vector</type>
51                 <hide>part</hide>
52         </param>
53         <param>
54                 <name>Generate Options</name>
55                 <key>generate_options</key>
56                 <value>wx_gui</value>
57                 <type>enum</type>
58                 <hide>#if $generate_options() == 'wx_gui' then 'part' else 'none'#</hide>
59                 <option>
60                         <name>WX GUI</name>
61                         <key>wx_gui</key>
62                 </option>
63                 <option>
64                         <name>No GUI</name>
65                         <key>no_gui</key>
66                 </option>
67                 <option>
68                         <name>Hier Block</name>
69                         <key>hb</key>
70                 </option>
71         </param>
72         <param>
73                 <name>Category</name>
74                 <key>category</key>
75                 <value>Custom</value>
76                 <type>string</type>
77                 <hide>#if $generate_options() == 'hb' then 'none' else 'all'#</hide>
78         </param>
79         <param>
80                 <name>Run</name>
81                 <key>run</key>
82                 <value>True</value>
83                 <type>bool</type>
84                 <hide>#if $generate_options() == 'wx_gui'
85         #if str($run) == 'True'
86 part#slurp
87         #else
88 none#slurp
89         #end if
90 #else
91 all#slurp
92 #end if</hide>
93                 <option>
94                         <name>Autostart</name>
95                         <key>True</key>
96                 </option>
97                 <option>
98                         <name>Off</name>
99                         <key>False</key>
100                 </option>
101         </param>
102         <param>
103                 <name>Realtime Scheduling</name>
104                 <key>realtime_scheduling</key>
105                 <value></value>
106                 <type>enum</type>
107                 <hide>#if $generate_options() == 'hb'
108 all#slurp
109 #elif $realtime_scheduling()
110 none#slurp
111 #else
112 part#slurp
113 #end if</hide>
114                 <option>
115                         <name>Off</name>
116                         <key></key>
117                 </option>
118                 <option>
119                         <name>On</name>
120                         <key>1</key>
121                 </option>
122         </param>
123         <check>len($window_size) == 2</check>
124         <check>300 &lt;= $(window_size)[0] &lt;= 4096</check>
125         <check>300 &lt;= $(window_size)[1] &lt;= 4096</check>
126         <doc>
127 The options block sets special parameters for the flow graph. \
128 Only one option block is allowed per flow graph.
129
130 Title, author, and description parameters are for identification purposes.
131
132 The window size controls the dimensions of the flow graph editor. \
133 The window size (width, height) must be between (300, 300) and (4096, 4096).
134
135 The generate options controls the type of code generated. \
136 Non-graphical flow graphs should avoid using graphical sinks or graphical variable controls.
137
138 In a graphical application, \
139 run can be controlled by a variable to start and stop the flowgraph at runtime.
140
141 The id of this block determines the name of the generated file and the name of the class. \
142 For example, an id of my_block will generate the file my_block.py and class my_block(gr....
143
144 The category parameter determines the placement of the block in the block selection window. \
145 The category only applies when creating hier blocks. \
146 To put hier blocks into the root category, enter / for the category.
147         </doc>
148 </block>