8 #ifndef INCLUDED_UHD_DEVICE3_HPP     9 #define INCLUDED_UHD_DEVICE3_HPP    12 #include <uhd/rfnoc/block_ctrl_base.hpp>    13 #include <uhd/rfnoc/graph.hpp>    14 #include <boost/thread/mutex.hpp>    15 #include <boost/units/detail/utility.hpp>    30     typedef boost::shared_ptr<device3> 
sptr;
    33     static sptr make(
const device_addr_t& hint, 
const size_t which = 0);
    35     virtual rfnoc::graph::sptr create_graph(
const std::string& name = 
"") = 0;
    49     bool has_block(
const rfnoc::block_id_t& block_id) 
const;
    56     template <
typename T> 
bool has_block(
const rfnoc::block_id_t& block_id)
 const    58         if (has_block(block_id)) {
    59             return bool(boost::dynamic_pointer_cast<T>(get_block_ctrl(block_id)));
    73     rfnoc::block_ctrl_base::sptr get_block_ctrl(
const rfnoc::block_id_t& block_id) 
const;
    93         boost::shared_ptr<T> blk =
    94             boost::dynamic_pointer_cast<T>(get_block_ctrl(block_id));
    99                 boost::format(
"This device does not have a block of type %s with ID: %s")
   100                 % boost::units::detail::demangle(
typeid(T).name())
   101                 % block_id.to_string()));
   117     std::vector<rfnoc::block_id_t> find_blocks(
const std::string& block_id_hint) 
const;
   121     template <
typename T>
   122     std::vector<rfnoc::block_id_t> 
find_blocks(
const std::string& block_id_hint)
 const   124         std::vector<rfnoc::block_id_t> all_block_ids = find_blocks(block_id_hint);
   125         std::vector<rfnoc::block_id_t> filt_block_ids;
   126         for (
size_t i = 0; i < all_block_ids.size(); i++) {
   127             if (has_block<T>(all_block_ids[i])) {
   128                 filt_block_ids.push_back(all_block_ids[i]);
   131         return filt_block_ids;
 
Definition: exception.hpp:60
 
std::vector< rfnoc::block_id_t > find_blocks(const std::string &block_id_hint) const
Definition: device3.hpp:122
 
Extends uhd::device for third-generation USRP devices. 
Definition: device3.hpp:27
 
Definition: build_info.hpp:13
 
boost::mutex _block_ctrl_mutex
Mutex to protect access to members. 
Definition: device3.hpp:140
 
std::vector< rfnoc::block_ctrl_base::sptr > _rfnoc_block_ctrl
List of all RFNoC blocks available on this device. 
Definition: device3.hpp:138
 
#define UHD_API
Definition: config.h:68
 
bool has_block(const rfnoc::block_id_t &block_id) const
Definition: device3.hpp:56
 
boost::shared_ptr< T > get_block_ctrl(const rfnoc::block_id_t &block_id) const
Definition: device3.hpp:91
 
Definition: device.hpp:28
 
boost::shared_ptr< device3 > sptr
Definition: device3.hpp:30
 
Definition: device_addr.hpp:38