From 5961bedfb79351a0bc58edc1ab17780d9ba48d29 Mon Sep 17 00:00:00 2001 From: Frank Wuerthwein Date: Sun, 8 Feb 2009 19:54:54 +0000 Subject: Fix bug and rename step functions --- src/lib/rrdFile.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/lib/rrdFile.js b/src/lib/rrdFile.js index d86e065..288fc7e 100644 --- a/src/lib/rrdFile.js +++ b/src/lib/rrdFile.js @@ -103,8 +103,8 @@ RRDRRAInfo.prototype.getPdpPerRow = function() { return this.rrd_data.getLongAt(this.rra_def_idx+32,20); } -// Get step per row (expressed in seconds) -RRDRRAInfo.prototype.getStepPerRow = function() { +// Get RRA step (expressed in seconds) +RRDRRAInfo.prototype.getStep = function() { return this.pdp_step*this.getPdpPerRow(); } @@ -157,9 +157,9 @@ RRDRRA.prototype.getNrDSs = function() { return this.ds_cnt; } -// Get step per row (expressed in seconds) -RRDRRA.prototype.getStepPerRow = function() { - return this.rra_info.getStepPerRow(); +// Get RRA step (expressed in seconds) +RRDRRA.prototype.getStep = function() { + return this.rra_info.getStep(); } // Get consolidation function name @@ -284,7 +284,7 @@ RRDHeader.prototype.load_row_cnts = function() { // --------------------------- // Start of user functions -RRDHeader.prototype.getStep = function() { +RRDHeader.prototype.getMinStep = function() { return this.pdp_step; } RRDHeader.prototype.getLastUpdate = function() { @@ -330,8 +330,8 @@ function RRDFile(bf) { // =================================== // Start of user functions - this.getStep = function() { - return this.rrd_header.getStep(); + this.getMinStep = function() { + return this.rrd_header.getMinStep(); } this.getLastUpdate = function() { return this.rrd_header.getLastUpdate(); @@ -345,7 +345,11 @@ function RRDFile(bf) { } this.getNrRRAs = function() { - return this.rrd_header.getNrRRAs(idx); + return this.rrd_header.getNrRRAs(); + } + + this.getRRAInfo = function(idx) { + return this.rrd_header.getRRAInfo(idx); } this.getRRA = function(idx) { -- cgit v1.1-4-g5e80