commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10137 - in gnuradio/branches/developers/n4hy/pfb_fbs/


From: n4hy
Subject: [Commit-gnuradio] r10137 - in gnuradio/branches/developers/n4hy/pfb_fbs/grc: . data/platforms/python data/platforms/python/blocks examples examples/audio examples/simple examples/trellis examples/usrp examples/xmlrpc scripts src/grc_gnuradio/blks2 src/grc_gnuradio/wxgui src/gui src/platforms/base src/platforms/gui src/platforms/python
Date: Fri, 19 Dec 2008 19:37:07 -0700 (MST)

Author: n4hy
Date: 2008-12-19 19:37:07 -0700 (Fri, 19 Dec 2008)
New Revision: 10137

Added:
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_descrambler_bb.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_density_b.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_scrambler_bb.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/probe_function.xml
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/Makefile.am
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/interference_cancellation.grc
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/readme.txt
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/probe.py
Removed:
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/preferences.xml
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/Makefile.am
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/interference_cancellation.grc
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/readme.txt
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/queue.py
Modified:
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/block_tree.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/Makefile.am
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/blks2_selector.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_float_to_char.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/random_source_x.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_metrics_x.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_viterbi_combined_xx.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_viterbi_x.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/variable_sink.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/variable_slider.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/flow_graph.tmpl
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/Makefile.am
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/audio/Makefile.am
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/simple/Makefile.am
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/usrp/Makefile.am
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/xmlrpc/Makefile.am
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/scripts/grc
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/Makefile.am
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/__init__.py
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/selector.py
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/wxgui/callback_controls.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/ActionHandler.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Actions.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Bars.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/BlockTreeWindow.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Constants.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Dialogs.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/FileDialogs.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/NotebookPage.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Preferences.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Block.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Makefile.am
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Param.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Platform.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Block.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Connection.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/FlowGraph.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Param.py
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Generator.py
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Makefile.am
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Param.py
   
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Platform.py
   gnuradio/branches/developers/n4hy/pfb_fbs/grc/todo.txt
Log:
Bringing up to date with trunk

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/block_tree.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/block_tree.xml
  2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/block_tree.xml
  2008-12-20 02:37:07 UTC (rev 10137)
@@ -129,6 +129,9 @@
                <block>gr_pn_correlator_cc</block>
                <block>gr_simple_correlator</block>
                <block>gr_simple_framer</block>
+
+               <block>blks2_packet_decoder</block>
+               <block>blks2_packet_encoder</block>
        </cat>
        <cat>
                <name>Level Controls</name>
@@ -214,24 +217,33 @@
        </cat>
        <cat>
                <name>Error Correction</name>
+               <cat>
+                       <name>Trellis</name>
+                       <block>trellis_encoder_xx</block>
+                       <block>trellis_metrics_x</block>
+                       <block>trellis_permutation</block>
+                       <block>trellis_siso_combined_f</block>
+                       <block>trellis_siso_f</block>
+                       <block>trellis_viterbi_combined_xx</block>
+                       <block>trellis_viterbi_x</block>
+               </cat>
 
-               <block>blks2_packet_decoder</block>
-               <block>blks2_packet_encoder</block>
-
                <block>gr_encode_ccsds_27_bb</block>
                <block>gr_decode_ccsds_27_fb</block>
        </cat>
        <cat>
-               <name>Trellis</name>
-               <block>trellis_encoder_xx</block>
-               <block>trellis_metrics_x</block>
-               <block>trellis_permutation</block>
-               <block>trellis_siso_combined_f</block>
-               <block>trellis_siso_f</block>
-               <block>trellis_viterbi_combined_xx</block>
-               <block>trellis_viterbi_x</block>
+               <name>Line Coding</name>
+               <block>gr_scrambler_bb</block>
+               <block>gr_descrambler_bb</block>
        </cat>
        <cat>
+               <name>Probes</name>
+               <block>gr_probe_avg_mag_sqrd_x</block>
+               <block>gr_probe_density_b</block>
+               <block>gr_probe_mpsk_snr_c</block>
+               <block>probe_function</block>
+       </cat>
+       <cat>
                <name>USRP</name>
                <block>usrp_simple_source_x</block>
                <block>usrp_simple_sink_x</block>

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/Makefile.am
      2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/Makefile.am
      2008-12-20 02:37:07 UTC (rev 10137)
@@ -82,6 +82,7 @@
        gr_decode_ccsds_27_fb.xml \
        gr_deinterleave.xml \
        gr_delay.xml \
+       gr_descrambler_bb.xml \
        gr_diff_decoder_bb.xml \
        gr_diff_encoder_bb.xml \
        gr_diff_phasor_cc.xml \
@@ -137,12 +138,16 @@
        gr_pll_freqdet_cf.xml \
        gr_pll_refout_cc.xml \
        gr_pn_correlator_cc.xml \
+       gr_probe_avg_mag_sqrd_x.xml \
+       gr_probe_density_b.xml \
+       gr_probe_mpsk_snr_c.xml \
        gr_pwr_squelch_xx.xml \
        gr_quadrature_demod_cf.xml \
        gr_rational_resampler_base_xxx.xml \
        gr_repeat.xml \
        gr_rms_xx.xml \
        gr_sample_and_hold_xx.xml \
+       gr_scrambler_bb.xml \
        gr_short_to_float.xml \
        gr_sig_source_x.xml \
        gr_simple_correlator.xml \
@@ -178,7 +183,7 @@
        pad_sink.xml \
        pad_source.xml \
        parameter.xml \
-       preferences.xml \
+       probe_function.xml \
        random_source_x.xml \
        trellis_encoder_xx.xml \
        trellis_metrics_x.xml \

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/blks2_selector.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/blks2_selector.xml
       2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/blks2_selector.xml
       2008-12-20 02:37:07 UTC (rev 10137)
@@ -16,8 +16,8 @@
        input_index=$input_index,
        output_index=$output_index,
 )</make>
-       <callback>set_input_index($input_index)</callback>
-       <callback>set_output_index($output_index)</callback>
+       <callback>set_input_index(int($input_index))</callback>
+       <callback>set_output_index(int($output_index))</callback>
        <param>
                <name>Type</name>
                <key>type</key>

Copied: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_descrambler_bb.xml
 (from rev 10133, 
gnuradio/trunk/grc/data/platforms/python/blocks/gr_descrambler_bb.xml)
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_descrambler_bb.xml
                            (rev 0)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_descrambler_bb.xml
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Descrambler
+###################################################
+ -->
+<block>
+       <name>Descrambler</name>
+       <key>gr_descrambler_bb</key>
+       <import>from gnuradio import gr</import>
+       <make>gr.descrambler_bb($mask, $seed, $len)</make>
+       <param>
+               <name>Mask</name>
+               <key>mask</key>
+               <value>0x8A</value>
+               <type>hex</type>
+       </param>
+       <param>
+               <name>Seed</name>
+               <key>seed</key>
+               <value>0x7F</value>
+               <type>hex</type>
+       </param>
+       <param>
+               <name>Length</name>
+               <key>len</key>
+               <value>7</value>
+               <type>int</type>
+       </param>
+       <sink>
+               <name>in</name>
+               <type>byte</type>
+       </sink>
+       <source>
+               <name>out</name>
+               <type>byte</type>
+       </source>
+</block>

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_float_to_char.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_float_to_char.xml
     2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_float_to_char.xml
     2008-12-20 02:37:07 UTC (rev 10137)
@@ -8,7 +8,7 @@
        <name>Float To Char</name>
        <key>gr_float_to_char</key>
        <import>from gnuradio import gr</import>
-       <make>gr.gr_float_to_char()</make>
+       <make>gr.float_to_char()</make>
        <sink>
                <name>in</name>
                <type>float</type>

Copied: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml
 (from rev 10133, 
gnuradio/trunk/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml)
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml
                              (rev 0)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml
      2008-12-20 02:37:07 UTC (rev 10137)
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Probe Average Magnitude Squared
+###################################################
+ -->
+<block>
+       <name>Probe Avg Mag^2</name>
+       <key>gr_probe_avg_mag_sqrd_x</key>
+       <import>from grc_gnuradio import blks2 as grc_blks2</import>
+       <make>grc_blks2.probe_avg_mag_sqrd_$(type)(
+       threshold=$threshold,
+       alpha=$alpha,
+       probe_rate=$probe_rate,
+)</make>
+       <callback>set_alpha($alpha)</callback>
+       <callback>set_threshold($threshold)</callback>
+       <callback>set_probe_rate($probe_rate)</callback>
+       <param>
+               <name>Type</name>
+               <key>type</key>
+               <type>enum</type>
+               <option>
+                       <name>Complex</name>
+                       <key>c</key>
+                       <opt>input:complex</opt>
+               </option>
+               <option>
+                       <name>Float</name>
+                       <key>f</key>
+                       <opt>input:float</opt>
+               </option>
+       </param>
+       <param>
+               <name>Threshold (dB)</name>
+               <key>threshold</key>
+               <value>0</value>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Alpha</name>
+               <key>alpha</key>
+               <value>1</value>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Probe Rate</name>
+               <key>probe_rate</key>
+               <value>10</value>
+               <type>real</type>
+       </param>
+       <sink>
+               <name>in</name>
+               <type>$type.input</type>
+       </sink>
+       <source>
+               <name>out</name>
+               <type>float</type>
+       </source>
+</block>

Copied: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_density_b.xml
 (from rev 10133, 
gnuradio/trunk/grc/data/platforms/python/blocks/gr_probe_density_b.xml)
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_density_b.xml
                           (rev 0)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_density_b.xml
   2008-12-20 02:37:07 UTC (rev 10137)
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Probe Density
+###################################################
+ -->
+<block>
+       <name>Probe Density</name>
+       <key>gr_probe_density_b</key>
+       <import>from grc_gnuradio import blks2 as grc_blks2</import>
+       <make>grc_blks2.probe_density_b(
+       alpha=$alpha,
+       probe_rate=$probe_rate,
+)</make>
+       <callback>set_alpha($alpha)</callback>
+       <callback>set_probe_rate($probe_rate)</callback>
+       <param>
+               <name>Alpha</name>
+               <key>alpha</key>
+               <value>1</value>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Probe Rate</name>
+               <key>probe_rate</key>
+               <value>10</value>
+               <type>real</type>
+       </param>
+       <sink>
+               <name>in</name>
+               <type>byte</type>
+       </sink>
+       <source>
+               <name>out</name>
+               <type>float</type>
+       </source>
+</block>

Copied: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml
 (from rev 10133, 
gnuradio/trunk/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml)
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml
                          (rev 0)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml
  2008-12-20 02:37:07 UTC (rev 10137)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Probe MPSK SNR
+###################################################
+ -->
+<block>
+       <name>Probe MPSK SNR</name>
+       <key>gr_probe_mpsk_snr_c</key>
+       <import>from grc_gnuradio import blks2 as grc_blks2</import>
+       <make>grc_blks2.probe_mpsk_snr_c(
+       type=&quot;$type&quot;,
+       alpha=$alpha,
+       probe_rate=$probe_rate,
+)</make>
+       <callback>set_alpha($alpha)</callback>
+       <callback>set_probe_rate($probe_rate)</callback>
+       <param>
+               <name>Type</name>
+               <key>type</key>
+               <type>enum</type>
+               <option>
+                       <name>SNR</name>
+                       <key>snr</key>
+               </option>
+               <option>
+                       <name>Signal Mean</name>
+                       <key>signal_mean</key>
+               </option>
+               <option>
+                       <name>Noise Variance</name>
+                       <key>noise_variance</key>
+               </option>
+       </param>
+       <param>
+               <name>Alpha</name>
+               <key>alpha</key>
+               <value>1</value>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Probe Rate</name>
+               <key>probe_rate</key>
+               <value>10</value>
+               <type>real</type>
+       </param>
+       <sink>
+               <name>in</name>
+               <type>complex</type>
+       </sink>
+       <source>
+               <name>out</name>
+               <type>float</type>
+       </source>
+</block>

Copied: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_scrambler_bb.xml
 (from rev 10133, 
gnuradio/trunk/grc/data/platforms/python/blocks/gr_scrambler_bb.xml)
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_scrambler_bb.xml
                              (rev 0)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/gr_scrambler_bb.xml
      2008-12-20 02:37:07 UTC (rev 10137)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Descrambler
+###################################################
+ -->
+<block>
+       <name>Scrambler</name>
+       <key>gr_scrambler_bb</key>
+       <import>from gnuradio import gr</import>
+       <make>gr.scrambler_bb($mask, $seed, $len)</make>
+       <param>
+               <name>Mask</name>
+               <key>mask</key>
+               <value>0x8A</value>
+               <type>hex</type>
+       </param>
+       <param>
+               <name>Seed</name>
+               <key>seed</key>
+               <value>0x7F</value>
+               <type>hex</type>
+       </param>
+       <param>
+               <name>Length</name>
+               <key>len</key>
+               <value>7</value>
+               <type>int</type>
+       </param>
+       <sink>
+               <name>in</name>
+               <type>byte</type>
+       </sink>
+       <source>
+               <name>out</name>
+               <type>byte</type>
+       </source>
+</block>

Deleted: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/preferences.xml

Copied: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/probe_function.xml
 (from rev 10133, 
gnuradio/trunk/grc/data/platforms/python/blocks/probe_function.xml)
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/probe_function.xml
                               (rev 0)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/probe_function.xml
       2008-12-20 02:37:07 UTC (rev 10137)
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Probe Function
+###################################################
+ -->
+<block>
+       <name>Probe Function</name>
+       <key>probe_function</key>
+       <import>from grc_gnuradio import blks2 as grc_blks2</import>
+       <make>grc_blks2.probe_function(
+       probe_callback=self.$(block_id.eval).$(function_name.eval),
+       probe_rate=$probe_rate,
+)</make>
+       <callback>set_probe_rate($probe_rate)</callback>
+       <param>
+               <name>Block ID</name>
+               <key>block_id</key>
+               <value>my_block_0</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>Function Name</name>
+               <key>function_name</key>
+               <value>get_number</value>
+               <type>string</type>
+       </param>
+       <param>
+               <name>Probe Rate</name>
+               <key>probe_rate</key>
+               <value>10</value>
+               <type>real</type>
+       </param>
+       <source>
+               <name>out</name>
+               <type>float</type>
+       </source>
+       <doc>
+Polls a function of an arbitrary block and writes the value to the output 
port. \
+The block id is the id of another block in the flow graph. \
+The function name is the name of a function in the said block. \
+The function should take no arguments and return a floating point or integer 
number.
+       </doc>
+</block>

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/random_source_x.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/random_source_x.xml
      2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/random_source_x.xml
      2008-12-20 02:37:07 UTC (rev 10137)
@@ -40,7 +40,7 @@
        <param>
                <name>Maximum</name>
                <key>max</key>
-               <value>1</value>
+               <value>2</value>
                <type>int</type>
        </param>
        <param>
@@ -69,5 +69,7 @@
        </source>
        <doc>
 Generate num samples of random numbers of [min, max). Repeat samples if 
specified.
+
+Ex: With min=0 and max=2, the sequence 01110101... will be generated.
        </doc>
 </block>

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_metrics_x.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_metrics_x.xml
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_metrics_x.xml
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -9,6 +9,7 @@
        <key>trellis_metrics_x</key>
        <import>from gnuradio import trellis</import>
        <make>trellis.metrics_$(type)($card, $dim, $table, $metric_type)</make>
+       <callback>set_TABLE($table)</callback>
        <param>
                <name>Type</name>
                <key>type</key>
@@ -76,7 +77,7 @@
        </sink>
        <source>
                <name>out</name>
-               <type>$type.io</type>
+               <type>float</type>
        </source>
        <doc>
 Generate metrics required for Viterbi or SISO algorithms.

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_viterbi_combined_xx.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_viterbi_combined_xx.xml
  2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_viterbi_combined_xx.xml
  2008-12-20 02:37:07 UTC (rev 10137)
@@ -9,6 +9,7 @@
        <key>trellis_viterbi_combined_xx</key>
        <import>from gnuradio import trellis</import>
        
<make>trellis.viterbi_combined_$(type)$(out_type)(trellis.fsm($fsm_args), 
$block_size, $init_state, $final_state, $dim, $table, $metric_type)</make>
+        <callback>set_TABLE($table)</callback>
        <param>
                <name>Input Type</name>
                <key>type</key>

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_viterbi_x.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_viterbi_x.xml
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/trellis_viterbi_x.xml
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -53,7 +53,7 @@
        </param>
        <sink>
                <name>in</name>
-               <type>$type.io</type>
+               <type>float</type>
        </sink>
        <source>
                <name>out</name>

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
   2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
   2008-12-20 02:37:07 UTC (rev 10137)
@@ -96,7 +96,7 @@
                </option>
        </param>
        <param>
-               <name>RX Antenna B</name>
+               <name>RX Antenna A</name>
                <key>rx_ant_a</key>
                <value>None</value>
                <type>enum</type>

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/variable_sink.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/variable_sink.xml
        2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/variable_sink.xml
        2008-12-20 02:37:07 UTC (rev 10137)
@@ -7,9 +7,24 @@
 <block>
        <name>Variable Sink</name>
        <key>variable_sink</key>
-       <import>from grc_gnuradio import blks2 as grc_blks2</import>
-       <make>grc_blks2.queue_sink_$(type.fcn)($vlen)
-grc_blks2.queue_sink_thread(self.$id, set_$(variable))</make>
+       <import>from gnuradio import gr</import>
+       <import>import threading</import>
+       <import>import time</import>
+       <make>gr.vector_sink_$(type.fcn)()
+def _$(id)_run():
+       while True:
+               time.sleep(1.0/$samp_rate)
+               data = self.$(id).data()
+#if $vlen.eval == 0
+               if data:
+                       self.set_$(variable.eval)(data[-1])
+                       self.$(id).clear()
+#else
+               if len(data) &gt;= $vlen:
+                       self.set_$(variable.eval)(data[-($vlen):])
+                       self.$(id).clear()
+#end if
+threading.Thread(target=_$(id)_run).start()</make>
        <param>
                <name>Type</name>
                <key>type</key>
@@ -44,23 +59,31 @@
                <name>Variable</name>
                <key>variable</key>
                <value></value>
-               <type>raw</type>
+               <type>string</type>
        </param>
        <param>
+               <name>Sample Rate</name>
+               <key>samp_rate</key>
+               <value>10</value>
+               <type>real</type>
+       </param>
+       <param>
                <name>Vec Length</name>
                <key>vlen</key>
-               <value>1</value>
+               <value>0</value>
                <type>int</type>
        </param>
-       <check>$vlen &gt; 0</check>
+       <check>$vlen &gt;= 0</check>
        <sink>
                <name>in</name>
                <type>$type</type>
-               <vlen>$vlen</vlen>
        </sink>
        <doc>
-Read samples from the input stream and write each sample to the variable.
+Read samples at from the input stream and write each sample to the variable.
 
 The variable must be the id of an existing variable block.
+
+When the vector length is 0, the variable will be set to numbers. \
+When the vector length is > 0, the variable will be set to vectors.
        </doc>
 </block>

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/variable_slider.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/variable_slider.xml
      2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/variable_slider.xml
      2008-12-20 02:37:07 UTC (rev 10137)
@@ -20,6 +20,7 @@
        min=$min,
        max=$max,
        num_steps=$num_steps,
+       slider_length=$slider_length,
 )
 #set $grid_pos = $grid_pos.eval
 #if not grid_pos
@@ -56,8 +57,16 @@
                <key>num_steps</key>
                <value>100</value>
                <type>int</type>
+               <hide>part</hide>
        </param>
-               <param>
+       <param>
+               <name>Slider Length (px)</name>
+               <key>slider_length</key>
+               <value>200</value>
+               <type>int</type>
+               <hide>part</hide>
+       </param>
+       <param>
                <name>Slider Type</name>
                <key>slider_type</key>
                <value>horizontal</value>

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/blocks/wxgui_numbersink2.xml
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -27,8 +27,8 @@
 #end if
        label=$title,
        peak_hold=$options.peak_hold,
+       show_gauge=$show_gauge,
 )
-self.$(id).set_show_gauge($show_gauge)
 #set $grid_pos = $grid_pos.eval
 #if not grid_pos
 self.Add(self.$(id).win)
@@ -102,7 +102,7 @@
        <param>
                <name>Reference Level</name>
                <key>ref_level</key>
-               <value>50</value>
+               <value>0</value>
                <type>real</type>
        </param>
        <param>

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/flow_graph.tmpl
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/flow_graph.tmpl
 2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/data/platforms/python/flow_graph.tmpl
 2008-12-20 02:37:07 UTC (rev 10137)
@@ -41,7 +41,6 @@
 #set $class_name = $flow_graph.get_option('id')
 #set $param_str = ', '.join(['self'] + ['%s=%s'%(param.get_id(), 
param.get_make()) for param in $parameters])
 #if $generate_options == 'wx_gui'
-       #from gnuradio.grc.gui import Preferences
        #import gtk
        #set $icon = gtk.IconTheme().lookup_icon('gnuradio-grc', 32, 0)
 class $(class_name)(grc_wxgui.top_block_gui):
@@ -49,7 +48,7 @@
        def __init__($param_str):
                grc_wxgui.top_block_gui.__init__(
                        self,
-                       title="$Preferences.window_prefix() - Executing: 
$flow_graph.get_option('title')",
+                       title="$flow_graph.get_parent().get_name() - Executing: 
$flow_graph.get_option('title')",
        #if $icon
                        icon="$icon.get_filename()",
        #end if

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/Makefile.am
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/Makefile.am  
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/Makefile.am  
2008-12-20 02:37:07 UTC (rev 10137)
@@ -24,5 +24,6 @@
 SUBDIRS = \
        audio \
        simple \
+       trellis \
        usrp \
        xmlrpc

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/audio/Makefile.am
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/audio/Makefile.am    
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/audio/Makefile.am    
2008-12-20 02:37:07 UTC (rev 10137)
@@ -23,8 +23,4 @@
 
 ourdatadir = $(grc_examples_prefix)/audio
 
-DATA_FILES = dial_tone.grc
-
-ourdata_DATA = $(DATA_FILES)
-
-EXTRA_DIST = $(DATA_FILES)
+dist_ourdata_DATA = dial_tone.grc

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/simple/Makefile.am
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/simple/Makefile.am   
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/simple/Makefile.am   
2008-12-20 02:37:07 UTC (rev 10137)
@@ -23,8 +23,4 @@
 
 ourdatadir = $(grc_examples_prefix)/simple
 
-DATA_FILES = ber_simulation.grc
-
-ourdata_DATA = $(DATA_FILES)
-
-EXTRA_DIST = $(DATA_FILES)
+dist_ourdata_DATA = ber_simulation.grc

Copied: gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis (from 
rev 10133, gnuradio/trunk/grc/examples/trellis)


Property changes on: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis
___________________________________________________________________
Name: svn:ignore
   + Makefile
Makefile.in


Deleted: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/Makefile.am

Copied: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/Makefile.am 
(from rev 10133, gnuradio/trunk/grc/examples/trellis/Makefile.am)
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/Makefile.am  
                        (rev 0)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/Makefile.am  
2008-12-20 02:37:07 UTC (rev 10137)
@@ -0,0 +1,28 @@
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+include $(top_srcdir)/grc/Makefile.inc
+
+ourdatadir = $(grc_examples_prefix)/trellis
+
+dist_ourdata_DATA = \
+       readme.txt \
+       interference_cancellation.grc

Deleted: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/interference_cancellation.grc

Copied: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/interference_cancellation.grc
 (from rev 10133, 
gnuradio/trunk/grc/examples/trellis/interference_cancellation.grc)
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/interference_cancellation.grc
                                (rev 0)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/interference_cancellation.grc
        2008-12-20 02:37:07 UTC (rev 10137)
@@ -0,0 +1,2012 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Tue Nov 18 00:48:20 2008</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>int_cancellation</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Superposition Coding</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>AA</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>gnuradio flow graph</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>2048, 2048</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>alpha</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>P1/P</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0.6</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_length</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(243, 11)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>snr_db</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>P/sigma^2 (dB)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>16</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>20</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_length</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(447, 14)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>noisevar</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>10**(-snr_db/10)</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(637, 13)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>random_source_x</key>
+    <param>
+      <key>id</key>
+      <value>random_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>num_samps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(21, 170)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_chunks_to_symbols_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_chunks_to_symbols_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>in_type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>symbol_table</key>
+      <value>1,1j,-1j,-1</value>
+    </param>
+    <param>
+      <key>dimension</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(665, 187)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>alpha**0.5</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(988, 196)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>random_source_x</key>
+    <param>
+      <key>id</key>
+      <value>random_source_x_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>num_samps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(25, 291)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_chunks_to_symbols_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_chunks_to_symbols_xx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>in_type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>symbol_table</key>
+      <value>1,1j,-1j,-1</value>
+    </param>
+    <param>
+      <key>dimension</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(660, 311)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>(1-alpha)**0.5</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(994, 319)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_add_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_add_vxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1224, 244)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_add_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_add_vxx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1400, 262)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_noise_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_noise_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>noise_type</key>
+      <value>gr.GR_GAUSSIAN</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>noisevar</value>
+    </param>
+    <param>
+      <key>seed</key>
+      <value>42</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1146, 369)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_constellationsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_constellationsink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Constellation Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>frame_decim</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>marker</key>
+      <value>set_format_plus</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1301, 74)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(536, 529)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_vxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(771, 525)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_short_to_float</key>
+    <param>
+      <key>id</key>
+      <value>gr_short_to_float_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(994, 545)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_3</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(535, 792)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_vxx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(785, 779)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_short_to_float</key>
+    <param>
+      <key>id</key>
+      <value>gr_short_to_float_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1005, 798)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_chunks_to_symbols_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_chunks_to_symbols_xx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>in_type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>symbol_table</key>
+      <value>1,1j,-1j,-1</value>
+    </param>
+    <param>
+      <key>dimension</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(405, 998)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>alpha**0.5</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(710, 1008)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(944, 978)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(540, 1141)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_vxx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(796, 1136)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_short_to_float</key>
+    <param>
+      <key>id</key>
+      <value>gr_short_to_float_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1009, 1156)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_chunks_to_symbols_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_chunks_to_symbols_xx_2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>in_type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>symbol_table</key>
+      <value>1,1j,-1j,-1</value>
+    </param>
+    <param>
+      <key>dimension</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(420, 1368)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx_2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>(1-alpha)**0.5</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(733, 1374)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(975, 1342)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_1_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(559, 1536)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_vxx_2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(771, 1530)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_short_to_float</key>
+    <param>
+      <key>id</key>
+      <value>gr_short_to_float_1_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1010, 1551)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_numbersink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_numbersink2_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>BER 2 (raw)</value>
+    </param>
+    <param>
+      <key>units</key>
+      <value>BER</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>base_value</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>min_value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max_value</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>factor</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>decimal_places</key>
+      <value>6</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>number_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0.001</value>
+    </param>
+    <param>
+      <key>options</key>
+      <value>average</value>
+    </param>
+    <param>
+      <key>show_gauge</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0,1,1,1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1260, 659)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_numbersink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_numbersink2_3</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>BER 2 (after cancelling user 1)</value>
+    </param>
+    <param>
+      <key>units</key>
+      <value>BER</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>base_value</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>min_value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max_value</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>factor</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>decimal_places</key>
+      <value>6</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>number_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0.001</value>
+    </param>
+    <param>
+      <key>options</key>
+      <value>average</value>
+    </param>
+    <param>
+      <key>show_gauge</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1,1,1,1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1262, 1020)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_numbersink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_numbersink2_3_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>BER 1 (after cancelling user 2)</value>
+    </param>
+    <param>
+      <key>units</key>
+      <value>BER</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>base_value</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>min_value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max_value</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>factor</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>decimal_places</key>
+      <value>6</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>number_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0.001</value>
+    </param>
+    <param>
+      <key>options</key>
+      <value>average</value>
+    </param>
+    <param>
+      <key>show_gauge</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1,0,1,1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1269, 1417)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_numbersink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_numbersink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>BER 1 (raw)</value>
+    </param>
+    <param>
+      <key>units</key>
+      <value>BER</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>base_value</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>min_value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max_value</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>factor</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>decimal_places</key>
+      <value>6</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>number_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0.001</value>
+    </param>
+    <param>
+      <key>options</key>
+      <value>average</value>
+    </param>
+    <param>
+      <key>show_gauge</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0,0,1,1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1267, 410)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>10e3</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(748, 12)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_encoder_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_encoder_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ss</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(334, 190)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_encoder_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_encoder_xx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ss</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(336, 311)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_viterbi_combined_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_viterbi_combined_xx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>c</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>s</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>block_size</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>final_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>dim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>table</key>
+      
<value>alpha**0.5*1,alpha**0.5*1j,alpha**0.5*(-1j),alpha**0.5*(-1)</value>
+    </param>
+    <param>
+      <key>metric_type</key>
+      <value>trellis.TRELLIS_EUCLIDEAN</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(79, 501)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_viterbi_combined_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_viterbi_combined_xx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>c</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>s</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>block_size</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>final_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>dim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>table</key>
+      
<value>(1-alpha)**0.5*1,(1-alpha)**0.5*1j,(1-alpha)**0.5*(-1j),(1-alpha)**0.5*(-1)</value>
+    </param>
+    <param>
+      <key>metric_type</key>
+      <value>trellis.TRELLIS_EUCLIDEAN</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(82, 766)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_encoder_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_encoder_xx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ss</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(89, 998)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_viterbi_combined_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_viterbi_combined_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>c</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>s</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>block_size</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>final_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>dim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>table</key>
+      
<value>(1-alpha)**0.5*1,(1-alpha)**0.5*1j,(1-alpha)**0.5*(-1j),(1-alpha)**0.5*(-1)</value>
+    </param>
+    <param>
+      <key>metric_type</key>
+      <value>trellis.TRELLIS_EUCLIDEAN</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(83, 1111)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_encoder_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_encoder_xx_2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ss</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(105, 1367)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_viterbi_combined_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_viterbi_combined_xx_0_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>c</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>s</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>block_size</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>final_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>dim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>table</key>
+      
<value>alpha**0.5*1,alpha**0.5*1j,alpha**0.5*(-1j),alpha**0.5*(-1)</value>
+    </param>
+    <param>
+      <key>metric_type</key>
+      <value>trellis.TRELLIS_EUCLIDEAN</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(75, 1495)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>prefix</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>"../../../"</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(871, 14)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>random_source_x_1</source_block_id>
+    <sink_block_id>trellis_encoder_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_encoder_xx_0</source_block_id>
+    <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_encoder_xx_1</source_block_id>
+    <sink_block_id>gr_chunks_to_symbols_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx_0</source_block_id>
+    <sink_block_id>gr_add_vxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_vxx_0</source_block_id>
+    <sink_block_id>gr_add_vxx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_noise_source_x_0</source_block_id>
+    <sink_block_id>gr_add_vxx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_vxx_1</source_block_id>
+    <sink_block_id>wxgui_constellationsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_chunks_to_symbols_xx_1</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx_1</source_block_id>
+    <sink_block_id>gr_add_vxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_0</source_block_id>
+    <sink_block_id>gr_multiply_vxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_0</source_block_id>
+    <sink_block_id>gr_multiply_vxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_vxx_0</source_block_id>
+    <sink_block_id>gr_short_to_float_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_short_to_float_0</source_block_id>
+    <sink_block_id>wxgui_numbersink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_vxx_2</source_block_id>
+    <sink_block_id>gr_short_to_float_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_0</source_block_id>
+    <sink_block_id>trellis_encoder_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_vxx_1</source_block_id>
+    <sink_block_id>trellis_viterbi_combined_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_0</source_block_id>
+    <sink_block_id>gr_sub_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_1</source_block_id>
+    <sink_block_id>gr_sub_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_0</source_block_id>
+    <sink_block_id>gr_sub_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_1</source_block_id>
+    <sink_block_id>gr_sub_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_1</source_block_id>
+    <sink_block_id>gr_multiply_vxx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_1</source_block_id>
+    <sink_block_id>gr_multiply_vxx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_2</source_block_id>
+    <sink_block_id>trellis_viterbi_combined_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_vxx_1</source_block_id>
+    <sink_block_id>gr_sub_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_encoder_xx_2</source_block_id>
+    <sink_block_id>gr_chunks_to_symbols_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_chunks_to_symbols_xx_2</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx_2</source_block_id>
+    <sink_block_id>gr_sub_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_1</source_block_id>
+    <sink_block_id>trellis_encoder_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_vxx_1</source_block_id>
+    <sink_block_id>gr_short_to_float_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_short_to_float_2</source_block_id>
+    <sink_block_id>wxgui_numbersink2_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_2</source_block_id>
+    <sink_block_id>gr_sub_xx_3</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_3</source_block_id>
+    <sink_block_id>gr_multiply_vxx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_3</source_block_id>
+    <sink_block_id>gr_multiply_vxx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_vxx_1</source_block_id>
+    <sink_block_id>trellis_viterbi_combined_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_1</source_block_id>
+    <sink_block_id>gr_sub_xx_3</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_short_to_float_1</source_block_id>
+    <sink_block_id>wxgui_numbersink2_3</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_encoder_xx_2_0</source_block_id>
+    <sink_block_id>gr_chunks_to_symbols_xx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_chunks_to_symbols_xx_2_0</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_2</source_block_id>
+    <sink_block_id>trellis_encoder_xx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_vxx_2_0</source_block_id>
+    <sink_block_id>gr_short_to_float_1_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_0_0</source_block_id>
+    <sink_block_id>gr_sub_xx_1_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_1_0</source_block_id>
+    <sink_block_id>gr_multiply_vxx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_1_0</source_block_id>
+    <sink_block_id>gr_multiply_vxx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_2_0</source_block_id>
+    <sink_block_id>trellis_viterbi_combined_xx_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_short_to_float_1_0</source_block_id>
+    <sink_block_id>wxgui_numbersink2_3_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_vxx_1</source_block_id>
+    <sink_block_id>gr_sub_xx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_0</source_block_id>
+    <sink_block_id>gr_sub_xx_1_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx_2_0</source_block_id>
+    <sink_block_id>gr_sub_xx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+</flow_graph>

Deleted: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/readme.txt

Copied: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/readme.txt (from 
rev 10133, gnuradio/trunk/grc/examples/trellis/readme.txt)
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/readme.txt   
                        (rev 0)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/trellis/readme.txt   
2008-12-20 02:37:07 UTC (rev 10137)
@@ -0,0 +1,16 @@
+This is an example of using gr-trellis in grc.
+
+Two users are transmitting simultaneously using convolutionally encoded QPSK, 
each with power P1=alpha*P and P2=(1-alpha)*P.
+The combined signal is observed in noise and four different receivers are 
considered:
+1) A viterbi decoder decoding user 1 assuming user 2 is noise
+2) A viterbi decoder decoding user 2 assuming user 1 is noise
+3) A viterbi decoder decoding user 1 first 
+   and then reencoding this signal, subtracting it from the observation 
+   and then running a Viterbi decoder decoding user 2
+4) A viterbi decoder decoding user 2 first 
+   and then reencoding this signal, subtracting it from the observation 
+   and then running a Viterbi decoder decoding user 1
+
+You can change the signal to noise ratio P/sigma^2 and the allocation of power 
to the two users, alpha.
+
+Enjoy.

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/usrp/Makefile.am
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/usrp/Makefile.am     
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/usrp/Makefile.am     
2008-12-20 02:37:07 UTC (rev 10137)
@@ -23,10 +23,6 @@
 
 ourdatadir = $(grc_examples_prefix)/usrp
 
-DATA_FILES = \
+dist_ourdata_DATA = \
        usrp_two_tone_loopback.grc \
        usrp_wbfm_receive.grc
-
-ourdata_DATA = $(DATA_FILES)
-
-EXTRA_DIST = $(DATA_FILES)

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/xmlrpc/Makefile.am
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/xmlrpc/Makefile.am   
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/examples/xmlrpc/Makefile.am   
2008-12-20 02:37:07 UTC (rev 10137)
@@ -23,12 +23,8 @@
 
 ourdatadir = $(grc_examples_prefix)/xmlrpc
 
-DATA_FILES = \
+dist_ourdata_DATA = \
        readme.txt \
        xmlrpc_client.grc \
        xmlrpc_client_script.py\
        xmlrpc_server.grc
-
-ourdata_DATA = $(DATA_FILES)
-
-EXTRA_DIST = $(DATA_FILES)

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/scripts/grc
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/scripts/grc   2008-12-20 
02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/scripts/grc   2008-12-20 
02:37:07 UTC (rev 10137)
@@ -18,12 +18,11 @@
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-from gnuradio.grc.gui.Constants import FLOW_GRAPH_FILE_EXTENSION
 from gnuradio.grc.platforms.base.Constants import VERSION
 from optparse import OptionParser
 
 if __name__ == "__main__":
-       usage = 'usage: %%prog [options] 
[optional_flow_graphs%s]'%FLOW_GRAPH_FILE_EXTENSION
+       usage = 'usage: %prog [options] [saved flow graphs]'
        version = """
 GNU Radio Companion %s
 

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/Makefile.am
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/Makefile.am
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -27,5 +27,5 @@
        __init__.py \
        error_rate.py \
        packet.py \
-       queue.py \
+       probe.py \
        selector.py

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/__init__.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/__init__.py
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/__init__.py
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -18,10 +18,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from queue import queue_sink_thread
-from queue import queue_sink_c, queue_sink_f, queue_sink_i, queue_sink_s, 
queue_sink_b
-from queue import queue_source_c, queue_source_f, queue_source_i, 
queue_source_s, queue_source_b
-
 from selector import selector, valve
 from packet import packet_encoder, packet_decoder
 from error_rate import error_rate
+from probe import probe_function, probe_avg_mag_sqrd_c, probe_avg_mag_sqrd_f, 
probe_density_b, probe_mpsk_snr_c

Copied: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/probe.py 
(from rev 10133, gnuradio/trunk/grc/src/grc_gnuradio/blks2/probe.py)
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/probe.py   
                            (rev 0)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/probe.py   
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -0,0 +1,123 @@
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr
+import threading
+import numpy
+import time
+
+#######################################################################################
+## Probe: Function
+#######################################################################################
+class probe_function(gr.hier_block2, threading.Thread):
+       """
+       The thread polls the function for values and writes to a message source.
+       """
+
+       def __init__(self, probe_callback, probe_rate):
+               #init hier block
+               gr.hier_block2.__init__(
+                       self, 'probe_function',
+                       gr.io_signature(0, 0, 0),
+                       gr.io_signature(1, 1, gr.sizeof_float),
+               )
+               self._probe_callback = probe_callback
+               self.set_probe_rate(probe_rate)
+               #create message source
+               message_source = gr.message_source(gr.sizeof_float, 1)
+               self._msgq = message_source.msgq()
+               #connect
+               self.connect(message_source, self)
+               #setup thread
+               threading.Thread.__init__(self)
+               self.setDaemon(True)
+               self.start()
+
+       def run(self):
+               """
+               Infinite polling loop.
+               """
+               while True:
+                       time.sleep(1.0/self._probe_rate)
+                       arr = numpy.array(self._probe_callback(), numpy.float32)
+                       msg = gr.message_from_string(arr.tostring(), 0, 
gr.sizeof_float, 1)
+                       self._msgq.insert_tail(msg)
+
+       def set_probe_rate(self, probe_rate):
+               self._probe_rate = probe_rate
+
+class _probe_base(gr.hier_block2):
+       def __init__(self, probe_block, probe_callback, probe_rate):
+               #init hier block
+               gr.hier_block2.__init__(
+                       self, 'probe',
+                       gr.io_signature(1, 1, 
probe_block.input_signature().sizeof_stream_items()[0]),
+                       gr.io_signature(1, 1, gr.sizeof_float),
+               )
+               probe_function_block = probe_function(probe_callback, 
probe_rate)
+               #forward callbacks
+               self.set_probe_rate = probe_function_block.set_probe_rate
+               #connect
+               self.connect(self, probe_block)
+               self.connect(probe_function_block, self)
+
+#######################################################################################
+## Probe: Average Magnitude Squared
+#######################################################################################
+class _probe_avg_mag_sqrd_base(_probe_base):
+       def __init__(self, threshold, alpha, probe_rate):
+               #create block
+               probe_block = self._probe_block_contructor[0](threshold, alpha)
+               #forward callbacks
+               self.set_alpha = probe_block.set_alpha
+               self.set_threshold = probe_block.set_threshold
+               #init
+               _probe_base.__init__(self, probe_block, probe_block.level, 
probe_rate)
+
+class probe_avg_mag_sqrd_c(_probe_avg_mag_sqrd_base): _probe_block_contructor 
= (gr.probe_avg_mag_sqrd_c,)
+class probe_avg_mag_sqrd_f(_probe_avg_mag_sqrd_base): _probe_block_contructor 
= (gr.probe_avg_mag_sqrd_f,)
+
+#######################################################################################
+## Probe: Density
+#######################################################################################
+class probe_density_b(_probe_base):
+       def __init__(self, alpha, probe_rate):
+               #create block
+               probe_block = gr.probe_density_b(alpha)
+               #forward callbacks
+               self.set_alpha = probe_block.set_alpha
+               #init
+               _probe_base.__init__(self, probe_block, probe_block.density, 
probe_rate)
+
+#######################################################################################
+## Probe: MPSK SNR
+#######################################################################################
+class probe_mpsk_snr_c(_probe_base):
+       def __init__(self, type, alpha, probe_rate):
+               """
+               Type can be "snr", "signal_mean", or "noise_variance" 
+               """
+               #create block
+               probe_block = gr.probe_mpsk_snr_c(alpha)
+               #forward callbacks
+               self.set_alpha = probe_block.set_alpha
+               #init
+               _probe_base.__init__(self, probe_block, getattr(probe_block, 
type), probe_rate)

Deleted: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/queue.py

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/selector.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/selector.py
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/blks2/selector.py
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # Copyright 2008 Free Software Foundation, Inc.
 #
@@ -26,7 +25,7 @@
        """A hier2 block with N inputs and M outputs, where data is only 
forwarded through input n to output m."""
        def __init__(self, item_size, num_inputs, num_outputs, input_index, 
output_index):
                """
-               SelectorHelper constructor.
+               Selector constructor.
                @param item_size the size of the gr data stream in bytes
                @param num_inputs the number of inputs (integer)
                @param num_outputs the number of outputs (integer)
@@ -39,9 +38,9 @@
                        gr.io_signature(num_outputs, num_outputs, item_size),
                )
                #terminator blocks for unused inputs and outputs
-               self.input_terminators = [gr.null_sink(item_size)] * num_inputs
-               self.output_terminators = [gr.head(item_size, 0)] * num_outputs
-               self.copy = None
+               self.input_terminators = [gr.null_sink(item_size) for i in 
range(num_inputs)]
+               self.output_terminators = [gr.head(item_size, 0) for i in 
range(num_outputs)]
+               self.copy = gr.kludge_copy(item_size)
                #connections
                for i in range(num_inputs): self.connect((self, i), 
self.input_terminators[i])
                for i in range(num_outputs): 
self.connect(gr.null_source(item_size), self.output_terminators[i], (self, i))
@@ -66,7 +65,6 @@
                if self._indexes_valid():
                        self.disconnect((self, self.input_index), 
self.input_terminators[self.input_index])
                        
self.disconnect(self.output_terminators[self.output_index], (self, 
self.output_index))
-                       self.copy = gr.skiphead(self.item_size, 0)
                        self.connect((self, self.input_index), self.copy)
                        self.connect(self.copy, (self, self.output_index))
                        
self.connect(self.output_terminators[self.output_index], 
self.input_terminators[self.input_index])
@@ -80,8 +78,6 @@
                        self.disconnect((self, self.input_index), self.copy)
                        self.disconnect(self.copy, (self, self.output_index))
                        
self.disconnect(self.output_terminators[self.output_index], 
self.input_terminators[self.input_index])
-                       del self.copy
-                       self.copy = None
                        self.connect((self, self.input_index), 
self.input_terminators[self.input_index])
                        
self.connect(self.output_terminators[self.output_index], (self, 
self.output_index))
 

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/wxgui/callback_controls.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/wxgui/callback_controls.py
   2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/grc_gnuradio/wxgui/callback_controls.py
   2008-12-20 02:37:07 UTC (rev 10137)
@@ -152,7 +152,7 @@
 class _slider_control_base(_control_base):
        """House a Slider and a Text Box for variable control."""
 
-       def __init__(self, window, callback, label='Label', value=50, min=0, 
max=100, num_steps=100):
+       def __init__(self, window, callback, label='Label', value=50, min=0, 
max=100, num_steps=100, slider_length=200):
                """
                Slider contructor.
                Create the slider, text box, and label.
@@ -163,12 +163,14 @@
                @param min the min
                @param max the max
                @param num_steps the number of steps
+               @param slider_length the length of the slider bar in pixels
                """
                #initialize
                _control_base.__init__(self, window, callback)
                self.min = float(min)
                self.max = float(max)
                self.num_steps = int(num_steps)
+               self.slider_length = slider_length
                #create gui elements
                label_text_sizer = wx.BoxSizer(self.label_text_orientation) 
#label and text box container
                label_text = LabelText(self.get_window(), '%s: '%str(label))
@@ -178,7 +180,7 @@
                        label_text_sizer.Add(obj, 0, 
wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL)
                self.Add(label_text_sizer, 0, wx.ALIGN_CENTER)
                #make the slider
-               self.slider = slider = wx.Slider(self.get_window(), -1, 
size=wx.Size(*self.slider_size), style=self.slider_style)
+               self.slider = slider = wx.Slider(self.get_window(), -1, 
size=wx.Size(*self.get_slider_size()), style=self.slider_style)
                try: slider.SetRange(0, num_steps)
                except Exception, e:
                        print >> sys.stderr, 'Error in set slider range: 
"%s".'%e
@@ -230,11 +232,11 @@
 class slider_horizontal_control(_slider_control_base):
        label_text_orientation = wx.HORIZONTAL
        slider_style = wx.SL_HORIZONTAL
-       slider_size = 200, 20
+       def get_slider_size(self): return self.slider_length, 20
 class slider_vertical_control(_slider_control_base):
        label_text_orientation = wx.VERTICAL
        slider_style = wx.SL_VERTICAL
-       slider_size = 20, 200
+       def get_slider_size(self): return 20, self.slider_length
 
 
##############################################################################################
 # Text Box Control
@@ -261,7 +263,8 @@
                for obj in (label_text, text_box): #fill the container with 
label and text entry box
                        label_text_sizer.Add(obj, 0, 
wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL)
                self.Add(label_text_sizer, 0, wx.ALIGN_CENTER)
-               self.text_box.SetValue(str(value))
+               #detect string mode
+               self._string_mode = isinstance(value, str)
 
        def get_value(self):
                """
@@ -274,8 +277,14 @@
                """
                An enter key was pressed. Read the text box, call the callback.
                If the text cannot be evaluated, do not try callback.
+               Do not evaluate the text box value in string mode.
                """
-               try: self._value = eval(self.text_box.GetValue())
-               except: return
+               if self._string_mode:
+                       self._value = str(self.text_box.GetValue())
+               else:
+                       try: self._value = eval(self.text_box.GetValue())
+                       except Exception, e:
+                               print >> sys.stderr, 'Error in evaluate value 
from handle enter.\n', e
+                               return
                try: self.call()
                except Exception, e: print >> sys.stderr, 'Error in exec 
callback from handle enter.\n', e

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/ActionHandler.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/ActionHandler.py      
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/ActionHandler.py      
2008-12-20 02:37:07 UTC (rev 10137)
@@ -32,7 +32,7 @@
 import random
 from .. platforms.gui.Platform import Platform
 from MainWindow import MainWindow
-from Dialogs import PreferencesDialog, AboutDialog, HotKeysDialog
+from Dialogs import AboutDialog
 from FileDialogs import OpenFlowGraphFileDialog, SaveFlowGraphFileDialog, 
SaveImageFileDialog
 
 gobject.threads_init()
@@ -56,7 +56,7 @@
                #setup icon using icon theme
                try: 
gtk.window_set_default_icon(gtk.IconTheme().load_icon('gnuradio-grc', 256, 0))
                except: pass
-               for action in Actions.ACTIONS_LIST: action.connect('activate', 
self._handle_actions)
+               for action in Actions.get_all_actions(): 
action.connect('activate', self._handle_actions)
                #setup the main window
                self.main_window = MainWindow(self.handle_states, platform)
                self.main_window.connect('delete_event', self._quit)
@@ -75,74 +75,32 @@
 
        def _handle_key_press(self, widget, event):
                """
-               Handle key presses from the keyboard.
-               Translate key combos into actions.
-               Key combinations that do not include special keys, such as ctrl 
or Fcn*,
-               Also, require that the flow graph has mouse focus when choosing 
to handle keys.
-               @return true if the flow graph is in active use
+               Handle key presses from the keyboard and translate key combos 
into actions.
+               This key press handler is called before the gtk accelerators 
kick in.
+               This handler ensures that key presses without a mod mask,
+               only pass to the accelerators if the flow graph is in focus.
+               This function also handles keys that accelerators refuse to 
handle: left/right,
+               and keys that are not registered with an accelerator: +/-.
+               @return false to let the accelerators handle the key action
                """
-               keyname = gtk.gdk.keyval_name(event.keyval)
-               ctrl = event.state & gtk.gdk.CONTROL_MASK
-               alt = event.state & gtk.gdk.MOD1_MASK
-               shift = event.state & gtk.gdk.SHIFT_MASK
-               #################### save/open/new/close 
###############################
-               if ctrl and keyname == 's':
-                       self.handle_states(Actions.FLOW_GRAPH_SAVE)
-               elif ctrl and keyname == 'o':
-                       self.handle_states(Actions.FLOW_GRAPH_OPEN)
-               elif ctrl and keyname == 'n':
-                       self.handle_states(Actions.FLOW_GRAPH_NEW)
-               elif ctrl and keyname == 'q':
-                       self.handle_states(Actions.FLOW_GRAPH_CLOSE)
-               #################### Cut/Copy/Paste 
###############################
-               elif self.get_focus_flag() and ctrl and keyname == 'x': #mouse 
focus
-                       self.handle_states(Actions.BLOCK_CUT)
-               elif self.get_focus_flag() and ctrl and keyname == 'c': #mouse 
focus
-                       self.handle_states(Actions.BLOCK_COPY)
-               elif self.get_focus_flag() and ctrl and keyname == 'v': #mouse 
focus
-                       self.handle_states(Actions.BLOCK_PASTE)
-               #################### Undo/Redo ###############################
-               elif ctrl and keyname == 'z':
-                       self.handle_states(Actions.FLOW_GRAPH_UNDO)
-               elif ctrl and keyname == 'y':
-                       self.handle_states(Actions.FLOW_GRAPH_REDO)
-               #################### Delete ###############################
-               elif self.get_focus_flag() and keyname == 'Delete':     #mouse 
focus
-                       self.handle_states(Actions.ELEMENT_DELETE)
-               #################### Params     ###############################
-               elif self.get_focus_flag() and keyname == 'Return':     #mouse 
focus
-                       self.handle_states(Actions.BLOCK_PARAM_MODIFY)
-               #################### Rotate ###############################
-               elif self.get_focus_flag() and keyname == 'Right': #mouse focus
-                       self.handle_states(Actions.BLOCK_ROTATE_RIGHT)
-               elif self.get_focus_flag() and keyname == 'Left': #mouse focus
-                       self.handle_states(Actions.BLOCK_ROTATE_LEFT)
-               #################### Enable/Disable 
###############################
-               elif self.get_focus_flag() and keyname == 'e': #mouse focus
-                       self.handle_states(Actions.BLOCK_ENABLE)
-               elif self.get_focus_flag() and keyname == 'd': #mouse focus
-                       self.handle_states(Actions.BLOCK_DISABLE)
-               #################### Data Type ###############################
-               elif self.get_focus_flag() and keyname == 'Down': #mouse focus
-                       self.handle_states(Actions.BLOCK_INC_TYPE)
-               elif self.get_focus_flag() and keyname == 'Up': #mouse focus
-                       self.handle_states(Actions.BLOCK_DEC_TYPE)
-               #################### Port Controllers 
###############################
-               elif self.get_focus_flag() and keyname in ('equal','plus', 
'KP_Add'): #mouse focus
-                       self.handle_states(Actions.PORT_CONTROLLER_INC)
-               elif self.get_focus_flag() and keyname in ('minus', 
'KP_Subtract'): #mouse focus
-                       self.handle_states(Actions.PORT_CONTROLLER_DEC)
-               #################### Gen/Exec/Stop/Print 
###############################
-               elif keyname == 'F5':
-                       self.handle_states(Actions.FLOW_GRAPH_GEN)
-               elif keyname == 'F6':
-                       self.handle_states(Actions.FLOW_GRAPH_EXEC)
-               elif keyname == 'F7':
-                       self.handle_states(Actions.FLOW_GRAPH_KILL)
-               elif keyname == 'Print':
-                       self.handle_states(Actions.FLOW_GRAPH_SCREEN_CAPTURE)
-               #propagate this if the fg is not in focus or nothing is selected
-               return self.get_focus_flag() and 
self.get_flow_graph().is_selected()
+               if self.get_focus_flag():
+                       try:
+                               self.handle_states({
+                                       'Left': Actions.BLOCK_ROTATE_LEFT,
+                                       'Right': Actions.BLOCK_ROTATE_RIGHT,
+                                       'Up': Actions.BLOCK_DEC_TYPE,
+                                       'Down': Actions.BLOCK_INC_TYPE,
+                                       'equal': Actions.PORT_CONTROLLER_INC,
+                                       'plus': Actions.PORT_CONTROLLER_INC,
+                                       'KP_Add': Actions.PORT_CONTROLLER_INC,
+                                       'minus': Actions.PORT_CONTROLLER_DEC,
+                                       'KP_Subtract': 
Actions.PORT_CONTROLLER_DEC,
+                               }[gtk.gdk.keyval_name(event.keyval)])
+                               return True
+                       #focus: always return false for accelerator to handle
+                       except: return False
+               #no focus: only allow accelerator to handle when a mod is used
+               return not event.state
 
        def _quit(self, window, event):
                """
@@ -177,16 +135,15 @@
                # Initalize/Quit
                ##################################################
                if state == Actions.APPLICATION_INITIALIZE:
-                       for action in Actions.ACTIONS_LIST: 
action.set_sensitive(False) #set all actions disabled
+                       for action in Actions.get_all_actions(): 
action.set_sensitive(False) #set all actions disabled
                        # enable a select few actions
                        for action in (
                                Actions.APPLICATION_QUIT, 
Actions.FLOW_GRAPH_NEW,
                                Actions.FLOW_GRAPH_OPEN, 
Actions.FLOW_GRAPH_SAVE_AS,
                                Actions.FLOW_GRAPH_CLOSE, 
Actions.ABOUT_WINDOW_DISPLAY,
-                               Actions.HOTKEYS_WINDOW_DISPLAY, 
Actions.PREFS_WINDOW_DISPLAY,
                                Actions.FLOW_GRAPH_SCREEN_CAPTURE,
                        ): 
Actions.get_action_from_name(action).set_sensitive(True)
-                       if not self.init_file_paths and 
Preferences.restore_files():
+                       if not self.init_file_paths:
                                self.init_file_paths = Preferences.files_open()
                        if not self.init_file_paths: self.init_file_paths = ['']
                        for file_path in self.init_file_paths:
@@ -283,13 +240,8 @@
                ##################################################
                # Window stuff
                ##################################################
-               elif state == Actions.PREFS_WINDOW_DISPLAY:
-                       PreferencesDialog()
-                       self.get_flow_graph().update()
                elif state == Actions.ABOUT_WINDOW_DISPLAY:
                        AboutDialog()
-               elif state == Actions.HOTKEYS_WINDOW_DISPLAY:
-                       HotKeysDialog()
                ##################################################
                # Param Modifications
                ##################################################
@@ -328,7 +280,10 @@
                elif state == Actions.FLOW_GRAPH_CLOSE:
                        self.main_window.close_page()
                elif state == Actions.FLOW_GRAPH_SAVE:
-                       if not self.get_page().get_file_path(): 
self.handle_states(Actions.FLOW_GRAPH_SAVE_AS)
+                       #read-only or undefined file path, do save-as
+                       if self.get_page().get_read_only() or not 
self.get_page().get_file_path():
+                               self.handle_states(Actions.FLOW_GRAPH_SAVE_AS)
+                       #otherwise try to save
                        else:
                                try:
                                        
ParseXML.to_file(self.get_flow_graph().export_data(), 
self.get_page().get_file_path())
@@ -338,12 +293,12 @@
                                        self.get_page().set_saved(False)
                elif state == Actions.FLOW_GRAPH_SAVE_AS:
                        file_path = 
SaveFlowGraphFileDialog(self.get_page().get_file_path()).run()
-                       if file_path != None:
+                       if file_path is not None:
                                self.get_page().set_file_path(file_path)
                                self.handle_states(Actions.FLOW_GRAPH_SAVE)
                elif state == Actions.FLOW_GRAPH_SCREEN_CAPTURE:
                        file_path = 
SaveImageFileDialog(self.get_page().get_file_path()).run()
-                       if file_path != None:
+                       if file_path is not None:
                                pixmap = 
self.get_flow_graph().get_drawing_area().pixmap
                                width, height = pixmap.get_size()
                                pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, 
0, 8, width, height)

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Actions.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Actions.py    
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Actions.py    
2008-12-20 02:37:07 UTC (rev 10137)
@@ -22,7 +22,7 @@
 import gtk
 
 
######################################################################################################
-# States
+# Action Names
 
######################################################################################################
 APPLICATION_INITIALIZE = 'app init'
 APPLICATION_QUIT = 'app quit'
@@ -56,13 +56,38 @@
 FLOW_GRAPH_KILL = 'flow graph kill'
 FLOW_GRAPH_SCREEN_CAPTURE = 'flow graph screen capture'
 ABOUT_WINDOW_DISPLAY = 'about window display'
-HOTKEYS_WINDOW_DISPLAY = 'hotkeys window display'
-PREFS_WINDOW_DISPLAY = 'prefs window display'
 
 
######################################################################################################
+# Action Key Map
+######################################################################################################
+_actions_key_map = {
+       #action name: (key name, mask)
+       FLOW_GRAPH_NEW: ('n', gtk.gdk.CONTROL_MASK),
+       FLOW_GRAPH_OPEN: ('o', gtk.gdk.CONTROL_MASK),
+       FLOW_GRAPH_SAVE: ('s', gtk.gdk.CONTROL_MASK),
+       FLOW_GRAPH_CLOSE: ('w', gtk.gdk.CONTROL_MASK),
+       APPLICATION_QUIT: ('q', gtk.gdk.CONTROL_MASK),
+       FLOW_GRAPH_UNDO: ('z', gtk.gdk.CONTROL_MASK),
+       FLOW_GRAPH_REDO: ('y', gtk.gdk.CONTROL_MASK),
+       ELEMENT_DELETE: ('Delete', 0),
+       BLOCK_ROTATE_LEFT: ('Left', 0),
+       BLOCK_ROTATE_RIGHT: ('Right', 0),
+       BLOCK_PARAM_MODIFY: ('Return', 0),
+       BLOCK_ENABLE: ('e', 0),
+       BLOCK_DISABLE: ('d', 0),
+       BLOCK_CUT: ('x', gtk.gdk.CONTROL_MASK),
+       BLOCK_COPY: ('c', gtk.gdk.CONTROL_MASK),
+       BLOCK_PASTE: ('v', gtk.gdk.CONTROL_MASK),
+       FLOW_GRAPH_GEN: ('F5', 0),
+       FLOW_GRAPH_EXEC: ('F6', 0),
+       FLOW_GRAPH_KILL: ('F7', 0),
+       FLOW_GRAPH_SCREEN_CAPTURE: ('Print', 0),
+}
+
+######################################################################################################
 # Actions
 
######################################################################################################
-ACTIONS_LIST = (
+_actions_list = (
        gtk.Action(FLOW_GRAPH_NEW, '_New', 'Create a new flow graph', 
'gtk-new'),
        gtk.Action(FLOW_GRAPH_OPEN, '_Open', 'Open an existing flow graph', 
'gtk-open'),
        gtk.Action(FLOW_GRAPH_SAVE, '_Save', 'Save the current flow graph', 
'gtk-save'),
@@ -80,17 +105,15 @@
        gtk.Action(BLOCK_CUT, 'Cu_t', 'Cut', 'gtk-cut'),
        gtk.Action(BLOCK_COPY, '_Copy', 'Copy', 'gtk-copy'),
        gtk.Action(BLOCK_PASTE, '_Paste', 'Paste', 'gtk-paste'),
-       gtk.Action(PREFS_WINDOW_DISPLAY, '_Preferences', 'Configure 
Preferences', 'gtk-preferences'),
        gtk.Action(ABOUT_WINDOW_DISPLAY, '_About', 'About this program', 
'gtk-about'),
-       gtk.Action(HOTKEYS_WINDOW_DISPLAY, '_HotKeys', 'Hot Keys', 'gtk-info'),
        gtk.Action(FLOW_GRAPH_GEN, '_Generate', 'Generate the flow graph', 
'gtk-convert'),
        gtk.Action(FLOW_GRAPH_EXEC, '_Execute', 'Execute the flow graph', 
'gtk-execute'),
        gtk.Action(FLOW_GRAPH_KILL, '_Kill', 'Kill the flow graph', 'gtk-stop'),
        gtk.Action(FLOW_GRAPH_SCREEN_CAPTURE, 'S_creen Capture', 'Create a 
screen capture of the flow graph', 'gtk-print'),
 )
+def get_all_actions(): return _actions_list
 
-ACTIONS_DICT = dict((action.get_name(), action) for action in ACTIONS_LIST)
-
+_actions_dict = dict((action.get_name(), action) for action in _actions_list)
 def get_action_from_name(action_name):
        """
        Retrieve the action from the action list.
@@ -99,5 +122,16 @@
        @throw KeyError bad action name
        @return a gtk action object
        """
-       if ACTIONS_DICT.has_key(action_name): return ACTIONS_DICT[action_name]
+       if _actions_dict.has_key(action_name): return _actions_dict[action_name]
        raise KeyError('Action Name: "%s" does not exist'%action_name)
+
+_accel_group = gtk.AccelGroup()
+def get_accel_group(): return _accel_group
+
+#load the actions key map
+#set the accelerator group, and accelerator path
+#register the key and mod with the accelerator path
+for action_name, (key_name, mod) in _actions_key_map.iteritems():
+       get_action_from_name(action_name).set_accel_group(get_accel_group())
+       get_action_from_name(action_name).set_accel_path('<main>/'+action_name)
+       gtk.accel_map_add_entry('<main>/'+action_name, 
gtk.gdk.keyval_from_name(key_name),mod)

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Bars.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Bars.py       
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Bars.py       
2008-12-20 02:37:07 UTC (rev 10137)
@@ -86,12 +86,8 @@
                Actions.FLOW_GRAPH_EXEC,
                Actions.FLOW_GRAPH_KILL,
        ]),
-       (gtk.Action('Options', '_Options', None, None), [
-               Actions.PREFS_WINDOW_DISPLAY,
-       ]),
        (gtk.Action('Help', '_Help', None, None), [
                Actions.ABOUT_WINDOW_DISPLAY,
-               Actions.HOTKEYS_WINDOW_DISPLAY,
        ]),
 )
 

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/BlockTreeWindow.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/BlockTreeWindow.py    
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/BlockTreeWindow.py    
2008-12-20 02:37:07 UTC (rev 10137)
@@ -17,7 +17,7 @@
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-from Constants import BLOCK_SELECTION_WINDOW_WIDTH
+from Constants import DEFAULT_BLOCKS_WINDOW_WIDTH
 import pygtk
 pygtk.require('2.0')
 import gtk
@@ -57,7 +57,7 @@
                scrolled_window = gtk.ScrolledWindow()
                scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, 
gtk.POLICY_AUTOMATIC)
                scrolled_window.add_with_viewport(self.treeview)
-               scrolled_window.set_size_request(BLOCK_SELECTION_WINDOW_WIDTH, 
-1)
+               scrolled_window.set_size_request(DEFAULT_BLOCKS_WINDOW_WIDTH, 
-1)
                self.pack_start(scrolled_window)
                #add button
                self.add_button = gtk.Button(None, 'gtk-add')

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Constants.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Constants.py  
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Constants.py  
2008-12-20 02:37:07 UTC (rev 10137)
@@ -23,7 +23,6 @@
 DEFAULT_FILE_PATH = os.getcwd()
 
 ##file extensions
-FLOW_GRAPH_FILE_EXTENSION = '.grc'
 IMAGE_FILE_EXTENSION = '.png'
 
 ##name for new/unsaved flow graphs
@@ -39,10 +38,9 @@
 ##dialog constraints
 MIN_DIALOG_WIDTH = 500
 MIN_DIALOG_HEIGHT = 500
-##static height of reports window
-REPORTS_WINDOW_HEIGHT = 100
-##static width of block selection window
-BLOCK_SELECTION_WINDOW_WIDTH = 200
+##default sizes
+DEFAULT_BLOCKS_WINDOW_WIDTH = 100
+DEFAULT_REPORTS_WINDOW_WIDTH = 100
 
 ##How close can the mouse get to the window border before mouse events are 
ignored.
 BORDER_PROXIMITY_SENSITIVITY = 50

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Dialogs.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Dialogs.py    
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Dialogs.py    
2008-12-20 02:37:07 UTC (rev 10137)
@@ -41,27 +41,6 @@
                self.set_cursor_visible(False)
                self.set_wrap_mode(gtk.WRAP_WORD_CHAR)
 
-class PreferencesDialog(gtk.Dialog):
-       """A dialog box to display the preferences."""
-
-       def __init__(self):
-               """PreferencesDialog constructor."""
-               gtk.Dialog.__init__(self, buttons=('gtk-close', 
gtk.RESPONSE_CLOSE))
-               self.set_title("Preferences")
-               self.set_size_request(MIN_DIALOG_WIDTH, MIN_DIALOG_HEIGHT)
-               notebook = gtk.Notebook()
-               for title,desc,params in Preferences.get_preferences():
-                       vbox = gtk.VBox()
-                       vbox.pack_start(gtk.Label(''), False) #blank label for 
spacing
-                       for param in params: 
vbox.pack_start(param.get_input_object(), False)
-                       desc = desc.strip('\n')
-                       if desc: vbox.pack_start(TextDisplay(desc), False, 
padding=5)
-                       notebook.append_page(vbox, gtk.Label(title))
-               self.vbox.pack_start(notebook, True)
-               self.show_all()
-               self.run()
-               self.destroy()
-
 def MessageDialogHelper(type, buttons, title=None, markup=None):
        """
        Create a modal message dialog and run it.
@@ -103,43 +82,3 @@
 -----""")
                self.run()
                self.destroy()
-
-class HotKeysDialog(gtk.Dialog):
-       """Display each action with the associated hotkey."""
-
-       def __init__(self):
-               """HotKeysDialog constructor."""
-               gtk.Dialog.__init__(self, buttons=('gtk-close', 
gtk.RESPONSE_CLOSE))
-               self.set_title('Hot Keys')
-               markup = ''
-               for action, hotkey in (
-                       ('New Flow Graph', 'Ctrl + n'),
-                       ('Open Flow Graph', 'Ctrl + o'),
-                       ('Save Flow Graph', 'Ctrl + s'),
-                       ('Close Flow Graph', 'Ctrl + q'),
-                       ('Cut Block', 'Ctrl + x'),
-                       ('Copy Block', 'Ctrl + c'),
-                       ('Paste Block', 'Ctrl + v'),
-                       ('Undo Change', 'Ctrl + z'),
-                       ('Redo Change', 'Ctrl + y'),
-                       ('Delete Block', 'Delete'),
-                       ('Modify Parameters', 'Enter'),
-                       ('Rotate Block', 'Right'),
-                       ('Rotate Block', 'Left'),
-                       ('Enable Block', 'e'),
-                       ('Disable Block', 'd'),
-                       ('Modify Data Type', 'Up'),
-                       ('Modify Data Type', 'Down'),
-                       ('Add a Port', '+'),
-                       ('Remove a Port', '-'),
-                       ('Flow Graph Generate', 'F5'),
-                       ('Flow Graph Execute', 'F6'),
-                       ('Flow Graph Kill', 'F7'),
-                       ('Screen Shot', 'PrintScreen'),
-               ): markup = '%s\n<b>%s:</b>%s'%(markup, action, 
hotkey.rjust(25-len(action), ' '))
-               label = gtk.Label()
-               label.set_markup('<tt>%s</tt>\n'%markup) #append newline
-               self.vbox.pack_start(label, False)
-               self.show_all()
-               self.run()
-               self.destroy()

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/FileDialogs.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/FileDialogs.py        
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/FileDialogs.py        
2008-12-20 02:37:07 UTC (rev 10137)
@@ -22,8 +22,9 @@
 import gtk
 from Dialogs import MessageDialogHelper
 from Constants import \
-       DEFAULT_FILE_PATH, FLOW_GRAPH_FILE_EXTENSION, \
-       IMAGE_FILE_EXTENSION, NEW_FLOGRAPH_TITLE
+       DEFAULT_FILE_PATH, IMAGE_FILE_EXTENSION, \
+       NEW_FLOGRAPH_TITLE
+import Preferences
 from os import path
 
 OPEN_FLOW_GRAPH = 'open flow graph'
@@ -31,20 +32,26 @@
 SAVE_IMAGE = 'save image'
 
 ##the filter for flow graph files
-FLOW_GRAPH_FILE_FILTER = gtk.FileFilter()
-FLOW_GRAPH_FILE_FILTER.set_name('GRC Files')
-FLOW_GRAPH_FILE_FILTER.add_pattern('*'+FLOW_GRAPH_FILE_EXTENSION)
-FLOW_GRAPH_FILE_FILTER.add_pattern('*.xml') #TEMP
+def get_flow_graph_files_filter():
+       filter = gtk.FileFilter()
+       filter.set_name('Flow Graph Files')
+       filter.add_pattern('*'+Preferences.file_extension())
+       filter.add_pattern('*.xml') #TEMP
+       return filter
 
 ##the filter for image files
-IMAGE_FILE_FILTER = gtk.FileFilter()
-IMAGE_FILE_FILTER.set_name('Image Files')
-IMAGE_FILE_FILTER.add_pattern('*'+IMAGE_FILE_EXTENSION)
+def get_image_files_filter():
+       filter = gtk.FileFilter()
+       filter.set_name('Image Files')
+       filter.add_pattern('*'+IMAGE_FILE_EXTENSION)
+       return filter
 
 ##the filter for all files
-ALL_FILE_FILTER = gtk.FileFilter()
-ALL_FILE_FILTER.set_name('All Files')
-ALL_FILE_FILTER.add_pattern('*')
+def get_all_files_filter():
+       filter = gtk.FileFilter()
+       filter.set_name('All Files')
+       filter.add_pattern('*')
+       return filter
 
 class FileDialogHelper(gtk.FileChooserDialog):
        """
@@ -64,7 +71,7 @@
                gtk.FileChooserDialog.__init__(self, title, None, action, 
('gtk-cancel', gtk.RESPONSE_CANCEL, ok_stock, gtk.RESPONSE_OK))
                self.set_select_multiple(False)
                self.set_local_only(True)
-               self.add_filter(ALL_FILE_FILTER)
+               self.add_filter(get_all_files_filter())
 
 class FileDialog(FileDialogHelper):
        """A dialog box to save or open flow graph files. This is a base class, 
do not use."""
@@ -74,18 +81,18 @@
                FileDialog constructor.
                @param current_file_path the current directory or path to the 
open flow graph
                """
-               if not current_file_path: current_file_path = 
path.join(DEFAULT_FILE_PATH, NEW_FLOGRAPH_TITLE + FLOW_GRAPH_FILE_EXTENSION)
+               if not current_file_path: current_file_path = 
path.join(DEFAULT_FILE_PATH, NEW_FLOGRAPH_TITLE + Preferences.file_extension())
                if self.type == OPEN_FLOW_GRAPH:
                        FileDialogHelper.__init__(self, 
gtk.FILE_CHOOSER_ACTION_OPEN, 'Open a Flow Graph from a File...')
-                       self.add_and_set_filter(FLOW_GRAPH_FILE_FILTER)
+                       self.add_and_set_filter(get_flow_graph_files_filter())
                        self.set_select_multiple(True)
                elif self.type == SAVE_FLOW_GRAPH:
                        FileDialogHelper.__init__(self, 
gtk.FILE_CHOOSER_ACTION_SAVE, 'Save a Flow Graph to a File...')
-                       self.add_and_set_filter(FLOW_GRAPH_FILE_FILTER)
+                       self.add_and_set_filter(get_flow_graph_files_filter())
                        self.set_current_name(path.basename(current_file_path)) 
#show the current filename
                elif self.type == SAVE_IMAGE:
                        FileDialogHelper.__init__(self, 
gtk.FILE_CHOOSER_ACTION_SAVE, 'Save a Flow Graph Screen Shot...')
-                       self.add_and_set_filter(IMAGE_FILE_FILTER)
+                       self.add_and_set_filter(get_image_files_filter())
                        current_file_path = current_file_path + 
IMAGE_FILE_EXTENSION
                        self.set_current_name(path.basename(current_file_path)) 
#show the current filename
                self.set_current_folder(path.dirname(current_file_path)) 
#current directory
@@ -112,12 +119,12 @@
                #############################################
                if self.type in (SAVE_FLOW_GRAPH, SAVE_IMAGE):
                        filename = self.get_filename()
-                       for extension, filter in (
-                               (FLOW_GRAPH_FILE_EXTENSION, 
FLOW_GRAPH_FILE_FILTER),
-                               (IMAGE_FILE_EXTENSION, IMAGE_FILE_FILTER),
-                       ): #append the missing file extension if the filter 
matches
-                               if filename[len(filename)-len(extension):] != 
extension \
-                                       and filter == self.get_filter(): 
filename += extension
+                       extension = {
+                               SAVE_FLOW_GRAPH: Preferences.file_extension(),
+                               SAVE_IMAGE: IMAGE_FILE_EXTENSION,
+                       }[self.type]
+                       #append the missing file extension if the filter matches
+                       if path.splitext(filename)[1].lower() != extension: 
filename += extension
                        self.set_current_name(path.basename(filename)) #show 
the filename with extension
                        if path.exists(filename): #ask the user to confirm 
overwrite
                                if MessageDialogHelper(

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/NotebookPage.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/NotebookPage.py       
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/NotebookPage.py       
2008-12-20 02:37:07 UTC (rev 10137)
@@ -135,6 +135,16 @@
                """
                return self._flow_graph
 
+       def get_read_only(self):
+               """
+               Get the read-only state of the file.
+               Always false for empty path.
+               @return true for read-only
+               """
+               if not self.get_file_path(): return False
+               return os.path.exists(self.get_file_path()) and \
+               not os.access(self.get_file_path(), os.W_OK)
+
        def get_file_path(self):
                """
                Get the file path for the flow graph.

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Preferences.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Preferences.py        
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/gui/Preferences.py        
2008-12-20 02:37:07 UTC (rev 10137)
@@ -17,113 +17,70 @@
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-from .. platforms.base.Constants import FLOW_GRAPH_DTD
-from .. utils import ParseXML
-import Messages
+import ConfigParser
 import os
 
-##Access the loaded preferences in this module
-_prefs = list()
-def _set_prefs(prefs): _prefs.append(prefs)
-def _get_prefs(): return _prefs[0]
-def load(platform): _Preferences(platform)
-def save(): _get_prefs().save()
-def get_preferences(): return _get_prefs().get_preferences()
+_platform = None
+_config_parser = ConfigParser.ConfigParser()
 
-class _Preferences(object):
+def file_extension(): return '.'+_platform.get_key()
+def _prefs_file(): return os.path.join(os.path.expanduser('~'), 
file_extension())
 
-       def __init__(self, platform):
-               #make self available to module
-               _set_prefs(self)
-               #get prefs block
-               self._prefs_block = platform.get_prefs_block()
-               #prefs file path
-               self._prefs_file_path = os.path.join(os.path.expanduser('~'), 
self._prefs_block.get_param('prefs_file').get_value())
-               #load
-               try:
-                       ParseXML.validate_dtd(self._prefs_file_path, 
FLOW_GRAPH_DTD)
-                       n = ParseXML.from_file(self._prefs_file_path)
-                       self._prefs_block.import_data(n['block'])
-               except: 
Messages.send_fail_load_preferences(self._prefs_file_path)
-               ##all params
-               self.window_prefix_param = 
self._prefs_block.get_param('window_prefix')
-               self.snap_to_grid_param = 
self._prefs_block.get_param('snap_to_grid')
-               self.grid_size_param = self._prefs_block.get_param('grid_size')
-               self.show_grid_param = self._prefs_block.get_param('show_grid')
-               self.show_reports_param = 
self._prefs_block.get_param('show_reports')
-               self.restore_files_param = 
self._prefs_block.get_param('restore_files')
-               self.window_size_param = 
self._prefs_block.get_param('window_size')
-               self.file_open_param = self._prefs_block.get_param('file_open')
-               self.files_open_param = 
self._prefs_block.get_param('files_open')
-               self.show_params_param = 
self._prefs_block.get_param('show_params')
+def load(platform):
+       global _platform
+       _platform = platform
+       #create sections
+       _config_parser.add_section('main')
+       _config_parser.add_section('files_open')
+       try: _config_parser.read(_prefs_file())
+       except: pass
+def save():
+       try: _config_parser.write(open(_prefs_file(), 'w'))
+       except: pass
 
-       def save(self):
-               try: ParseXML.to_file({'block': 
self._prefs_block.export_data()}, self._prefs_file_path)
-               except IOError: 
Messages.send_fail_save_preferences(self._prefs_file_path)
-
-       def get_preferences(self):
-               ##Preferences: title, notes, params
-               return [
-                       (
-                               'Grid',
-                               '''
-Show grid will draw a square grid onto the flow graph with grid points 
separated by grid size pixels. \
-Snap to Grid forces the upper right corner of the signal block to align with a 
grid point.
-''',
-                               [self.snap_to_grid_param, self.grid_size_param, 
self.show_grid_param],
-                       ),
-                       (
-                               'Appearance',
-                               '''
-Show or hide the reports window at the bottom of the main window.
-Show or hide all paramater labels in the signal blocks.
-''',
-                               [self.show_reports_param, 
self.show_params_param],
-                       ),
-                       (
-                               'Misc',
-                               '''
-Restore previously opened files on start-up.
-''',
-                               [self.restore_files_param],
-                       ),
-               ]
-
 ###########################################################################
 # Special methods for specific program functionalities
 ###########################################################################
 
-def window_prefix():
-       return _get_prefs().window_prefix_param.get_value()
-
-def window_size(size=None):
-       if size: _get_prefs().window_size_param.set_value(size)
+def main_window_size(size=None):
+       if size is not None:
+               _config_parser.set('main', 'main_window_width', size[0])
+               _config_parser.set('main', 'main_window_height', size[1])
        else:
-               try: return eval(_get_prefs().window_size_param.get_value())
-               except: return (-1, -1)
+               try: return (
+                       _config_parser.getint('main', 'main_window_width'),
+                       _config_parser.getint('main', 'main_window_height'),
+               )
+               except: return (1, 1)
 
-def restore_files():
-       return _get_prefs().restore_files_param.get_value() == 'yes'
-
 def file_open(file=None):
-       if file is not None: _get_prefs().file_open_param.set_value(file)
-       else: return _get_prefs().file_open_param.get_value()
+       if file is not None: _config_parser.set('main', 'file_open', file)
+       else:
+               try: return _config_parser.get('main', 'file_open')
+               except: return ''
 
 def files_open(files=None):
-       if files is not None: 
_get_prefs().files_open_param.set_value('\n'.join(files))
-       else: return _get_prefs().files_open_param.get_value().split('\n')
+       if files is not None:
+               _config_parser.remove_section('files_open') #clear section
+               _config_parser.add_section('files_open')
+               for i, file in enumerate(files):
+                       _config_parser.set('files_open', 'file_open_%d'%i, file)
+       else:
+               files = list()
+               i = 0
+               while True:
+                       try: files.append(_config_parser.get('files_open', 
'file_open_%d'%i))
+                       except: return files
+                       i = i + 1
 
-def show_reports_window():
-       return _get_prefs().show_reports_param.get_value() == 'show'
+def reports_window_position(pos=None):
+       if pos is not None: _config_parser.set('main', 
'reports_window_position', pos)
+       else:
+               try: return _config_parser.getint('main', 
'reports_window_position') or 1 #greater than 0
+               except: return -1
 
-def get_grid_size():
-       return int(_get_prefs().grid_size_param.get_value())
-
-def snap_to_grid():
-       return _get_prefs().snap_to_grid_param.get_value() == 'on'
-
-def show_grid():
-       return _get_prefs().show_grid_param.get_value() == 'show'
-
-def show_params():
-       return _get_prefs().show_params_param.get_value() == 'show'
+def blocks_window_position(pos=None):
+       if pos is not None: _config_parser.set('main', 
'blocks_window_position', pos)
+       else:
+               try: return _config_parser.getint('main', 
'blocks_window_position') or 1 #greater than 0
+               except: return -1

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Block.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Block.py   
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Block.py   
2008-12-20 02:37:07 UTC (rev 10137)
@@ -56,19 +56,16 @@
                @param n the nested odict
                @return block a new block
                """
+               #build the block
+               Element.__init__(self, flow_graph)
                #grab the data
-               name = n['name']
-               key = n['key']
-               category = utils.exists_or_else(n, 'category', '')
                params = utils.listify(n, 'param')
                sources = utils.listify(n, 'source')
                sinks = utils.listify(n, 'sink')
-               #build the block
-               Element.__init__(self, flow_graph)
-               #store the data
-               self._name = name
-               self._key = key
-               self._category = category
+               self._name = n['name']
+               self._key = n['key']
+               self._category = utils.exists_or_else(n, 'category', '')
+               self._block_wrapper_path = n['block_wrapper_path']
                #create the param objects
                self._params = odict()
                #add the id param
@@ -155,18 +152,13 @@
        def __str__(self): return 'Block - %s - %s(%s)'%(self.get_id(), 
self.get_name(), self.get_key())
 
        def get_id(self): return self.get_param('id').get_value()
-
        def is_block(self): return True
-
        def get_name(self): return self._name
-
        def get_key(self): return self._key
-
        def get_category(self): return self._category
-
        def get_doc(self): return ''
-
        def get_ports(self): return self.get_sources() + self.get_sinks()
+       def get_block_wrapper_path(self): return self._block_wrapper_path
 
        ##############################################
        # Access Params

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Makefile.am    
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Makefile.am    
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -34,15 +34,13 @@
        Port.py \
        __init__.py
 
-BUILT_SOURCES = Constants.py
-
-Constants.py: Makefile $(srcdir)/Constants.py.in
+Constants.py: Makefile Constants.py.in
        sed \
                -e 's|@address@hidden|$(PACKAGE)|g' \
                -e 's|@address@hidden|$(VERSION)|g' \
                -e 's|@address@hidden|$(grc_base_data_dir)|g' \
-       $(srcdir)/Constants.py.in > $@
+       $(srcdir)/address@hidden > $@
 
 EXTRA_DIST = $(srcdir)/Constants.py.in
-
+BUILT_SOURCES = Constants.py
 MOSTLYCLEANFILES = $(BUILT_SOURCES)

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Param.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Param.py   
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Param.py   
2008-12-20 02:37:07 UTC (rev 10137)
@@ -20,7 +20,56 @@
 from ... import utils
 from ... utils import odict
 from Element import Element
+import pygtk
+pygtk.require('2.0')
+import gtk
+import gobject
 
+class InputParam(gtk.HBox):
+       """The base class for an input parameter inside the input parameters 
dialog."""
+
+       def __init__(self, param, _handle_changed):
+               gtk.HBox.__init__(self)
+               self.param = param
+               self._handle_changed = _handle_changed
+               self.label = gtk.Label('') #no label, markup is added by 
set_markup
+               self.label.set_size_request(150, -1)
+               self.pack_start(self.label, False)
+               self.set_markup = lambda m: self.label.set_markup(m)
+               self.tp = None
+       def set_color(self, color): pass
+
+class EntryParam(InputParam):
+       """Provide an entry box for strings and numbers."""
+
+       def __init__(self, *args, **kwargs):
+               InputParam.__init__(self, *args, **kwargs)
+               self.entry = input = gtk.Entry()
+               input.set_text(self.param.get_value())
+               input.connect('changed', self._handle_changed)
+               self.pack_start(input, True)
+               self.get_text = input.get_text
+               #tool tip
+               self.tp = gtk.Tooltips()
+               self.tp.set_tip(self.entry, '')
+               self.tp.enable()
+       def set_color(self, color): self.entry.modify_base(gtk.STATE_NORMAL, 
gtk.gdk.color_parse(color))
+
+class EnumParam(InputParam):
+       """Provide an entry box for Enum types with a drop down menu."""
+
+       def __init__(self, *args, **kwargs):
+               InputParam.__init__(self, *args, **kwargs)
+               input = gtk.ComboBox(gtk.ListStore(gobject.TYPE_STRING))
+               cell = gtk.CellRendererText()
+               input.pack_start(cell, True)
+               input.add_attribute(cell, 'text', 0)
+               for option in self.param.get_options(): 
input.append_text(option.get_name())
+               
input.set_active(int(self.param.get_option_keys().index(self.param.get_value())))
+               input.connect("changed", self._handle_changed)
+               self.pack_start(input, False)
+               self.get_text = lambda: str(input.get_active()) #the get text 
parses the selected index to a string
+
 class Option(Element):
 
        def __init__(self, param, name, key, opts):
@@ -109,12 +158,7 @@
                        #store the option
                        self._options[key] = option
                #test the enum options
-               if self._options or self.is_enum():
-                       #test against bad combos of type and enum
-                       try: assert(self._options)
-                       except AssertionError: self._exit_with_error('At least 
one option must exist when type "enum" is set.')
-                       try: assert(self.is_enum())
-                       except AssertionError: self._exit_with_error('Type 
"enum" must be set when options are present.')
+               if self.is_enum():
                        #test against options with identical keys
                        try: assert(len(set(self.get_option_keys())) == 
len(self._options))
                        except AssertionError: self._exit_with_error('Options 
keys "%s" are not unique.'%self.get_option_keys())
@@ -164,15 +208,10 @@
                raise NotImplementedError
 
        def get_color(self): return '#FFFFFF'
-
        def __str__(self): return 'Param - %s(%s)'%(self.get_name(), 
self.get_key())
-
        def is_param(self): return True
-
        def get_name(self): return self._name
-
        def get_key(self): return self._key
-
        def get_hide(self): return 
self.get_parent().resolve_dependencies(self._hide)
 
        def get_value(self):
@@ -187,8 +226,15 @@
                self._value = str(value) #must be a string
 
        def get_type(self): return 
self.get_parent().resolve_dependencies(self._type)
+       def is_enum(self): return bool(self.get_options())
 
-       def is_enum(self): return self._type == 'enum'
+       def get_input_class(self):
+               """
+               Get the graphical gtk class to represent this parameter.
+               @return gtk input class
+               """
+               if self.is_enum(): return EnumParam
+               return EntryParam
 
        ##############################################
        # Access Options

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Platform.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Platform.py    
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/base/Platform.py    
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -74,6 +74,8 @@
                try: ParseXML.validate_dtd(f, self._block_dtd)
                except ParseXML.XMLSyntaxError, e: self._exit_with_error('Block 
definition "%s" failed: \n\t%s'%(f, e))
                for n in utils.listify(ParseXML.from_file(f), 'block'):
+                       #inject block wrapper path
+                       n['block_wrapper_path'] = f
                        block = self.Block(self._flow_graph, n)
                        key = block.get_key()
                        #test against repeated keys

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Block.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Block.py    
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Block.py    
2008-12-20 02:37:07 UTC (rev 10137)
@@ -17,7 +17,6 @@
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-from ... gui import Preferences
 from Element import Element
 import Utils
 import Colors
@@ -137,13 +136,12 @@
                layout.set_font_description(desc)
                self.label_width, self.label_height = layout.get_pixel_size()
                #display the params
-               if Preferences.show_params():
-                       for param in filter(lambda p: p.get_hide() not in 
('all', 'part'), self.get_params()):
-                               layout = param.get_layout()
-                               layouts.append(layout)
-                               w,h = layout.get_pixel_size()
-                               self.label_width = max(w, self.label_width)
-                               self.label_height = self.label_height + h + 
LABEL_SEPARATION
+               for param in filter(lambda p: p.get_hide() not in ('all', 
'part'), self.get_params()):
+                       layout = param.get_layout()
+                       layouts.append(layout)
+                       w,h = layout.get_pixel_size()
+                       self.label_width = max(w, self.label_width)
+                       self.label_height = self.label_height + h + 
LABEL_SEPARATION
                width = self.label_width
                height = self.label_height
                #setup the pixmap

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Connection.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Connection.py   
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Connection.py   
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -59,6 +59,8 @@
                        Utils.get_rotated_coordinate((-CONNECTOR_ARROW_HEIGHT, 
CONNECTOR_ARROW_BASE/2), self.get_sink().get_rotation()),
                ]
                self._update_after_move()
+               if self.is_valid(): self._foreground = Colors.FG_COLOR
+               else: self._foreground = Colors.ERROR_COLOR
 
        def _update_after_move(self):
                """Calculate coordinates."""
@@ -123,7 +125,6 @@
                fg_color = self.get_enabled() and Colors.FG_COLOR or 
Colors.DISABLED_FG_COLOR
                Element.draw(self, window, FG_color=fg_color)
                gc = self.get_gc()
-               if self.is_valid(): gc.foreground = Colors.FG_COLOR
-               else: gc.foreground = Colors.ERROR_COLOR
+               gc.foreground = self._foreground
                #draw arrow on sink port
                window.draw_polygon(gc, True, self._arrow)

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/FlowGraph.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/FlowGraph.py    
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/FlowGraph.py    
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -17,14 +17,14 @@
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
-from ... gui import Preferences
 from ... gui.Constants import \
        DIR_LEFT, DIR_RIGHT, \
        SCROLL_PROXIMITY_SENSITIVITY, SCROLL_DISTANCE, \
        MOTION_DETECT_REDRAWING_SENSITIVITY
 from ... gui.Actions import \
        ELEMENT_CREATE, ELEMENT_SELECT, \
-       BLOCK_PARAM_MODIFY, BLOCK_MOVE
+       BLOCK_PARAM_MODIFY, BLOCK_MOVE, \
+       ELEMENT_DELETE
 import Colors
 import Utils
 from ... import utils
@@ -63,9 +63,9 @@
                self._old_selected_port = None
                self._new_selected_port = None
 
-###########################################################################
-# Access Drawing Area
-###########################################################################
+       
###########################################################################
+       # Access Drawing Area
+       
###########################################################################
        def get_drawing_area(self): return self.drawing_area
        def get_gc(self): return self.get_drawing_area().gc
        def get_pixmap(self): return self.get_drawing_area().pixmap
@@ -139,7 +139,6 @@
                for block_n in blocks_n:
                        block_key = block_n['key']
                        if block_key == 'options': continue
-                       block_id = self._get_unique_id(block_key)
                        block = self.get_new_block(block_key)
                        selected.add(block)
                        #set params
@@ -150,11 +149,15 @@
                                #setup id parameter
                                if param_key == 'id':
                                        old_id2block[param_value] = block
-                                       param_value = block_id
+                                       #if the block id is not unique, get a 
new block id
+                                       if param_value in [block.get_id() for 
block in self.get_blocks()]:
+                                               param_value = 
self._get_unique_id(param_value)
                                #set value to key
                                
block.get_param(param_key).set_value(param_value)
                        #move block to offset coordinate
                        block.move((x_off, y_off))
+               #update before creating connections
+               self.update()
                #create connections
                for connection_n in connections_n:
                        source = 
old_id2block[connection_n['source_block_id']].get_source(connection_n['source_key'])
@@ -298,15 +301,6 @@
                        #draw the background
                        self.get_gc().foreground = Colors.BACKGROUND_COLOR
                        self.get_pixmap().draw_rectangle(self.get_gc(), True, 
0, 0, W, H)
-                       #draw grid (depends on prefs)
-                       if Preferences.show_grid():
-                               grid_size = Preferences.get_grid_size()
-                               points = list()
-                               for i in range(W/grid_size):
-                                       for j in range(H/grid_size):
-                                               points.append((i*grid_size, 
j*grid_size))
-                               self.get_gc().foreground = Colors.TXT_COLOR
-                               self.get_pixmap().draw_points(self.get_gc(), 
points)
                        #draw multi select rectangle
                        if self.mouse_pressed and (not 
self.get_selected_elements() or self.get_ctrl_mask()):
                                #coordinates
@@ -503,16 +497,6 @@
                self.time = 0
                self.mouse_pressed = False
                if self.element_moved:
-                       if Preferences.snap_to_grid():
-                               grid_size = Preferences.get_grid_size()
-                               X,Y = 
self.get_selected_element().get_coordinate()
-                               deltaX = X%grid_size
-                               if deltaX < grid_size/2: deltaX = -1 * deltaX
-                               else: deltaX = grid_size - deltaX
-                               deltaY = Y%grid_size
-                               if deltaY < grid_size/2: deltaY = -1 * deltaY
-                               else: deltaY = grid_size - deltaY
-                               self.move_selected((deltaX, deltaY))
                        self.handle_states(BLOCK_MOVE)
                        self.element_moved = False
                self.update_selected_elements()
@@ -543,7 +527,10 @@
                        elif pos-adj_val < SCROLL_PROXIMITY_SENSITIVITY:
                                adj.set_value(adj_val-SCROLL_DISTANCE)
                                adj.emit('changed')
-               #move the selected element and record the new coordinate
+               #remove the connection if selected in drag event
+               if len(self.get_selected_elements()) == 1 and 
self.get_selected_element().is_connection():
+                       self.handle_states(ELEMENT_DELETE)
+               #move the selected elements and record the new coordinate
                X, Y = self.get_coordinate()
                if not self.get_ctrl_mask(): self.move_selected((int(x - X), 
int(y - Y)))
                self.draw()

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Param.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Param.py    
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/gui/Param.py    
2008-12-20 02:37:07 UTC (rev 10137)
@@ -23,98 +23,8 @@
 pygtk.require('2.0')
 import gtk
 import pango
-import gobject
 from Constants import PARAM_LABEL_FONT, PARAM_FONT
-from ... gui.Constants import DEFAULT_FILE_PATH
-from os import path
 
-######################################################################################################
-# gtk objects for handling input
-######################################################################################################
-
-class InputParam(gtk.HBox):
-       """The base class for an input parameter inside the input parameters 
dialog."""
-
-       def __init__(self, param, _handle_changed):
-               gtk.HBox.__init__(self)
-               self.param = param
-               self._handle_changed = _handle_changed
-               self.label = gtk.Label('') #no label, markup is added by 
set_markup
-               self.label.set_size_request(150, -1)
-               self.pack_start(self.label, False)
-               self.set_markup = lambda m: self.label.set_markup(m)
-               self.tp = None
-       def set_color(self, color): pass
-
-class EntryParam(InputParam):
-       """Provide an entry box for strings and numbers."""
-
-       def __init__(self, *args, **kwargs):
-               InputParam.__init__(self, *args, **kwargs)
-               self.entry = input = gtk.Entry()
-               input.set_text(self.param.get_value())
-               input.connect('changed', self._handle_changed)
-               self.pack_start(input, True)
-               self.get_text = input.get_text
-               #tool tip
-               self.tp = gtk.Tooltips()
-               self.tp.set_tip(self.entry, '')
-               self.tp.enable()
-       def set_color(self, color): self.entry.modify_base(gtk.STATE_NORMAL, 
gtk.gdk.color_parse(color))
-
-class FileParam(EntryParam):
-       """Provide an entry box for filename and a button to browse for a 
file."""
-
-       def __init__(self, *args, **kwargs):
-               EntryParam.__init__(self, *args, **kwargs)
-               input = gtk.Button('...')
-               input.connect('clicked', self._handle_clicked)
-               self.pack_start(input, False)
-
-       def _handle_clicked(self, widget=None):
-               """
-               If the button was clicked, open a file dialog in open/save 
format.
-               Replace the text in the entry with the new filename from the 
file dialog.
-               """
-               file_path = self.param.is_valid() and self.param.evaluate() or 
''
-               #bad file paths will be redirected to default
-               if not path.exists(path.dirname(file_path)): file_path = 
DEFAULT_FILE_PATH
-               if self.param.get_type() == 'file_open':
-                       file_dialog = gtk.FileChooserDialog('Open a Data 
File...', None,
-                               gtk.FILE_CHOOSER_ACTION_OPEN, 
('gtk-cancel',gtk.RESPONSE_CANCEL,'gtk-open',gtk.RESPONSE_OK))
-               elif self.param.get_type() == 'file_save':
-                       file_dialog = gtk.FileChooserDialog('Save a Data 
File...', None,
-                               gtk.FILE_CHOOSER_ACTION_SAVE, 
('gtk-cancel',gtk.RESPONSE_CANCEL, 'gtk-save',gtk.RESPONSE_OK))
-                       file_dialog.set_do_overwrite_confirmation(True)
-                       file_dialog.set_current_name(path.basename(file_path)) 
#show the current filename
-               file_dialog.set_current_folder(path.dirname(file_path)) 
#current directory
-               file_dialog.set_select_multiple(False)
-               file_dialog.set_local_only(True)
-               if gtk.RESPONSE_OK == file_dialog.run(): #run the dialog
-                       file_path = file_dialog.get_filename() #get the file 
path
-                       self.entry.set_text(file_path)
-                       self._handle_changed()
-               file_dialog.destroy() #destroy the dialog
-
-class EnumParam(InputParam):
-       """Provide an entry box for Enum types with a drop down menu."""
-
-       def __init__(self, *args, **kwargs):
-               InputParam.__init__(self, *args, **kwargs)
-               input = gtk.ComboBox(gtk.ListStore(gobject.TYPE_STRING))
-               cell = gtk.CellRendererText()
-               input.pack_start(cell, True)
-               input.add_attribute(cell, 'text', 0)
-               for option in self.param.get_options(): 
input.append_text(option.get_name())
-               
input.set_active(int(self.param.get_option_keys().index(self.param.get_value())))
-               input.connect("changed", self._handle_changed)
-               self.pack_start(input, False)
-               self.get_text = lambda: str(input.get_active()) #the get text 
parses the selected index to a string
-
-######################################################################################################
-# A Flow Graph Parameter
-######################################################################################################
-
 class Param(Element):
        """The graphical parameter."""
 
@@ -123,29 +33,26 @@
                Called when an external change occurs.
                Update the graphical input by calling the change handler.
                """
-               if hasattr(self, 'input'): self._handle_changed()
+               if hasattr(self, '_input'): self._handle_changed()
 
        def get_input_object(self, callback=None):
                """
-               Get the graphical gtk class to represent this parameter.
+               Get the graphical gtk object to represent this parameter.
                Create the input object with this data type and the handle 
changed method.
                @param callback a function of one argument(this param) to be 
called from the change handler
                @return gtk input object
                """
-               self.callback = callback
-               if self.is_enum(): input = EnumParam
-               elif self.get_type() in ('file_open', 'file_save'): input = 
FileParam
-               else: input = EntryParam
-               self.input = input(self, self._handle_changed)
-               if not callback: self.update()
-               return self.input
+               self._callback = callback
+               self._input = self.get_input_class()(self, self._handle_changed)
+               if not self._callback: self.update()
+               return self._input
 
        def _handle_changed(self, widget=None):
                """
                When the input changes, write the inputs to the data type.
                Finish by calling the exteral callback.
                """
-               value = self.input.get_text()
+               value = self._input.get_text()
                if self.is_enum(): value = self.get_option_keys()[int(value)]
                self.set_value(value)
                #set the markup on the label, red for errors in corresponding 
data type.
@@ -158,23 +65,23 @@
                        filter(lambda c: self.get_key() in c, 
self.get_parent()._callbacks):
                        name = '<span underline="low">%s</span>'%name
                if not self.is_valid():
-                       self.input.set_markup('<span 
foreground="red">%s</span>'%name)
+                       self._input.set_markup('<span 
foreground="red">%s</span>'%name)
                        tip = 'Error: ' + ' '.join(self.get_error_messages())
                else:
-                       self.input.set_markup(name)
+                       self._input.set_markup(name)
                        tip = 'Value: %s'%str(self.evaluate())
                #hide/show
-               if self.get_hide() == 'all': self.input.hide_all()
-               else: self.input.show_all()
+               if self.get_hide() == 'all': self._input.hide_all()
+               else: self._input.show_all()
                #set the color
-               self.input.set_color(self.get_color())
+               self._input.set_color(self.get_color())
                #set the tooltip
-               if self.input.tp: self.input.tp.set_tip(
-                       self.input.entry,
+               if self._input.tp: self._input.tp.set_tip(
+                       self._input.entry,
                        'Key: %s\nType: %s\n%s'%(self.get_key(), 
self.get_type(), tip),
                )
                #execute the external callback
-               if self.callback: self.callback(self)
+               if self._callback: self._callback(self)
 
        def get_markup(self):
                """
@@ -214,9 +121,9 @@
                                dt_str = ', '.join(map(to_str, data))
                        else: dt_str = to_str(data)     #other types
                        #truncate
-                       max_len = max(42 - len(self.get_name()), 3)
+                       max_len = max(27 - len(self.get_name()), 3)
                        if len(dt_str) > max_len:
-                               dt_str = dt_str[:max_len-3] + '...'
+                               dt_str = dt_str[:max_len/2 -3] + '...' + 
dt_str[-max_len/2:]
                        return '<b>%s:</b> 
%s'%(Utils.xml_encode(self.get_name()), Utils.xml_encode(dt_str))
                else: return '<span foreground="red"><b>%s:</b> 
error</span>'%Utils.xml_encode(self.get_name())
 

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Generator.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Generator.py 
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Generator.py 
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -81,7 +81,8 @@
                controls = filter(lambda v: 
v.get_key().startswith('variable_'), variables)
                #list of blocks not including variables and imports and 
parameters and disabled
                blocks = sorted(self._flow_graph.get_enabled_blocks(), lambda 
x, y: cmp(x.get_id(), y.get_id()))
-               blocks = filter(lambda b: b not in (imports + parameters + 
variables), blocks)
+               probes = filter(lambda b: b.get_key().startswith('probe_'), 
blocks) #ensure probes are last in the block list
+               blocks = filter(lambda b: b not in (imports + parameters + 
variables + probes), blocks) + probes
                #list of connections where each endpoint is enabled
                connections = self._flow_graph.get_enabled_connections()
                #list of variable names

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Makefile.am  
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Makefile.am  
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -36,16 +36,14 @@
        Port.py \
        __init__.py
 
-BUILT_SOURCES = Constants.py
-
-Constants.py: Makefile $(srcdir)/Constants.py.in
+Constants.py: Makefile Constants.py.in
        sed \
                -e 's|@address@hidden|$(PYTHONW)|g' \
                -e 's|@address@hidden|$(grc_python_data_dir)|g' \
                -e 's|@address@hidden|$(grc_python_blocks_dir)|g' \
                -e 's|@address@hidden|$(gr_docdir)|g' \
-       $(srcdir)/Constants.py.in > $@
+       $(srcdir)/address@hidden > $@
 
 EXTRA_DIST = $(srcdir)/Constants.py.in
-
+BUILT_SOURCES = Constants.py
 MOSTLYCLEANFILES = $(BUILT_SOURCES)

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Param.py
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Param.py 
2008-12-20 02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Param.py 
2008-12-20 02:37:07 UTC (rev 10137)
@@ -18,10 +18,61 @@
 """
 
 from utils import expr_utils
-from .. base.Param import Param as _Param
+from .. base.Param import Param as _Param, EntryParam
 import Constants
+import numpy
 import os
+import pygtk
+pygtk.require('2.0')
+import gtk
 
+class FileParam(EntryParam):
+       """Provide an entry box for filename and a button to browse for a 
file."""
+
+       def __init__(self, *args, **kwargs):
+               EntryParam.__init__(self, *args, **kwargs)
+               input = gtk.Button('...')
+               input.connect('clicked', self._handle_clicked)
+               self.pack_start(input, False)
+
+       def _handle_clicked(self, widget=None):
+               """
+               If the button was clicked, open a file dialog in open/save 
format.
+               Replace the text in the entry with the new filename from the 
file dialog.
+               """
+               #get the paths
+               file_path = self.param.is_valid() and self.param.evaluate() or 
''
+               (dirname, basename) = os.path.isfile(file_path) and 
os.path.split(file_path) or (file_path, '')
+               if not os.path.exists(dirname): dirname = os.getcwd() #fix bad 
paths
+               #build the dialog
+               if self.param.get_type() == 'file_open':
+                       file_dialog = gtk.FileChooserDialog('Open a Data 
File...', None,
+                               gtk.FILE_CHOOSER_ACTION_OPEN, 
('gtk-cancel',gtk.RESPONSE_CANCEL,'gtk-open',gtk.RESPONSE_OK))
+               elif self.param.get_type() == 'file_save':
+                       file_dialog = gtk.FileChooserDialog('Save a Data 
File...', None,
+                               gtk.FILE_CHOOSER_ACTION_SAVE, 
('gtk-cancel',gtk.RESPONSE_CANCEL, 'gtk-save',gtk.RESPONSE_OK))
+                       file_dialog.set_do_overwrite_confirmation(True)
+                       file_dialog.set_current_name(basename) #show the 
current filename
+               file_dialog.set_current_folder(dirname) #current directory
+               file_dialog.set_select_multiple(False)
+               file_dialog.set_local_only(True)
+               if gtk.RESPONSE_OK == file_dialog.run(): #run the dialog
+                       file_path = file_dialog.get_filename() #get the file 
path
+                       self.entry.set_text(file_path)
+                       self._handle_changed()
+               file_dialog.destroy() #destroy the dialog
+
+#define types, native python + numpy
+VECTOR_TYPES = (tuple, list, set, numpy.ndarray)
+COMPLEX_TYPES = [complex, numpy.complex, numpy.complex64, numpy.complex128]
+REAL_TYPES = [float, numpy.float, numpy.float32, numpy.float64]
+INT_TYPES = [int, long, numpy.int, numpy.int8, numpy.int16, numpy.int32, 
numpy.uint64,
+       numpy.uint, numpy.uint8, numpy.uint16, numpy.uint32, numpy.uint64]
+#cast to tuple for isinstance, concat subtypes
+COMPLEX_TYPES = tuple(COMPLEX_TYPES + REAL_TYPES + INT_TYPES)
+REAL_TYPES = tuple(REAL_TYPES + INT_TYPES)
+INT_TYPES = tuple(INT_TYPES)
+
 class Param(_Param):
 
        _init = False
@@ -37,6 +88,10 @@
                'grid_pos', 'import',
        ]
 
+       def get_input_class(self):
+               if self.get_type() in ('file_open', 'file_save'): return 
FileParam
+               return _Param.get_input_class(self)
+
        def get_color(self):
                """
                Get the color that represents this param's type.
@@ -65,6 +120,7 @@
                Get the hide value from the base class.
                Hide the ID parameter for most blocks. Exceptions below.
                If the parameter controls a port type, vlen, or nports, return 
part.
+               If the parameter is an empty grid position, return part.
                These parameters are redundant to display in the flow graph 
view.
                @return hide the hide property string
                """
@@ -78,6 +134,8 @@
                if self.get_key() in ' '.join(map(
                        lambda p: ' '.join([p._type, p._vlen, p._nports]), 
self.get_parent().get_ports())
                ): return 'part'
+               #hide empty grid positions
+               if self.get_key() == 'grid_pos' and not self.get_value(): 
return 'part'
                return hide
 
        def evaluate(self):
@@ -114,52 +172,55 @@
                        #raise an exception if the data is invalid
                        if t == 'raw': return e
                        elif t == 'complex':
-                               try: assert(isinstance(e, (complex, float, int, 
long)))
+                               try: assert(isinstance(e, COMPLEX_TYPES))
                                except AssertionError:
                                        self._add_error_message('Expression 
"%s" is invalid for type complex.'%str(e))
                                        raise Exception
                                return e
                        elif t == 'real':
-                               try: assert(isinstance(e, (float, int, long)))
+                               try: assert(isinstance(e, REAL_TYPES))
                                except AssertionError:
                                        self._add_error_message('Expression 
"%s" is invalid for type real.'%str(e))
                                        raise Exception
                                return e
                        elif t == 'int':
-                               try: assert(isinstance(e, (int, long)))
+                               try: assert(isinstance(e, INT_TYPES))
                                except AssertionError:
                                        self._add_error_message('Expression 
"%s" is invalid for type integer.'%str(e))
                                        raise Exception
                                return e
+                       #########################
+                       # Numeric Vector Types
+                       #########################
                        elif t == 'complex_vector':
-                               if not isinstance(e, (tuple, list, set)):
+                               if not isinstance(e, VECTOR_TYPES):
                                        self._lisitify_flag = True
                                        e = [e]
                                try:
                                        for ei in e:
-                                               assert(isinstance(ei, (complex, 
float, int, long)))
+                                               assert(isinstance(ei, 
COMPLEX_TYPES))
                                except AssertionError:
                                        self._add_error_message('Expression 
"%s" is invalid for type complex vector.'%str(e))
                                        raise Exception
                                return e
                        elif t == 'real_vector':
-                               if not isinstance(e, (tuple, list, set)):
+                               if not isinstance(e, VECTOR_TYPES):
                                        self._lisitify_flag = True
                                        e = [e]
                                try:
                                        for ei in e:
-                                               assert(isinstance(ei, (float, 
int, long)))
+                                               assert(isinstance(ei, 
REAL_TYPES))
                                except AssertionError:
                                        self._add_error_message('Expression 
"%s" is invalid for type real vector.'%str(e))
                                        raise Exception
                                return e
                        elif t == 'int_vector':
-                               if not isinstance(e, (tuple, list, set)):
+                               if not isinstance(e, VECTOR_TYPES):
                                        self._lisitify_flag = True
                                        e = [e]
                                try:
                                        for ei in e:
-                                               assert(isinstance(ei, (int, 
long)))
+                                               assert(isinstance(ei, 
INT_TYPES))
                                except AssertionError:
                                        self._add_error_message('Expression 
"%s" is invalid for type integer vector.'%str(e))
                                        raise Exception

Modified: 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Platform.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Platform.py  
    2008-12-20 02:35:52 UTC (rev 10136)
+++ 
gnuradio/branches/developers/n4hy/pfb_fbs/grc/src/platforms/python/Platform.py  
    2008-12-20 02:37:07 UTC (rev 10137)
@@ -52,8 +52,8 @@
                #init
                _Platform.__init__(
                        self,
-                       name='GNURadio Python',
-                       key='gnuradio_python',
+                       name='GRC',
+                       key='grc',
                        block_paths=block_paths,
                        block_dtd=BLOCK_DTD,
                        block_tree=BLOCK_TREE,

Modified: gnuradio/branches/developers/n4hy/pfb_fbs/grc/todo.txt
===================================================================
--- gnuradio/branches/developers/n4hy/pfb_fbs/grc/todo.txt      2008-12-20 
02:35:52 UTC (rev 10136)
+++ gnuradio/branches/developers/n4hy/pfb_fbs/grc/todo.txt      2008-12-20 
02:37:07 UTC (rev 10137)
@@ -4,8 +4,9 @@
 -optparse block
 -ofdm wrappers
 -controlled step block
--throttle with sink only (source is nulled)
 -simplify simple usrp
+-probe: also non-float outputs
+-RFID, ATSC
 
 ##################################################
 # Features
@@ -13,11 +14,13 @@
 -param editor, expand entry boxes in focus
 -change param dialog to panel within main window
 -command line option for additional block wrappers
--hotkeys in action descriptions
 -log slider gui control
 -icons for certain blocks, + for add
 -zoom in/out (cairo vector graphics)
 -search for blocks
+-gui grid editor for configuring grid params/placing wxgui plots and controls
+-grid param chooser gui
+-histogram plot
 
 ##################################################
 # Problems
@@ -26,6 +29,11 @@
 -auto clean hier library
 -add hier blocks to tree without restart?
 -dont hide vlen controller when vlen > 1
+-dont generate py files in .grc file dir
+-save/restore cwd
+-special connection validation rules for disabled blocks
+-threads dont die on exit in probe and variable sink
+-overloaded gui classes for each platform, move param input objects into 
overloaded
 
 ##################################################
 # External
@@ -38,4 +46,4 @@
 # Documentation
 ##################################################
 -notes on throttle
--how to add a block wrapper
+-notes on xdg-utils





reply via email to

[Prev in Thread] Current Thread [Next in Thread]