USRP Hardware Driver and USRP Manual Version: 4.0.0.0
UHD and USRP Manual
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 <boost/none.hpp>
15#include <boost/optional.hpp>
16#include <vector>
17
18
19namespace uhd { namespace rfnoc {
20
22using block_port_def = std::tuple<std::string, boost::optional<size_t>>;
23
24// TODO: Get rid of magic strings
28static const std::vector<block_port_def> TERMINATOR_BLOCKS{
29 {NODE_ID_SEP, boost::none}, {"Radio", boost::none}, {"NullSrcSink", 0}};
30
46std::vector<graph_edge_t> UHD_API get_block_chain(const rfnoc_graph::sptr graph,
47 const block_id_t start_block,
48 const size_t port,
49 const bool source_chain);
50
51
61 const block_id_t src_blk,
62 const size_t src_port,
63 const block_id_t dst_blk,
64 const size_t dst_port);
65
66}} // namespace uhd::rfnoc
Definition: block_id.hpp:40
std::shared_ptr< rfnoc_graph > sptr
Definition: rfnoc_graph.hpp:38
#define UHD_API
Definition: config.h:67
void 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)
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
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)
Definition: build_info.hpp:12