discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Does the reset() method in the Head block work?


From: Jeff Long
Subject: Re: Does the reset() method in the Head block work?
Date: Sat, 5 Aug 2023 13:51:02 -0400

reset() should work _before_ the Head block reaches the specified items, but once it reaches that number of items, Head is done and the flowgraph will terminate. So, I don't think reset() will do what you're hoping.

Also, the code you posted creates a _new_ Head block each time through the while loop and resets that block. You would want to operate on the Head block in your flowgraph.

On Sat, Aug 5, 2023 at 12:45 PM Elmore's <wa4ywm@comcast.net> wrote:

I am trying to reset a Head block so that I can resume streaming after receiving 180,000 samples. I had previously posted “Incompatible Function Arguments” related to this question but I seem to have resolved that issue. The following code – a callback – shows what I am attempting to do but it is not re-setting. The streaming never resumes.

Is there more I need to do other than the reset? The Head block is in a Hier Block. Is this a complicating factor?

 

from gnuradio import blocks

def rx(stop_rx):
        while not stop_rx.isSet():
            print("\nStarting RX")
            check_time(rx_cycle)
            parse_rx()
            time.sleep(8)
            blocks_head_0 = blocks.head(gr.sizeof_float*1, 12000*15)
            blocks_head_0.reset()
            print("\nExiting RX")


Virus-free.www.avg.com

reply via email to

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