diff options
author | Bastian Bloessl <mail@bastibl.net> | 2019-08-14 13:33:57 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2019-08-22 15:18:33 +0200 |
commit | c94054d5123afec6ee4696edf015822ada378f9a (patch) | |
tree | 1891676f5d4f7e7f00dba534140a613df3cb5a05 | |
parent | 03a3d1b584323c5ed4736d672d07222f780d3f64 (diff) |
runtime: add msg ports to dot graph and use unique names
-rw-r--r-- | gnuradio-runtime/lib/flowgraph.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gnuradio-runtime/lib/flowgraph.cc b/gnuradio-runtime/lib/flowgraph.cc index 435611f599..96956b1f0d 100644 --- a/gnuradio-runtime/lib/flowgraph.cc +++ b/gnuradio-runtime/lib/flowgraph.cc @@ -491,6 +491,7 @@ std::string dot_graph_fg(flowgraph_sptr fg) { basic_block_vector_t blocks = fg->calc_used_blocks(); edge_vector_t edges = fg->edges(); + msg_edge_vector_t msg_edges = fg->msg_edges(); std::stringstream out; @@ -498,7 +499,7 @@ std::string dot_graph_fg(flowgraph_sptr fg) // Define nodes and set labels for (basic_block_viter_t block = blocks.begin(); block != blocks.end(); ++block) { - out << (*block)->unique_id() << " [ label=\"" << (*block)->name() << "\" ]" + out << (*block)->unique_id() << " [ label=\"" << (*block)->alias() << "\" ]" << std::endl; } @@ -508,6 +509,11 @@ std::string dot_graph_fg(flowgraph_sptr fg) << edge->dst().block()->unique_id() << std::endl; } + for (msg_edge_viter_t edge = msg_edges.begin(); edge != msg_edges.end(); edge++) { + out << edge->src().block()->unique_id() << " -> " + << edge->dst().block()->unique_id() << " [color=blue]" << std::endl; + } + out << "}" << std::endl; return out.str(); |