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