diff options
-rw-r--r-- | host/include/uhd/utils/graph_utils.hpp | 9 | ||||
-rw-r--r-- | host/lib/utils/graph_utils.cpp | 3 |
2 files changed, 10 insertions, 2 deletions
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 @@ -53,13 +53,20 @@ std::vector<graph_edge_t> 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<graph_edge_t> 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, diff --git a/host/lib/utils/graph_utils.cpp b/host/lib/utils/graph_utils.cpp index 513f7b709..89df30e15 100644 --- a/host/lib/utils/graph_utils.cpp +++ b/host/lib/utils/graph_utils.cpp @@ -83,7 +83,7 @@ std::vector<graph_edge_t> get_block_chain(const rfnoc_graph::sptr graph, } -void connect_through_blocks(rfnoc_graph::sptr graph, +std::vector<graph_edge_t> connect_through_blocks(rfnoc_graph::sptr graph, const block_id_t src_blk, const size_t src_port, const block_id_t dst_blk, @@ -159,6 +159,7 @@ void connect_through_blocks(rfnoc_graph::sptr graph, UHD_LOG_TRACE("GRAPH_UTILS", err_msg); throw uhd::runtime_error("[graph_utils] " + err_msg); } + return block_chain; } }} // namespace uhd::rfnoc |