summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/runtime
diff options
context:
space:
mode:
authorJohnathan Corgan2013-02-12 20:52:32 -0800
committerJohnathan Corgan2013-02-12 20:52:32 -0800
commit54a850f1612537e6cd5a7e7d415bc28b959cb295 (patch)
treefc2b826ffffd5ca37683e284a8ebfd1f4d0822ab /gnuradio-core/src/lib/runtime
parentc75c288a89c3c417e012282df8242144b8e42a47 (diff)
parent5ab960295f00991fa9447819b3ff9eaf8d88d28e (diff)
downloadgnuradio-54a850f1612537e6cd5a7e7d415bc28b959cb295.tar.gz
gnuradio-54a850f1612537e6cd5a7e7d415bc28b959cb295.tar.bz2
gnuradio-54a850f1612537e6cd5a7e7d415bc28b959cb295.zip
Merge remote-tracking branch 'reynwar/python_msg'
Diffstat (limited to 'gnuradio-core/src/lib/runtime')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_basic_block.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_basic_block.h b/gnuradio-core/src/lib/runtime/gr_basic_block.h
index 9cc2ad775..b4935d8ac 100644
--- a/gnuradio-core/src/lib/runtime/gr_basic_block.h
+++ b/gnuradio-core/src/lib/runtime/gr_basic_block.h
@@ -54,18 +54,6 @@ class GR_CORE_API gr_basic_block : public gr_msg_accepter, public boost::enable_
typedef boost::function<void(pmt::pmt_t)> msg_handler_t;
private:
- /*
- * This function is called by the runtime system to dispatch messages.
- *
- * The thread-safety guarantees mentioned in set_msg_handler are implemented
- * by the callers of this method.
- */
- void dispatch_msg(pmt::pmt_t which_port, pmt::pmt_t msg)
- {
- // AA Update this
- if (d_msg_handlers.find(which_port) != d_msg_handlers.end()) // Is there a handler?
- d_msg_handlers[which_port](msg); // Yes, invoke it.
- };
//msg_handler_t d_msg_handler;
typedef std::map<pmt::pmt_t , msg_handler_t, pmt::pmt_comperator> d_msg_handlers_t;
@@ -117,6 +105,19 @@ class GR_CORE_API gr_basic_block : public gr_msg_accepter, public boost::enable_
*/
void set_color(vcolor color) { d_color = color; }
vcolor color() const { return d_color; }
+
+ /*
+ * This function is called by the runtime system to dispatch messages.
+ *
+ * The thread-safety guarantees mentioned in set_msg_handler are implemented
+ * by the callers of this method.
+ */
+ virtual void dispatch_msg(pmt::pmt_t which_port, pmt::pmt_t msg)
+ {
+ // AA Update this
+ if (d_msg_handlers.find(which_port) != d_msg_handlers.end()) // Is there a handler?
+ d_msg_handlers[which_port](msg); // Yes, invoke it.
+ };
// Message passing interface
pmt::pmt_t message_subscribers;