#include #include #include #include #include "hdfi.h" #include "cris.h" #include "crisGetData.h" #include "utilities.h" void main(int argc, void *argv) { struct L1CrisEventCycle *pEventCycle; /* testing getEventCycleStruct_c */ if (1) { uint32 secondsSince1996 = 54605303; int autoFreeMemoryFlag = 1; printf("\ntesting getEventCycleStruct_c\n"); printf("secondsSince1996 = %d\n", secondsSince1996); pEventCycle = getEventCycleStruct_c(secondsSince1996, autoFreeMemoryFlag); while (pEventCycle->Second1996 != 0) { printf("pEventCycle->Second1996 = %d\n", pEventCycle->Second1996); pEventCycle++; } } } ------------------------------------------------------------------------ % setenv L1_CRIS_DATA_BASE_DIRECTORY /home/idunn1/rgr/prototype/data/cris_prelim % crisTest testing getEventCycleStruct_c secondsSince1996 = 54605303 pEventCycle->Second1996 = 54605048 [Note that the time stamp 54605048 for the struct returned is valid between 54605048 and (54605048 + 255 = 54605303). Note what is returned if we increase the requested time by 1 second: % crisTest testing getEventCycleStruct_c secondsSince1996 = 54605304 pEventCycle->Second1996 = 54605304 and by one again: testing getEventCycleStruct_c secondsSince1996 = 54605305 pEventCycle->Second1996 = 54605304 ]