@@ -21,6 +21,89 @@ The ``p4p`` interface connects to an external EPICS server. The ``p4p_server``
2121interface hosts its own p4p server for the specified PVs. Both share the same
2222YAML configuration format. See the README for sample YAML.
2323
24+ EPICS Variable Fields
25+ ~~~~~~~~~~~~~~~~~~~~~
26+
27+ .. list-table ::
28+ :header-rows: 1
29+ :widths: 18 10 15 57
30+
31+ * - Field
32+ - Type
33+ - Default
34+ - Description
35+ * - ``proto ``
36+ - string
37+ - **required **
38+ - Protocol (currently ``pva ``)
39+ * - ``name ``
40+ - string
41+ - **required **
42+ - PV name
43+ * - ``mode ``
44+ - string
45+ - ``"inout" ``
46+ - ``in ``, ``out ``, or ``inout ``
47+ * - ``type ``
48+ - string
49+ - ``"scalar" ``
50+ - ``scalar ``, ``waveform ``, ``array ``, ``image ``
51+ * - ``default ``
52+ - any
53+ - ``0.0 `` / zeros
54+ - Initial value (not supported for ``image `` type)
55+ * - ``length ``
56+ - int
57+ - ``10 ``
58+ - Array/waveform length when no default is provided
59+ * - ``image_size ``
60+ - dict
61+ - —
62+ - Required for ``image `` type: ``{"x": int, "y": int} ``
63+ * - ``compute_alarm ``
64+ - bool
65+ - ``false ``
66+ - Enable scalar alarm computation from ``valueAlarm `` limits
67+ * - ``display ``
68+ - dict
69+ - —
70+ - Optional NTScalar display metadata
71+ * - ``control ``
72+ - dict
73+ - —
74+ - Optional NTScalar control metadata
75+ * - ``valueAlarm ``
76+ - dict
77+ - —
78+ - Optional NTScalar alarm limit metadata
79+
80+ Alarm Behavior
81+ ~~~~~~~~~~~~~~
82+
83+ - Computation is scalar-only and active when ``compute_alarm: true ``.
84+ - ``compute_alarm: true `` requires:
85+ ``valueAlarm.active: true `` and limits
86+ ``lowAlarmLimit ``, ``lowWarningLimit ``, ``highWarningLimit ``, ``highAlarmLimit ``.
87+ - Missing severities use defaults:
88+ ``lowAlarmSeverity=2 ``, ``lowWarningSeverity=1 ``,
89+ ``highWarningSeverity=1 ``, ``highAlarmSeverity=2 ``.
90+ - Status mapping follows EPICS ``menuAlarmStat ``:
91+ ``NO_ALARM=0 ``, ``HIHI=3 ``, ``HIGH=4 ``, ``LOLO=5 ``, ``LOW=6 ``.
92+ - Explicit ``alarm `` payload overrides computed alarm.
93+ - Non-scalars do not compute alarms, but explicit ``alarm `` payloads are accepted.
94+
95+ Model Alarm Override
96+ ~~~~~~~~~~~~~~~~~~~~
97+
98+ Models can publish structured output with explicit alarm fields (for example
99+ ``{"PV": {"value": 1.0, "alarm": {...}}} ``), and ``ModelObserver `` preserves
100+ that structure when publishing downstream.
101+
102+ See example:
103+
104+ - ``examples/base/local/deployment_config_p4p_alarm.yaml ``
105+ - ``examples/base/local/model_definition_alarm_override.py ``
106+
24107k2eg Interface
25108--------------
26109Built on SLAC's `k2eg <https://github.com/slaclab/k2eg >`_, this interface gets
@@ -246,4 +329,4 @@ Completed jobs can be retrieved via ``GET /jobs/next`` (FIFO dequeue) or
246329 Proper job tracking will be integrated via trace propagation across the
247330 message broker. Each job's ``job_id `` will be carried through the full
248331 pipeline in struct metadata, enabling accurate matching of results to jobs
249- even under concurrent load.
332+ even under concurrent load.
0 commit comments