Saturday, August 5, 2023

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

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

No comments:

Post a Comment