Tuesday, December 28, 2010

seek

Today's goal is to get my file pointer to the start of the interesting data.

The file header contains three numbers that I'll need - the number of DSP channels, the number of event channels, and the number of slow channels. Each one of these channels has its own corresponding header I have to skip over. I actually need data in some of those headers, but I think it will be easier to separate the two actions. I'll get the data I need from the headers, but then set the pointer back to the beginning and skip to the data block from there. That seems more straightforward than trying to know how far in I've gone and then jumping forward the correct amount.

Hmm, I just read through the example program and this seems to be what it does, also. It's hard to tell because again I'm not sure how much keeping track of things fread does.

No comments:

Post a Comment