X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Fdata.h;h=30d1253b5967192da75456c16a15849058116901;hb=e98b2d71aa507c8656b47752a529a3a2a619875a;hp=e52dadc6236e6ab7bcca514525675b0388725c16;hpb=5ab6641e1e2c28d85440f4cbe4c4091d0c54d1ab;p=matches%2FMCTX3420.git diff --git a/server/data.h b/server/data.h index e52dadc..30d1253 100644 --- a/server/data.h +++ b/server/data.h @@ -34,8 +34,7 @@ typedef enum */ typedef struct { - FILE * read_file; // used for reading - FILE * write_file; // used for writing + FILE * file; // file pointer int num_points; // Number of DataPoints in the file char * filename; // Name of the file pthread_mutex_t mutex; // Mutex around num_points @@ -51,4 +50,7 @@ extern void Data_PrintByIndexes(DataFile * df, int start_index, int end_index, D extern void Data_PrintByTimes(DataFile * df, double start_time, double end_time, DataFormat format); // Print data between time values extern int Data_FindByTime(DataFile * df, double time_stamp, DataPoint * closest); // Find index of DataPoint with the closest timestamp to that given +extern void Data_Handler(DataFile * df, FCGIValue * start, FCGIValue * end, DataFormat format, double current_time); // Helper; given FCGI params print data +extern DataFormat Data_GetFormat(FCGIValue * fmt); // Helper; convert human readable format string to DataFormat + #endif //_DATAPOINT_H