diff options
author | Josh Blum | 2011-10-06 09:26:40 -0700 |
---|---|---|
committer | Josh Blum | 2011-11-07 18:56:27 -0800 |
commit | 5b0ae93c8f319bbc367254172719d40f11a0f55b (patch) | |
tree | 3e6decdae54ee512bdce605090e858623813c62b /gr-uhd/grc/gen_uhd_usrp_blocks.py | |
parent | 24d572bc56f265f99b1994cd031df6bd15607ff3 (diff) | |
download | gnuradio-5b0ae93c8f319bbc367254172719d40f11a0f55b.tar.gz gnuradio-5b0ae93c8f319bbc367254172719d40f11a0f55b.tar.bz2 gnuradio-5b0ae93c8f319bbc367254172719d40f11a0f55b.zip |
uhd: backwards compat work which support streamer API
Diffstat (limited to 'gr-uhd/grc/gen_uhd_usrp_blocks.py')
-rw-r--r-- | gr-uhd/grc/gen_uhd_usrp_blocks.py | 65 |
1 files changed, 59 insertions, 6 deletions
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py index 7116dad3b..19e64d2fd 100644 --- a/gr-uhd/grc/gen_uhd_usrp_blocks.py +++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py @@ -27,8 +27,12 @@ MAIN_TMPL = """\ <import>from gnuradio import uhd</import> <make>uhd.usrp_$(sourk)( device_addr=\$dev_addr, - io_type=uhd.io_type.\$type.type, - num_channels=\$nchan, + stream_args=uhd.stream_args( + cpu_format='\$type.type', + otw_format='\$otw.format', + args='\$otw.args', + channels=range(\$nchan), + ), ) \#if \$clock_rate() self.\$(id).set_clock_rate(\$clock_rate, uhd.ALL_MBOARDS) @@ -84,17 +88,66 @@ self.\$(id).set_bandwidth(\$bw$(n), $n) <key>type</key> <type>enum</type> <option> - <name>Complex</name> + <name>complex float32</name> <key>complex</key> - <opt>type:COMPLEX_FLOAT32</opt> + <opt>type:fc32</opt> <opt>vlen:1</opt> </option> <option> - <name>Short</name> + <name>complex uint16</name> <key>short</key> - <opt>type:COMPLEX_INT16</opt> + <opt>type:sc16</opt> <opt>vlen:2</opt> </option> + <option> + <name>real float32</name> + <key>float</key> + <opt>type:f32</opt> + <opt>vlen:1</opt> + </option> + <option> + <name>real uint16</name> + <key>short</key> + <opt>type:s16</opt> + <opt>vlen:1</opt> + </option> + </param> + <param> + <name>Wire Format</name> + <key>otw_format</key> + <type>enum</type> + <option> + <name>complex uint16</name> + <key>sc16</key> + <opt>format:sc16</opt> + <opt>args:</opt> + </option> + <option> + <name>complex uint8</name> + <key>sc8</key> + <opt>format:sc8</opt> + <opt>args:</opt> + </option> + <option> + <name>real uint16</name> + <opt>format:s16</opt> + <opt>args:</opt> + </option> + <option> + <name>real uint8</name> + <opt>format:s8</opt> + <opt>args:</opt> + </option> + <option> + <name>magnitude uint16</name> + <opt>format:s16</opt> + <opt>args:magnitude</opt> + </option> + <option> + <name>magnitude uint8</name> + <opt>format:s8</opt> + <opt>args:magnitude</opt> + </option> </param> <param> <name>Device Addr</name> |