summaryrefslogtreecommitdiffstats
path: root/include/usrp_uhd/props.hpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-01-28 19:54:55 -0800
committerJosh Blum <josh@joshknows.com>2010-01-28 19:54:55 -0800
commitd5d9da3114bf069c05a8dcb7fca32ccd70405512 (patch)
tree5c2c63efe9175ebd2b22c6b4899b997e9fed5b11 /include/usrp_uhd/props.hpp
parentfc1bffcfd9761c1f60cf322bb58e7f9c8096a5c0 (diff)
downloaduhd-d5d9da3114bf069c05a8dcb7fca32ccd70405512.tar.gz
uhd-d5d9da3114bf069c05a8dcb7fca32ccd70405512.tar.bz2
uhd-d5d9da3114bf069c05a8dcb7fca32ccd70405512.zip
Added gain handler class to manage wildcard gain settings.
Gets overall gains and sets overall gains when used. Wild card gain will be a gain with an empty string name.
Diffstat (limited to 'include/usrp_uhd/props.hpp')
-rw-r--r--include/usrp_uhd/props.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/usrp_uhd/props.hpp b/include/usrp_uhd/props.hpp
index 426554a53..b74493961 100644
--- a/include/usrp_uhd/props.hpp
+++ b/include/usrp_uhd/props.hpp
@@ -62,6 +62,18 @@ namespace usrp_uhd{
typedef boost::tuple<wax::type, std::string> named_prop_t;
/*!
+ * Utility function to separate a named property into its components.
+ * \param key a reference to the prop object
+ * \param name a reference to the name object
+ */
+ inline named_prop_t extract_named_prop(const wax::type &key, const std::string &name = ""){
+ if (key.type() == typeid(named_prop_t)){
+ return wax::cast<named_prop_t>(key);
+ }
+ return named_prop_t(key, name);
+ }
+
+ /*!
* Possible device properties:
* In general, a device will have a single mboard.
* In certain mimo applications, multiple boards