X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_format.h;h=5557772a7e708323089d0b1c4f43b873320d8f4c;hp=3528362bd1a5908fa89033a388e1f6e5120f3280;hb=c112f7c06e534ce7a5a4e25b6f7f742aeb051850;hpb=7c016dfa001ae254bf4e18126f814ee8f0abd821 diff --git a/src/rrd_format.h b/src/rrd_format.h index 3528362..5557772 100644 --- a/src/rrd_format.h +++ b/src/rrd_format.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997, 1998, 1999 + * RRDtool 1.2rc3 Copyright by Tobi Oetiker, 1997-2005 ***************************************************************************** * rrd_format.h RRD Database Format header *****************************************************************************/ @@ -19,22 +19,12 @@ *****************************************************************************/ #define RRD_COOKIE "RRD" -#define RRD_VERSION "0002" +/* #define RRD_VERSION "0002" */ +/* changed because microsecond precision requires another field */ +#define RRD_VERSION "0003" #define FLOAT_COOKIE 8.642135E130 -#if defined(WIN32) -#define DNAN ((double)fmod(0.0,0.0)) -#define DINF ((double)log(0.0)) -#else - -#define DNAN ((double)(0.0/0.0)) /* we use a DNAN to - * represent the UNKNOWN - * */ -#define DINF ((double)(1.0/0.0)) /* we use a DINF to - * represent a value at the upper or - * lower border of the graph ... - * */ -#endif +#include "rrd_nan_inf.h" typedef union unival { unsigned long u_cnt; @@ -136,18 +126,21 @@ typedef struct stat_head_t { enum dst_en { DST_COUNTER=0, /* data source types available */ DST_ABSOLUTE, DST_GAUGE, - DST_DERIVE}; + DST_DERIVE, + DST_CDEF}; enum ds_param_en { DS_mrhb_cnt=0, /* minimum required heartbeat. A * data source must provide input at * least every ds_mrhb seconds, * otherwise it is regarded dead and * will be set to UNKNOWN */ - DS_min_val, /* the processed input of a ds must */ - DS_max_val }; /* be between max_val and min_val + DS_min_val, /* the processed input of a ds must */ + DS_max_val, /* be between max_val and min_val * both can be set to UNKNOWN if you * do not care. Data outside the limits * set to UNKNOWN */ + DS_cdef = DS_mrhb_cnt}; /* pointer to encoded rpn + * expression only applies to DST_CDEF */ /* The magic number here is one less than DS_NAM_SIZE */ #define DS_NAM_FMT "%19[a-zA-Z0-9_-]" @@ -169,7 +162,7 @@ enum cf_en { CF_AVERAGE=0, /* data consolidation functions */ CF_MINIMUM, CF_MAXIMUM, CF_LAST, - CF_HWPREDICT, + CF_HWPREDICT, /* An array of predictions using the seasonal * Holt-Winters algorithm. Requires an RRA of type * CF_SEASONAL for this data source. */ @@ -257,6 +250,8 @@ typedef struct rra_def_t { typedef struct live_head_t { time_t last_up; /* when was rrd last updated */ + long last_up_usec; /* micro seconds part of the + update timestamp. Always >= 0 */ } live_head_t;