1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Example: alarm severity.
//!
//! `.alarm_limits(lolo, low, high, hihi)` fills in — and publishes — the
//! NTScalar `valueAlarm` block, but the server does *not* evaluate values
//! against it, even with `.compute_alarms(true)`. Only limits loaded from a
//! `.db` file (LOW/HIGH/LOLO/HIHI) are evaluated. See the Alarms chapter.
//!
//! For handle-built PVs, set severity yourself with `set_alarm`.
//!
//! Try it:
//! cargo run -p spvirit-server --example alarms
//!
//! Then from another terminal:
//! spget SIM:LINK # INVALID, "device unreachable"
//! spget SIM:PRESSURE # limits published, severity 0
use ;
async