Hi all,

There was some talk a few weeks back on creating a file format in which there's a header storing info like the sample rate, capture freq, decimation, etc.

I would like to create such a file, but would like to store some small amount of data once per work cycle. The idea is to constantly record a changing freq and other data and be able to play it back later.

I followed the model of file_sink/file_source and designed format like this:

<int> length of header stuff (could be 0)
 <int> header ints
.... The sample data

<int> length of header stuff (could be 0)
 <int> header ints
.... The sample data

<int> length of header stuff (could be 0)
 <int> header ints
.... The sample data

So far this doesn't work because of my assumption of the sample data size. Am I assuming correctly that sample data (n_input_items) items is a fixed size? How is that determined in the flow graph? Will it be the same when I go back to read in the file? (I think not, this is why my code fails, it assumes that it will find my header info (size, header) at the start of each work cycle when reading in the file).

And, finally, I saw gr_simple_framer in the list... would it be better to frame the data first, before writing to the file so that I guarantee a known, fixed size?

Any suggestions on how to better do this? I thought also of recording the info in a separate file along with corresponding seek point. Yet another way would be to interleave a vector stream with the real stream... seems pretty wasteful, though.

thanks,

-jamie




_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to