From: Peter Stamfest Date: Tue, 4 Mar 2014 20:46:49 +0000 (+0100) Subject: make update_cdp usable from other modules X-Git-Tag: v1.5.0-rc1~131^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c86a2d175e78900c7dbcd240d767bab63f7d75fc;p=thirdparty%2Frrdtool-1.x.git make update_cdp usable from other modules --- diff --git a/src/rrd_update.c b/src/rrd_update.c index 48ba7e47..5c4a6fb6 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -25,6 +25,7 @@ #include "unused.h" #include "rrd_client.h" +#include "rrd_update.h" #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) @@ -192,18 +193,6 @@ static int update_cdp_prep( rrd_value_t *seasonal_coef, int current_cf); -static void update_cdp( - unival *scratch, - int current_cf, - rrd_value_t pdp_temp_val, - unsigned long rra_step_cnt, - unsigned long elapsed_pdp_st, - unsigned long start_pdp_offset, - unsigned long pdp_cnt, - rrd_value_t xff, - int i, - int ii); - static void initialize_cdp_val( unival *scratch, int current_cf, @@ -1607,7 +1596,7 @@ static int update_cdp_prep( * Given the new reading (pdp_temp_val), update or initialize the CDP value, * primary value, secondary value, and # of unknowns. */ -static void update_cdp( +void update_cdp( unival *scratch, int current_cf, rrd_value_t pdp_temp_val, diff --git a/src/rrd_update.h b/src/rrd_update.h new file mode 100644 index 00000000..29bc4290 --- /dev/null +++ b/src/rrd_update.h @@ -0,0 +1,33 @@ +/**************************************************************************** + * RRDtool 1.4.8 Copyright by Tobi Oetiker, 1997-2013 + **************************************************************************** + * rrd_restore.h + ****************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _RRD_UPDATE_H +#define _RRD_UPDATE_H + +#include +#include "rrd.h" + +void update_cdp( + unival *scratch, + int current_cf, + rrd_value_t pdp_temp_val, + unsigned long rra_step_cnt, + unsigned long elapsed_pdp_st, + unsigned long start_pdp_offset, + unsigned long pdp_cnt, + rrd_value_t xff, + int i, + int ii); + +#endif + + +#ifdef __cplusplus +} +#endif