| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
graph_utils.hpp
Go to the documentation of this file.
1//
2// Copyright 2019 Ettus Research, a National Instruments Branch
3//
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6
7#pragma once
8
9#include <uhd/config.hpp>
10#include <uhd/rfnoc/block_id.hpp>
11#include <uhd/rfnoc/defaults.hpp>
12#include <uhd/rfnoc/graph_edge.hpp>
13#include <uhd/rfnoc_graph.hpp>
14#include <boost/none.hpp>
15#include <boost/optional.hpp>
16#include <vector>
17
18
19 namespace uhd { namespace rfnoc {
20
22 using block_port_def = std::tuple<std::string, boost::optional<size_t>>;
23
24// TODO: Get rid of magic strings
28 static const std::vector<block_port_def> TERMINATOR_BLOCKS{
29 block_port_def{NODE_ID_SEP, boost::none},
30 block_port_def{"Radio", boost::none},
31 block_port_def{"NullSrcSink", 0}};
32
48std::vector<graph_edge_t> UHD_API get_block_chain(const rfnoc_graph::sptr graph,
49 const block_id_t start_block,
50 const size_t port,
51 const bool source_chain);
52
53
73std::vector<graph_edge_t> UHD_API connect_through_blocks(rfnoc_graph::sptr graph,
74 const block_id_t src_blk,
75 const size_t src_port,
76 const block_id_t dst_blk,
77 const size_t dst_port,
78 const bool skip_property_propagation = false);
79
80}} // namespace uhd::rfnoc
block_id.hpp
uhd::rfnoc::block_id_t
Definition block_id.hpp:40
uhd::rfnoc::rfnoc_graph::sptr
std::shared_ptr< rfnoc_graph > sptr
Definition rfnoc_graph.hpp:40
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
defaults.hpp
graph_edge.hpp
uhd::rfnoc
Definition actions.hpp:25
uhd::rfnoc::block_port_def
std::tuple< std::string, boost::optional< size_t > > block_port_def
Tuple that stores a block ID, as well as an optional port number.
Definition graph_utils.hpp:22
uhd::rfnoc::get_block_chain
std::vector< graph_edge_t > UHD_API get_block_chain(const rfnoc_graph::sptr graph, const block_id_t start_block, const size_t port, const bool source_chain)
uhd::rfnoc::connect_through_blocks
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, const size_t dst_port, const bool skip_property_propagation=false)
uhd
Definition build_info.hpp:12
rfnoc_graph.hpp