From df9a3f3bad0942fe0d6ec45dd02eec62544d02be Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 21 Oct 2010 15:48:52 -0700 Subject: uhd: added support for setting bw filters through grc --- gr-uhd/grc/gen_uhd_multi_usrp_blocks_xml.py | 26 +++++++++++++++++++++++++- 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 229716732..ae40e551a 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 @@ -59,6 +62,7 @@ self.\$(id).set_antenna(\$ant$(n), $n) set_center_freq(\$center_freq$(n), $n) set_gain(\$gain$(n), $n) set_antenna(\$ant$(n), $n) + set_bandwidth(\$bw$(n), $n) #end for Input Type @@ -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. """ @@ -233,6 +242,21 @@ PARAMS_TMPL = """ \#end if + + Ch$(n): Bandwidth (Hz) + bw$(n) + 0 + real + + \#if not \$nchan() > $n + all + \#elif \$bw$(n)() + none + \#else + part + \#end if + + """ 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 02cdf64cc..cb2143f8f 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 @@ -49,6 +52,7 @@ self.\$(id).set_antenna(\$ant$(n), $n) set_center_freq(\$center_freq$(n), $n) set_gain(\$gain$(n), $n) set_antenna(\$ant$(n), $n) + set_bandwidth(\$bw$(n), $n) #end for Input Type @@ -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. """ @@ -189,6 +198,21 @@ PARAMS_TMPL = """ \#end if + + Ch$(n): Bandwidth (Hz) + bw$(n) + 0 + real + + \#if not \$nchan() > $n + all + \#elif \$bw$(n)() + none + \#else + part + \#end if + + """ def parse_tmpl(_tmpl, **kwargs): -- cgit