What it solves
Hand-written threshold alarms chatter, disappear before acknowledgement or lose operator state.
How it works
1Condition→2delay/latch policy→3alarm state→4transition event
Use it when
Delay activation of a noisy pressure condition
Latch an alarm until an operator acknowledges it
Shelve an alarm during bounded maintenance
Emit transition events to an external history system
Quick Start
#include "loxalarm/loxalarm.h"
lox_alarm_t alarm;
lox_alarm_config_t cfg={.on_delay_ms=2000,.latched=true};
lox_alarm_init(&alarm,&cfg);
lox_alarm_update(&alarm,pressure_high,now_ms);
if(lox_alarm_just_activated(&alarm)) log_event("pressure");
/* Expected: activation only after the configured delay. */Engineering evidence
- Repository tests include deterministic invariant exercise and uint32_t clock-wrap coverage
- Evidence and limitations are explicitly separated in docs
Known limits
- Not safety-rated, an HMI, history database or transport
- Does not calculate thresholds or signal filtering
- Snapshot integrity and persistence must be provided externally
- No first-out detection