discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] flowgraph time, or getting number of samples sinc


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] flowgraph time, or getting number of samples since start of flowgraph
Date: Sun, 5 Dec 2010 23:32:22 -0500

On Sun, Dec 5, 2010 at 11:24 PM, Steve Mcmahon
<address@hidden> wrote:
> Hello:
>
> Does GNU Radio keep track of time, or sample count, or something similar as a 
> flowgraph runs? How can I query the current "flowgraph time", from within my 
> flowgraph, if such a thing exists?
>
> More specifically, I have a Signal Source connected to a USRP2 Sink in order 
> to generate a tone. Is there any way to query the Signal Source for how many 
> samples it has created since the flowgraph started?
>
> Thanks a lot.
>
> Steve McMahon


Time would indicate that there is a concept of a sample rate, which
isn't always true and not every block is told what the sample rate is,
anyways, even if the items are clocked. However, the next branch does
now keep track of the number of items read and written for each
input/output of each block. You can get these by calling the
nitems_read and nitems_written. It returns a 64-bit number of the item
count since the start of the flow graph.

Tom



reply via email to

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