Extends uhd::device for third-generation USRP devices. More...
#include <uhd/device3.hpp>
Public Types | |
| typedef boost::shared_ptr< device3 > | sptr |
Public Types inherited from uhd::device | |
| 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 rfnoc::graph::sptr | create_graph (const std::string &name="")=0 |
| void | clear () |
| bool | has_block (const rfnoc::block_id_t &block_id) const |
| Checks if an RFNoC block exists on the device. More... | |
| template<typename T > | |
| bool | has_block (const rfnoc::block_id_t &block_id) const |
| rfnoc::block_ctrl_base::sptr | get_block_ctrl (const rfnoc::block_id_t &block_id) const |
| Returns a block controller class for an RFNoC block. More... | |
| template<typename T > | |
| boost::shared_ptr< T > | get_block_ctrl (const rfnoc::block_id_t &block_id) const |
| std::vector< rfnoc::block_id_t > | find_blocks (const std::string &block_id_hint) const |
| template<typename T > | |
| std::vector< rfnoc::block_id_t > | find_blocks (const std::string &block_id_hint) const |
Public Member Functions inherited from uhd::device | |
| 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... | |
| virtual bool | recv_async_msg (async_metadata_t &async_metadata, double timeout=0.1)=0 |
| 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 sptr | make (const device_addr_t &hint, const size_t which=0) |
| Same as uhd::device::make(), but will fail if not actually a device3. More... | |
Static Public Member Functions inherited from uhd::device | |
| 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 | |
| std::vector< rfnoc::block_ctrl_base::sptr > | _rfnoc_block_ctrl |
| List of all RFNoC blocks available on this device. More... | |
| boost::mutex | _block_ctrl_mutex |
| Mutex to protect access to members. More... | |
Protected Attributes inherited from uhd::device | |
| uhd::property_tree::sptr | _tree |
| device_filter_t | _type |
Extends uhd::device for third-generation USRP devices.
Generation-3 devices are characterized by the following traits:
| typedef boost::shared_ptr<device3> uhd::device3::sptr |
| void uhd::device3::clear | ( | ) |
Reset blocks after a stream.
TODO write docs
|
pure virtual |
| std::vector<rfnoc::block_id_t> uhd::device3::find_blocks | ( | const std::string & | block_id_hint | ) | const |
Returns the block ids of all blocks that match the specified hint Uses block_ctrl_base::match() internally. If no matching block is found, it returns an empty vector.
To access specialized block controller classes (i.e. derived from block_ctrl_base), use the templated version of this function, e.g.
|
inline |
Type-cast version of find_blocks().
| rfnoc::block_ctrl_base::sptr uhd::device3::get_block_ctrl | ( | const rfnoc::block_id_t & | block_id | ) | const |
Returns a block controller class for an RFNoC block.
If the given block ID is not valid (i.e. such a block does not exist on this device), it will throw a uhd::lookup_error.
| block_id | Canonical block name (e.g. "0/FFT_1"). |
|
inline |
Same as get_block_ctrl(), but with a type cast.
If you have a block controller class that is derived from block_ctrl_base, use this function to access its specific methods. If the given block ID is not valid (i.e. such a block does not exist on this device) or if the type does not match, it will throw a uhd::lookup_error.
| bool uhd::device3::has_block | ( | const rfnoc::block_id_t & | block_id | ) | const |
Checks if an RFNoC block exists on the device.
| block_id | Canonical block name (e.g. "0/FFT_1"). |
|
inline |
Same as has_block(), but with a type check.
|
static |
Same as uhd::device::make(), but will fail if not actually a device3.
|
protected |
Mutex to protect access to members.
|
protected |
List of all RFNoC blocks available on this device.