Dynamic C to C Data Transfer
- From: Tom <Thomas-911@xxxxxxxxxxxxx>
- Date: Sat, 16 Dec 2006 13:47:40 GMT
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. :)
.
- Follow-Ups:
- Re: Dynamic C to C Data Transfer
- From: Roland Pibinger
- Re: Dynamic C to C Data Transfer
- From: goose
- Re: Dynamic C to C Data Transfer
- From: Randy Howard
- Re: Dynamic C to C Data Transfer
- Prev by Date: Re: signal handling in C
- Next by Date: Re: C-related Christmas presents
- Previous by thread: C-related Christmas presents
- Next by thread: Re: Dynamic C to C Data Transfer
- Index(es):