Thursday, June 21, 2012

[Discuss-gnuradio] Wait for another thread to finish in the top block?

Hi, All,

For OFDM demodulation, in gnuradio/gr-digital/python/ofdm.py,  a _queue_watcher_thread is defined. It returns whether a packet is received correctly, what's the sequence number, and so on.
I'm using gnuradio/gr-digital/examples/ofdm/benchmark_rx.py to decode samples saved by uhd/host/rx_samples_to_file.
Thoses samples are processed by C++ modules and organized into packets enqueued in rcvd_pktq, waiting for _queue_watcher_thread to retreive them.
I found that sometimes the benchmark_rx.py terminates before the rcvd_pktq is empty, that is, the _queue_watcher_thread hasn't finished all packets in the rcvd_pktq but the main program is terminated. Maybe all samples in the file have been processed by C++ modules and thus the main program terminates.
How can I make the main program wait for the _queue_watcher_thread??? Make sure all packets in the queue are processed.

Thanks a lot!

Pei

No comments:

Post a Comment