Extends uhd::device for third-generation USRP devices.
More...
#include <uhd/device3.hpp>
Extends uhd::device for third-generation USRP devices.
Generation-3 devices are characterized by the following traits:
- They support RFNoC (RF Network-on-Chip).
- Data transport uses the compressed VITA (CVITA/CHDR) data format.
◆ sptr
◆ clear()
void uhd::device3::clear |
( |
| ) |
|
Reset blocks after a stream.
TODO write docs
◆ create_graph()
virtual rfnoc::graph::sptr uhd::device3::create_graph |
( |
const std::string & |
name = "" | ) |
|
|
pure virtual |
◆ find_blocks() [1/2]
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.
null_block_ctrl::sptr null_block = DEV->find_blocks<null_block_ctrl>("NullSrcSink");
- Note
- this access is not thread safe if peformed during block enumeration
◆ find_blocks() [2/2]
template<typename T >
std::vector<rfnoc::block_id_t> uhd::device3::find_blocks |
( |
const std::string & |
block_id_hint | ) |
const |
|
inline |
◆ get_block_ctrl() [1/2]
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.
- Parameters
-
block_id | Canonical block name (e.g. "0/FFT_1"). |
- Note
- this access is not thread safe if peformed during block enumeration
◆ get_block_ctrl() [2/2]
template<typename T >
boost::shared_ptr<T> uhd::device3::get_block_ctrl |
( |
const rfnoc::block_id_t & |
block_id | ) |
const |
|
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.
uhd::rfnoc::my_block_ctrl::sptr block_controller = get_block_ctrl<my_block_ctrl>("0/MyBlock_0");
block_controller->my_own_block_method();
- Note
- this access is not thread safe if peformed during block enumeration
◆ has_block() [1/2]
bool uhd::device3::has_block |
( |
const rfnoc::block_id_t & |
block_id | ) |
const |
Checks if an RFNoC block exists on the device.
- Parameters
-
block_id | Canonical block name (e.g. "0/FFT_1"). |
- Returns
- true if a block with the specified id exists
- Note
- this access is not thread safe if peformed during block enumeration
◆ has_block() [2/2]
template<typename T >
bool uhd::device3::has_block |
( |
const rfnoc::block_id_t & |
block_id | ) |
const |
|
inline |
Same as has_block(), but with a type check.
- Returns
- true if a block of type T with the specified id exists
- Note
- this access is not thread safe if peformed during block enumeration
◆ make()
static sptr uhd::device3::make |
( |
const device_addr_t & |
hint, |
|
|
const size_t |
which = 0 |
|
) |
| |
|
static |
◆ _block_ctrl_mutex
boost::mutex uhd::device3::_block_ctrl_mutex |
|
protected |
Mutex to protect access to members.
◆ _rfnoc_block_ctrl
std::vector< rfnoc::block_ctrl_base::sptr > uhd::device3::_rfnoc_block_ctrl |
|
protected |
List of all RFNoC blocks available on this device.
The documentation for this class was generated from the following file: