summaryrefslogtreecommitdiffstats
path: root/lib/usrp/mboard
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 /lib/usrp/mboard
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 'lib/usrp/mboard')
-rw-r--r--lib/usrp/mboard/test.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/usrp/mboard/test.cpp b/lib/usrp/mboard/test.cpp
index a12560e9a..321ec0855 100644
--- a/lib/usrp/mboard/test.cpp
+++ b/lib/usrp/mboard/test.cpp
@@ -47,11 +47,8 @@ public:
~shell_dboard(void){}
private:
void get(const wax::type &key_, wax::type &val){
- //extract the index if key is a named prop
- wax::type key = key_; std::string name = "";
- if (key.type() == typeid(named_prop_t)){
- boost::tie(key, name) = wax::cast<named_prop_t>(key);
- }
+ wax::type key; std::string name;
+ tie(key, name) = extract_named_prop(key_);
//handle the get request conditioned on the key
switch(wax::cast<dboard_prop_t>(key)){
@@ -113,11 +110,8 @@ test::~test(void){
}
void test::get(const wax::type &key_, wax::type &val){
- //extract the index if key is a named prop
- wax::type key = key_; std::string name = "";
- if (key.type() == typeid(named_prop_t)){
- boost::tie(key, name) = wax::cast<named_prop_t>(key);
- }
+ wax::type key; std::string name;
+ tie(key, name) = extract_named_prop(key_);
//handle the get request conditioned on the key
switch(wax::cast<mboard_prop_t>(key)){