summaryrefslogtreecommitdiff
path: root/gr-uhd/grc
diff options
context:
space:
mode:
authorJosh Blum2010-07-06 17:17:03 -0700
committerJosh Blum2010-07-06 17:17:03 -0700
commit22bc2fabead56a409315d6e7632494140680de36 (patch)
treee2fe5b4946e8ae12b954236b7b3a24648e3a2d88 /gr-uhd/grc
parent61d57743c708c8cec9b0137427e6aa709a954443 (diff)
parentc6e8a20c39357dc12bf28030a1bb0c36596403b9 (diff)
downloadgnuradio-22bc2fabead56a409315d6e7632494140680de36.tar.gz
gnuradio-22bc2fabead56a409315d6e7632494140680de36.tar.bz2
gnuradio-22bc2fabead56a409315d6e7632494140680de36.zip
Merge branch 'uhd_mimo' into uhd
Diffstat (limited to 'gr-uhd/grc')
-rw-r--r--gr-uhd/grc/Makefile.am2
-rw-r--r--gr-uhd/grc/uhd_mimo_sink.xml102
-rw-r--r--gr-uhd/grc/uhd_mimo_source.xml102
3 files changed, 206 insertions, 0 deletions
diff --git a/gr-uhd/grc/Makefile.am b/gr-uhd/grc/Makefile.am
index 61eb32770..cf3f77080 100644
--- a/gr-uhd/grc/Makefile.am
+++ b/gr-uhd/grc/Makefile.am
@@ -24,5 +24,7 @@ include $(top_srcdir)/Makefile.common
grcblocksdir = $(grc_blocksdir)
dist_grcblocks_DATA = \
+ uhd_mimo_source.xml \
+ uhd_mimo_sink.xml \
uhd_simple_source.xml \
uhd_simple_sink.xml
diff --git a/gr-uhd/grc/uhd_mimo_sink.xml b/gr-uhd/grc/uhd_mimo_sink.xml
new file mode 100644
index 000000000..00d7f678f
--- /dev/null
+++ b/gr-uhd/grc/uhd_mimo_sink.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## UHD MIMO Sink
+###################################################
+ -->
+<block>
+ <name>UHD MIMO Sink</name>
+ <key>uhd_mimo_sink</key>
+ <category>UHD</category>
+ <import>from gnuradio import uhd</import>
+ <make>uhd.mimo_sink($nchan, $args, uhd.io_type_t.$type.type)
+self.$(id).set_samp_rate_all($samp_rate)
+map(lambda x: self.$(id).set_center_freq(*x), enumerate($center_freqs))
+map(lambda x: self.$(id).set_gain(*x), enumerate($gains))
+#if $ants()
+map(lambda x: self.$(id).set_antenna(*x), enumerate($ants))
+#end if</make>
+ <callback>set_samp_rate($samp_rate)</callback>
+ <callback>map(lambda x: self.$(id).set_center_freq(*x), enumerate($center_freqs))</callback>
+ <callback>map(lambda x: self.$(id).set_gain(*x), enumerate($gains))</callback>
+ <callback>map(lambda x: self.$(id).set_antenna(*x), enumerate($ants))</callback>
+ <param>
+ <name>Input Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>type:COMPLEX_FLOAT32</opt>
+ <opt>vlen:1</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>type:COMPLEX_INT16</opt>
+ <opt>vlen:2</opt>
+ </option>
+ </param>
+ <param>
+ <name>Num Channels</name>
+ <key>nchan</key>
+ <value>2</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Args</name>
+ <key>args</key>
+ <value>addr=192.168.10.2 192.168.20.2</value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>Samp Rate (Sps)</name>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Center Freqs (Hz)</name>
+ <key>center_freqs</key>
+ <value>0, 0</value>
+ <type>real_vector</type>
+ </param>
+ <param>
+ <name>Gains (dB)</name>
+ <key>gains</key>
+ <value>0, 0</value>
+ <type>real_vector</type>
+ </param>
+ <param>
+ <name>Antennas</name>
+ <key>ants</key>
+ <value>['RX2', 'RX2']</value>
+ <type>raw</type>
+ <hide>#if not $ants() then 'part' else 'none'#</hide>
+ </param>
+ <sink>
+ <name>out</name>
+ <type>$type</type>
+ <vlen>$type.vlen</vlen>
+ <nports>$nchan</nports>
+ </sink>
+ <doc>
+The UHD Sink Block:
+
+Args:
+Args is a delimited string used to locate UHD devices on your system. \
+If left blank, the first UHD device found will be used. \
+Used args to specify a specfic device. \
+USRP2 Example: addr=192.168.10.2
+
+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.
+
+Antenna:
+For subdevices/daughterboards with only one antenna, this may be left blank. \
+Otherwise, the user should specify one of the possible antenna choices. \
+See the daughterboard application notes for the possible antenna choices.
+ </doc>
+</block>
diff --git a/gr-uhd/grc/uhd_mimo_source.xml b/gr-uhd/grc/uhd_mimo_source.xml
new file mode 100644
index 000000000..98081bff0
--- /dev/null
+++ b/gr-uhd/grc/uhd_mimo_source.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## UHD MIMO Source
+###################################################
+ -->
+<block>
+ <name>UHD MIMO Source</name>
+ <key>uhd_mimo_source</key>
+ <category>UHD</category>
+ <import>from gnuradio import uhd</import>
+ <make>uhd.mimo_source($nchan, $args, uhd.io_type_t.$type.type)
+self.$(id).set_samp_rate_all($samp_rate)
+map(lambda x: self.$(id).set_center_freq(*x), enumerate($center_freqs))
+map(lambda x: self.$(id).set_gain(*x), enumerate($gains))
+#if $ants()
+map(lambda x: self.$(id).set_antenna(*x), enumerate($ants))
+#end if</make>
+ <callback>set_samp_rate($samp_rate)</callback>
+ <callback>map(lambda x: self.$(id).set_center_freq(*x), enumerate($center_freqs))</callback>
+ <callback>map(lambda x: self.$(id).set_gain(*x), enumerate($gains))</callback>
+ <callback>map(lambda x: self.$(id).set_antenna(*x), enumerate($ants))</callback>
+ <param>
+ <name>Output Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>type:COMPLEX_FLOAT32</opt>
+ <opt>vlen:1</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>type:COMPLEX_INT16</opt>
+ <opt>vlen:2</opt>
+ </option>
+ </param>
+ <param>
+ <name>Num Channels</name>
+ <key>nchan</key>
+ <value>2</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Args</name>
+ <key>args</key>
+ <value>addr=192.168.10.2 192.168.20.2</value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>Samp Rate (Sps)</name>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Center Freqs (Hz)</name>
+ <key>center_freqs</key>
+ <value>0, 0</value>
+ <type>real_vector</type>
+ </param>
+ <param>
+ <name>Gains (dB)</name>
+ <key>gains</key>
+ <value>0, 0</value>
+ <type>real_vector</type>
+ </param>
+ <param>
+ <name>Antennas</name>
+ <key>ants</key>
+ <value>['RX2', 'RX2']</value>
+ <type>raw</type>
+ <hide>#if not $ants() then 'part' else 'none'#</hide>
+ </param>
+ <source>
+ <name>out</name>
+ <type>$type</type>
+ <vlen>$type.vlen</vlen>
+ <nports>$nchan</nports>
+ </source>
+ <doc>
+The UHD Source Block:
+
+Args:
+Args is a delimited string used to locate UHD devices on your system. \
+If left blank, the first UHD device found will be used. \
+Used args to specify a specfic device. \
+USRP2 Example: addr=192.168.10.2
+
+Sample rate:
+The sample rate is the number of samples per second output 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.
+
+Antenna:
+For subdevices/daughterboards with only one antenna, this may be left blank. \
+Otherwise, the user should specify one of the possible antenna choices. \
+See the daughterboard application notes for the possible antenna choices.
+ </doc>
+</block>