|
From: | Michael Dickens |
Subject: | Re: [Discuss-gnuradio] How to find out if device sink is finished writing samples to radio |
Date: | Mon, 16 Sep 2019 13:23:52 -0500 |
Hi Kevin,_______________________________________________
Thanks for the answer, unfortunately in my case I want to keep the flowgraph running and I'd need a way to check the state of the block buffers. Maybe I can do that with a custom block before the source or maybe I should rethink my approach.
AdrianOn September 16, 2019 2:42:06 PM UTC, Kevin Reid <address@hidden> wrote:On Mon, Sep 16, 2019 at 4:22 AM Adrian Musceac <address@hidden> wrote:So far I haven't found a way (callback?) to tell when the last sample is out of the flowgraph. I am using the C++ API of GNU radio.The wait() method of a top_block will block the calling thread until all items have passed through.Note that this will only succeed if your source blocks indicate there are no more items, by returning -1 (gr::block::WORK_DONE). Vector and file sources and other such standard fixed-length sources do, but if your source is merely emitting no items at this time (e.g. a network source that's not currently receiving packets) the flow graph will still be running waiting for more. I do not know of a way to ask for "when all buffers are currently empty", if that's what you need.
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Prev in Thread] | Current Thread | [Next in Thread] |