summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2014-07-31 14:35:24 -0400
committerTom Rondeau <tom@trondeau.com>2014-07-31 14:35:24 -0400
commit921e90bd65479e220145f04445445335302af270 (patch)
tree9bd08ad8f7da805ae214d5d7a2943c2e80a0eb89
parent254871ab525d1ef35fcb3d4672ab258927a8dbc1 (diff)
parent550c8b3b8d740d17be7ac54edec142b116eefe46 (diff)
Merge remote-tracking branch 'argilo/mute-changes'
-rw-r--r--gr-blocks/grc/blocks_mute_xx.xml5
-rw-r--r--gr-blocks/lib/mute_XX_impl.cc.t3
-rw-r--r--gr-blocks/lib/mute_XX_impl.h.t1
3 files changed, 9 insertions, 0 deletions
diff --git a/gr-blocks/grc/blocks_mute_xx.xml b/gr-blocks/grc/blocks_mute_xx.xml
index 7023d32674..74c22ec83a 100644
--- a/gr-blocks/grc/blocks_mute_xx.xml
+++ b/gr-blocks/grc/blocks_mute_xx.xml
@@ -54,6 +54,11 @@
<name>in</name>
<type>$type</type>
</sink>
+ <sink>
+ <name>set_mute</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
<source>
<name>out</name>
<type>$type</type>
diff --git a/gr-blocks/lib/mute_XX_impl.cc.t b/gr-blocks/lib/mute_XX_impl.cc.t
index af46dc221a..e7c2c4398b 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@::~@NAME_IMPL@()
diff --git a/gr-blocks/lib/mute_XX_impl.h.t b/gr-blocks/lib/mute_XX_impl.h.t
index b519bb20a1..8234583bbf 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,