aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorBrent Stapleton <brent.stapleton@ettus.com>2018-03-29 18:42:39 -0700
committerMartin Braun <martin.braun@ettus.com>2018-04-02 13:38:45 -0700
commit3f0e7d405f128e9faeea03cb6f97f25423983e63 (patch)
treeb2edb1fe8ad3e6161e300174faa873baa935689a /host/lib
parent6038a7af68451639f48dc75e1f3939bf975118ed (diff)
downloaduhd-3f0e7d405f128e9faeea03cb6f97f25423983e63.tar.gz
uhd-3f0e7d405f128e9faeea03cb6f97f25423983e63.tar.bz2
uhd-3f0e7d405f128e9faeea03cb6f97f25423983e63.zip
lib: adding device_addr_t constructor from map
Adding constructor for device_addr_t that takes a map<string, string> as an argument.
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/types/device_addr.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/host/lib/types/device_addr.cpp b/host/lib/types/device_addr.cpp
index 18376a8b8..65d265857 100644
--- a/host/lib/types/device_addr.cpp
+++ b/host/lib/types/device_addr.cpp
@@ -41,6 +41,12 @@ device_addr_t::device_addr_t(const std::string &args){
}
}
+device_addr_t::device_addr_t(const std::map<std::string, std::string> &info) {
+ for (auto& t : info) {
+ this->set(t.first, t.second);
+ }
+}
+
std::string device_addr_t::to_pp_string(void) const{
if (this->size() == 0) return "Empty Device Address";