ValueModelFormula

  • The units one signal is worth: an expression of numbers, variables, + - * /, parentheses, comparisons (<, <=, >, >=, ==, !=, which give 1 when true and 0 otherwise) and the functions min, max, abs, floor, ceil, round(x, digits) and if(condition, then, else). A variable is one of the formula's variables, else a dotted path into the signal's data (such as usage.minutes); a missing or non-numeric one counts as 0. 1 counts one unit per signal. An expression that can't be evaluated is refused with UNSUPPORTED_FORMULA.

  • Unique within the document; signals name it in formulaId.

  • The value type this formula belongs to.

  • Properties: 7
  • Condition bands, tried in order. The first that matches gives the units instead of expression; when none does, defaultResult does if set, else expression.

    Properties: 4
  • What a condition band (or a formula's defaultResult) gives: a constant, or an expression over the same variables.

    Properties: 3