Skip to main content

pvxs_sys/
metadata.rs

1// Copyright 2026 Tine Zata
2// SPDX-License-Identifier: MPL-2.0
3use crate::AlarmSeverity;
4
5/// Alarm metadata for NTScalar
6#[derive(Clone, Debug, Default)]
7pub struct AlarmMetadata {
8    pub active: bool,
9    pub low_alarm_limit: f64,
10    pub low_warning_limit: f64,
11    pub high_warning_limit: f64,
12    pub high_alarm_limit: f64,
13    pub low_alarm_severity: AlarmSeverity,
14    pub low_warning_severity: AlarmSeverity,
15    pub high_warning_severity: AlarmSeverity,
16    pub high_alarm_severity: AlarmSeverity,
17    pub hysteresis: u8,
18}
19
20/// Display metadata for NTScalar
21#[derive(Clone, Debug, Default)]
22pub struct DisplayMetadata {
23    pub limit_low: i64,
24    pub limit_high: i64,
25    pub description: String,
26    pub units: String,
27    pub precision: i32,
28}
29
30/// Control metadata for NTScalar
31#[derive(Clone, Debug, Default)]
32pub struct ControlMetadata {
33    pub limit_low: f64,
34    pub limit_high: f64,
35    pub min_step: f64,
36}