Skip to main content

CompareScalar

A family of comparison operators that evaluate a numeric input against a threshold value, producing a boolean output.

Operators

TypeConditionParameters
CompareGTx > valuevalue
CompareLTx < valuevalue
CompareGTEx >= valuevalue
CompareLTEx <= valuevalue
CompareEQ|x - value| <= tolerancevalue, tolerance (default 0.0)
CompareNEQ|x - value| > tolerancevalue, tolerance (default 0.0)

Configuration

{ "id": "gt1", "value": 42.0 }
{ "id": "eq1", "value": 10.0, "tolerance": 0.1 }

Ports

  • Input Port 0: NumberData
  • Output Port 0: BooleanData (true if condition holds, false otherwise)

Operation

Each input value is evaluated against the condition and a boolean result is emitted with the same timestamp.

TimeInputCompareGT (value=5.0)CompareLT (value=5.0)
13.0falsetrue
25.0falsefalse
37.0truefalse

Error Handling

  • Throws if receiving invalid message types