1 NEW RRD DATAFORMAT with Accessor Functions
2 ==========================================
6 Tobias Oetiker <tobi@oetiker.ch>
7 Jake Brutlag <jakeb@microsoft.com>
8 - updating rrd_update to use accessor fks
12 Encapsulating access to the RRD files through
13 special accessor functions which provide
14 access to the datastructures within the
19 For example, here is a current code block from rrd_update.c:
21 for (i=0;i<rrd.stat_head->ds_cnt;i++) {
23 rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt += interval;
25 rrd.pdp_prep[i].scratch[PDP_val].u_val+= pdp_new[i];
30 for (i=0 ; i < getDSCount(&rrd) ;i++) {
31 if(isnan(pdp_new[i])) {
32 temp = getPDPParam(&rrd, i, PDP_unkn_sec_cnt);
33 temp.u_cnt += interval;
34 setPDPParam(&rrd, i, PDP_unkn_sec_cnt, temp);
36 temp = getPDPParam(&rrd, i, PDP_val);
37 temp.u_val += pdp_new[i];
38 setPDPParam(&rrd, i, PDP_val, temp);