OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C++ API referencev12.0

optris::sdk::EvalResult

Result of one evaluation step.

Public attributes

runtime

RuleRuntime runtime

The state to carry into this rule's next Evaluate(). The caller owns it: Evaluate() is pure and keeps nothing, so failing to store this back is what makes delays, hysteresis, kChanged and latching silently stop working.

event

std::optional< AlarmEvent > event

Set only when the state actually changed. Steady-state evaluation -- the overwhelmingly common case, once per rule per frame -- produces no event and allocates nothing. A rule's first observation is a change, from kUnknown, so a rule announces itself even when it comes up clear.

AlarmEvent::region_id and AlarmEvent::region_name are left at their defaults; whoever owns the rule fills them in, because Evaluate() knows nothing about regions.