X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_format.h;h=4046af21628f4e284b1bfc5577453e68886632a5;hp=0d8a9dc3751c099d09e9039bfc9fc430340a5ae0;hb=965b570fe98ee533ed72f4d65d171a97bdf422d1;hpb=7383625ce0413ce5dbcc0ced4ee4873c6df37735 diff --git a/src/rrd_format.h b/src/rrd_format.h index 0d8a9dc..4046af2 100644 --- a/src/rrd_format.h +++ b/src/rrd_format.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.99907080300 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 ***************************************************************************** * rrd_format.h RRD Database Format header *****************************************************************************/ @@ -7,6 +7,18 @@ #ifndef _RRD_FORMAT_H #define _RRD_FORMAT_H +/* + * _RRD_TOOL_H + * We're building RRDTool itself. + * + * RRD_EXPORT_DEPRECATED + * User is requesting internal function which need this struct. They have + * been told that this will change and have agreed to adapt their programs. + */ +#if !defined(_RRD_TOOL_H) && !defined(RRD_EXPORT_DEPRECATED) +# error "Do not include rrd_format.h directly. Include rrd.h instead!" +#endif + #include "rrd.h" /***************************************************************************** @@ -23,9 +35,7 @@ /* changed because microsecond precision requires another field */ #define RRD_VERSION "0004" #define RRD_VERSION3 "0003" -#define FLOAT_COOKIE 8.642135E130 - -#include "rrd_nan_inf.h" +#define FLOAT_COOKIE ((double)8.642135E130) typedef union unival { unsigned long u_cnt; @@ -194,13 +204,15 @@ enum cf_en { CF_AVERAGE = 0, /* data consolidation functions */ enum rra_par_en { RRA_cdp_xff_val = 0, /* what part of the consolidated * datapoint must be known, to produce a * valid entry in the rra */ - RRA_hw_alpha, + /* CF_HWPREDICT: */ + RRA_hw_alpha = 1, /* exponential smoothing parameter for the intercept in * the Holt-Winters prediction algorithm. */ - RRA_hw_beta, + RRA_hw_beta = 2, /* exponential smoothing parameter for the slope in * the Holt-Winters prediction algorithm. */ - RRA_dependent_rra_idx, + + RRA_dependent_rra_idx = 3, /* For CF_HWPREDICT: index of the RRA with the seasonal * effects of the Holt-Winters algorithm (of type * CF_SEASONAL). @@ -212,22 +224,30 @@ enum rra_par_en { RRA_cdp_xff_val = 0, /* what part of the consolidated * Holt-Winters prediction (of type CF_HWPREDICT). * For CF_FAILURES: index of the CF_DEVSEASONAL array. * */ - RRA_seasonal_smooth_idx, - /* For CF_SEASONAL and CF_DEVSEASONAL: - * an integer between 0 and row_count - 1 which + + /* CF_SEASONAL and CF_DEVSEASONAL: */ + RRA_seasonal_gamma = 1, + /* exponential smoothing parameter for seasonal effects. */ + + RRA_seasonal_smoothing_window = 2, + /* fraction of the season to include in the running average + * smoother */ + + /* RRA_dependent_rra_idx = 3, */ + + RRA_seasonal_smooth_idx = 4, + /* an integer between 0 and row_count - 1 which * is index in the seasonal cycle for applying * the period smoother. */ - RRA_failure_threshold, + + /* CF_FAILURES: */ + RRA_delta_pos = 1, /* confidence bound scaling parameters */ + RRA_delta_neg = 2, + /* RRA_dependent_rra_idx = 3, */ + RRA_window_len = 4, + RRA_failure_threshold = 5 /* For CF_FAILURES, number of violations within the last * window required to mark a failure. */ - RRA_seasonal_gamma = RRA_hw_alpha, - /* exponential smoothing parameter for seasonal effects. - * */ - RRA_delta_pos = RRA_hw_alpha, - RRA_delta_neg = RRA_hw_beta, - /* confidence bound scaling parameters for the - * the FAILURES RRA. */ - RRA_window_len = RRA_seasonal_smooth_idx }; /* For CF_FAILURES, the length of the window for measuring @@ -375,7 +395,8 @@ typedef struct rrd_t { stat_head_t *stat_head; /* the static header */ ds_def_t *ds_def; /* list of data source definitions */ rra_def_t *rra_def; /* list of round robin archive def */ - live_head_t *live_head; + live_head_t *live_head; /* rrd v >= 3 last_up with us */ + time_t *legacy_last_up; /* rrd v < 3 last_up time */ pdp_prep_t *pdp_prep; /* pdp data prep area */ cdp_prep_t *cdp_prep; /* cdp prep area */ rra_ptr_t *rra_ptr; /* list of rra pointers */