diff options
author | Josh Blum <josh@joshknows.com> | 2010-03-10 14:47:03 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-03-10 14:47:03 -0800 |
commit | 8e9a8464386db03a596e0b88d0714d22723d37d0 (patch) | |
tree | de6a35865ba1d54bb4d908d86397aeba459b3e01 /host/lib/usrp/usrp2/dsp_impl.cpp | |
parent | bb86022d5a5f7055cdeebaeb4a55216e1a056fd4 (diff) | |
download | uhd-8e9a8464386db03a596e0b88d0714d22723d37d0.tar.gz uhd-8e9a8464386db03a596e0b88d0714d22723d37d0.tar.bz2 uhd-8e9a8464386db03a596e0b88d0714d22723d37d0.zip |
Added simple device to handle wrapping general properties up into simple api.
Added setting time capability to the usrp2 impl.
Messing with props and time specs...
Diffstat (limited to 'host/lib/usrp/usrp2/dsp_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/dsp_impl.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp index 7831b7667..cb7f58ec8 100644 --- a/host/lib/usrp/usrp2/dsp_impl.cpp +++ b/host/lib/usrp/usrp2/dsp_impl.cpp @@ -16,6 +16,7 @@ // #include <uhd/utils.hpp> +#include <boost/format.hpp> #include <boost/assign/list_of.hpp> #include "usrp2_impl.hpp" @@ -110,7 +111,7 @@ void usrp2_impl::ddc_get(const wax::obj &key, wax::obj &val){ prop_names_t others = boost::assign::list_of ("rate") ("decim") - ("decim_rates") + ("decims") ("freq") ("enabled") ("stream_at") @@ -131,7 +132,7 @@ void usrp2_impl::ddc_get(const wax::obj &key, wax::obj &val){ val = _ddc_decim; return; } - else if (key_name == "decim_rates"){ + else if (key_name == "decims"){ val = _allowed_decim_and_interp_rates; return; } @@ -154,10 +155,10 @@ void usrp2_impl::ddc_set(const wax::obj &key, const wax::obj &val){ std::string key_name = wax::cast<std::string>(key); if (key_name == "decim"){ size_t new_decim = wax::cast<size_t>(val); - ASSERT_THROW(std::has( + assert_has( _allowed_decim_and_interp_rates, - new_decim - )); + new_decim, "usrp2 decimation" + ); _ddc_decim = new_decim; //shadow update_ddc_config(); return; @@ -244,7 +245,7 @@ void usrp2_impl::duc_get(const wax::obj &key, wax::obj &val){ prop_names_t others = boost::assign::list_of ("rate") ("interp") - ("interp_rates") + ("interps") ("freq") ; val = others; @@ -263,7 +264,7 @@ void usrp2_impl::duc_get(const wax::obj &key, wax::obj &val){ val = _duc_interp; return; } - else if (key_name == "interp_rates"){ + else if (key_name == "interps"){ val = _allowed_decim_and_interp_rates; return; } @@ -282,10 +283,10 @@ void usrp2_impl::duc_set(const wax::obj &key, const wax::obj &val){ std::string key_name = wax::cast<std::string>(key); if (key_name == "interp"){ size_t new_interp = wax::cast<size_t>(val); - ASSERT_THROW(std::has( + assert_has( _allowed_decim_and_interp_rates, - new_interp - )); + new_interp, "usrp2 interpolation" + ); _duc_interp = new_interp; //shadow update_duc_config(); return; |