File_sink does not save all?

Hi All,

this is a Bug report for the Developers.
I am using the file_sink after an Analysis Filterbank, wich parts
my Bandwidth into 3 bands. So i should get the same count of samples
in all 3 bands, but this is not the norm. Sometimes
i get to few samples for some of my bands.

For example one file includes 43894800 Samples and the others
have 43890000.
FIlE1 --> 43894800 Samples
FILE2 --> 43890000 Samples
FILE3 --> 43890000 Samples

This occurs not all the time.

Regards Markus

On Mon, May 25, 2009 at 11:02:20AM +0000, feldmaus wrote:

FILE3 --> 43890000 Samples
Are you forcing the flow graph to quit (e.g. by KeyboardInterrupt or
similar)? In that, your “problem” would probably normal behaviour.

Martin

Martin B. <braun int.uni-karlsruhe.de> writes:

FIlE1 → 43894800 Samples
FILE2 → 43890000 Samples
FILE3 → 43890000 Samples

Are you forcing the flow graph to quit (e.g. by KeyboardInterrupt or
similar)? In that, your “problem” would probably normal behaviour.

I closing the app by clicking with the mouse on the cross symbol in the
right above corner.
Further on, my app has a file.close() method, so that the data
should be flushed.

Regards Markus

Eric B. <eb comsec.com> writes:

What you are seeing is the expected behavior.

Thanks for your Answer,

so you mean this is the normal behaviour, that it doesnt have the same
count of samples at all file_sinks ?

regards Markus

On Mon, May 25, 2009 at 11:22:38PM +0000, feldmaus wrote:

Eric B. <eb comsec.com> writes:

What you are seeing is the expected behavior.

Thanks for your Answer,

so you mean this is the normal behaviour, that it doesnt have the same
count of samples at all file_sinks ?

regards Markus

Markus,

It does save all of the samples that it’s seen. GNU Radio does not
process everything “instantaneously”. Since you’re not causing the
graph to stop synchronously, say using gr.head, or by providing input
from a file, the graph is stopping at the first interruption point
that it comes to after seeing stop(). There are many threads
involved, and they are not all stopped atomically.

If you feed your graph from a file and let it run to the EOF, you
would get the same number of samples in all three files.

Eric

Eric B. <eb comsec.com> writes:

Thanks,

nice to know. My data comes from an Analysis Filterbank
which parts the main band into 3 bands. Then it will be saved to
a file.

Regards Markus

On Mon, May 25, 2009 at 05:00:39PM +0000, feldmaus wrote:

For example one file includes 43894800 Samples and the others
Further on, my app has a file.close() method, so that the data
should be flushed.

What you are seeing is the expected behavior.

Eric