summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python/gnuradio/gr/hier_block2.py
diff options
context:
space:
mode:
authorJohannes Schmitz <schmitz@ti.rwth-aachen.de>2014-03-07 12:31:52 -0500
committerTom Rondeau <tom@trondeau.com>2014-03-07 12:31:52 -0500
commit216799215efaaec72aa2d60f230f90f836196d51 (patch)
treec2e404764653ee3858f0932490a79c7c2ed3ccb4 /gnuradio-runtime/python/gnuradio/gr/hier_block2.py
parent0f18a39b39f74eb01865e59b5e7e1896f47d8197 (diff)
runtime: adds ability to output flowgraph in dot format (resolves issue 245).
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/gr/hier_block2.py')
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/hier_block2.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/hier_block2.py b/gnuradio-runtime/python/gnuradio/gr/hier_block2.py
index a254a58c72..d7cea3a9a3 100644
--- a/gnuradio-runtime/python/gnuradio/gr/hier_block2.py
+++ b/gnuradio-runtime/python/gnuradio/gr/hier_block2.py
@@ -19,7 +19,7 @@
# Boston, MA 02110-1301, USA.
#
-from runtime_swig import hier_block2_swig
+from runtime_swig import hier_block2_swig, dot_graph
import pmt
#
@@ -126,3 +126,7 @@ class hier_block2(object):
def message_port_register_hier_out(self, portname):
self.primitive_message_port_register_hier_out(pmt.intern(portname));
+ def dot_graph(self):
+ '''Return graph representation in dot language'''
+ return dot_graph(self._hb)
+