discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] data from flow graph is not updated


From: lishan_wh
Subject: Re: [Discuss-gnuradio] data from flow graph is not updated
Date: Sun, 22 May 2011 23:46:04 +0800 (CST)

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 = ""
print data

At 2011-05-22 23:14:11��Yang <address@hidden> 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 with Sparrow

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 = "">
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
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

[Prev in Thread] Current Thread [Next in Thread]