summaryrefslogtreecommitdiff
path: root/gr-uhd
diff options
context:
space:
mode:
Diffstat (limited to 'gr-uhd')
-rwxr-xr-xgr-uhd/grc/gen_uhd_multi_usrp_blocks_xml.py24
-rwxr-xr-xgr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py16
-rw-r--r--gr-uhd/swig/__init__.py12
3 files changed, 38 insertions, 14 deletions
diff --git a/gr-uhd/grc/gen_uhd_multi_usrp_blocks_xml.py b/gr-uhd/grc/gen_uhd_multi_usrp_blocks_xml.py
index ae40e551a..112d88159 100755
--- a/gr-uhd/grc/gen_uhd_multi_usrp_blocks_xml.py
+++ b/gr-uhd/grc/gen_uhd_multi_usrp_blocks_xml.py
@@ -180,15 +180,6 @@ USRP2 Example: addr=192.168.10.2 192.168.10.3
Num Motherboards:
Selects the number of USRP motherboards in this multi-USRP configuration.
-Num Channels:
-Selects the total number of channels in this multi-USRP configuration.
-Ex: 4 motherboards with 2 channels per board = 8 channels total
-
-Sample rate:
-The sample rate is the number of samples per second input by this block. \\
-The UHD device driver will try its best to match the requested sample rate. \\
-If the requested rate is not possible, the UHD block will print an error at runtime.
-
Subdevice specification:
Each motherboard should have its own subdevice specification \\
and all subdevice specifications should be the same length. \\
@@ -199,6 +190,21 @@ See the application notes for further details.
Single channel example: :AB
Dual channel example: :A :B
+Num Channels:
+Selects the total number of channels in this multi-USRP configuration.
+Ex: 4 motherboards with 2 channels per board = 8 channels total
+
+Sample rate:
+The sample rate is the number of samples per second input by this block. \\
+The UHD device driver will try its best to match the requested sample rate. \\
+If the requested rate is not possible, the UHD block will print an error at runtime.
+
+Center frequency:
+The center frequency is the overall frequency of the RF chain. \\
+For greater control of how the UHD tunes elements in the RF chain, \\
+pass a tune_request_t object rather than a simple target frequency.
+Tuning with an LO offset example: uhd.tune_request_t(freq, lo_off)
+
Antenna:
For subdevices with only one antenna, this may be left blank. \\
Otherwise, the user should specify one of the possible antenna choices. \\
diff --git a/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py b/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py
index cb2143f8f..9b6422f7a 100755
--- a/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py
+++ b/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py
@@ -142,11 +142,6 @@ Used args to specify a specfic device.
USRP2 Example: addr=192.168.10.2
USRP1 Example: serial=12345678
-Sample rate:
-The sample rate is the number of samples per second input by this block. \\
-The UHD device driver will try its best to match the requested sample rate. \\
-If the requested rate is not possible, the UHD block will print an error at runtime.
-
Subdevice specification:
Select the subdevice or subdevices for each channel using a markup string. \\
The markup string consists of a list of dboard_slot:subdev_name pairs (one pair per channel). \\
@@ -155,6 +150,17 @@ See the application notes for further details.
Single channel example: A:AB
Dual channel example: A:AB B:0
+Sample rate:
+The sample rate is the number of samples per second input by this block. \\
+The UHD device driver will try its best to match the requested sample rate. \\
+If the requested rate is not possible, the UHD block will print an error at runtime.
+
+Center frequency:
+The center frequency is the overall frequency of the RF chain. \\
+For greater control of how the UHD tunes elements in the RF chain, \\
+pass a tune_request_t object rather than a simple target frequency.
+Tuning with an LO offset example: uhd.tune_request_t(freq, lo_off)
+
Antenna:
For subdevices with only one antenna, this may be left blank. \\
Otherwise, the user should specify one of the possible antenna choices. \\
diff --git a/gr-uhd/swig/__init__.py b/gr-uhd/swig/__init__.py
index 2fed17e57..0fdacb796 100644
--- a/gr-uhd/swig/__init__.py
+++ b/gr-uhd/swig/__init__.py
@@ -21,8 +21,20 @@
# The presence of this file turns this directory into a Python package
+########################################################################
# Add SWIG generated code to this namespace
+########################################################################
from uhd_swig import *
+########################################################################
# Add other content from pure-Python modules here
+########################################################################
+class tune_request_t(tune_request_t, float):
+ """
+ Make the python tune request object inherit from float
+ so that it can be passed in GRC as a frequency parameter.
+ The type checking in GRC will accept the tune request.
+ """
+ def __new__(self, *args): return float.__new__(self)
+ def __float__(self): return self.target_freq