Options options from gnuradio import gr #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 if $run: self.start() else: self.stop(); self.wait() Title title string #if $title() then 'none' else 'part'# Author author string #if $author() then 'none' else 'part'# Description description string #if $description() then 'none' else 'part'# Window Size window_size 1280, 1024 int_vector part Generate Options generate_options wx_gui enum #if $generate_options() == 'wx_gui' then 'part' else 'none'# Category category Custom string #if $generate_options() == 'hb' then 'none' else 'all'# Run run True bool #if $generate_options() == 'wx_gui' #if str($run) == 'True' part#slurp #else none#slurp #end if #else all#slurp #end if Realtime Scheduling realtime_scheduling enum #if $generate_options() == 'hb' all#slurp #elif $realtime_scheduling() none#slurp #else part#slurp #end if len($window_size) == 2 300 <= $(window_size)[0] <= 4096 300 <= $(window_size)[1] <= 4096 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.