From 843527d303b4407f273b10a8986d6a51f5eeb389 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Tue, 31 Mar 2020 13:39:54 -0500 Subject: uhd: mpm: Query prefs per-device for multi-device queries If a user specifies a multi-device query, such as "serial0=1234,serial1=4321", we have to look up the preferences for each device. To minimize the impact to non-x400 devices, I simply push the get_usrp_args call down into mpmd_impl and mpmd_find. --- host/lib/usrp/mpmd/mpmd_find.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/mpmd/mpmd_find.cpp') diff --git a/host/lib/usrp/mpmd/mpmd_find.cpp b/host/lib/usrp/mpmd/mpmd_find.cpp index c04615587..9c7ea8958 100644 --- a/host/lib/usrp/mpmd/mpmd_find.cpp +++ b/host/lib/usrp/mpmd/mpmd_find.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -206,7 +207,13 @@ device_addrs_t mpmd_find(const device_addr_t& hint_) } } #endif - device_addrs_t hints = separate_device_addr(hint_); + device_addrs_t hints_without_prefs = separate_device_addr(hint_); + device_addrs_t hints; + for (size_t i = 0; i < hints_without_prefs.size(); i++) + { + hints.push_back(prefs::get_usrp_args(hints_without_prefs[i])); + } + if (hint_.has_key("type")) { if (std::find(MPM_DEVICE_TYPES.cbegin(), MPM_DEVICE_TYPES.cend(), hint_["type"]) == MPM_DEVICE_TYPES.cend()) { -- cgit v1.2.3