Options options from gnuradio import gr from gnuradio.gr import firdes #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 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 Category category Custom string #if $generate_options() == 'hb' then 'none' else 'all'# Run Options run_options prompt enum #if $generate_options() == 'no_gui' then 'none' else 'all'# Run run True bool #if $generate_options() in ('qt_gui', 'wx_gui') #if $run() part #else none #end if #else all #end if Max Number of Output max_nouts 0 int #if $generate_options() == 'hb' all#slurp #elif $max_nouts() none#slurp #else part#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. The Max Number of Output is the maximum number of output items allowed for any block \ in the flowgraph; to disable this set the max_nouts equal to 0.\ Use this to adjust the maximum latency a flowgraph can exhibit.