#include <uhd/device.hpp>
Public Types | |
enum | device_filter_t { ANY, USRP, CLOCK } |
Device type, used as a filter in make. More... | |
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 |
Public Member Functions | |
virtual | ~device (void)=0 |
virtual rx_streamer::sptr | get_rx_stream (const stream_args_t &args)=0 |
Make a new receive streamer from the streamer arguments. More... | |
virtual tx_streamer::sptr | get_tx_stream (const stream_args_t &args)=0 |
Make a new transmit streamer from the streamer arguments. More... | |
uhd::property_tree::sptr | get_tree (void) const |
Get access to the underlying property structure. More... | |
device_filter_t | get_device_type () const |
Get device type. More... | |
Static Public Member Functions | |
static void | register_device (const find_t &find, const make_t &make, const device_filter_t filter) |
static device_addrs_t | find (const device_addr_t &hint, device_filter_t filter=ANY) |
Find devices attached to the host. More... | |
static sptr | make (const device_addr_t &hint, device_filter_t filter=ANY, size_t which=0) |
Create a new device from the device address hint. More... | |
Protected Attributes | |
uhd::property_tree::sptr | _tree |
device_filter_t | _type |
The device interface represents the hardware. The API allows for discovery, configuration, and streaming.
typedef boost::function<device_addrs_t(const device_addr_t &)> uhd::device::find_t |
typedef boost::function<sptr(const device_addr_t &)> uhd::device::make_t |
typedef boost::shared_ptr<device> uhd::device::sptr |
|
pure virtual |
|
static |
Find devices attached to the host.
The hint device address should be used to narrow down the search to particular transport types and/or transport arguments.
hint | a partially (or fully) filled in device address |
filter | an optional filter to exclude USRP or clock devices |
device_filter_t uhd::device::get_device_type | ( | ) | const |
Get device type.
|
pure virtual |
Make a new receive streamer from the streamer arguments.
Note: There can always only be one streamer. When calling get_rx_stream() a second time, the first streamer must be destroyed beforehand.
uhd::property_tree::sptr uhd::device::get_tree | ( | void | ) | const |
Get access to the underlying property structure.
|
pure virtual |
Make a new transmit streamer from the streamer arguments.
Note: There can always only be one streamer. When calling get_tx_stream() a second time, the first streamer must be destroyed beforehand.
|
static |
Create a new device from the device address hint.
The make routine will call find and pick one of the results. By default, the first result will be used to create a new device. Use the which parameter as an index into the list of results.
hint | a partially (or fully) filled in device address |
filter | an optional filter to exclude USRP or clock devices |
which | which address to use when multiple are found |
|
static |
Register a device into the discovery and factory system.
find | a function that discovers devices |
make | a factory function that makes a device |
|
protected |
|
protected |