X-Git-Url: https://git.ucc.asn.au/?p=matches%2FMCTX3420.git;a=blobdiff_plain;f=server%2Fdata.h;fp=server%2Fdata.h;h=188f5aa380dbe8871b1366c2cc3c6b0f653af7e0;hp=0573c2ee24ce1b1a6623575b43619a8152bdd031;hb=b7a1e44bd6c984d061b0b88a8b00cf24b854a1df;hpb=7deca6b4e089e76e279ae84c0aa25728d91e8fd9 diff --git a/server/data.h b/server/data.h index 0573c2e..188f5aa 100644 --- a/server/data.h +++ b/server/data.h @@ -6,7 +6,7 @@ #ifndef _DATAPOINT_H #define _DATAPOINT_H -#define DATA_BUFSIZ 10 // Size to use for DataPoint buffers (TODO: Optimise) +#define DATA_BUFSIZ 10 /** Size to use for DataPoint buffers (TODO: Optimise) **/ #include "common.h" @@ -23,8 +23,8 @@ typedef struct /** Enum of output format types for DataPoints **/ typedef enum { - JSON, // JSON data - TSV // Tab seperated vector + JSON, /** JSON data */ + TSV /** Tab seperated vector */ } DataFormat; /** @@ -34,10 +34,10 @@ typedef enum */ typedef struct { - 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 + 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 */ } DataFile; @@ -54,7 +54,4 @@ extern double Data_Calibrate(double value, double x[], double y[], int size); 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 - -extern double Data_Callibrate(double value, double map[], int map_size); - #endif //_DATAPOINT_H