From c1e26b4a260d6f9210f3c31b9f7311be833e8cad Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 3 Feb 2022 14:32:43 +0100 Subject: uhd: rfnoc: Let connect_through_blocks() return edge list This changes the return value of connect_through_blocks() from void to a list of edges. If the connection can be made, then it will now return the list of connections between the source block and port. --- host/include/uhd/utils/graph_utils.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'host/include') diff --git a/host/include/uhd/utils/graph_utils.hpp b/host/include/uhd/utils/graph_utils.hpp index c4d77b093..6b264032c 100644 --- a/host/include/uhd/utils/graph_utils.hpp +++ b/host/include/uhd/utils/graph_utils.hpp @@ -52,14 +52,21 @@ std::vector UHD_API get_block_chain(const rfnoc_graph::sptr graph, /*! Connect desired blocks by whatever path that can be found + * + * This will find the most direct path from a source block to a destination + * block. If these blocks are statically connected it will simply call connect() + * on all intermediate connections. If not, it will create a dynamic connection + * between stream endpoints. If this is not possible, an exception is thrown. * * \param graph The rfnoc_graph that is being examined * \param src_blk Source block's ID * \param src_port Block port where the path starts * \param dst_blk Destination block's ID * \param dst_port Block port where the path ends + * + * \return The edge list representing the data path requested */ -void UHD_API connect_through_blocks(rfnoc_graph::sptr graph, +std::vector UHD_API connect_through_blocks(rfnoc_graph::sptr graph, const block_id_t src_blk, const size_t src_port, const block_id_t dst_blk, -- cgit v1.2.3