discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] How to time stamp how often Message Strobe fires


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:

Marcus,

I am trying to figure out how often Message Strobe fires off.

Currently I have Message Strobe connected to the print port of Message Debug.

In Message Strobe > Message PMT: pmt.intern(repr(time.time()))

and the Period (ms) is 40.


My goal is to eventually be able to shorten the period and then see the new time stamp in the message debug get shorter and shorter.


When I run it, I get the message

***** MESSAGE DEBUG PRINT ******

1468965027.859858

***** MESSAGE DEBUG PRINT ******

1468965027.859858


over and over again, which is not what I want.  I want to get the time stamp to change with each unique new time it fires off instead of the first time I ran it.


Any ideas?


Craig


Craig F. Swanson
Research Engineer II
Information and Communications Laboratory
Communications, Systems, and Spectrum Division
Georgia Tech Research Institute
Room 560
250 14th St NW
Atlanta, GA 30318
Cell: 770.298.9156



reply via email to

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