summaryrefslogtreecommitdiff
path: root/grc/data/platforms/python
diff options
context:
space:
mode:
authorjblum2009-01-26 21:17:41 +0000
committerjblum2009-01-26 21:17:41 +0000
commitb21f38784342234627c9f43d7013f139800322b1 (patch)
treea63af72da5ee5d5f32a03ec4df0417539b677fd3 /grc/data/platforms/python
parent381eea6c45b640fdfbf4b4ba167583f1390b9ac2 (diff)
downloadgnuradio-b21f38784342234627c9f43d7013f139800322b1.tar.gz
gnuradio-b21f38784342234627c9f43d7013f139800322b1.tar.bz2
gnuradio-b21f38784342234627c9f43d7013f139800322b1.zip
new and improved simple/dual usrp blocks and wrapper classes
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10305 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/data/platforms/python')
-rw-r--r--grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml62
-rw-r--r--grc/data/platforms/python/blocks/usrp2_source_xxxx.xml62
-rw-r--r--grc/data/platforms/python/blocks/usrp_dual_sink_x.xml126
-rw-r--r--grc/data/platforms/python/blocks/usrp_dual_source_x.xml188
-rw-r--r--grc/data/platforms/python/blocks/usrp_simple_sink_x.xml97
-rw-r--r--grc/data/platforms/python/blocks/usrp_simple_source_x.xml130
6 files changed, 297 insertions, 368 deletions
diff --git a/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml b/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
index 352fe4ce0..fe00908e0 100644
--- a/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
+++ b/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
@@ -17,14 +17,7 @@ usrp2.sink_$(type.fcn)($interface, $mac_addr)
#end if
self.$(id).set_interp($interpolation)
self.$(id).set_center_freq($frequency)
-self.$(id).set_gain($gain)
-#if $auto_tr.eval
-self.$(id).set_auto_tr($auto_tr)
-#end if
-#if $tx_enb.eval
-self.$(id).set_enable($tx_enb)
-#end if
-</make>
+self.$(id).set_gain($gain)</make>
<callback>set_interp($interpolation)</callback>
<callback>set_center_freq($frequency)</callback>
<callback>set_gain($gain)</callback>
@@ -70,50 +63,6 @@ self.$(id).set_enable($tx_enb)
<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>
@@ -124,14 +73,5 @@ The USRP2 sink inputs 100 Megasamples per second / interpolation.
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>
diff --git a/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml b/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
index 548baa8d9..bd92ec65b 100644
--- a/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
+++ b/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
@@ -17,14 +17,7 @@ usrp2.source_$(type.fcn)($interface, $mac_addr)
#end if
self.$(id).set_decim($decimation)
self.$(id).set_center_freq($frequency)
-self.$(id).set_gain($gain)
-#if $auto_tr.eval
-self.$(id).set_auto_tr($auto_tr)
-#end if
-#if $rx_ant.eval
-self.$(id).select_rx_antenna($rx_ant)
-#end if
-</make>
+self.$(id).set_gain($gain)</make>
<callback>set_decim($decimation)</callback>
<callback>set_center_freq($frequency)</callback>
<callback>set_gain($gain)</callback>
@@ -70,50 +63,6 @@ self.$(id).select_rx_antenna($rx_ant)
<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>
@@ -124,14 +73,5 @@ The USRP2 source outputs 100 Megasamples per second / decimation.
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>
diff --git a/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml b/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
index 68213080c..3e665c0f8 100644
--- a/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
+++ b/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
@@ -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_gain_a($gain_a)</callback>
<callback>set_frequency_b($frequency_b)</callback>
+ <callback>set_gain_a($gain_a)</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>
diff --git a/grc/data/platforms/python/blocks/usrp_dual_source_x.xml b/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
index 33ff12cb7..2ed8f7656 100644
--- a/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
+++ b/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
@@ -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_gain_a($gain_a)</callback>
<callback>set_frequency_b($frequency_b)</callback>
+ <callback>set_gain_a($gain_a)</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>
diff --git a/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml b/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
index 31d01c9bf..885aec852 100644
--- a/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
+++ b/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
@@ -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>
diff --git a/grc/data/platforms/python/blocks/usrp_simple_source_x.xml b/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
index e537f700f..e1c43238a 100644
--- a/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
+++ b/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
@@ -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,64 +50,67 @@
<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>
- </option>
- <option>
- <name>Disable</name>
- <key>False</key>
- <opt>hide:none</opt>
+ <name>Side B</name>
+ <key>B</key>
</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>
@@ -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>