commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 01/03: Add async message port to switch mut


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/03: Add async message port to switch muting on and off.
Date: Thu, 31 Jul 2014 19:00:16 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit a26be77d497298bce340c507c03dc1b9aabd9234
Author: Clayton Smith <address@hidden>
Date:   Fri Jul 11 01:16:47 2014 -0400

    Add async message port to switch muting on and off.
---
 gr-blocks/lib/mute_XX_impl.cc.t | 3 +++
 gr-blocks/lib/mute_XX_impl.h.t  | 1 +
 2 files changed, 4 insertions(+)

diff --git a/gr-blocks/lib/mute_XX_impl.cc.t b/gr-blocks/lib/mute_XX_impl.cc.t
index af46dc2..e7c2c43 100644
--- a/gr-blocks/lib/mute_XX_impl.cc.t
+++ b/gr-blocks/lib/mute_XX_impl.cc.t
@@ -46,6 +46,9 @@ namespace gr {
                     io_signature::make(1, 1, sizeof(@O_TYPE@))),
       d_mute(mute)
     {
+      message_port_register_in(pmt::intern("set_mute"));
+      set_msg_handler(pmt::intern("set_mute"),
+        boost::bind(&@NAME_IMPL@::set_mute_pmt, this, _1));
     }
 
     @NAME_IMPL@::address@hidden@()
diff --git a/gr-blocks/lib/mute_XX_impl.h.t b/gr-blocks/lib/mute_XX_impl.h.t
index b519bb2..8234583 100644
--- a/gr-blocks/lib/mute_XX_impl.h.t
+++ b/gr-blocks/lib/mute_XX_impl.h.t
@@ -41,6 +41,7 @@ namespace gr {
 
       bool mute() const { return d_mute; }
       void set_mute(bool mute) { d_mute = mute; }
+      void set_mute_pmt(pmt::pmt_t msg) { set_mute(pmt::to_bool(msg)); }
 
       int work(int noutput_items,
                gr_vector_const_void_star &input_items,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]