- case CF_AVERAGE:
- case CF_MAXIMUM:
- case CF_MINIMUM:
- case CF_LAST:
- default:
- read_tag(&ptr2, "xff", "%lf",
- &(rrd->rra_def[rra_index].par[RRA_cdp_xff_val].
- u_val));
- }
- }
- eat_tag(&ptr2, "/params");
- }
-
-
- eat_tag(&ptr2, "cdp_prep");
- for (i = 0; i < (int) rrd->stat_head->ds_cnt; i++) {
- eat_tag(&ptr2, "ds");
- /* support to read CDP parameters */
- rra_index = rrd->stat_head->rra_cnt - 1;
- skip(&ptr2);
- if (input_version < 2) {
- rrd->cdp_prep[rrd->stat_head->ds_cnt * (rra_index) +
- i].scratch[CDP_primary_val].u_val = 0.0;
- rrd->cdp_prep[rrd->stat_head->ds_cnt * (rra_index) +
- i].scratch[CDP_secondary_val].u_val = 0.0;
- read_tag(&ptr2, "value", "%lf",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt * (rra_index) +
- i].scratch[CDP_val].u_val));
- read_tag(&ptr2, "unknown_datapoints", "%lu",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt * (rra_index) +
- i].scratch[CDP_unkn_pdp_cnt].u_cnt));
- } else {
-
- if (strncmp(ptr2, "<value>", 7) == 0) {
- parse_patch1028_CDP_params(&ptr2, rrd, rra_index, i);
- } else {
- read_tag(&ptr2, "primary_value", "%lf",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt * (rra_index)
- + i].scratch[CDP_primary_val].u_val));
- read_tag(&ptr2, "secondary_value", "%lf",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt * (rra_index)
- +
- i].scratch[CDP_secondary_val].u_val));
- switch (cf_conv(rrd->rra_def[rra_index].cf_nam)) {
- case CF_HWPREDICT:
- case CF_MHWPREDICT:
- read_tag(&ptr2, "intercept", "%lf",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index)
- +
- i].scratch[CDP_hw_intercept].
- u_val));
- read_tag(&ptr2, "last_intercept", "%lf",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index)
- +
- i].scratch[CDP_hw_last_intercept].
- u_val));
- read_tag(&ptr2, "slope", "%lf",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index)
- +
- i].scratch[CDP_hw_slope].u_val));
- read_tag(&ptr2, "last_slope", "%lf",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index)
- +
- i].scratch[CDP_hw_last_slope].
- u_val));
- read_tag(&ptr2, "nan_count", "%lu",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index)
- +
- i].scratch[CDP_null_count].
- u_cnt));
- read_tag(&ptr2, "last_nan_count", "%lu",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index)
- +
- i].scratch[CDP_last_null_count].
- u_cnt));
- break;
- case CF_SEASONAL:
- case CF_DEVSEASONAL:
- read_tag(&ptr2, "seasonal", "%lf",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index)
- +
- i].scratch[CDP_hw_seasonal].
- u_val));
- read_tag(&ptr2, "last_seasonal", "%lf",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index)
- +
- i].scratch[CDP_hw_last_seasonal].
- u_val));
- read_tag(&ptr2, "init_flag", "%lu",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index)
- +
- i].scratch[CDP_init_seasonal].
- u_cnt));
- break;
- case CF_DEVPREDICT:
- break;
- case CF_FAILURES:
- parse_FAILURES_history(&ptr2, rrd, rra_index, i);
- break;
- case CF_AVERAGE:
- case CF_MAXIMUM:
- case CF_MINIMUM:
- case CF_LAST:
- default:
- read_tag(&ptr2, "value", "%lf",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index) +
- i].scratch[CDP_val].u_val));
- read_tag(&ptr2, "unknown_datapoints", "%lu",
- &(rrd->
- cdp_prep[rrd->stat_head->ds_cnt *
- (rra_index) +
- i].scratch[CDP_unkn_pdp_cnt].
- u_cnt));
- break;