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")
Read the mailing list of the GNU project right here! The information here is regarding the GNU radio project for USRP radios.
Saturday, August 5, 2023
Re: Does the reset() method in the Head block work?
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:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment