aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-07-30 10:31:28 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:33 -0800
commit867cd4a23b28ad469b61cb822980fecd798f108b (patch)
treeaae4e906b7e693a4cc06a30a71f0d3ba6e51a90b /host/include
parent9b8e4e652c168e76f7cf2ca0a699640961b8e6ce (diff)
downloaduhd-867cd4a23b28ad469b61cb822980fecd798f108b.tar.gz
uhd-867cd4a23b28ad469b61cb822980fecd798f108b.tar.bz2
uhd-867cd4a23b28ad469b61cb822980fecd798f108b.zip
rfnoc: rfnoc_graph: Add is_connectable() API
rfnoc_graph::is_connectable() allows to check if is possible to call connect() on blocks. If blocks are attached to other blocks statically, or if they are on unconnected devices, they are not connectable.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/rfnoc_graph.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/host/include/uhd/rfnoc_graph.hpp b/host/include/uhd/rfnoc_graph.hpp
index ff7e46aa8..09e95d667 100644
--- a/host/include/uhd/rfnoc_graph.hpp
+++ b/host/include/uhd/rfnoc_graph.hpp
@@ -156,6 +156,19 @@ public:
/**************************************************************************
* Connection APIs
*************************************************************************/
+ /*! Verify if two blocks/ports are connectable.
+ *
+ * If this call returns true, then connect() can be called with the same
+ * arguments. It does not, however, check if the block was already
+ * connnected.
+ *
+ * \returns true if the two blocks are connectable
+ */
+ virtual bool is_connectable(const block_id_t& src_blk,
+ size_t src_port,
+ const block_id_t& dst_blk,
+ size_t dst_port) = 0;
+
/*! Connect a RFNOC block with block ID \p src_block to another with block ID \p
* dst_block.
*