discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] gr.head, and flushing of file sinks


From: Steven Clark
Subject: [Discuss-gnuradio] gr.head, and flushing of file sinks
Date: Tue, 23 Oct 2007 12:22:31 -0400

1) Has anybody ever noticed a case where gr.head doesn't seem to limit the amount of data that flows through it? I have (some data source) -> (head) -> (file sink), and sometimes the writing to the file shuts off appropriately, other times it seems to skip over the limit and would happily consume my entire hard drive (I watch the file grow to 50MB, 100MB, ...) if I didn't Ctrl-C. I'm having trouble reproducing this now, but thought I would ask.


2)
b = MyTopBlockWhichWritesToAFileSink()
b.start()
b.wait()
raw_input() #wait indefinitely for user to hit enter
del b

b.wait() doesn't seem to do a final flush of the file sink...ie if b is supposed to write 10000 bytes to a file, after b.wait() the file will have 8.0KB (~8192 bytes) in it. Not until del b is the file complete (9.8KB, ~10000 bytes). What exactly does b.wait() do? Is there any way to force a file flush without deleting b?


3) Is there anything wrong with having multiple sequential top blocks?
Something like:

a = MyTopBlock1()
a.start()
a.wait()
del a

for i in range(10):
    b = MyTopBlock2()
    b.start()
    b.wait()
    del b
reply via email to

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