[USRP-users] List valid subdev specs?
rbhattacharjea at gmail.com
Wed Apr 1 16:44:52 EDT 2015
I have receiving application written in C++ where a user controls a B210
through a GUI. They enter parameters into the GUI (antenna port, gain,
center frequency, etc.) and hit "go", and the USRP responds and goes to
those settings. I do some input validation to make sure that their entries
aren't nonsense, and I check this by querying the multi_usrp API for valid
values (e.g., get_clock_sources, get_rx_freq_range, get_rx_gain_range, and
get_rx_antennas). If the entry is valid it's passed through to the
multi_usrp "setter" APIs, and if their inputs are invalid, I generally
default to the first valid value in the list of valid string values or clip
the numerical entries to the valid range.
However, there doesn't seem to be a high level API that returns all valid
subdevice specifications. Is this correct? So if the user enters "A:"
instead of "A:A", then I get an exception:
what(): AssertionError: assertion failed:
A: is not a valid rx subdevice specification on mboard 0.
possible values are: [A:A, A:B].
What I'd like to do instead is query UHD for the list of valid values (the
very list in the exception above), and if the user enters garbage, just
default to the first valid value in the list. Am I missing this API, or
does it really not exist? In the guts of the code there is
"validate_subdev_spec" which seems to do this checking, but the part that
generates the list of valid specifications uses the property tree APIs. Is
this functionality exposed up at the multi_usrp level?
Georgia Institute of Technology
School of Electrical and Computer Engineering
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the USRP-users