|
USRP Hardware Driver and USRP Manual
Version: 4.4.0.HEAD-0-g5fac246b
UHD and USRP Manual
|
|
Go to the documentation of this file.
18 #include <boost/units/detail/utility.hpp>
22 namespace uhd {
namespace rfnoc {
38 using sptr = std::shared_ptr<rfnoc_graph>;
77 virtual std::vector<block_id_t> find_blocks(
78 const std::string& block_id_hint)
const = 0;
83 std::vector<block_id_t>
find_blocks(
const std::string& block_id_hint)
const
85 std::vector<block_id_t> all_block_ids = find_blocks(block_id_hint);
86 std::vector<block_id_t> filt_block_ids;
87 for (
size_t i = 0; i < all_block_ids.size(); i++) {
88 if (has_block<T>(all_block_ids[i])) {
89 filt_block_ids.push_back(all_block_ids[i]);
92 return filt_block_ids;
101 virtual bool has_block(
const block_id_t& block_id)
const = 0;
108 template <
typename T>
111 return has_block(block_id)
112 && bool(std::dynamic_pointer_cast<T>(get_block(block_id)));
139 template <
typename T>
142 std::shared_ptr<T> blk = std::dynamic_pointer_cast<T>(get_block(block_id));
147 std::string(
"This device does not have a block of type ")
148 + boost::units::detail::demangle(
typeid(T).name())
164 virtual bool is_connectable(
const block_id_t& src_blk,
167 size_t dst_port) = 0;
188 virtual void connect(
const block_id_t& src_blk,
192 bool is_back_edge =
false) = 0;
222 virtual void connect(
const block_id_t& src_blk,
241 virtual void disconnect(
const block_id_t& src_blk,
244 size_t dst_port) = 0;
255 virtual void disconnect(
const std::string& streamer_id) = 0;
267 virtual void disconnect(
const std::string& streamer_id,
size_t port) = 0;
278 virtual std::vector<uhd::transport::adapter_id_t> enumerate_adapters_from_src(
279 const block_id_t& src_blk,
size_t src_port) = 0;
290 virtual std::vector<uhd::transport::adapter_id_t> enumerate_adapters_to_dst(
291 const block_id_t& dst_blk,
size_t dst_port) = 0;
302 virtual std::vector<graph_edge_t> enumerate_static_connections()
const = 0;
311 virtual std::vector<graph_edge_t> enumerate_active_connections() = 0;
320 virtual void commit() = 0;
362 virtual size_t get_num_mboards()
const = 0;
366 virtual std::shared_ptr<mb_controller> get_mb_controller(
367 const size_t mb_index = 0) = 0;
389 virtual bool synchronize_devices(
Definition: block_id.hpp:39
std::vector< block_id_t > find_blocks(const std::string &block_id_hint) const
Definition: rfnoc_graph.hpp:83
Definition: exception.hpp:58
string release
Definition: conf.py:29
std::shared_ptr< rx_streamer > sptr
Definition: stream.hpp:169
std::shared_ptr< tx_streamer > sptr
Definition: stream.hpp:267
std::string to_string() const
Return a string like this: "0/FFT#1" (includes all components, if set)
#define UHD_API
Definition: config.h:87
std::shared_ptr< property_tree > sptr
Definition: property_tree.hpp:222
bool has_block(const block_id_t &block_id) const
Definition: rfnoc_graph.hpp:109
Definition: device_addr.hpp:37
virtual ~rfnoc_graph()
Definition: rfnoc_graph.hpp:40
Definition: build_info.hpp:12
Definition: time_spec.hpp:28
size_t adapter_id_t
Host transport adapter ID.
Definition: adapter_id.hpp:17
Definition: rfnoc_graph.hpp:32
Definition: stream.hpp:47
std::shared_ptr< rfnoc_graph > sptr
Definition: rfnoc_graph.hpp:38
std::shared_ptr< noc_block_base > sptr
Definition: noc_block_base.hpp:48
boost::noncopyable noncopyable
Definition: noncopyable.hpp:45
std::shared_ptr< T > get_block(const block_id_t &block_id) const
Definition: rfnoc_graph.hpp:140