From 5ec42578fa9f69e92ae935c16717957a6ea66324 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 5 Aug 2010 16:41:51 -0700 Subject: uhd: created subdevice pair struct for subdev spec (easier than first/second) --- host/include/uhd/usrp/subdev_spec.hpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/usrp/subdev_spec.hpp b/host/include/uhd/usrp/subdev_spec.hpp index d874a9bd9..4d8f03b77 100644 --- a/host/include/uhd/usrp/subdev_spec.hpp +++ b/host/include/uhd/usrp/subdev_spec.hpp @@ -19,12 +19,31 @@ #define INCLUDED_UHD_USRP_SUBDEV_SPEC_HPP #include -#include //std::pair #include #include namespace uhd{ namespace usrp{ + /*! + * A subdevice specification (daughterboard, subdevice) name pairing. + */ + struct UHD_API subdev_spec_pair_t{ + //! The daughterboard name + std::string db_name; + + //! The subdevice name + std::string sd_name; + + /*! + * Create a new subdevice specification pair from dboard and subdev names. + * \param db_name the name of a daughterboard slot + * \param sd_name the name of a subdevice on that daughterboard + */ + subdev_spec_pair_t( + const std::string &db_name, const std::string &sd_name + ); + }; + /*! * A list of (daughterboard name, subdevice name) pairs: * @@ -48,9 +67,8 @@ namespace uhd{ namespace usrp{ * An empty subdevice specification can be used to automatically * select the first subdevice on the first present daughterboard. */ - class UHD_API subdev_spec_t : public std::vector >{ + class UHD_API subdev_spec_t : public std::vector{ public: - typedef std::pair pair_t; /*! * Create a subdev specification from a markup string. -- cgit v1.2.3