|
From: | Tom Rondeau |
Subject: | Re: [Discuss-gnuradio] File Sink open/close question |
Date: | Wed, 23 Jan 2013 10:20:46 -0500 |
Hi!
Im using a message queue to count data, while the data is sinked to a file.
Then if the counter reaches X i want the old file to be closed and continue
sinking in a new file. Then again if reaches X to switch to the old file. So
my bottom part code looks like that:
tb = top_block()
tb.start()
a=0
while 1:
if tb.sink_queue.count()>X:
tb.gr_file_sink_0.close()
tb.sink_queue.flush()
if a==0:
tb.gr_file_sink_0.open("PLACE_TO_SAVE\two")
a=1
else:
tb.gr_file_sink_0.open("PLACE_TO_SAVE\one")
a=0
Right now, it simply closes the first file, but does not begin with the
second one. Can anyone help me with that? Thanks in advance
[Prev in Thread] | Current Thread | [Next in Thread] |