diff options
author | jcorgan | 2008-05-20 18:56:10 +0000 |
---|---|---|
committer | jcorgan | 2008-05-20 18:56:10 +0000 |
commit | c7fc4e073aca82bc4cae529459448e0bc98b650e (patch) | |
tree | 9b76e0e91aa0fba37eb014501c184d6a6fab043b /gnuradio-core/src | |
parent | f86aa7487adf1403ac7a41d64eb3e2a74ce05299 (diff) | |
download | gnuradio-c7fc4e073aca82bc4cae529459448e0bc98b650e.tar.gz gnuradio-c7fc4e073aca82bc4cae529459448e0bc98b650e.tar.bz2 gnuradio-c7fc4e073aca82bc4cae529459448e0bc98b650e.zip |
Expose flowgraph debugging dump as gr.top_block.dump(). May or may not be suitable for ticket:245
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8466 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src')
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block.cc | 6 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block.h | 5 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block.i | 1 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block_impl.cc | 7 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block_impl.h | 3 |
5 files changed, 22 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.cc b/gnuradio-core/src/lib/runtime/gr_top_block.cc index b2523afc9..5cb0ccdea 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.cc +++ b/gnuradio-core/src/lib/runtime/gr_top_block.cc @@ -90,6 +90,12 @@ gr_top_block::unlock() d_impl->unlock(); } +void +gr_top_block::dump() +{ + d_impl->dump(); +} + bool gr_top_block::is_running() { diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.h b/gnuradio-core/src/lib/runtime/gr_top_block.h index 0209546fe..637a38468 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.h +++ b/gnuradio-core/src/lib/runtime/gr_top_block.h @@ -100,6 +100,11 @@ public: virtual void unlock(); /*! + * Displays flattened flowgraph edges and block connectivity + */ + void dump(); + + /*! * Returns true if flowgraph is running */ bool is_running(); diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.i b/gnuradio-core/src/lib/runtime/gr_top_block.i index f48dea74e..d2e8e3b41 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.i +++ b/gnuradio-core/src/lib/runtime/gr_top_block.i @@ -47,6 +47,7 @@ public: void lock(); void unlock() throw (std::runtime_error); bool is_running(); + void dump(); }; %inline %{ diff --git a/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc b/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc index 51755a65d..359665a77 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc +++ b/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc @@ -231,3 +231,10 @@ gr_top_block_impl::restart() start_threads(); } + +void +gr_top_block_impl::dump() +{ + if (d_ffg) + d_ffg->dump(); +} diff --git a/gnuradio-core/src/lib/runtime/gr_top_block_impl.h b/gnuradio-core/src/lib/runtime/gr_top_block_impl.h index 1868cffd6..abdfa9964 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block_impl.h +++ b/gnuradio-core/src/lib/runtime/gr_top_block_impl.h @@ -54,6 +54,9 @@ public: // Unlock the top block at end of reconfiguration void unlock(); + // Dump the flowgraph to stdout + void dump(); + // Return true if flowgraph is running bool is_running() const { return d_running; } |