1 NEW RRD DATAFORMAT with Accessor Functions
2 ==========================================
6 Tobias Oetiker <oetiker@ee.ethz.ch>
7 Jake Brutlag <jakeb@microsoft.com>
8 - updating rrd_update to use accessor fks
9 Karl Schilke <karl_schilke@eli.net>
10 - changeing data access to mmap
15 Encapsulating access to the RRD files through
16 special accessor functions which provide
17 access to the datastructures within the
22 For example, here is a current code block from rrd_update.c:
24 for (i=0;i<rrd.stat_head->ds_cnt;i++) {
26 rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt += interval;
28 rrd.pdp_prep[i].scratch[PDP_val].u_val+= pdp_new[i];
33 for (i=0 ; i < getDSCount(&rrd) ;i++) {
34 if(isnan(pdp_new[i])) {
35 temp = getPDPParam(&rrd, i, PDP_unkn_sec_cnt);
36 temp.u_cnt += interval;
37 setPDPParam(&rrd, i, PDP_unkn_sec_cnt, temp);
39 temp = getPDPParam(&rrd, i, PDP_val);
40 temp.u_val += pdp_new[i];
41 setPDPParam(&rrd, i, PDP_val, temp);