[USRP-users] List valid subdev specs?
martin.braun at ettus.com
Wed Apr 1 17:20:06 EDT 2015
On 01.04.2015 13:44, Raj Bhattacharjea via USRP-users wrote:
> 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?
Good question, and no, we don't have a method to do exactly that.
However, when a device is initialized, it will set all available
channels as the default subdev spec (with one caveat, see below). So, if
you fire up a B210 and read back the subdev spec, you'll see "A:A A:B".
(USRP1 may be different).
The one caveat is that there are cases with multiple DDCs per channel,
so you can receive 2 channels on one d'board, and you'd have no way of
knowing this just from reading the default subdev spec.
One way to actually query possible specs is by parsing the property
tree, but you probably don't want to do that.
More information about the USRP-users