I mean data should be different at different time. I print data after it is assigned def main(tb): while(True): time.sleep(1) data = tb.dst.data() print data
At 2011-05-22 23:14:11��Yang <[email protected]> wrote: what do you mean updated? Where and when do you print the data? If you print it after the block stops, the data will not change anyway. -- Yang Sent withSparrow On 2011年5月22日星期日 at 下午10:13, lishan_wh wrote: Hi, all I met a problem when I tried to read data from USRP. I hope someone can help me. Thanks. Here is my flow graph: source_c --> keep_one_in_n --> g.head --> gr.complex_to_mag --> gr.vector_sink_f if __name__ == '__main__': tb = top_block() try: tb.start() # start executing flow graph in another thread... time.sleep(1) main_loop(tb) except KeyboardInterrupt: pass In main_loop function, I read data from vector_sink_f. def main(tb): while(True): time.sleep(1) data = tb.dst.data() But when I print data, the result shows that data doesn't change at all. I don't why. In my opinion, data should be updated as the flow graph runs. And that changing data with time is what I wanted. Does anybody know the reason? Thanks! Ally _______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
