CRIS/SIS: Data Archive Routines' Returned Status

Before inserting the data struct into the archive file, these routines first read what is already in the "time slot" the struct is to be written into. If the slot is zeroed, then nothing has been placed in the slot previously. In such a case, the struct is written into the slot, and the return status value is 0. This is the case to be expected normally.

But for various reasons, a time slot may have been written into previously. If data already exists in the slot, the routines check for differences in the data already in the slot and the data waiting to be written there. If the data is identical, nothing is written and the return status value is 3.

If the data is different, both the data in the slot and that waiting to be written are written out to a ".overlap" file in the same directory. The slot is then filled with char -1 (0xffff) to signal the abnormal condition existing for this time slot. The return status value is 1 in this case.

Finally, if it is found that the time slot is already filled with char -1 (see previous paragraph for why this would be), then the struct waiting to be written is written to the ".overlap" file, and a status value of 2 is returned. This is a very abnormal condition.


Back

bruce