diff options
author | Josh Blum <josh@joshknows.com> | 2010-07-01 16:08:33 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-07-05 13:45:16 -0700 |
commit | 3b1473d5a3fbfb89e9ddc5575e855644707718d0 (patch) | |
tree | 7b83663b81e8c8d4882b6a9a0291c388088a6c26 /host/include | |
parent | 82790f3da8afe646f255da428c5936045f0e2434 (diff) | |
download | uhd-3b1473d5a3fbfb89e9ddc5575e855644707718d0.tar.gz uhd-3b1473d5a3fbfb89e9ddc5575e855644707718d0.tar.bz2 uhd-3b1473d5a3fbfb89e9ddc5575e855644707718d0.zip |
usrp2: removed usrp2.hpp header, its not needed, just use the discovery/factory system
uhd: added usrp_mimo skeleton code/header
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/usrp/CMakeLists.txt | 6 | ||||
-rw-r--r-- | host/include/uhd/usrp/mimo_usrp.hpp | 69 | ||||
-rw-r--r-- | host/include/uhd/usrp/usrp2.hpp | 62 |
3 files changed, 72 insertions, 65 deletions
diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt index bbd124ed8..6f8c1a2d8 100644 --- a/host/include/uhd/usrp/CMakeLists.txt +++ b/host/include/uhd/usrp/CMakeLists.txt @@ -31,12 +31,12 @@ INSTALL(FILES dboard_iface.hpp dboard_manager.hpp - ### usrp headers ### - usrp2.hpp - ### utilities ### tune_helper.hpp + + ### interfaces ### simple_usrp.hpp + mimo_usrp.hpp DESTINATION ${INCLUDE_DIR}/uhd/usrp ) diff --git a/host/include/uhd/usrp/mimo_usrp.hpp b/host/include/uhd/usrp/mimo_usrp.hpp new file mode 100644 index 000000000..2262b324e --- /dev/null +++ b/host/include/uhd/usrp/mimo_usrp.hpp @@ -0,0 +1,69 @@ +// +// Copyright 2010 Ettus Research LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#ifndef INCLUDED_UHD_USRP_MIMO_USRP_HPP +#define INCLUDED_UHD_USRP_MIMO_USRP_HPP + +#include <uhd/config.hpp> +#include <uhd/device.hpp> +#include <uhd/types/ranges.hpp> +#include <uhd/types/stream_cmd.hpp> +#include <uhd/types/clock_config.hpp> +#include <uhd/types/tune_result.hpp> +#include <boost/shared_ptr.hpp> +#include <boost/utility.hpp> +#include <vector> + +namespace uhd{ namespace usrp{ + +/*! + * The MIMO USRP device class: + * A mimo usrp facilitates ease-of-use for multi-usrp scenarios. + * The wrapper provides convenience functions to control the group + * of underlying devices as if they consisted of a single device. + */ +class UHD_API mimo_usrp : boost::noncopyable{ +public: + typedef boost::shared_ptr<mimo_usrp> sptr; + + /*! + * Make a new mimo usrp from the device address. + * \param dev_addr the device address + * \return a new mimo usrp object + */ + static sptr make(const device_addr_t &dev_addr); + + /*! + * Get the underlying device object. + * This is needed to get access to the streaming API and properties. + * \return the device object within this simple usrp + */ + virtual device::sptr get_device(void) = 0; + + /*! + * Get a printable name for this mimo usrp. + * \return a printable string + */ + virtual std::string get_name(void) = 0; + + //TODO + +}; + +}} + +#endif /* INCLUDED_UHD_USRP_MIMO_USRP_HPP */ diff --git a/host/include/uhd/usrp/usrp2.hpp b/host/include/uhd/usrp/usrp2.hpp deleted file mode 100644 index 7387e5dd4..000000000 --- a/host/include/uhd/usrp/usrp2.hpp +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright 2010 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_UHD_USRP_USRP2_HPP -#define INCLUDED_UHD_USRP_USRP2_HPP - -#include <uhd/config.hpp> -#include <uhd/device.hpp> - -namespace uhd{ namespace usrp{ - -/*! - * The usrp2 device class. - */ -class UHD_API usrp2 : public device{ -public: - /*! - * Find usrp2 devices over the ethernet. - * - * Recommended key/value pairs for the device hint address: - * hint["addr"] = address, where address is a resolvable address - * or ip address, which may or may not be a broadcast address. - * - * Other optional device address keys: - * recv_buff_size: resizes the recv buffer on the data socket - * send_buff_size: resizes the send buffer on the data socket - * - * \param hint a device addr with the usrp2 address filled in - * \return a vector of device addresses for all usrp2s found - */ - static device_addrs_t find(const device_addr_t &hint); - - /*! - * Make a usrp2 from a device address. - * - * Required key/value pairs for the device address: - * hint["addr"] = address, where address is a resolvable address - * or ip address, which must be the specific address of a usrp2. - * - * \param addr the device address - * \return a device sptr to a new usrp2 - */ - static device::sptr make(const device_addr_t &addr); -}; - -}} //namespace - -#endif /* INCLUDED_UHD_USRP_USRP2_HPP */ |