All Implemented Interfaces:
NonRrdSource

class CDefextends Source implements NonRrdSource
RRD CDEF (Computed Data Source Definition) implementation.
Creates computed data sources using Reverse Polish Notation (RPN) expressions on existing data sources.
  • Field Details

    • rpnExpression

      private final String rpnExpression
      The RPN expression that computes this source's values.
  • Constructor Details

    • CDef

      CDef(String name, String rpnExpression)
      Create a CDef.
      Parameters:
      name - the source name
      rpnExpression - the RPN expression
  • Method Details

    • getRpnExpression

      String getRpnExpression()
      Return the RPN expression for this CDef.
      Returns:
      the RPN expression
    • calculate

      public void calculate(long tStart, long tEnd, DataProcessor dataProcessor)
      Calculates values for the specified time range.
      Specified by:
      calculate in interface NonRrdSource
      Parameters:
      tStart - start time for calculation
      tEnd - end time for calculation
      dataProcessor - DataProcessor object for accessing other data sources