All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
device.hpp
Go to the documentation of this file.
//
// Copyright 2010-2011 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_DEVICE_HPP
#define INCLUDED_UHD_DEVICE_HPP
#include <uhd/config.hpp>
#include <uhd/stream.hpp>
#include <uhd/deprecated.hpp>
#include <uhd/types/device_addr.hpp>
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
namespace uhd{
class property_tree; //forward declaration
class UHD_API device : boost::noncopyable{
public:
typedef boost::shared_ptr<device> sptr;
typedef boost::function<device_addrs_t(const device_addr_t &)> find_t;
typedef boost::function<sptr(const device_addr_t &)> make_t;
static void register_device(
const find_t &find,
const make_t &make
);
static device_addrs_t find(const device_addr_t &hint);
static sptr make(const device_addr_t &hint, size_t which = 0);
virtual rx_streamer::sptr get_rx_stream(const stream_args_t &args) = 0;
virtual tx_streamer::sptr get_tx_stream(const stream_args_t &args) = 0;
virtual bool recv_async_msg(
async_metadata_t &async_metadata, double timeout = 0.1
) = 0;
virtual boost::shared_ptr<property_tree> get_tree(void) const = 0;
#include <uhd/device_deprecated.ipp>
};
} //namespace uhd
#endif /* INCLUDED_UHD_DEVICE_HPP */