pythongnuradiognuradio-companion

How to know when a gnuradio File Source has finished reading?


I am writing a python program based on gnuradio, and using a gnuradio File Source. I cant seem to find a way to do that...

I tried looking at the documentation for this block, but i couldn't find anything useful. I also tried calling the work function of the block using python, but it didn't work (I couldn't provide the correct parameter types that gnuradio was expecting). I am looking for something like:

if (file_source_name.items_remaining() == 0): print("done.")


Solution

  • That's not a problem your block needs to solve. It also can't know, by design.

    Your block simply gets called until all output of the file source has been consumed.