commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10309 - in gnuradio/branches/releases/3.2/grc: . data


From: jcorgan
Subject: [Commit-gnuradio] r10309 - in gnuradio/branches/releases/3.2/grc: . data/platforms/python data/platforms/python/blocks examples/usrp scripts src/grc_gnuradio/usrp src/gui src/platforms/python
Date: Tue, 27 Jan 2009 08:26:38 -0700 (MST)

Author: jcorgan
Date: 2009-01-27 08:26:38 -0700 (Tue, 27 Jan 2009)
New Revision: 10309

Added:
   gnuradio/branches/releases/3.2/grc/examples/usrp/usrp2_const_wave.grc
   gnuradio/branches/releases/3.2/grc/examples/usrp/usrp2_fft.grc
   gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/common.py
   gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/dual_usrp.py
Modified:
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_cpfsk_bc.xml
   gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/parameter.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_probe.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
   gnuradio/branches/releases/3.2/grc/data/platforms/python/flow_graph.tmpl
   gnuradio/branches/releases/3.2/grc/examples/usrp/Makefile.am
   gnuradio/branches/releases/3.2/grc/scripts/usrp2_probe
   gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/Makefile.am
   gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/__init__.py
   gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/simple_usrp.py
   gnuradio/branches/releases/3.2/grc/src/gui/Messages.py
   gnuradio/branches/releases/3.2/grc/src/gui/NotebookPage.py
   gnuradio/branches/releases/3.2/grc/src/platforms/python/Generator.py
   gnuradio/branches/releases/3.2/grc/todo.txt
Log:
Merged -r10274:10306 from trunk/grc into release-3.2/grc

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_cpfsk_bc.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_cpfsk_bc.xml 
    2009-01-27 13:31:11 UTC (rev 10308)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_cpfsk_bc.xml 
    2009-01-27 15:26:38 UTC (rev 10309)
@@ -8,7 +8,7 @@
        <name>CPFSK</name>
        <key>gr_cpfsk_bc</key>
        <import>from gnuradio import gr</import>
-       <make>cpfsk_bc($k, $amplitude, $samples_per_symbol)</make>
+       <make>gr.cpfsk_bc($k, $amplitude, $samples_per_symbol)</make>
        <callback>set_amplitude($amplitude)</callback>
        <param>
                <name>K</name>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/parameter.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/parameter.xml   
    2009-01-27 13:31:11 UTC (rev 10308)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/parameter.xml   
    2009-01-27 15:26:38 UTC (rev 10309)
@@ -7,6 +7,7 @@
 <block>
        <name>Parameter</name>
        <key>parameter</key>
+       <import>from optparse import OptionParser</import>
        <make>$value</make>
        <param>
                <name>Label</name>
@@ -18,8 +19,51 @@
                <name>Value</name>
                <key>value</key>
                <value>0</value>
-               <type>raw</type>
+               <type>$type.type</type>
        </param>
+       <param>
+               <name>Type</name>
+               <key>type</key>
+               <value></value>
+               <type>enum</type>
+               <hide>$type.hide</hide>
+               <option>
+                       <name>None</name>
+                       <key></key>
+                       <opt>type:raw</opt>
+                       <opt>hide:part</opt>
+               </option>
+               <option>
+                       <name>Complex</name>
+                       <key>complex</key>
+                       <opt>type:complex</opt>
+                       <opt>hide:none</opt>
+               </option>
+               <option>
+                       <name>Float</name>
+                       <key>float</key>
+                       <opt>type:real</opt>
+                       <opt>hide:none</opt>
+               </option>
+               <option>
+                       <name>Int</name>
+                       <key>int</key>
+                       <opt>type:int</opt>
+                       <opt>hide:none</opt>
+               </option>
+               <option>
+                       <name>Long</name>
+                       <key>long</key>
+                       <opt>type:int</opt>
+                       <opt>hide:none</opt>
+               </option>
+               <option>
+                       <name>String</name>
+                       <key>string</key>
+                       <opt>type:string</opt>
+                       <opt>hide:none</opt>
+               </option>
+       </param>
        <doc>
 This block represents a parameter to the flow graph, \
 used when the flow graph is instantiated as a hier block.
@@ -27,5 +71,7 @@
 The paramater value cannot depend on any variables.
 
 Leave the label blank to use the parameter id as the label.
+
+When type is not None, this parameter also becomes a command line option of 
the form --[id] [value].
        </doc>
 </block>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_probe.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_probe.xml 
    2009-01-27 13:31:11 UTC (rev 10308)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_probe.xml 
    2009-01-27 15:26:38 UTC (rev 10309)
@@ -12,7 +12,7 @@
        <param>
                <name>Interface</name>
                <key>interface</key>
-               <value>eth0</value>
+               <value></value>
                <type>string</type>
        </param>
        <param>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
 2009-01-27 13:31:11 UTC (rev 10308)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
 2009-01-27 15:26:38 UTC (rev 10309)
@@ -8,19 +8,18 @@
        <name>USRP2 Sink</name>
        <key>usrp2_sink_xxxx</key>
        <import>from gnuradio import usrp2</import>
-       <make>usrp2.sink_$(type.fcn)($interface, $mac_addr)
-self.$(id).set_interp_rate($interpolation)
-self.$(id).set_frequency($frequency)
-self.$(id).set_gain($gain)
-#if $auto_tr.eval
-self.$(id).set_auto_tr($auto_tr)
+       <make>#if not $interface.eval and not $mac_addr.eval
+usrp2.sink_$(type.fcn)()
+#elif not $mac_addr.eval
+usrp2.sink_$(type.fcn)($interface)
+#else
+usrp2.sink_$(type.fcn)($interface, $mac_addr)
 #end if
-#if $tx_enb.eval
-self.$(id).set_enable($tx_enb)
-#end if
-</make>
-       <callback>set_interp_rate($interpolation)</callback>
-       <callback>set_frequency($frequency)</callback>
+self.$(id).set_interp($interpolation)
+self.$(id).set_center_freq($frequency)
+self.$(id).set_gain($gain)</make>
+       <callback>set_interp($interpolation)</callback>
+       <callback>set_center_freq($frequency)</callback>
        <callback>set_gain($gain)</callback>
        <param>
                <name>Output Type</name>
@@ -50,64 +49,20 @@
                <type>string</type>
        </param>
        <param>
-               <name>Frequency</name>
-               <key>frequency</key>
-               <type>real</type>
-       </param>
-       <param>
                <name>Interpolation</name>
                <key>interpolation</key>
                <type>int</type>
        </param>
        <param>
+               <name>Frequency</name>
+               <key>frequency</key>
+               <type>real</type>
+       </param>
+       <param>
                <name>Gain</name>
                <key>gain</key>
                <type>real</type>
        </param>
-       <param>
-               <name>Auto T/R</name>
-               <key>auto_tr</key>
-               <value></value>
-               <type>enum</type>
-               <hide>$auto_tr.hide</hide>
-               <option>
-                       <name>Ignore</name>
-                       <key></key>
-                       <opt>hide:part</opt>
-               </option>
-               <option>
-                       <name>Enable</name>
-                       <key>True</key>
-                       <opt>hide:none</opt>
-               </option>
-               <option>
-                       <name>Disable</name>
-                       <key>False</key>
-                       <opt>hide:none</opt>
-               </option>
-       </param>
-       <param>
-               <name>TX Enable</name>
-               <key>tx_enb</key>
-               <value></value>
-               <type>enum</type>
-               <hide>$tx_enb.hide</hide>
-               <option>
-                       <name>Ignore</name>
-                       <key></key>
-                       <opt>hide:part</opt>
-               </option>
-               <option>
-                       <name>Enable</name>
-                       <key>True</key>
-                       <opt>hide:none</opt>
-               </option>
-               <option>
-                       <name>Disable</name>
-                       <key>False</key>
-                       <opt>hide:none</opt>
-               </option>
-       </param>
        <sink>
                <name>in</name>
                <type>$type</type>
@@ -118,14 +73,5 @@
 To use the default ethernet device, leave interface blank. \
 For systems with only 1 USRP2, you may leave the mac address blank. \
 For multi-USRP2 systems, specify the mac address in the form 00:50:C2:85:3x:xx.
-
---- Flex RF specific ---
-The "Auto TR" and "TX Enable" settings are flex rf specific and should be left 
at "Ignore" unless this is a flex rf board.
-
-If enabled, "Auto Transmit/Receive Switching" handles the preference for 
transmit packets vs receive packets. \
-By default, "Auto TR" is disabled.
-
-The "Transmit Enable" configures the transmitter to be on or off. \
-Do not leave this unconfigured.
        </doc>
 </block>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
       2009-01-27 13:31:11 UTC (rev 10308)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
       2009-01-27 15:26:38 UTC (rev 10309)
@@ -8,19 +8,18 @@
        <name>USRP2 Source</name>
        <key>usrp2_source_xxxx</key>
        <import>from gnuradio import usrp2</import>
-       <make>usrp2.source_$(type.fcn)($interface, $mac_addr)
-self.$(id).set_decim_rate($decimation)
-self.$(id).set_frequency($frequency)
-self.$(id).set_gain($gain)
-#if $auto_tr.eval
-self.$(id).set_auto_tr($auto_tr)
+       <make>#if not $interface.eval and not $mac_addr.eval
+usrp2.source_$(type.fcn)()
+#elif not $mac_addr.eval
+usrp2.source_$(type.fcn)($interface)
+#else
+usrp2.source_$(type.fcn)($interface, $mac_addr)
 #end if
-#if $rx_ant.eval
-self.$(id).select_rx_antenna($rx_ant)
-#end if
-</make>
-       <callback>set_decim_rate($decimation)</callback>
-       <callback>set_frequency($frequency)</callback>
+self.$(id).set_decim($decimation)
+self.$(id).set_center_freq($frequency)
+self.$(id).set_gain($gain)</make>
+       <callback>set_decim($decimation)</callback>
+       <callback>set_center_freq($frequency)</callback>
        <callback>set_gain($gain)</callback>
        <param>
                <name>Output Type</name>
@@ -50,64 +49,20 @@
                <type>string</type>
        </param>
        <param>
-               <name>Frequency</name>
-               <key>frequency</key>
-               <type>real</type>
-       </param>
-       <param>
                <name>Decimation</name>
                <key>decimation</key>
                <type>int</type>
        </param>
        <param>
+               <name>Frequency</name>
+               <key>frequency</key>
+               <type>real</type>
+       </param>
+       <param>
                <name>Gain</name>
                <key>gain</key>
                <type>real</type>
        </param>
-       <param>
-               <name>Auto T/R</name>
-               <key>auto_tr</key>
-               <value></value>
-               <type>enum</type>
-               <hide>$auto_tr.hide</hide>
-               <option>
-                       <name>Ignore</name>
-                       <key></key>
-                       <opt>hide:part</opt>
-               </option>
-               <option>
-                       <name>Enable</name>
-                       <key>True</key>
-                       <opt>hide:none</opt>
-               </option>
-               <option>
-                       <name>Disable</name>
-                       <key>False</key>
-                       <opt>hide:none</opt>
-               </option>
-       </param>
-       <param>
-               <name>RX Antenna</name>
-               <key>rx_ant</key>
-               <value></value>
-               <type>enum</type>
-               <hide>$rx_ant.hide</hide>
-               <option>
-                       <name>Ignore</name>
-                       <key></key>
-                       <opt>hide:part</opt>
-               </option>
-               <option>
-                       <name>TX/RX</name>
-                       <key>'TX/RX'</key>
-                       <opt>hide:none</opt>
-               </option>
-               <option>
-                       <name>RX2</name>
-                       <key>'RX2'</key>
-                       <opt>hide:none</opt>
-               </option>
-       </param>
        <source>
                <name>out</name>
                <type>$type</type>
@@ -118,14 +73,5 @@
 To use the default ethernet device, leave interface blank. \
 For systems with only 1 USRP2, you may leave the mac address blank. \
 For multi-USRP2 systems, specify the mac address in the form 00:50:C2:85:3x:xx.
-
---- Flex RF specific ---
-The "Auto TR" and "RX Antenna" settings are flex rf specific and should be 
left at "Ignore" unless this is a flex rf board.
-
-If enabled, "Auto Transmit/Receive Switching" handles the preference for 
transmit packets vs receive packets. \
-By default, "Auto TR" is disabled.
-
-The "Receive Antenna Setting" selects one of the SMA connectors as the data 
source. \
-By default, 'TX/RX' is selected.
        </doc>
 </block>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
        2009-01-27 13:31:11 UTC (rev 10308)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
        2009-01-27 15:26:38 UTC (rev 10309)
@@ -8,22 +8,34 @@
        <name>USRP Dual Sink</name>
        <key>usrp_dual_sink_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
-       <make>grc_usrp.dual_sink_$(type.fcn)(
-       number=$number,
-       frequency_a=$frequency_a,
-       frequency_b=$frequency_b,
-       interpolation=$interpolation,
-       gain_a=$gain_a,
-       gain_b=$gain_b,
-       mux=$mux,
-       auto_tr=$auto_tr,
-       tx_enb_a=$tx_enb_a,
-       tx_enb_b=$tx_enb_b,
-)</make>
+       <make>grc_usrp.dual_sink_$(type.fcn)(number=$number)
+self.$(id).set_interp_rate($interpolation)
+self.$(id).set_frequency_a($frequency_a, verbose=True)
+self.$(id).set_frequency_b($frequency_b, verbose=True)
+self.$(id).set_gain_a($gain_a)
+self.$(id).set_gain_b($gain_b)
+##################################################
+## Flex RF A
+##################################################
+#if $tx_enb_a.eval
+self.$(id).set_enable_a($tx_enb_a)
+#end if
+#if $auto_tr_a.eval and $tx_enb_a.eval
+self.$(id).set_auto_tr_a($auto_tr_a)
+#end if
+##################################################
+## Flex RF B
+##################################################
+#if $tx_enb_b.eval
+self.$(id).set_enable_b($tx_enb_b)
+#end if
+#if $auto_tr_b.eval and $tx_enb_b.eval
+self.$(id).set_auto_tr_b($auto_tr_b)
+#end if</make>
        <callback>set_interp_rate($interpolation)</callback>
        <callback>set_frequency_a($frequency_a)</callback>
+       <callback>set_frequency_b($frequency_b)</callback>
        <callback>set_gain_a($gain_a)</callback>
-       <callback>set_frequency_b($frequency_b)</callback>
        <callback>set_gain_b($gain_b)</callback>
        <param>
                <name>Input Type</name>
@@ -47,6 +59,11 @@
                <type>int</type>
        </param>
        <param>
+               <name>Interpolation</name>
+               <key>interpolation</key>
+               <type>int</type>
+       </param>
+       <param>
                <name>Frequency A</name>
                <key>frequency_a</key>
                <type>real</type>
@@ -57,11 +74,6 @@
                <type>real</type>
        </param>
        <param>
-               <name>Interpolation</name>
-               <key>interpolation</key>
-               <type>int</type>
-       </param>
-       <param>
                <name>Gain A</name>
                <key>gain_a</key>
                <type>real</type>
@@ -71,22 +83,20 @@
                <key>gain_b</key>
                <type>real</type>
        </param>
+<!--
+###################################################
+## Flex RF A
+###################################################
+ -->
        <param>
-               <name>Mux</name>
-               <key>mux</key>
-               <value>0x0</value>
-               <type>hex</type>
-               <hide>part</hide>
-       </param>
-       <param>
-               <name>Auto T/R</name>
-               <key>auto_tr</key>
-               <value>None</value>
+               <name>TX Enable A</name>
+               <key>tx_enb_a</key>
+               <value></value>
                <type>enum</type>
-               <hide>$auto_tr.hide</hide>
+               <hide>$tx_enb_a.hide</hide>
                <option>
-                       <name>Ignore</name>
-                       <key>None</key>
+                       <name>Unconfigured</name>
+                       <key></key>
                        <opt>hide:part</opt>
                </option>
                <option>
@@ -101,36 +111,38 @@
                </option>
        </param>
        <param>
-               <name>TX Enable A</name>
-               <key>tx_enb_a</key>
-               <value>None</value>
+               <name>Auto T/R A</name>
+               <key>auto_tr_a</key>
+               <value></value>
                <type>enum</type>
-               <hide>$tx_enb_a.hide</hide>
+               <hide>#if $tx_enb_a.eval then 'none' else 'all'#</hide>
                <option>
-                       <name>Ignore</name>
-                       <key>None</key>
-                       <opt>hide:part</opt>
+                       <name>Auto</name>
+                       <key></key>
                </option>
                <option>
                        <name>Enable</name>
                        <key>True</key>
-                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>Disable</name>
                        <key>False</key>
-                       <opt>hide:none</opt>
                </option>
        </param>
+<!--
+###################################################
+## Flex RF B
+###################################################
+ -->
        <param>
                <name>TX Enable B</name>
                <key>tx_enb_b</key>
-               <value>None</value>
+               <value></value>
                <type>enum</type>
                <hide>$tx_enb_b.hide</hide>
                <option>
-                       <name>Ignore</name>
-                       <key>None</key>
+                       <name>Unconfigured</name>
+                       <key></key>
                        <opt>hide:part</opt>
                </option>
                <option>
@@ -144,6 +156,25 @@
                        <opt>hide:none</opt>
                </option>
        </param>
+       <param>
+               <name>Auto T/R B</name>
+               <key>auto_tr_b</key>
+               <value></value>
+               <type>enum</type>
+               <hide>#if $tx_enb_b.eval then 'none' else 'all'#</hide>
+               <option>
+                       <name>Auto</name>
+                       <key></key>
+               </option>
+               <option>
+                       <name>Enable</name>
+                       <key>True</key>
+               </option>
+               <option>
+                       <name>Disable</name>
+                       <key>False</key>
+               </option>
+       </param>
        <sink>
                <name>Ain</name>
                <type>$type</type>
@@ -155,13 +186,10 @@
        <doc>
 The USRP sink inputs 128 Megasamples per second / interpolation.
 
---- Flex RF specific ---
-The "Auto TR" and "TX Enable" settings are flex rf specific and should be left 
at "Ignore" unless this is a flex rf board.
+Flex RF boards only: The "Transmit Enable" configures the transmitter to be on 
or off. \
+Do not leave this unconfigured.
 
-If enabled, "Auto Transmit/Receive Switching" handles the preference for 
transmit packets vs receive packets. \
+Flex RF boards only: If enabled, "Auto Transmit/Receive Switching" handles the 
preference for transmit packets vs receive packets. \
 By default, "Auto TR" is disabled.
-
-The "Transmit Enable" configures the transmitter to be on or off. \
-Do not leave this unconfigured.
        </doc>
 </block>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
      2009-01-27 13:31:11 UTC (rev 10308)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
      2009-01-27 15:26:38 UTC (rev 10309)
@@ -8,22 +8,28 @@
        <name>USRP Dual Source</name>
        <key>usrp_dual_source_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
-       <make>grc_usrp.dual_source_$(type.fcn)(
-       number=$number,
-       frequency_a=$frequency_a,
-       frequency_b=$frequency_b,
-       decimation=$decimation,
-       gain_a=$gain_a,
-       gain_b=$gain_b,
-       mux=$mux,
-       auto_tr=$auto_tr,
-       rx_ant_a=$rx_ant_a,
-       rx_ant_b=$rx_ant_b,
-)</make>
+       <make>grc_usrp.dual_source_$(type.fcn)(number=$number, 
side_a='$rx_ant_a.side', rx_ant_a='$rx_ant_a.rx_ant', side_b='$rx_ant_b.side', 
rx_ant_b='$rx_ant_b.rx_ant')
+self.$(id).set_decim_rate($decimation)
+self.$(id).set_frequency_a($frequency_a, verbose=True)
+self.$(id).set_frequency_b($frequency_b, verbose=True)
+self.$(id).set_gain_a($gain_a)
+self.$(id).set_gain_b($gain_b)
+##################################################
+## Flex RF A
+##################################################
+#if $auto_tr_a.eval and $rx_ant_a.flex
+self.$(id).set_auto_tr_a($auto_tr_a)
+#end if
+##################################################
+## Flex RF B
+##################################################
+#if $auto_tr_b.eval and $rx_ant_b.flex
+self.$(id).set_auto_tr_b($auto_tr_b)
+#end if</make>
        <callback>set_decim_rate($decimation)</callback>
        <callback>set_frequency_a($frequency_a)</callback>
+       <callback>set_frequency_b($frequency_b)</callback>
        <callback>set_gain_a($gain_a)</callback>
-       <callback>set_frequency_b($frequency_b)</callback>
        <callback>set_gain_b($gain_b)</callback>
        <param>
                <name>Output Type</name>
@@ -47,6 +53,11 @@
                <type>int</type>
        </param>
        <param>
+               <name>Decimation</name>
+               <key>decimation</key>
+               <type>int</type>
+       </param>
+       <param>
                <name>Frequency A</name>
                <key>frequency_a</key>
                <type>real</type>
@@ -57,11 +68,6 @@
                <type>real</type>
        </param>
        <param>
-               <name>Decimation</name>
-               <key>decimation</key>
-               <type>int</type>
-       </param>
-       <param>
                <name>Gain A</name>
                <key>gain_a</key>
                <type>real</type>
@@ -71,77 +77,132 @@
                <key>gain_b</key>
                <type>real</type>
        </param>
+<!--
+###################################################
+## Flex RF A
+###################################################
+ -->
        <param>
-               <name>Mux</name>
-               <key>mux</key>
-               <value>0x0</value>
-               <type>hex</type>
-               <hide>part</hide>
+               <name>RX Antenna A</name>
+               <key>rx_ant_a</key>
+               <type>enum</type>
+               <option>
+                       <name>Side A, RXA</name>
+                       <key>A_RXA</key>
+                       <opt>side:A</opt>
+                       <opt>rx_ant:RXA</opt>
+                       <opt>flex:</opt>
+               </option>
+               <option>
+                       <name>Side A, RXB</name>
+                       <key>A_RXB</key>
+                       <opt>side:A</opt>
+                       <opt>rx_ant:RXB</opt>
+                       <opt>flex:</opt>
+               </option>
+               <option>
+                       <name>Side A, TX/RX</name>
+                       <key>A_TXRX</key>
+                       <opt>side:A</opt>
+                       <opt>rx_ant:TX/RX</opt>
+                       <opt>flex:1</opt>
+               </option>
+               <option>
+                       <name>Side A, RX2</name>
+                       <key>A_RX2</key>
+                       <opt>side:A</opt>
+                       <opt>rx_ant:RX2</opt>
+                       <opt>flex:1</opt>
+               </option>
+               <option>
+                       <name>Side B, RXA</name>
+                       <key>B_RXA</key>
+                       <opt>side:B</opt>
+                       <opt>rx_ant:RXA</opt>
+                       <opt>flex:</opt>
+               </option>
        </param>
        <param>
-               <name>Auto T/R</name>
-               <key>auto_tr</key>
-               <value>None</value>
+               <name>Auto T/R A</name>
+               <key>auto_tr_a</key>
+               <value></value>
                <type>enum</type>
-               <hide>$auto_tr.hide</hide>
+               <hide>#if $rx_ant_a.flex then 'none' else 'all'#</hide>
                <option>
-                       <name>Ignore</name>
-                       <key>None</key>
-                       <opt>hide:part</opt>
+                       <name>Auto</name>
+                       <key></key>
                </option>
                <option>
                        <name>Enable</name>
                        <key>True</key>
-                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>Disable</name>
                        <key>False</key>
-                       <opt>hide:none</opt>
                </option>
        </param>
+<!--
+###################################################
+## Flex RF B
+###################################################
+ -->
        <param>
-               <name>RX Antenna A</name>
-               <key>rx_ant_a</key>
-               <value>None</value>
+               <name>RX Antenna B</name>
+               <key>rx_ant_b</key>
                <type>enum</type>
-               <hide>$rx_ant_a.hide</hide>
                <option>
-                       <name>Ignore</name>
-                       <key>None</key>
-                       <opt>hide:part</opt>
+                       <name>Side B, RXA</name>
+                       <key>B_RXA</key>
+                       <opt>side:B</opt>
+                       <opt>rx_ant:RXA</opt>
+                       <opt>flex:</opt>
                </option>
                <option>
-                       <name>TX/RX</name>
-                       <key>'TX/RX'</key>
-                       <opt>hide:none</opt>
+                       <name>Side B, RXB</name>
+                       <key>B_RXB</key>
+                       <opt>side:B</opt>
+                       <opt>rx_ant:RXB</opt>
+                       <opt>flex:</opt>
                </option>
                <option>
-                       <name>RX2</name>
-                       <key>'RX2'</key>
-                       <opt>hide:none</opt>
+                       <name>Side B, TX/RX</name>
+                       <key>B_TXRX</key>
+                       <opt>side:B</opt>
+                       <opt>rx_ant:TX/RX</opt>
+                       <opt>flex:1</opt>
                </option>
+               <option>
+                       <name>Side B, RX2</name>
+                       <key>B_RX2</key>
+                       <opt>side:B</opt>
+                       <opt>rx_ant:RX2</opt>
+                       <opt>flex:1</opt>
+               </option>
+               <option>
+                       <name>Side A, RXB</name>
+                       <key>A_RXB</key>
+                       <opt>side:A</opt>
+                       <opt>rx_ant:RXB</opt>
+                       <opt>flex:</opt>
+               </option>
        </param>
        <param>
-               <name>RX Antenna B</name>
-               <key>rx_ant_b</key>
-               <value>None</value>
+               <name>Auto T/R B</name>
+               <key>auto_tr_b</key>
+               <value></value>
                <type>enum</type>
-               <hide>$rx_ant_b.hide</hide>
+               <hide>#if $rx_ant_b.flex then 'none' else 'all'#</hide>
                <option>
-                       <name>Ignore</name>
-                       <key>None</key>
-                       <opt>hide:part</opt>
+                       <name>Auto</name>
+                       <key></key>
                </option>
                <option>
-                       <name>TX/RX</name>
-                       <key>'TX/RX'</key>
-                       <opt>hide:none</opt>
+                       <name>Enable</name>
+                       <key>True</key>
                </option>
                <option>
-                       <name>RX2</name>
-                       <key>'RX2'</key>
-                       <opt>hide:none</opt>
+                       <name>Disable</name>
+                       <key>False</key>
                </option>
        </param>
        <source>
@@ -155,13 +216,12 @@
        <doc>
 The USRP source outputs 64 Megasamples per second / decimation.
 
---- Flex RF specific ---
-The "Auto TR" and "RX Antenna" settings are flex rf specific and should be 
left at "Ignore" unless this is a flex rf board.
+The "Receive Antenna Setting" selects one of the SMA connectors as the data 
source. \
+Flex RF boards use the "TX/RX" and "RX2" settings. \
+Basic RX and LFRX use the "RXA" and "RXB" settings. \
+All other boards use the "RXA" setting.
 
-If enabled, "Auto Transmit/Receive Switching" handles the preference for 
transmit packets vs receive packets. \
+Flex RF boards only: If enabled, "Auto Transmit/Receive Switching" handles the 
preference for transmit packets vs receive packets. \
 By default, "Auto TR" is disabled.
-
-The "Receive Antenna Setting" selects one of the SMA connectors as the data 
source. \
-By default, 'TX/RX' is selected.
        </doc>
 </block>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
      2009-01-27 13:31:11 UTC (rev 10308)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
      2009-01-27 15:26:38 UTC (rev 10309)
@@ -8,16 +8,16 @@
        <name>USRP Sink</name>
        <key>usrp_simple_sink_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
-       <make>grc_usrp.simple_sink_$(type.fcn)(
-       number=$number,
-       subdev_spec=$subdev_spec,
-       frequency=$frequency,
-       interpolation=$interpolation,
-       gain=$gain,
-       mux=$mux,
-       auto_tr=$auto_tr,
-       tx_enb=$tx_enb,
-)</make>
+       <make>grc_usrp.simple_sink_$(type.fcn)(number=$number, side='$side')
+self.$(id).set_interp_rate($interpolation)
+self.$(id).set_frequency($frequency, verbose=True)
+self.$(id).set_gain($gain)
+#if $tx_enb.eval
+self.$(id).set_enable($tx_enb)
+#end if
+#if $auto_tr.eval and $tx_enb.eval
+self.$(id).set_auto_tr($auto_tr)
+#end if</make>
        <callback>set_interp_rate($interpolation)</callback>
        <callback>set_frequency($frequency)</callback>
        <callback>set_gain($gain)</callback>
@@ -43,22 +43,9 @@
                <type>int</type>
        </param>
        <param>
-               <name>Subdev Spec</name>
-               <key>subdev_spec</key>
-               <value>auto</value>
-               <type>enum</type>
-               <option>
-                       <name>Auto</name>
-                       <key>None</key>
-               </option>
-               <option>
-                       <name>Side A</name>
-                       <key>(0, 0)</key>
-               </option>
-               <option>
-                       <name>Side B</name>
-                       <key>(1, 0)</key>
-               </option>
+               <name>Interpolation</name>
+               <key>interpolation</key>
+               <type>int</type>
        </param>
        <param>
                <name>Frequency</name>
@@ -66,31 +53,33 @@
                <type>real</type>
        </param>
        <param>
-               <name>Interpolation</name>
-               <key>interpolation</key>
-               <type>int</type>
-       </param>
-       <param>
                <name>Gain</name>
                <key>gain</key>
                <type>real</type>
        </param>
        <param>
-               <name>Mux</name>
-               <key>mux</key>
-               <value>0x0</value>
-               <type>hex</type>
-               <hide>part</hide>
+               <name>Side</name>
+               <key>side</key>
+               <value>A</value>
+               <type>enum</type>
+               <option>
+                       <name>Side A</name>
+                       <key>A</key>
+               </option>
+               <option>
+                       <name>Side B</name>
+                       <key>B</key>
+               </option>
        </param>
        <param>
-               <name>Auto T/R</name>
-               <key>auto_tr</key>
-               <value>None</value>
+               <name>TX Enable</name>
+               <key>tx_enb</key>
+               <value></value>
                <type>enum</type>
-               <hide>$auto_tr.hide</hide>
+               <hide>$tx_enb.hide</hide>
                <option>
-                       <name>Ignore</name>
-                       <key>None</key>
+                       <name>Unconfigured</name>
+                       <key></key>
                        <opt>hide:part</opt>
                </option>
                <option>
@@ -105,25 +94,22 @@
                </option>
        </param>
        <param>
-               <name>TX Enable</name>
-               <key>tx_enb</key>
-               <value>None</value>
+               <name>Auto T/R</name>
+               <key>auto_tr</key>
+               <value></value>
                <type>enum</type>
-               <hide>$tx_enb.hide</hide>
+               <hide>#if $tx_enb.eval then 'none' else 'all'#</hide>
                <option>
-                       <name>Ignore</name>
-                       <key>None</key>
-                       <opt>hide:part</opt>
+                       <name>Auto</name>
+                       <key></key>
                </option>
                <option>
                        <name>Enable</name>
                        <key>True</key>
-                       <opt>hide:none</opt>
                </option>
                <option>
                        <name>Disable</name>
                        <key>False</key>
-                       <opt>hide:none</opt>
                </option>
        </param>
        <sink>
@@ -133,13 +119,10 @@
        <doc>
 The USRP sink inputs 128 Megasamples per second / interpolation.
 
---- Flex RF specific ---
-The "Auto TR" and "TX Enable" settings are flex rf specific and should be left 
at "Ignore" unless this is a flex rf board.
+Flex RF boards only: The "Transmit Enable" configures the transmitter to be on 
or off. \
+Do not leave this unconfigured.
 
-If enabled, "Auto Transmit/Receive Switching" handles the preference for 
transmit packets vs receive packets. \
+Flex RF boards only: If enabled, "Auto Transmit/Receive Switching" handles the 
preference for transmit packets vs receive packets. \
 By default, "Auto TR" is disabled.
-
-The "Transmit Enable" configures the transmitter to be on or off. \
-Do not leave this unconfigured.
        </doc>
 </block>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
    2009-01-27 13:31:11 UTC (rev 10308)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
    2009-01-27 15:26:38 UTC (rev 10309)
@@ -8,16 +8,13 @@
        <name>USRP Source</name>
        <key>usrp_simple_source_x</key>
        <import>from grc_gnuradio import usrp as grc_usrp</import>
-       <make>grc_usrp.simple_source_$(type.fcn)(
-       number=$number,
-       subdev_spec=$subdev_spec,
-       frequency=$frequency,
-       decimation=$decimation,
-       gain=$gain,
-       mux=$mux,
-       auto_tr=$auto_tr,
-       rx_ant=$rx_ant,
-)</make>
+       <make>grc_usrp.simple_source_$(type.fcn)(number=$number, side='$side', 
rx_ant='$rx_ant')
+self.$(id).set_decim_rate($decimation)
+self.$(id).set_frequency($frequency, verbose=True)
+self.$(id).set_gain($gain)
+#if $auto_tr.eval and $rx_ant.flex
+self.$(id).set_auto_tr($auto_tr)
+#end if</make>
        <callback>set_decim_rate($decimation)</callback>
        <callback>set_frequency($frequency)</callback>
        <callback>set_gain($gain)</callback>
@@ -43,30 +40,9 @@
                <type>int</type>
        </param>
        <param>
-               <name>Subdev Spec</name>
-               <key>subdev_spec</key>
-               <value>auto</value>
-               <type>enum</type>
-               <option>
-                       <name>Auto</name>
-                       <key>None</key>
-               </option>
-               <option>
-                       <name>Side A:0</name>
-                       <key>(0, 0)</key>
-               </option>
-               <option>
-                       <name>Side B:0</name>
-                       <key>(1, 0)</key>
-               </option>
-               <option>
-                       <name>Side A:1</name>
-                       <key>(0, 1)</key>
-               </option>
-               <option>
-                       <name>Side B:1</name>
-                       <key>(1, 1)</key>
-               </option>
+               <name>Decimation</name>
+               <key>decimation</key>
+               <type>int</type>
        </param>
        <param>
                <name>Frequency</name>
@@ -74,66 +50,69 @@
                <type>real</type>
        </param>
        <param>
-               <name>Decimation</name>
-               <key>decimation</key>
-               <type>int</type>
-       </param>
-       <param>
                <name>Gain</name>
                <key>gain</key>
                <type>real</type>
        </param>
        <param>
-               <name>Mux</name>
-               <key>mux</key>
-               <value>0x0</value>
-               <type>hex</type>
-               <hide>part</hide>
-       </param>
-       <param>
-               <name>Auto T/R</name>
-               <key>auto_tr</key>
-               <value>None</value>
+               <name>Side</name>
+               <key>side</key>
+               <value>A</value>
                <type>enum</type>
-               <hide>$auto_tr.hide</hide>
                <option>
-                       <name>Ignore</name>
-                       <key>None</key>
-                       <opt>hide:part</opt>
+                       <name>Side A</name>
+                       <key>A</key>
                </option>
                <option>
-                       <name>Enable</name>
-                       <key>True</key>
-                       <opt>hide:none</opt>
+                       <name>Side B</name>
+                       <key>B</key>
                </option>
-               <option>
-                       <name>Disable</name>
-                       <key>False</key>
-                       <opt>hide:none</opt>
-               </option>
        </param>
        <param>
                <name>RX Antenna</name>
                <key>rx_ant</key>
-               <value>None</value>
+               <value>RXA</value>
                <type>enum</type>
-               <hide>$rx_ant.hide</hide>
                <option>
-                       <name>Ignore</name>
-                       <key>None</key>
-                       <opt>hide:part</opt>
+                       <name>RXA</name>
+                       <key>RXA</key>
+                       <opt>flex:</opt>
                </option>
                <option>
+                       <name>RXB</name>
+                       <key>RXB</key>
+                       <opt>flex:</opt>
+               </option>
+               <option>
                        <name>TX/RX</name>
-                       <key>'TX/RX'</key>
-                       <opt>hide:none</opt>
+                       <key>TX/RX</key>
+                       <opt>flex:1</opt>
                </option>
                <option>
                        <name>RX2</name>
-                       <key>'RX2'</key>
-                       <opt>hide:none</opt>
+                       <key>RX2</key>
+                       <opt>flex:1</opt>
                </option>
        </param>
+       <param>
+               <name>Auto T/R</name>
+               <key>auto_tr</key>
+               <value></value>
+               <type>enum</type>
+               <hide>#if $rx_ant.flex then 'none' else 'all'#</hide>
+               <option>
+                       <name>Auto</name>
+                       <key></key>
+               </option>
+               <option>
+                       <name>Enable</name>
+                       <key>True</key>
+               </option>
+               <option>
+                       <name>Disable</name>
+                       <key>False</key>
+               </option>
+       </param>
        <source>
                <name>out</name>
                <type>$type</type>
@@ -141,13 +120,12 @@
        <doc>
 The USRP source outputs 64 Megasamples per second / decimation.
 
---- Flex RF specific ---
-The "Auto TR" and "RX Antenna" settings are flex rf specific and should be 
left at "Ignore" unless this is a flex rf board.
+The "Receive Antenna Setting" selects one of the SMA connectors as the data 
source. \
+Flex RF boards use the "TX/RX" and "RX2" settings. \
+Basic RX and LFRX use the "RXA" and "RXB" settings. \
+All other boards use the "RXA" setting.
 
-If enabled, "Auto Transmit/Receive Switching" handles the preference for 
transmit packets vs receive packets. \
+Flex RF boards only: If enabled, "Auto Transmit/Receive Switching" handles the 
preference for transmit packets vs receive packets. \
 By default, "Auto TR" is disabled.
-
-The "Receive Antenna Setting" selects one of the SMA connectors as the data 
source. \
-By default, 'TX/RX' is selected.
        </doc>
 </block>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
===================================================================
--- 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
  2009-01-27 13:31:11 UTC (rev 10308)
+++ 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/wxgui_fftsink2.xml
  2009-01-27 15:26:38 UTC (rev 10309)
@@ -32,6 +32,7 @@
 #else
 self.GridAdd(self.$(id).win, $grid_pos[0], $grid_pos[1], $grid_pos[2], 
$grid_pos[3])
 #end if</make>
+       <callback>set_baseband_freq($baseband_freq)</callback>
        <param>
                <name>Type</name>
                <key>type</key>

Modified: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/flow_graph.tmpl
===================================================================
--- gnuradio/branches/releases/3.2/grc/data/platforms/python/flow_graph.tmpl    
2009-01-27 13:31:11 UTC (rev 10308)
+++ gnuradio/branches/releases/3.2/grc/data/platforms/python/flow_graph.tmpl    
2009-01-27 15:26:38 UTC (rev 10309)
@@ -18,10 +18,10 @@
 #set $DIVIDER = '#'*50
 $DIVIDER
 # Gnuradio Python Flow Graph
-$('# Title: %s'%$flow_graph.get_option('title'))
-$('# Author: %s'%$flow_graph.get_option('author'))
-$('# Description: %s'%$flow_graph.get_option('description'))
-$('# Generated: %s'%time.ctime())
+# Title: $flow_graph.get_option('title')
+# Author: $flow_graph.get_option('author')
+# Description: $flow_graph.get_option('description')
+# Generated: $time.ctime()
 $DIVIDER
 
 ########################################################
@@ -126,7 +126,7 @@
 #end if
 #for $blk in filter(lambda b: b.get_make(), $blocks)
        #set $code = '\n\t\t'.join($blk.get_make().splitlines())
-               $("self.%s = %s"%($blk.get_id(), $code))
+               self.$blk.get_id() = $code
 #end for
 ########################################################
 ##Create Connections
@@ -152,13 +152,7 @@
        #else
                #set $sink_name = 'self.' + $sink.get_parent().get_id()
        #end if
-               $("self.connect((%s, %s), (%s, %s))"%(
-                               $source_name,
-                               $source.get_key(),
-                               $sink_name,
-                               $sink.get_key(),
-                       )
-               )
+               self.connect(($source_name, $source.get_key()), ($sink_name, 
$sink.get_key()))
 #end for
 
 ########################################################
@@ -185,7 +179,19 @@
 ########################################################
 #if $generate_options != 'hb'
 if __name__ == '__main__':
-       tb = $(class_name)()
+       #set $args = list()
+       #if $parameters
+       parser = OptionParser()
+               #for $param in $parameters
+                       #set $type = $param.get_param('type').get_value()
+                       #if $type
+       parser.add_option("--$param.get_id()", dest="$param.get_id()", 
type="$type", default=$param.get_make())
+                               #silent 
$args.append('%s=options.%s'%($param.get_id(), $param.get_id()))
+                       #end if
+               #end for
+       (options, args) = parser.parse_args()
+       #end if
+       tb = $(class_name)($(', '.join($args)))
        #if $generate_options == 'wx_gui'
        tb.Run()
        #elif $generate_options == 'no_gui'

Modified: gnuradio/branches/releases/3.2/grc/examples/usrp/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.2/grc/examples/usrp/Makefile.am        
2009-01-27 13:31:11 UTC (rev 10308)
+++ gnuradio/branches/releases/3.2/grc/examples/usrp/Makefile.am        
2009-01-27 15:26:38 UTC (rev 10309)
@@ -1,5 +1,5 @@
 #
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -24,5 +24,7 @@
 ourdatadir = $(grc_examples_prefix)/usrp
 
 dist_ourdata_DATA = \
+       usrp2_const_wave.grc \
+       usrp2_fft.grc \
        usrp_two_tone_loopback.grc \
        usrp_wbfm_receive.grc

Copied: gnuradio/branches/releases/3.2/grc/examples/usrp/usrp2_const_wave.grc 
(from rev 10306, gnuradio/trunk/grc/examples/usrp/usrp2_const_wave.grc)
===================================================================
--- gnuradio/branches/releases/3.2/grc/examples/usrp/usrp2_const_wave.grc       
                        (rev 0)
+++ gnuradio/branches/releases/3.2/grc/examples/usrp/usrp2_const_wave.grc       
2009-01-27 15:26:38 UTC (rev 10309)
@@ -0,0 +1,198 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Fri Jan 23 11:26:26 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>top_block</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>USRP2 Const Wave</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>Carrier with constant amplitude</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</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>freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Frequency (Hz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>15e6</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>10e6</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>20e6</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>(12, 144)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sig_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_sig_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>waveform</key>
+      <value>gr.GR_CONST_WAVE</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>10e3</value>
+    </param>
+    <param>
+      <key>offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(225, 27)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>usrp2_sink_xxxx</key>
+    <param>
+      <key>id</key>
+      <value>usrp2_sink_xxxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>interface</key>
+      <value></value>
+    </param>
+    <param>
+      <key>mac_addr</key>
+      <value></value>
+    </param>
+    <param>
+      <key>frequency</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>interpolation</key>
+      <value>101</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>auto_tr</key>
+      <value></value>
+    </param>
+    <param>
+      <key>tx_enb</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(391, 190)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>gr_sig_source_x_0</source_block_id>
+    <sink_block_id>usrp2_sink_xxxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>

Copied: gnuradio/branches/releases/3.2/grc/examples/usrp/usrp2_fft.grc (from 
rev 10306, gnuradio/trunk/grc/examples/usrp/usrp2_fft.grc)
===================================================================
--- gnuradio/branches/releases/3.2/grc/examples/usrp/usrp2_fft.grc              
                (rev 0)
+++ gnuradio/branches/releases/3.2/grc/examples/usrp/usrp2_fft.grc      
2009-01-27 15:26:38 UTC (rev 10309)
@@ -0,0 +1,249 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Fri Jan 23 11:38:11 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>top_block</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>USRP2 FFT</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>FFT of Spectrum</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</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</key>
+    <param>
+      <key>id</key>
+      <value>decim</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(35, 149)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>usrp2_source_xxxx</key>
+    <param>
+      <key>id</key>
+      <value>usrp2_source_xxxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>interface</key>
+      <value></value>
+    </param>
+    <param>
+      <key>mac_addr</key>
+      <value></value>
+    </param>
+    <param>
+      <key>frequency</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>decimation</key>
+      <value>decim</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>auto_tr</key>
+      <value></value>
+    </param>
+    <param>
+      <key>rx_ant</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(177, 271)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FFT Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>100e6/decim</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>12</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>20</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(384, 72)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Frequency (Hz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>-100e6</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>100e6</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>(139, 129)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>usrp2_source_xxxx_0</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>

Modified: gnuradio/branches/releases/3.2/grc/scripts/usrp2_probe
===================================================================
--- gnuradio/branches/releases/3.2/grc/scripts/usrp2_probe      2009-01-27 
13:31:11 UTC (rev 10308)
+++ gnuradio/branches/releases/3.2/grc/scripts/usrp2_probe      2009-01-27 
15:26:38 UTC (rev 10309)
@@ -135,8 +135,11 @@
                        'rx': (usrp2.source_32fc, 'adc_rate'),
                        'tx': (usrp2.sink_32fc, 'dac_rate'),
                }[usrp_type_param.evaluate()]
+               interface = usrp_interface_param.evaluate()
                try:
-                       u = make(usrp_interface_param.evaluate(), mac_addr)
+                       if not interface and not mac_addr: u = make()
+                       elif not mac_addr: u = make(interface)
+                       else: u = make(interface, mac_addr)
                        msg = ">>> USRP2 Probe\n"
                        msg = "%s\nMAC Addr:\n\t%s\n"%(msg, u.mac_addr())
                        msg = "%s\nName (ID):\n\t%s\n"%(msg, 
u.daughterboard_id())

Modified: gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/Makefile.am
===================================================================
--- gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/Makefile.am        
2009-01-27 13:31:11 UTC (rev 10308)
+++ gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/Makefile.am        
2009-01-27 15:26:38 UTC (rev 10309)
@@ -25,4 +25,6 @@
 
 ourpython_PYTHON = \
        __init__.py \
+       common.py \
+       dual_usrp.py \
        simple_usrp.py

Modified: gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/__init__.py
===================================================================
--- gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/__init__.py        
2009-01-27 13:31:11 UTC (rev 10308)
+++ gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/__init__.py        
2009-01-27 15:26:38 UTC (rev 10309)
@@ -18,7 +18,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from simple_usrp import simple_source_c, simple_source_s
-from simple_usrp import dual_source_c, dual_source_s
-from simple_usrp import simple_sink_c, simple_sink_s
-from simple_usrp import dual_sink_c, dual_sink_s
+from simple_usrp import \
+       simple_source_c, simple_source_s, \
+       simple_sink_c, simple_sink_s
+from dual_usrp import \
+       dual_source_c, dual_source_s, \
+       dual_sink_c, dual_sink_s

Copied: gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/common.py 
(from rev 10306, gnuradio/trunk/grc/src/grc_gnuradio/usrp/common.py)
===================================================================
--- gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/common.py          
                (rev 0)
+++ gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/common.py  
2009-01-27 15:26:38 UTC (rev 10309)
@@ -0,0 +1,71 @@
+# Copyright 2009 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.
+#
+
+import sys
+from gnuradio import usrp, gr
+
+##################################################
+# Set frequency function w/ verbose option
+##################################################
+def set_frequency(u, which, subdev, frequency, verbose=False):
+       """
+       Set the carrier frequency for the given subdevice.
+       @param u the usrp source/sink
+       @param which specifies the DDC/DUC number
+       @param frequency the carrier frequency in Hz
+       @param verbose if true, print usrp tuning information
+       """
+       r = u.tune(which, subdev, frequency)
+       if not verbose: return
+       print subdev.side_and_name()
+       if r:
+               print "\tr.baseband_frequency =", r.baseband_freq
+               print "\tr.dxc_frequency =", r.dxc_freq
+               print "\tr.residual_frequency =", r.residual_freq
+               print "\tr.inverted =", r.inverted, "\n"
+       else: print >> sys.stderr, 'Error calling tune on subdevice.'
+
+##################################################
+# Classes to associate usrp constructor w/ io size
+##################################################
+class usrp_helper(object):
+       def _get_usrp_constructor(self): return self._usrp_args[0]
+       def _get_io_size(self): return self._usrp_args[1]
+class usrp_source_c(usrp_helper): _usrp_args = (usrp.source_c, 
gr.sizeof_gr_complex)
+class usrp_source_s(usrp_helper): _usrp_args = (usrp.source_s, gr.sizeof_short)
+class usrp_sink_c(usrp_helper): _usrp_args = (usrp.sink_c, 
gr.sizeof_gr_complex)
+class usrp_sink_s(usrp_helper): _usrp_args = (usrp.sink_s, gr.sizeof_short)
+
+##################################################
+# RX antenna definitions and helpers
+##################################################
+def is_flex(rx_ant): return rx_ant.upper() in ('TX/RX', 'RX2')
+def to_spec(side, rx_ant='RXA'):
+       """
+       Convert the side to a spec number.
+       @param side A or B
+       @param rx_ant antenna type
+       @return the spec (0/1, 0/1)
+       """
+       try: return (
+               {'A': 0, 'B': 1}[side.upper()], #side spec is 0 for A, 1 for B
+               rx_ant.upper() == 'RXB' and 1 or 0, #subdev spec is 1 for RXB
+       )
+       except: raise ValueError, 'Side A or B expected.'

Copied: gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/dual_usrp.py 
(from rev 10306, gnuradio/trunk/grc/src/grc_gnuradio/usrp/dual_usrp.py)
===================================================================
--- gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/dual_usrp.py       
                        (rev 0)
+++ gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/dual_usrp.py       
2009-01-27 15:26:38 UTC (rev 10309)
@@ -0,0 +1,146 @@
+# Copyright 2009 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.
+#
+
+import common
+from gnuradio import gr, usrp
+
+####################################################################
+# Dual USRP Source
+####################################################################
+class _dual_source(gr.hier_block2):
+       """A dual usrp source of IO type short or complex."""
+
+       def __init__(self, number, side_a='A', rx_ant_a='RXA', side_b='B', 
rx_ant_b='RXA'):
+               """
+               USRP dual source contructor.
+               @param number the unit number
+               @param side_a A or B
+               @param rx_ant_a the antenna choice
+               @param side_b A or B
+               @param rx_ant_b the antenna choice
+               """
+               #initialize hier2 block
+               gr.hier_block2.__init__(
+                       self, 'usrp_dual_source',
+                       gr.io_signature(0, 0, 0),
+                       gr.io_signature(2, 2, self._get_io_size()),
+               )
+               #create usrp object
+               self._u = self._get_usrp_constructor()(number, nchan=2)
+               #get the mux for output A
+               subdev_spec_a = common.to_spec(side_a, rx_ant_a)
+               self._subdev_a = usrp.selected_subdev(self._u, subdev_spec_a)
+               mux_a = usrp.determine_rx_mux_value(self._u, subdev_spec_a)
+               #get the mux for output B
+               subdev_spec_b = common.to_spec(side_b, rx_ant_b)
+               self._subdev_b = usrp.selected_subdev(self._u, subdev_spec_b)
+               mux_b = usrp.determine_rx_mux_value(self._u, subdev_spec_b)
+               #move the lower byte of the mux b into the second byte of the 
mux a
+               self._u.set_mux(((mux_b & 0xff) << 8) | (mux_a - (mux_a & 
0xff00)))
+               #connect
+               deinter = gr.deinterleave(self._get_io_size())
+               self.connect(self._u, deinter)
+               for i in range(2): self.connect((deinter, i), (self, i))
+
+       def set_decim_rate(self, decim): self._u.set_decim_rate(int(decim))
+       def set_frequency_a(self, frequency, verbose=False):
+               common.set_frequency(
+                       u=self._u,
+                       which=0, #ddc0
+                       subdev=self._subdev_a,
+                       frequency=frequency,
+                       verbose=verbose,
+               )
+       def set_frequency_b(self, frequency, verbose=False):
+               common.set_frequency(
+                       u=self._u,
+                       which=1, #ddc1
+                       subdev=self._subdev_b,
+                       frequency=frequency,
+                       verbose=verbose,
+               )
+       def set_gain_a(self, gain): self._subdev_a.set_gain(gain)
+       def set_gain_b(self, gain): self._subdev_b.set_gain(gain)
+       def set_auto_tr_a(self, auto_tr): self._subdev_a.set_auto_tr(auto_tr)
+       def set_auto_tr_b(self, auto_tr): self._subdev_b.set_auto_tr(auto_tr)
+
+class dual_source_c(_dual_source, common.usrp_source_c): pass
+class dual_source_s(_dual_source, common.usrp_source_s): pass
+
+####################################################################
+# Dual USRP Sink
+####################################################################
+class _dual_sink(gr.hier_block2):
+       """A dual usrp sink of IO type short or complex."""
+
+       def __init__(self, number):
+               """
+               USRP simple sink contructor.
+               @param number the unit number
+               """
+               #initialize hier2 block
+               gr.hier_block2.__init__(
+                       self, 'usrp_dual_sink',
+                       gr.io_signature(2, 2, self._get_io_size()),
+                       gr.io_signature(0, 0, 0),
+               )
+               #create usrp object
+               self._u = self._get_usrp_constructor()(number, nchan=2)
+               #get the mux for side A
+               subdev_spec_a = common.to_spec('A')
+               self._subdev_a = usrp.selected_subdev(self._u, subdev_spec_a)
+               mux_a = usrp.determine_tx_mux_value(self._u, subdev_spec_a)
+               #get the mux for side B
+               subdev_spec_b = common.to_spec('B')
+               self._subdev_b = usrp.selected_subdev(self._u, subdev_spec_b)
+               mux_b = usrp.determine_tx_mux_value(self._u, subdev_spec_b)
+               #set the mux
+               self._u.set_mux(mux_a | mux_b)
+               #connect
+               inter = gr.interleave(self._get_io_size())
+               self.connect(inter, self._u)
+               for i in range(2): self.connect((self, i), (inter, i))
+
+       def set_interp_rate(self, interp): self._u.set_interp_rate(int(interp))
+       def set_frequency_a(self, frequency, verbose=False):
+               common.set_frequency(
+                       u=self._u,
+                       which=self._subdev_a.which(),
+                       subdev=self._subdev_a,
+                       frequency=frequency,
+                       verbose=verbose,
+               )
+       def set_frequency_b(self, frequency, verbose=False):
+               common.set_frequency(
+                       u=self._u,
+                       which=self._subdev_b.which(),
+                       subdev=self._subdev_b,
+                       frequency=frequency,
+                       verbose=verbose,
+               )
+       def set_gain_a(self, gain): self._subdev_a.set_gain(gain)
+       def set_gain_b(self, gain): self._subdev_b.set_gain(gain)
+       def set_enable_a(self, enable): self._subdev_a.set_enable(enable)
+       def set_enable_b(self, enable): self._subdev_b.set_enable(enable)
+       def set_auto_tr_a(self, auto_tr): self._subdev_a.set_auto_tr(auto_tr)
+       def set_auto_tr_b(self, auto_tr): self._subdev_b.set_auto_tr(auto_tr)
+
+class dual_sink_c(_dual_sink, common.usrp_sink_c): pass
+class dual_sink_s(_dual_sink, common.usrp_sink_s): pass

Modified: 
gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/simple_usrp.py
===================================================================
--- gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/simple_usrp.py     
2009-01-27 13:31:11 UTC (rev 10308)
+++ gnuradio/branches/releases/3.2/grc/src/grc_gnuradio/usrp/simple_usrp.py     
2009-01-27 15:26:38 UTC (rev 10309)
@@ -1,4 +1,4 @@
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2009 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -18,363 +18,91 @@
 # Boston, MA 02110-1301, USA.
 #
 
-import sys
-from gnuradio import usrp, gr
+import common
+from gnuradio import gr, usrp
 
 ####################################################################
-# Helper Functions
-####################################################################
-
-def _set_frequency(u, which, subdev, frequency, verbose=False):
-       """
-       Set the carrier frequency for the given subdevice.
-       @param u the usrp source/sink
-       @param which specifies the DDC/DUC number
-       @param frequency the carrier frequency in Hz
-       @param verbose if true, print usrp tuning information
-       """
-       r = u.tune(which, subdev, frequency)
-       if not verbose: return
-       print subdev.side_and_name()
-       if r:
-               print "  r.baseband_frequency =", r.baseband_freq
-               print "  r.dxc_frequency      =", r.dxc_freq
-               print "  r.residual_frequency =", r.residual_freq
-               print "  r.inverted      =", r.inverted
-       else: print >> sys.stderr, 'Error calling tune on subdevice.'
-
-def _setup_rx_subdev(u, subdev_spec, ddc, gain, frequency, auto_tr=None, 
rx_ant=None):
-       """
-       Setup a usrp receive subdevice by setting gain and frequency.
-       Add the gain and frequency callbacks to the flow graph.
-       FlexRF: Handle auto transmit/receive and set the receive antenna.
-       @param u the usrp object
-       @param subdev_spec the sub-device specification
-       @param ddc which ddc to use: 0 or 1
-       @param gain the gain to set
-       @param frequency the frequency to tune
-       @param auto_tr auto transmit/receive True, False, or None
-       @param rx_ant the receive antenna: 'TX/RX', 'RX2', or None
-       @return the subdevice
-       """
-       subdev = usrp.selected_subdev(u, subdev_spec)#get the subdev
-       subdev.set_gain(gain)
-       _set_frequency(u, ddc, subdev, frequency, verbose=True)
-       if auto_tr is not None: subdev.set_auto_tr(auto_tr)
-       if rx_ant is not None: subdev.select_rx_antenna(rx_ant)
-       return subdev
-
-def _setup_tx_subdev(u, subdev_spec, gain, frequency, auto_tr=None, 
tx_enb=None):
-       """
-       Setup a usrp receive subdevice by setting gain and frequency.
-       Add the gain and frequency callbacks to the flow graph.
-       FlexRF: Handle auto transmit/receive and enable the transmitter.
-       @param u the usrp object
-       @param subdev_spec the sub-device specification
-       @param gain the gain to set
-       @param frequency the frequency to tune
-       @param auto_tr auto transmit/receive True, False, or None
-       @param tx_enb the transmit enable: True, False, or None
-       @return the subdevice
-       """
-       subdev = usrp.selected_subdev(u, subdev_spec)#get the subdev
-       subdev.set_gain(gain)
-       _set_frequency(u, subdev.which(), subdev, frequency, verbose=True)
-       if auto_tr is not None: subdev.set_auto_tr(auto_tr)
-       if tx_enb is not None: subdev.set_enable(tx_enb)
-       return subdev
-
-##map the usrp contructors to IO sizes
-constructor_to_size = {
-       usrp.source_c: gr.sizeof_gr_complex,
-       usrp.sink_c: gr.sizeof_gr_complex,
-       usrp.source_s: gr.sizeof_short,
-       usrp.sink_s: gr.sizeof_short,
-}
-
-####################################################################
-####################################################################
-# Simple USRP Base Classes
-####################################################################
-####################################################################
-
-class _simple_usrp(object):
-       """A single usrp source/sink base class."""
-
-       def __init__(self, u, subdev, which):
-               """
-               Create a simple usrp base class.
-               @param u the usrp object
-               @param subdev the subdevice object
-               @param which specifies the DDC/DUC number when tuning
-               """
-               self._u = u
-               self._subdev = subdev
-               self._which = which
-
-       def get_u(self):
-               """
-               Get the underlying usrp object.
-               @return the usrp source/sink object.
-               """
-               return self._u
-
-       def get_subdev(self):
-               """
-               Get the underlying subdevice.
-               @return the subdev object.
-               """
-               return self._subdev
-
-       def set_frequency(self, frequency):
-               """
-               Set the frequency of the subdevice.
-               @param frequency the frequency to tune
-               """
-               _set_frequency(self.get_u(), self._which, self.get_subdev(), 
frequency)
-
-       def set_gain(self, gain):
-               """
-               Set the gain of the subdevice.
-               @param gain the gain to set
-               """
-               self.get_subdev().set_gain(gain)
-
-####################################################################
 # Simple USRP Source
 ####################################################################
-class _simple_source(gr.hier_block2, _simple_usrp):
+class _simple_source(gr.hier_block2):
        """A single usrp source of IO type short or complex."""
 
-       def __init__(self, number, subdev_spec, frequency, decimation, gain, 
mux=0x0, auto_tr=None, rx_ant=None):
+       def __init__(self, number, side='A', rx_ant='RXA'):
                """
                USRP simple source contructor.
                @param number the unit number
-               @param subdev_spec the sub-device specification tuple
-               @param frequency the frequency to tune
-               @param decimation the device decimation
-               @param gain the gain to set
-               @param mux the mux in hex or None
-               @param auto_tr auto transmit/receive True, False, or None
-               @param rx_ant the receive antenna: 'TX/RX', 'RX2', or None
+               @param side the usrp side A or B
+               @param rx_ant the antenna choice
                """
                #initialize hier2 block
                gr.hier_block2.__init__(
                        self, 'usrp_simple_source',
                        gr.io_signature(0, 0, 0),
-                       gr.io_signature(1, 1, 
constructor_to_size[self.constructor[0]]),
+                       gr.io_signature(1, 1, self._get_io_size()),
                )
                #create usrp object
-               u = self.constructor[0](number, nchan=1)
-               if subdev_spec is None: subdev_spec = usrp.pick_rx_subdevice(u)
-               u.set_decim_rate(decimation)
-               if not mux: mux = usrp.determine_rx_mux_value(u, subdev_spec)
-               u.set_mux(mux)
-               subdev = _setup_rx_subdev(u, subdev_spec, 0, gain, frequency, 
auto_tr, rx_ant)
-               _simple_usrp.__init__(self, u, subdev, 0)
+               self._u = self._get_usrp_constructor()(number, nchan=1)
+               subdev_spec = common.to_spec(side, rx_ant)
+               self._u.set_mux(usrp.determine_rx_mux_value(self._u, 
subdev_spec))
+               self._subdev = usrp.selected_subdev(self._u, subdev_spec)
+               if common.is_flex(rx_ant): 
self._subdev.select_rx_antenna(rx_ant)
                #connect
-               self.connect(u, self)
+               self.connect(self._u, self)
 
-       def set_decim_rate(self, decim): self.get_u().set_decim_rate(int(decim))
+       def set_decim_rate(self, decim): self._u.set_decim_rate(int(decim))
+       def set_frequency(self, frequency, verbose=False):
+               common.set_frequency(
+                       u=self._u,
+                       which=0, #ddc0
+                       subdev=self._subdev,
+                       frequency=frequency,
+                       verbose=verbose,
+               )
+       def set_gain(self, gain): self._subdev.set_gain(gain)
+       def set_auto_tr(self, auto_tr): self._subdev.set_auto_tr(auto_tr)
 
-class simple_source_c(_simple_source): constructor = (usrp.source_c, )
-class simple_source_s(_simple_source): constructor = (usrp.source_s, )
+class simple_source_c(_simple_source, common.usrp_source_c): pass
+class simple_source_s(_simple_source, common.usrp_source_s): pass
 
 ####################################################################
 # Simple USRP Sink
 ####################################################################
-class _simple_sink(gr.hier_block2, _simple_usrp):
+class _simple_sink(gr.hier_block2):
        """A single usrp sink of IO type short or complex."""
 
-       def __init__(self, number, subdev_spec, frequency, interpolation, gain, 
mux=0x0, auto_tr=None, tx_enb=None):
+       def __init__(self, number, side='A'):
                """
                USRP simple sink contructor.
                @param number the unit number
-               @param subdev_spec the sub-device specification tuple
-               @param frequency the frequency to tune
-               @param interpolation the device interpolation
-               @param gain the gain to set
-               @param mux the mux in hex or None
-               @param auto_tr auto transmit/receive True, False, or None
-               @param tx_enb the transmit enable: True, False, or None
+               @param side the usrp side A or B
                """
                #initialize hier2 block
                gr.hier_block2.__init__(
                        self, 'usrp_simple_sink',
-                       gr.io_signature(1, 1, 
constructor_to_size[self.constructor[0]]),
+                       gr.io_signature(1, 1, self._get_io_size()),
                        gr.io_signature(0, 0, 0),
                )
                #create usrp object
-               u = self.constructor[0](number, nchan=1)
-               if subdev_spec is None: subdev_spec = usrp.pick_tx_subdevice(u)
-               u.set_interp_rate(interpolation)
-               if not mux: mux = usrp.determine_tx_mux_value(u, subdev_spec)
-               u.set_mux(mux)
-               subdev = _setup_tx_subdev(u, subdev_spec, gain, frequency, 
auto_tr, tx_enb)
-               _simple_usrp.__init__(self, u, subdev, subdev.which())
+               self._u = self._get_usrp_constructor()(number, nchan=1)
+               subdev_spec = common.to_spec(side)
+               self._u.set_mux(usrp.determine_tx_mux_value(self._u, 
subdev_spec))
+               self._subdev = usrp.selected_subdev(self._u, subdev_spec)
                #connect
-               self.connect(self, u)
+               self.connect(self, self._u)
 
-       def set_interp_rate(self, interp): 
self.get_u().set_interp_rate(int(interp))
-
-class simple_sink_c(_simple_sink): constructor = (usrp.sink_c, )
-class simple_sink_s(_simple_sink): constructor = (usrp.sink_s, )
-
-####################################################################
-####################################################################
-# Dual USRP Base Classes
-####################################################################
-####################################################################
-
-class _dual_usrp(object):
-       """A dual usrp source/sink base class."""
-
-       def __init__(self, u, subdev_a, subdev_b, which_a, which_b):
-               """
-               Create a dual usrp base class.
-               @param u the usrp object
-               @param subdev_a the subdevice object side a
-               @param subdev_b the subdevice object side b
-               @param which_a specifies the DDC/DUC number when tuning side a
-               @param which_b specifies the DDC/DUC number when tuning side b
-               """
-               self._u = u
-               self._subdev_a = subdev_a
-               self._subdev_b = subdev_b
-               self._which_a = which_a
-               self._which_b = which_b
-
-       def get_u(self):
-               """
-               Get the underlying usrp object.
-               @return the usrp source/sink object.
-               """
-               return self._u
-
-       def get_subdev_a(self):
-               """
-               Get the underlying subdevice.
-               @return the subdev object.
-               """
-               return self._subdev_a
-
-       def get_subdev_b(self):
-               """
-               Get the underlying subdevice.
-               @return the subdev object.
-               """
-               return self._subdev_b
-
-       def set_frequency_a(self, frequency):
-               """
-               Set the frequency of the subdevice.
-               @param frequency the frequency to tune
-               """
-               _set_frequency(self.get_u(), self._which_a, 
self.get_subdev_a(), frequency)
-
-       def set_frequency_b(self, frequency):
-               """
-               Set the frequency of the subdevice.
-               @param frequency the frequency to tune
-               """
-               _set_frequency(self.get_u(), self._which_b, 
self.get_subdev_b(), frequency)
-
-       def set_gain_a(self, gain):
-               """
-               Set the gain of the subdevice.
-               @param gain the gain to set
-               """
-               self.get_subdev_a().set_gain(gain)
-
-       def set_gain_b(self, gain):
-               """
-               Set the gain of the subdevice.
-               @param gain the gain to set
-               """
-               self.get_subdev_b().set_gain(gain)
-
-####################################################################
-# Dual USRP Source
-####################################################################
-class _dual_source(gr.hier_block2, _dual_usrp):
-       """A dual usrp source of IO type short or complex."""
-
-       def __init__(self, number, frequency_a, frequency_b, decimation, 
gain_a, gain_b, mux=0x0, auto_tr=None, rx_ant_a=None, rx_ant_b=None):
-               """
-               USRP dual source contructor.
-               @param number the unit number
-               @param frequency_a the frequency to tune side a
-               @param frequency_b the frequency to tune side b
-               @param decimation the device decimation
-               @param gain_a the gain to set side a
-               @param gain_b the gain to set side b
-               @param mux the mux in hex
-               @param auto_tr auto transmit/receive True, False, or None
-               @param rx_ant_a the receive antenna side a: 'TX/RX', 'RX2', or 
None
-               @param rx_ant_b the receive antenna side b: 'TX/RX', 'RX2', or 
None
-               """
-               #initialize hier2 block
-               gr.hier_block2.__init__(
-                       self, 'usrp_dual_source',
-                       gr.io_signature(0, 0, 0),
-                       gr.io_signature(2, 2, 
constructor_to_size[self.constructor[0]]),
+       def set_interp_rate(self, interp): self._u.set_interp_rate(int(interp))
+       def set_frequency(self, frequency, verbose=False):
+               common.set_frequency(
+                       u=self._u,
+                       which=self._subdev.which(),
+                       subdev=self._subdev,
+                       frequency=frequency,
+                       verbose=verbose,
                )
-               #create usrp object
-               u = self.constructor[0](number, nchan=2)
-               u.set_decim_rate(decimation)
-               if not mux: mux = 0x3210
-               u.set_mux(mux)
-               subdev_a = _setup_rx_subdev(u, (0, 0), 0, gain_a, frequency_a, 
auto_tr, rx_ant_a)
-               subdev_b = _setup_rx_subdev(u, (1, 0), 1, gain_b, frequency_b, 
auto_tr, rx_ant_b)
-               _dual_usrp.__init__(self, u, subdev_a, subdev_b, 0, 1)
-               #connect
-               deinter = 
gr.deinterleave(constructor_to_size[self.constructor[0]])
-               self.connect(u, deinter)
-               for i in range(2): self.connect((deinter, i), (self, i))
+       def set_gain(self, gain): self._subdev.set_gain(gain)
+       def set_enable(self, enable): self._subdev.set_enable(enable)
+       def set_auto_tr(self, auto_tr): self._subdev.set_auto_tr(auto_tr)
 
-       def set_decim_rate(self, decim): self.get_u().set_decim_rate(int(decim))
+class simple_sink_c(_simple_sink, common.usrp_sink_c): pass
+class simple_sink_s(_simple_sink, common.usrp_sink_s): pass
 
-class dual_source_c(_dual_source): constructor = usrp.source_c
-class dual_source_s(_dual_source): constructor = usrp.source_s
-
-####################################################################
-# Dual USRP Sink
-####################################################################
-class _dual_sink(gr.hier_block2, _dual_usrp):
-       """A dual usrp sink of IO type short or complex."""
-
-       def __init__(self, number, frequency_a, frequency_b, interpolation, 
gain_a, gain_b, mux=0x0, auto_tr=None, tx_enb_a=None, tx_enb_b=None):
-               """
-               USRP dual sink contructor.
-               @param number the unit number
-               @param subdev_spec the sub-device specification tuple
-               @param frequency the frequency to tune
-               @param interpolation the device interpolation
-               @param gain the gain to set
-               @param mux the mux in hex or None
-               @param auto_tr auto transmit/receive True, False, or None
-               @param tx_enb the transmit enable: True, False, or None
-               """
-               #initialize hier2 block
-               gr.hier_block2.__init__(
-                       self, 'usrp_dual_sink',
-                       gr.io_signature(2, 2, 
constructor_to_size[self.constructor[0]]),
-                       gr.io_signature(0, 0, 0),
-               )
-               #create usrp object
-               u = self.constructor[0](number, nchan=2)
-               u.set_interp_rate(interpolation)
-               if not mux: mux = 0xba98
-               u.set_mux(mux)
-               subdev_a = _setup_tx_subdev(u, (0, 0), gain_a, frequency_a, 
auto_tr, tx_enb_a)
-               subdev_b = _setup_tx_subdev(u, (1, 0), gain_b, frequency_b, 
auto_tr, tx_enb_b)
-               _dual_usrp.__init__(self, u, subdev_a, subdev_b, 
subdev_a.which(), subdev_b.which())
-               #connect
-               inter = gr.interleave(constructor_to_size[self.constructor[0]])
-               self.connect(inter, u)
-               for i in range(2): self.connect((self, i), (inter, i))
-
-       def set_interp_rate(self, interp): 
self.get_u().set_interp_rate(int(interp))
-
-class dual_sink_c(_dual_sink): constructor = usrp.sink_c
-class dual_sink_s(_dual_sink): constructor = usrp.sink_s

Modified: gnuradio/branches/releases/3.2/grc/src/gui/Messages.py
===================================================================
--- gnuradio/branches/releases/3.2/grc/src/gui/Messages.py      2009-01-27 
13:31:11 UTC (rev 10308)
+++ gnuradio/branches/releases/3.2/grc/src/gui/Messages.py      2009-01-27 
15:26:38 UTC (rev 10309)
@@ -59,11 +59,11 @@
        traceback.print_exc()
 
 def send_end_load():
-       send(">>> Done\n")
+       send('>>> Done\n')
 
 def send_fail_load(error):
-       send('Parser Error: %s\n'%error)
-       send(">>> Failue\n")
+       send('Error: %s\n'%error)
+       send('>>> Failue\n')
        traceback.print_exc()
 
 ################# functions for generating flow graphs 
########################################
@@ -72,7 +72,7 @@
 
 def send_fail_gen(error):
        send('Generate Error: %s\n'%error)
-       send(">>> Failue\n")
+       send('>>> Failue\n')
        traceback.print_exc()
 
 ################# functions for executing flow graphs  
########################################
@@ -83,7 +83,7 @@
        send(verbose)
 
 def send_end_exec():
-       send("\n>>> Done\n")
+       send('\n>>> Done\n')
 
 ################# functions for saving flow graphs     
########################################
 def send_fail_save(file_path):

Modified: gnuradio/branches/releases/3.2/grc/src/gui/NotebookPage.py
===================================================================
--- gnuradio/branches/releases/3.2/grc/src/gui/NotebookPage.py  2009-01-27 
13:31:11 UTC (rev 10308)
+++ gnuradio/branches/releases/3.2/grc/src/gui/NotebookPage.py  2009-01-27 
15:26:38 UTC (rev 10309)
@@ -45,6 +45,7 @@
                self.main_window = main_window
                self.set_file_path(file_path)
                file_path = file_path or 
flow_graph.get_parent().get_default_flow_graph()
+               open(file_path, 'r') #test open
                ############################################################
                from .. utils import converter
                converter.convert(file_path, flow_graph.get_parent())

Modified: gnuradio/branches/releases/3.2/grc/src/platforms/python/Generator.py
===================================================================
--- gnuradio/branches/releases/3.2/grc/src/platforms/python/Generator.py        
2009-01-27 13:31:11 UTC (rev 10308)
+++ gnuradio/branches/releases/3.2/grc/src/platforms/python/Generator.py        
2009-01-27 15:26:38 UTC (rev 10309)
@@ -63,7 +63,7 @@
                @return a popen object
                """
                #execute
-               cmds = [PYEXEC, self.get_file_path()]
+               cmds = [PYEXEC, '-u', self.get_file_path()] #-u is unbuffered 
stdio
                if self._generate_options == 'no_gui':
                        cmds = ['xterm', '-e'] + cmds
                p = subprocess.Popen(args=cmds, stdout=subprocess.PIPE, 
stderr=subprocess.STDOUT, shell=False, universal_newlines=True)
@@ -90,7 +90,7 @@
                #list of callbacks (prepend self.)
                callbacks = [
                        expr_utils.expr_prepend(cb, var_ids, 'self.')
-                       for cb in sum([block.get_callbacks() for block in 
self._flow_graph.get_blocks()], [])
+                       for cb in sum([block.get_callbacks() for block in 
self._flow_graph.get_enabled_blocks()], [])
                ]
                #map var id to the expression (prepend self.)
                var_id2expr = dict(

Modified: gnuradio/branches/releases/3.2/grc/todo.txt
===================================================================
--- gnuradio/branches/releases/3.2/grc/todo.txt 2009-01-27 13:31:11 UTC (rev 
10308)
+++ gnuradio/branches/releases/3.2/grc/todo.txt 2009-01-27 15:26:38 UTC (rev 
10309)
@@ -1,10 +1,8 @@
 ##################################################
 # Blocks
 ##################################################
--optparse block
 -ofdm wrappers
 -controlled step block
--simplify simple usrp
 -probe: also non-float outputs
 -RFID, ATSC
 
@@ -38,7 +36,6 @@
 # External
 ##################################################
 -simple usrp
--tune_result in usrp.py needs __str__ method
 -global wxgui controls and top block window
 
 ##################################################





reply via email to

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