18 #ifndef INCLUDED_UHD_DEVICE3_HPP 19 #define INCLUDED_UHD_DEVICE3_HPP 24 #include <boost/units/detail/utility.hpp> 39 typedef boost::shared_ptr<device3>
sptr;
42 static sptr make(
const device_addr_t &hint,
const size_t which = 0);
66 if (has_block(block_id)) {
67 return bool(boost::dynamic_pointer_cast<T>(get_block_ctrl(block_id)));
98 boost::shared_ptr<T> blk = boost::dynamic_pointer_cast<T>(get_block_ctrl(block_id));
102 throw uhd::lookup_error(str(boost::format(
"This device does not have a block of type %s with ID: %s")
103 % boost::units::detail::demangle(
typeid(T).name())
119 std::vector<rfnoc::block_id_t> find_blocks(
const std::string &block_id_hint)
const;
123 template <
typename T>
124 std::vector<rfnoc::block_id_t>
find_blocks(
const std::string &block_id_hint)
const 126 std::vector<rfnoc::block_id_t> all_block_ids = find_blocks(block_id_hint);
127 std::vector<rfnoc::block_id_t> filt_block_ids;
128 for (
size_t i = 0; i < all_block_ids.size(); i++) {
129 if (has_block<T>(all_block_ids[i])) {
130 filt_block_ids.push_back(all_block_ids[i]);
133 return filt_block_ids;
std::string to_string() const
Return a string like this: "0/FFT_1" (includes all components, if set)
Definition: exception.hpp:59
boost::shared_ptr< uhd::rfnoc::graph > sptr
Definition: graph.hpp:29
std::vector< rfnoc::block_id_t > find_blocks(const std::string &block_id_hint) const
Definition: device3.hpp:124
Extends uhd::device for third-generation USRP devices.
Definition: device3.hpp:36
Definition: block_id.hpp:49
Definition: build_info.hpp:25
boost::shared_ptr< block_ctrl_base > sptr
Definition: block_ctrl_base.hpp:112
std::vector< rfnoc::block_ctrl_base::sptr > _rfnoc_block_ctrl
List of all RFNoC blocks available on this device.
Definition: device3.hpp:140
#define UHD_API
Definition: config.h:73
bool has_block(const rfnoc::block_id_t &block_id) const
Definition: device3.hpp:64
boost::shared_ptr< T > get_block_ctrl(const rfnoc::block_id_t &block_id) const
Definition: device3.hpp:96
Definition: device.hpp:38
boost::shared_ptr< device3 > sptr
Definition: device3.hpp:39
Definition: device_addr.hpp:47