diff options
author | Josh Blum <josh@joshknows.com> | 2010-10-21 15:48:52 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-10-21 15:48:52 -0700 |
commit | df9a3f3bad0942fe0d6ec45dd02eec62544d02be (patch) | |
tree | d057922903e8f1a1f0ebfcf48c54ccd7ad3964dd /gr-uhd/grc | |
parent | cd6b9eee92cbb16c4b36f568b812de4dc918eac8 (diff) |
uhd: added support for setting bw filters through grc
Diffstat (limited to 'gr-uhd/grc')
-rwxr-xr-x | gr-uhd/grc/gen_uhd_multi_usrp_blocks_xml.py | 26 | ||||
-rwxr-xr-x | gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py | 26 |
2 files changed, 50 insertions, 2 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 2297167320..ae40e551ad 100755 --- a/gr-uhd/grc/gen_uhd_multi_usrp_blocks_xml.py +++ b/gr-uhd/grc/gen_uhd_multi_usrp_blocks_xml.py @@ -51,6 +51,9 @@ self.\$(id).set_gain(\$gain$(n), $n) \#if \$ant$(n)() self.\$(id).set_antenna(\$ant$(n), $n) \#end if + \#if \$bw$(n)() +self.\$(id).set_bandwidth(\$bw$(n), $n) + \#end if \#end if #end for </make> @@ -59,6 +62,7 @@ self.\$(id).set_antenna(\$ant$(n), $n) <callback>set_center_freq(\$center_freq$(n), $n)</callback> <callback>set_gain(\$gain$(n), $n)</callback> <callback>set_antenna(\$ant$(n), $n)</callback> + <callback>set_bandwidth(\$bw$(n), $n)</callback> #end for <param> <name>Input Type</name> @@ -196,9 +200,14 @@ Single channel example: :AB Dual channel example: :A :B Antenna: -For subdevices/daughterboards with only one antenna, this may be left blank. \\ +For subdevices 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. + +Bandwidth: +To use the default bandwidth filter setting, this should be zero. \\ +Only certain subdevices have configurable bandwidth filters. \\ +See the daughterboard application notes for possible configurations. </doc> </block> """ @@ -233,6 +242,21 @@ PARAMS_TMPL = """ \#end if </hide> </param> + <param> + <name>Ch$(n): Bandwidth (Hz)</name> + <key>bw$(n)</key> + <value>0</value> + <type>real</type> + <hide> + \#if not \$nchan() > $n + all + \#elif \$bw$(n)() + none + \#else + part + \#end if + </hide> + </param> """ def parse_tmpl(_tmpl, **kwargs): 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 02cdf64cc2..cb2143f8f9 100755 --- a/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py +++ b/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py @@ -41,6 +41,9 @@ self.\$(id).set_gain(\$gain$(n), $n) \#if \$ant$(n)() self.\$(id).set_antenna(\$ant$(n), $n) \#end if + \#if \$bw$(n)() +self.\$(id).set_bandwidth(\$bw$(n), $n) + \#end if \#end if #end for </make> @@ -49,6 +52,7 @@ self.\$(id).set_antenna(\$ant$(n), $n) <callback>set_center_freq(\$center_freq$(n), $n)</callback> <callback>set_gain(\$gain$(n), $n)</callback> <callback>set_antenna(\$ant$(n), $n)</callback> + <callback>set_bandwidth(\$bw$(n), $n)</callback> #end for <param> <name>Input Type</name> @@ -152,9 +156,14 @@ Single channel example: A:AB Dual channel example: A:AB B:0 Antenna: -For subdevices/daughterboards with only one antenna, this may be left blank. \\ +For subdevices 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. + +Bandwidth: +To use the default bandwidth filter setting, this should be zero. \\ +Only certain subdevices have configurable bandwidth filters. \\ +See the daughterboard application notes for possible configurations. </doc> </block> """ @@ -189,6 +198,21 @@ PARAMS_TMPL = """ \#end if </hide> </param> + <param> + <name>Ch$(n): Bandwidth (Hz)</name> + <key>bw$(n)</key> + <value>0</value> + <type>real</type> + <hide> + \#if not \$nchan() > $n + all + \#elif \$bw$(n)() + none + \#else + part + \#end if + </hide> + </param> """ def parse_tmpl(_tmpl, **kwargs): |