Restrict CROSSING conditions to directional operators only #44

Closed
opened 2026-07-27 09:22:15 +02:00 by minimons · 0 comments
Owner

Background

The CROSSING alarm type detects when a value crosses a threshold in a specific direction.

Currently it is possible to use comparison operators such as =, <= and >=, but these do not have a well-defined meaning for a crossing event.

For example:

CROSSING =10

If the value changes from:

9.99 → 10.01

the threshold has clearly been crossed, but the value was never exactly 10, so the alarm would never trigger.

A crossing should therefore always be directional.

Proposed change

Restrict CROSSING to the following operators only:

<
>

The following operators shall be rejected during configuration parsing:

=
<=
>=

Crossing semantics

   >10
triggers when:
   previous <= 10
   current > 10
   <10
triggers when:
   previous >= 10
   current < 10

Landing exactly on the threshold is not considered a crossing.

Benefits

  • Simpler configuration.
  • Unambiguous semantics.
  • Removes unsupported comparison operators from the CROSSING language.
  • Provides a clean foundation for hysteresis support.
### Background The CROSSING alarm type detects when a value crosses a threshold in a specific direction. Currently it is possible to use comparison operators such as =, <= and >=, but these do not have a well-defined meaning for a crossing event. For example: CROSSING =10 If the value changes from: 9.99 → 10.01 the threshold has clearly been crossed, but the value was never exactly 10, so the alarm would never trigger. A crossing should therefore always be directional. ### Proposed change Restrict CROSSING to the following operators only: ``` < > ``` The following operators shall be rejected during configuration parsing: ``` = <= >= ``` ### Crossing semantics ``` >10 triggers when: previous <= 10 current > 10 ``` ``` <10 triggers when: previous >= 10 current < 10 ``` Landing exactly on the threshold is not considered a crossing. ### Benefits - Simpler configuration. - Unambiguous semantics. - Removes unsupported comparison operators from the CROSSING language. - Provides a clean foundation for hysteresis support.
minimons added the enhancement label 2026-07-27 09:22:15 +02:00
minimons self-assigned this 2026-07-27 09:22:15 +02:00
minimons added this to the Evelyn project 2026-07-27 09:22:15 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r35157/com_r35157_nenjim-hubd-impl_ref#44