Due to awful preparation, we're now stuck trying to juryrig a solution of getting some numbers from labview into a c program.
So right now labview writes 6 numbers of interest, line after line into a file. Hopefully we can do this more often than the c program needs some numbers.
Can a a file be modified by someone else while it is open for read access by a c program? If not then the rest is moot and I might be off the hook.
If I can, my current and awful plan would be:
1) each time I need a set of numbers, open up the file,
2) fast forward to the end
3) wind back some (use an fseek() from SEEK_END?).
3a) If i can't wind back by line, maybe I could go back a certain number of characters, set some kind of marker (a number that wouldn't appear naturally) at the beginning of each line, and read numbers until I find one and then
4) grab the six numbers of interest
are there useful commands that would be useful that I'm just not seeing in the reference libraries?
Thanks so much to the people that helped me out last time, and to anyone who made it through this mess of a request!
edit: the reason i'd want to read the second to last line is in case labview hasn't finished writing the last line. i'm really not sure which one will be relatively faster.
So right now labview writes 6 numbers of interest, line after line into a file. Hopefully we can do this more often than the c program needs some numbers.
Can a a file be modified by someone else while it is open for read access by a c program? If not then the rest is moot and I might be off the hook.
If I can, my current and awful plan would be:
1) each time I need a set of numbers, open up the file,
2) fast forward to the end
3) wind back some (use an fseek() from SEEK_END?).
3a) If i can't wind back by line, maybe I could go back a certain number of characters, set some kind of marker (a number that wouldn't appear naturally) at the beginning of each line, and read numbers until I find one and then
4) grab the six numbers of interest
are there useful commands that would be useful that I'm just not seeing in the reference libraries?
Thanks so much to the people that helped me out last time, and to anyone who made it through this mess of a request!
edit: the reason i'd want to read the second to last line is in case labview hasn't finished writing the last line. i'm really not sure which one will be relatively faster.