aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b100/io_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-01 15:07:38 -0700
committerJosh Blum <josh@joshknows.com>2011-07-01 15:07:38 -0700
commit6aa4690af05559d28b5238fa153fd46ff57cf06f (patch)
tree6c43e2c2571d61a724c12577fbb5efba2aa701e8 /host/lib/usrp/b100/io_impl.cpp
parentd6d51025dc83719a01b93213e3be9248a5d93b4f (diff)
downloaduhd-6aa4690af05559d28b5238fa153fd46ff57cf06f.tar.gz
uhd-6aa4690af05559d28b5238fa153fd46ff57cf06f.tar.bz2
uhd-6aa4690af05559d28b5238fa153fd46ff57cf06f.zip
usrp: added validate_subdev_spec to all io_impls
Diffstat (limited to 'host/lib/usrp/b100/io_impl.cpp')
-rw-r--r--host/lib/usrp/b100/io_impl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/usrp/b100/io_impl.cpp b/host/lib/usrp/b100/io_impl.cpp
index 3c1acedaf..5b38a14ac 100644
--- a/host/lib/usrp/b100/io_impl.cpp
+++ b/host/lib/usrp/b100/io_impl.cpp
@@ -15,6 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
+#include "validate_subdev_spec.hpp"
#include "../../transport/super_recv_packet_handler.hpp"
#include "../../transport/super_send_packet_handler.hpp"
#include "usrp_commands.h"
@@ -176,8 +177,7 @@ void b100_impl::update_rx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
property_tree::path_type root = "/mboards/0/dboards";
//sanity checking
- if (spec.size() == 0) throw uhd::value_error("rx subdev spec cant be empty");
- if (spec.size() > _rx_dsps.size()) throw uhd::value_error("rx subdev spec too long");
+ validate_subdev_spec(_tree, spec, "rx");
//setup mux for this spec
for (size_t i = 0; i < spec.size(); i++){
@@ -204,7 +204,7 @@ void b100_impl::update_tx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
property_tree::path_type root = "/mboards/0/dboards";
//sanity checking
- if (spec.size() != 1) throw uhd::value_error("tx subdev spec has to be size 1");
+ validate_subdev_spec(_tree, spec, "tx");
//set the mux for this spec
const std::string conn = _tree->access<std::string>(root / spec[0].db_name / "tx_frontends" / spec[0].sd_name / "connection").get();