Modified type parser to allow blank values in vector types as empty vectors.
gain_mu=$gain_mu,
symbol_rate=$symbol_rate,
omega_limit=$omega_limit,
+#if $win_size()
+ size=$win_size,
+#end if
)
#if not $grid_pos()
$(parent).Add(self.$(id).win)
<value>0.005</value>
<type>real</type>
</param>
+ <param>
+ <name>Window Size</name>
+ <key>win_size</key>
+ <value></value>
+ <type>int_vector</type>
+ <hide>#if $win_size() then 'none' else 'part'#</hide>
+ </param>
<param>
<name>Grid Position</name>
<key>grid_pos</key>
<value></value>
<type>notebook</type>
</param>
+ <check>not $win_size or len($win_size) == 2</check>
<sink>
<name>in</name>
<type>complex</type>
</sink>
<doc>
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
title=$title,
peak_hold=$peak_hold,
+#if $win_size()
+ size=$win_size,
+#end if
)
#if not $grid_pos()
$(parent).Add(self.$(id).win)
<type>real</type>
<hide>#if $average() == 'True' then 'none' else 'all'#</hide>
</param>
+ <param>
+ <name>Window Size</name>
+ <key>win_size</key>
+ <value></value>
+ <type>int_vector</type>
+ <hide>#if $win_size() then 'none' else 'part'#</hide>
+ </param>
<param>
<name>Grid Position</name>
<key>grid_pos</key>
<value></value>
<type>notebook</type>
</param>
+ <check>not $win_size or len($win_size) == 2</check>
<sink>
<name>in</name>
<type>$type</type>
<doc>
Set Average Alpha to 0 for automatic setting.
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
title=$title,
num_bins=$num_bins,
frame_size=$frame_size,
+#if $win_size()
+ size=$win_size,
+#end if
)
#if not $grid_pos()
$(parent).Add(self.$(id).win)
<value>1000</value>
<type>int</type>
</param>
+ <param>
+ <name>Window Size</name>
+ <key>win_size</key>
+ <value></value>
+ <type>int_vector</type>
+ <hide>#if $win_size() then 'none' else 'part'#</hide>
+ </param>
<param>
<name>Grid Position</name>
<key>grid_pos</key>
<value></value>
<type>notebook</type>
</param>
+ <check>not $win_size or len($win_size) == 2</check>
<sink>
<name>in</name>
<type>float</type>
</sink>
<doc>
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
label=$title,
peak_hold=$peak_hold,
show_gauge=$show_gauge,
+#if $win_size()
+ size=$win_size,
+#end if
)
#if not $grid_pos()
$(parent).Add(self.$(id).win)
<key>False</key>
</option>
</param>
+ <param>
+ <name>Window Size</name>
+ <key>win_size</key>
+ <value></value>
+ <type>int_vector</type>
+ <hide>#if $win_size() then 'none' else 'part'#</hide>
+ </param>
<param>
<name>Grid Position</name>
<key>grid_pos</key>
<value></value>
<type>notebook</type>
</param>
+ <check>not $win_size or len($win_size) == 2</check>
<sink>
<name>in</name>
<type>$type</type>
<doc>
Set Average Alpha to 0 for automatic setting.
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
ac_couple=$ac_couple,
xy_mode=$xy_mode,
num_inputs=$num_inputs,
+#if $win_size()
+ size=$win_size,
+#end if
)
#if not $grid_pos()
$(parent).Add(self.$(id).win)
<value>1</value>
<type>int</type>
</param>
+ <param>
+ <name>Window Size</name>
+ <key>win_size</key>
+ <value></value>
+ <type>int_vector</type>
+ <hide>#if $win_size() then 'none' else 'part'#</hide>
+ </param>
<param>
<name>Grid Position</name>
<key>grid_pos</key>
<value></value>
<type>notebook</type>
</param>
+ <check>not $win_size or len($win_size) == 2</check>
<check>not $xy_mode or '$type' == 'complex' or $num_inputs != 1</check>
<sink>
<name>in</name>
XY Mode allows the scope to initialize as an XY plotter.
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
average=$options.average,
avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
title=$title,
+#if $win_size()
+ size=$win_size,
+#end if
)
#if not $grid_pos()
$(parent).Add(self.$(id).win)
<opt>average:True</opt>
</option>
</param>
+ <param>
+ <name>Window Size</name>
+ <key>win_size</key>
+ <value></value>
+ <type>int_vector</type>
+ <hide>#if $win_size() then 'none' else 'part'#</hide>
+ </param>
<param>
<name>Grid Position</name>
<key>grid_pos</key>
<value></value>
<type>notebook</type>
</param>
+ <check>not $win_size or len($win_size) == 2</check>
<sink>
<name>in</name>
<type>$type</type>
<doc>
Set Average Alpha to 0 for automatic setting.
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
#########################
# Numeric Types
#########################
- elif t in ('raw', 'complex', 'real', 'int', 'complex_vector', 'real_vector', 'int_vector', 'hex', 'bool'):
+ elif t in ('raw', 'complex', 'real', 'int', 'hex', 'bool'):
#raise exception if python cannot evaluate this value
try: e = self.get_parent().get_parent().evaluate(v)
except Exception, e: raise Exception, 'Value "%s" cannot be evaluated:\n%s'%(v, e)
try: assert isinstance(e, INT_TYPES)
except AssertionError: raise Exception, 'Expression "%s" is invalid for type integer.'%str(e)
return e
- #########################
- # Numeric Vector Types
- #########################
- elif t == 'complex_vector':
+ elif t == 'hex': return hex(e)
+ elif t == 'bool':
+ try: assert isinstance(e, bool)
+ except AssertionError: raise Exception, 'Expression "%s" is invalid for type bool.'%str(e)
+ return e
+ else: raise TypeError, 'Type "%s" not handled'%t
+ #########################
+ # Numeric Vector Types
+ #########################
+ elif t in ('complex_vector', 'real_vector', 'int_vector'):
+ if not v: v = '()' #turn a blank string into an empty list, so it will eval
+ #raise exception if python cannot evaluate this value
+ try: e = self.get_parent().get_parent().evaluate(v)
+ except Exception, e: raise Exception, 'Value "%s" cannot be evaluated:\n%s'%(v, e)
+ #raise an exception if the data is invalid
+ if t == 'complex_vector':
if not isinstance(e, VECTOR_TYPES):
self._lisitify_flag = True
e = [e]
for ei in e: assert isinstance(ei, INT_TYPES)
except AssertionError: raise Exception, 'Expression "%s" is invalid for type integer vector.'%str(e)
return e
- elif t == 'hex': return hex(e)
- elif t == 'bool':
- try: assert isinstance(e, bool)
- except AssertionError: raise Exception, 'Expression "%s" is invalid for type bool.'%str(e)
- return e
- else: raise TypeError, 'Type "%s" not handled'%t
#########################
# String Types
#########################