USRP Hardware Driver and USRP Manual Version: 4.1.0.3
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 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
63 const block_id_t src_blk,
64 const size_t src_port,
65 const block_id_t dst_blk,
66 const size_t dst_port);
67
68}} // 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:70
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