internal int Extract( long timestamp, Source[] sources, int row, int offset ) { int tblPos = offset; for ( int i = 0; i < dsValues.Length; i++ ) { if ( dsValues[i] == null ) continue; int tIndex = tPos[i]; if ( timestamp < timestamps[i][ tIndex ] ) throw new RrdException("Backward reading not allowed"); while ( tIndex < timestamps[i].Length - 1 ) { if ( timestamps[i][ tIndex ] <= timestamp && timestamp < timestamps[i][ tIndex + 1] ) { for (int j = 0; j < dsValues[i].Length; j++) sources[tblPos++].Set( row, timestamp, dsValues[i][j][ tIndex + 1 ] ); break; } else { tIndex++; } } tPos[i] = tIndex; } return tblPos; }
internal void SetValue( Source[] sources, Hashtable sourceIndex, ValueFormatter vFormat ) { try { double val = sources[ (int) sourceIndex[sourceName] ].GetAggregate( aggregate ); double oldBase = vFormat.Base; if (baseValue != -1) vFormat.SetBase(baseValue); vFormat.SetFormat( val, numDec, strLen ); vFormat.SetScaling( normalScale, uniformScale ); string valueStr = vFormat.FormattedValue; string prefix = vFormat.Prefix; // Replace all values for (int i = 0; i < oList.Count; i += 2 ) { string str = (string) oList[i]; str = VALUE_PATTERN.Replace(str, valueStr); str = str.Replace(VALUE_MARKER, valueStr); if ( normalScale ) str = str.Replace(SCALE_MARKER, prefix); if ( uniformScale ) str = str.Replace(UNIFORM_SCALE_MARKER, prefix); oList[i] = str ; } if (baseValue != -1) vFormat.SetBase(oldBase); } catch (Exception) { throw new RrdException( "Could not find datasource: " + sourceName ); } }
internal RpnCalculator( Source[] sources, double step ) { this.sources = sources; this.step = step; }
internal Area( Source source, Color color, bool stacked, bool visible ) : base(source, color, stacked, visible) { }
// Stubbed method, irrelevant for this PlotDef internal override void SetSource( Source[] sources, Hashtable sourceIndex ) { }