UHD 003.004.003-0-unknown

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Types | Public Member Functions | Static Public Member Functions | List of all members
uhd::device Class Referenceabstract

`#include <device.hpp>`

Inheritance diagram for uhd::device:

## Public Types
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 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...
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
| Get access to the underlying property structure. More...

## Static Public Member Functions
static void | register_device (const find_t &find, const make_t &make)
static device_addrs_t | find (const device_addr_t &hint)
| Find usrp devices attached to the host. More...
static sptr | make (const device_addr_t &hint, size_t which=0)
| Create a new usrp device from the device address hint. More...

## Detailed Description

The usrp device interface represents the usrp hardware. The api allows for discovery, configuration, and streaming.

## Member Typedef Documentation

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

## Member Function Documentation

static device_addrs_t uhd::device::find | ( | const device_addr_t & | hint | ) |
| static

Find usrp 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.

Parameters

  hint | a partially (or fully) filled in device address

Returns
  a vector of device addresses for all usrps on the system

virtual rx_streamer::sptr uhd::device::get_rx_stream | ( | const stream_args_t & | args | ) |
| pure virtual

Make a new receive streamer from the streamer arguments.

virtual boost::shared_ptr<property_tree> uhd::device::get_tree | ( | void |  | ) | const
| pure virtual

Get access to the underlying property structure.

virtual tx_streamer::sptr uhd::device::get_tx_stream | ( | const stream_args_t & | args | ) |
| pure virtual

Make a new transmit streamer from the streamer arguments.

static sptr uhd::device::make | ( | const device_addr_t & | hint,
|  | size_t | which = `0`
| ) |  |
| static

Create a new usrp 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.

Parameters

  hint | a partially (or fully) filled in device address
  which | which address to use when multiple are found

Returns
  a shared pointer to a new device instance

virtual bool uhd::device::recv_async_msg | ( | async_metadata_t & | async_metadata,
|  | double | timeout = `0.1`
| ) |  |
| pure virtual

Receive and asynchronous message from the device.

Parameters

  async_metadata | the metadata to be filled in
  timeout | the timeout in seconds to wait for a message

Returns
  true when the async_metadata is valid, false for timeout

static void uhd::device::register_device | ( | const find_t & | find,
|  | const make_t & | make
| ) |  |
| static

Register a device into the discovery and factory system.

Parameters

  find | a function that discovers devices
  make | a factory function that makes a device

The documentation for this class was generated from the following file:

- include/uhd/device.hpp