From 867cd4a23b28ad469b61cb822980fecd798f108b Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 30 Jul 2019 10:31:28 -0700 Subject: 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. --- host/include/uhd/rfnoc_graph.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'host/include') 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. * -- cgit v1.2.3