Container for the logical graph within an uhd::rfnoc_graph. More...
#include <uhd/rfnoc/detail/graph.hpp>
Public Types | |
using | uptr = std::unique_ptr< graph_t > |
using | node_ref_t = uhd::rfnoc::node_t * |
A shorthand for a pointer to a node. More... | |
using | graph_edge_t = uhd::rfnoc::graph_edge_t |
Shorthand to existing graph_edge_t. More... | |
Public Member Functions | |
graph_t () | |
~graph_t () | |
void | connect (node_ref_t src_node, node_ref_t dst_node, graph_edge_t edge_info) |
void | disconnect (node_ref_t src_node, node_ref_t dst_node, graph_edge_t edge_info) |
void | remove (node_ref_t node) |
void | commit () |
void | release () |
void | shutdown () |
std::vector< graph_edge_t > | enumerate_edges () |
std::string | to_dot () |
Friends | |
class | graph_accessor_t |
Container for the logical graph within an uhd::rfnoc_graph.
Shorthand to existing graph_edge_t.
A shorthand for a pointer to a node.
using uhd::rfnoc::detail::graph_t::uptr = std::unique_ptr<graph_t> |
uhd::rfnoc::detail::graph_t::graph_t | ( | ) |
uhd::rfnoc::detail::graph_t::~graph_t | ( | ) |
void uhd::rfnoc::detail::graph_t::commit | ( | ) |
Commit graph and run initial checks
This method can be called anytime, but it's intended to be called when the graph has been committed. It will run checks on the graph and run a property propagation.
uhd::resolve_error | if the properties fail to resolve. |
void uhd::rfnoc::detail::graph_t::connect | ( | node_ref_t | src_node, |
node_ref_t | dst_node, | ||
graph_edge_t | edge_info | ||
) |
Add a connection to the graph
After this function returns, the nodes will be considered connected along the ports specified in edge_info
.
src_node | A reference to the source node |
dst_node | A reference to the destination node |
edge_info | Information about the type of edge |
void uhd::rfnoc::detail::graph_t::disconnect | ( | node_ref_t | src_node, |
node_ref_t | dst_node, | ||
graph_edge_t | edge_info | ||
) |
Remove a connection from the graph
After this function returns, the nodes will be considered disconnected along the ports specified in edge_info
.
src_node | A reference to the source node |
dst_node | A reference to the destination node |
edge_info | Information about the type of edge |
std::vector<graph_edge_t> uhd::rfnoc::detail::graph_t::enumerate_edges | ( | ) |
Return a list of all edges
void uhd::rfnoc::detail::graph_t::release | ( | ) |
void uhd::rfnoc::detail::graph_t::remove | ( | node_ref_t | node | ) |
Remove a node from the graph
Disconnects all edges and removes the node from the graph.
node | A reference to the node |
void uhd::rfnoc::detail::graph_t::shutdown | ( | ) |
Shutdown graph: Permenanently release
This will release the graph permanently and safely. All ongoing property and action handling is completed and then disabled (this means that calling shutdown while blocks are still working will cause actions to not get delivered).
std::string uhd::rfnoc::detail::graph_t::to_dot | ( | ) |
Create a dot representation of the current graph
The graph is represented in the dot language, which can be visualized using the Graphviz tools. It contains all blocks and their connections. The connections are drawn between the ports of the blocks.
|
friend |