USRP Hardware Driver and Device Manual Version: 4.11.0.0-0-unknown
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>
13#include <uhd/rfnoc_graph.hpp>
14#include <optional>
15#include <vector>
16
17
18namespace uhd { namespace rfnoc {
19
21using block_port_def = std::tuple<std::string, std::optional<size_t>>;
22
23// TODO: Get rid of magic strings
27static const std::vector<block_port_def> TERMINATOR_BLOCKS{
28 block_port_def{NODE_ID_SEP, std::nullopt},
29 block_port_def{"Radio", std::nullopt},
30 block_port_def{"NullSrcSink", 0}};
31
47std::vector<graph_edge_t> UHD_API get_block_chain(const rfnoc_graph::sptr graph,
48 const block_id_t start_block,
49 const size_t port,
50 const bool source_chain);
51
52
72std::vector<graph_edge_t> UHD_API connect_through_blocks(rfnoc_graph::sptr graph,
73 const block_id_t src_blk,
74 const size_t src_port,
75 const block_id_t dst_blk,
76 const size_t dst_port,
77 const bool skip_property_propagation = false);
78
79}} // namespace uhd::rfnoc
Definition block_id.hpp:40
std::shared_ptr< rfnoc_graph > sptr
Definition rfnoc_graph.hpp:40
#define UHD_API
Definition config.h:87
Definition actions.hpp:25
std::tuple< std::string, std::optional< size_t > > block_port_def
Tuple that stores a block ID, as well as an optional port number.
Definition graph_utils.hpp:21
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)
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)
Definition build_info.hpp:12