Hello,

I am writing a program in Python to interface with a simple file source to
USRP sink flowgraph.

I have a short IQ file that I simply want to play once without repeating,
and I want the calling Python code to "know" when it's completed after
commanding the GR class instance to start via a call to tb.start(), if tb
is the class instance variable.  I came across the C++ GR API here:
https://www.gnuradio.org/doc/doxygen/classgr_1_1block.html#a89242cb1ac9d2bf5e75f923745baa576

^ That shows there's a gr.finished() boolean return that tells you when the
flowgraph is done, but evidently .finished is not an attribute of tb.  The
only methods that worked for me are tb.start/tb.run, tb.wait, tb.stop.

I'd also be happy with polling the GR class instance for the noutput_items
from the work function of the USRP_sink block. I know the file size so I
can have a while loop with the noutput_items value as a condition, but how
do I do that in Python?  I think I am getting close with these 2 results
from Google but still not getting it:
1)
https://stackoverflow.com/questions/50938245/gnuradio-number-of-output-items/50943105
2)
https://stackoverflow.com/questions/32305813/gnuradio-how-to-change-the-noutput-items-dynamically-when-writing-oot-block

Thanks,
Andrew
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to