<block>
<name>Options</name>
<key>options</key>
- <import>from gnuradio import gr
-#if $generate_options() == 'wx_gui'
+ <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() != 'hb'
from optparse import OptionParser
from gnuradio.eng_option import eng_option
-#end if
-</import>
+from gnuradio import eng_notation
+#end if</import>
<make></make>
- <callback>self.start($autostart)</callback>
+ <callback>if $run: self.start()
+else: self.stop(); self.wait()</callback>
<param>
<name>Title</name>
<key>title</key>
<hide>#if $generate_options() == 'hb' then 'none' else 'all'#</hide>
</param>
<param>
- <name>Autostart</name>
- <key>autostart</key>
+ <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() == 'wx_gui'
- #if str($autostart) == 'True'
-part#slurp
+ <hide>
+#if $generate_options() == 'wx_gui'
+ #if $run()
+ part
#else
-none#slurp
+ none
#end if
#else
-all#slurp
-#end if</hide>
+ all
+#end if
+ </hide>
<option>
- <name>Yes</name>
+ <name>Autostart</name>
<key>True</key>
</option>
<option>
- <name>No</name>
+ <name>Off</name>
<key>False</key>
</option>
</param>
Non-graphical flow graphs should avoid using graphical sinks or graphical variable controls.
In a graphical application, \
-autostart can be controlled by a variable to start and stop the flowgraph at runtime.
+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....