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/
> http://www.gtri.gatech.edu
> <https://mail.gtri.gatech.edu/owa/redir.aspx?C=c20925f2f0af4dd29329ddf0701ecfff&URL=http%3a%2f%2fwww.gtri.gatech.edu%2f>
>  
>

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to