|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] How to time stamp how often Message Strobe fires off |
Date: | Wed, 20 Jul 2016 00:37:18 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
Hi Craig,
cross-posting this on the GNU Radio discussion mailing list, since it's pretty GR-specific; please follow up where you feel is more adequate.
"pmt.intern(repr(time.time()))" will be evaluated once, and the result will be used to construct the message strobe block. So yes, the message strobe is meant to produce the same message object over and over again. I think by far the easiest way to achieve what you want is writing your own GNU Radio block that emits the current time as PMT regularly; you can basically just copy and paste gr-blocks' "message_strobe.h", "message_strobe_impl.cc" and "message_strobe_impl.h" in a OOT block. Just replace _impl.cc's 98 message_port_pub(pmt::mp("strobe"), d_msg); by something like message_port_pub(pmt::mp("strobe"), pmt::from_long( (boost::posix_time::microsec_clock::universal_time() - boost::posix_time::from_time_t(0)).total_microseconds() ) ); (no guarantee on boost code written from the back of my head!). Cheers, Marcus On 19.07.2016 23:55, Swanson, Craig
wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |