From a98e387578a3aceb15e2bcce4a9cc54d78c30dda Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 26 Jan 2010 11:29:14 -0800 Subject: Switched from indexed properties to named properties. Added some new properties for getting a list of antenna names, pps sources, ref sources... --- include/usrp_uhd/utils.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/usrp_uhd/utils.hpp (limited to 'include/usrp_uhd/utils.hpp') diff --git a/include/usrp_uhd/utils.hpp b/include/usrp_uhd/utils.hpp new file mode 100644 index 000000000..6fe5bd4d4 --- /dev/null +++ b/include/usrp_uhd/utils.hpp @@ -0,0 +1,30 @@ +// +// Copyright 2010 Ettus Research LLC +// + +#include +#include +#include + +#ifndef INCLUDED_USRP_UHD_UTILS_HPP +#define INCLUDED_USRP_UHD_UTILS_HPP + +namespace usrp_uhd{ + +template +std::vector get_map_keys(const std::map &m){ + std::vector v; + std::pair p; + BOOST_FOREACH(p, m){ + v.push_back(p.first); + } + return v; +} + +//TODO check name in vector of names + +//TODO optionally extract a name from the named_prop_t + +} //namespace usrp_uhd + +#endif /* INCLUDED_USRP_UHD_UTILS_HPP */ -- cgit v1.2.3