|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] Empty work functions |
Date: | Thu, 05 Sep 2013 10:07:08 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
Hi Sean,
yes, the scheduler "supports" this; I'm using this whenever I just need someone to receive messages. So basically you do 1), which is quite easy because your "block" looks like from pmt.pmt_to_python import pmt_to_python as pmt2py [...] class messageReceiver(gr.sync_block): message_port_identifier = pmt.intern("msg_in") def __init__(self, ref_to_uhd_sink): gr.sync_block.__init__(self, name="foo", in_sig=[], out_sig=[]) self._uhd = _ref_to_uhd_sink self.message_port_register_in(self.message_port_identifier) self.set_msg_handler(self.message_port_identifier, self.handle_msg) def handle_msg(self, msg): print "got message", pmt2py(msg) self._uhd->set_command_time[...] Happy Hacking, Marcus On 09/04/2013 10:28 PM, Nowlan, Sean wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |