summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Wuerthwein <fkw@ucsd.edu>2009-02-08 19:54:54 +0000
committerFrank Wuerthwein <fkw@ucsd.edu>2009-02-08 19:54:54 +0000
commit5961bedfb79351a0bc58edc1ab17780d9ba48d29 (patch)
treef849724682ae772be3b24f8560e4d7caa337daf8
parentb98e4b61a1732c7127b67520160712b495779caf (diff)
Fix bug and rename step functions
-rw-r--r--src/lib/rrdFile.js22
1 files 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) {