X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_format.h;h=75441ac9f1dfe09ab510256caeb987a26a65d29c;hp=711778f1a5ccdec84e0f382fd19dcbddde36e46d;hb=35354e059a77479a7a135c1e4fc71c76523fd7c4;hpb=6152d278ba083f0447e5989c7933897a03fcd7e3 diff --git a/src/rrd_format.h b/src/rrd_format.h index 711778f..75441ac 100644 --- a/src/rrd_format.h +++ b/src/rrd_format.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.3.0 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * 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" /***************************************************************************** @@ -25,8 +37,6 @@ #define RRD_VERSION3 "0003" #define FLOAT_COOKIE 8.642135E130 -#include "rrd_nan_inf.h" - typedef union unival { unsigned long u_cnt; rrd_value_t u_val; @@ -183,7 +193,7 @@ enum cf_en { CF_AVERAGE = 0, /* data consolidation functions */ CF_FAILURES, /* HWPREDICT that follows a moving baseline */ CF_MHWPREDICT - /* new entries must come last !!! */ + /* new entries must come last !!! */ }; /* A binary array of failure indicators: 1 indicates @@ -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 */