T
Tom
I need my data generating C program on computer #1 to export small
amounts of data (one - 40 byte data structure) periodically (once per
minute) to a C program on computer #2.
I am considering having computer #1 to create two duplicate data files
sequentially. (file_1.dat & file_2.dat).
Then, Computer #2 tries to open file_2.dat and upon failure it opens
file_1.dat.
Due to how small these files are ... one of these two files should
always be "available" for Computer #2.
If either file can not be opened by Computer #1 (Computer #2 is
reading it) ... then that file is simply skipped on that output cycle.
If Computer #2 sees the same time stamp on the most recently read
file_2.dat ... then it reads file_1.dat.
I only know the basics of C programming and hope this can be resolved
within C easily. Both the timing and communication issues are a
challenge for me. Perhaps using a small ram disk would prevent
hammering away on a hard drive? Most likely there is a simple solution
and I am just ignorant of the best approach. Please share how you
would solve this problem. Thanks in advance.
amounts of data (one - 40 byte data structure) periodically (once per
minute) to a C program on computer #2.
I am considering having computer #1 to create two duplicate data files
sequentially. (file_1.dat & file_2.dat).
Then, Computer #2 tries to open file_2.dat and upon failure it opens
file_1.dat.
Due to how small these files are ... one of these two files should
always be "available" for Computer #2.
If either file can not be opened by Computer #1 (Computer #2 is
reading it) ... then that file is simply skipped on that output cycle.
If Computer #2 sees the same time stamp on the most recently read
file_2.dat ... then it reads file_1.dat.
I only know the basics of C programming and hope this can be resolved
within C easily. Both the timing and communication issues are a
challenge for me. Perhaps using a small ram disk would prevent
hammering away on a hard drive? Most likely there is a simple solution
and I am just ignorant of the best approach. Please share how you
would solve this problem. Thanks in advance.