pub struct CommonFields {Show 43 fields
pub sevr: AlarmSeverity,
pub stat: u16,
pub amsg: String,
pub nsev: AlarmSeverity,
pub nsta: u16,
pub namsg: String,
pub acks: AlarmSeverity,
pub ackt: bool,
pub udf: u8,
pub udfs: i16,
pub scan: ScanType,
pub sscn: SimModeScan,
pub oldsimm: i16,
pub pini: i16,
pub tpro: u8,
pub bkpt: u8,
pub flnk: String,
pub inp: String,
pub out: String,
pub dtyp: String,
pub time: SystemTime,
pub tse: i16,
pub tsel: String,
pub utag: u64,
pub analog_alarm: Option<AnalogAlarmConfig>,
pub asg: String,
pub asl: u8,
pub desc: PvString,
pub phas: i16,
pub evnt: String,
pub prio: i16,
pub disv: i16,
pub disa: i16,
pub sdis: String,
pub diss: i16,
pub hyst: f64,
pub lcnt: i16,
pub disp: u8,
pub putf: bool,
pub rpro: u8,
pub proc_field: u8,
pub mlst: Option<f64>,
pub alst: Option<f64>,
}Expand description
Common fields shared by all records.
Fields§
§sevr: AlarmSeverity§stat: u16§amsg: StringAlarm message string (current). Mirrors epics-base PR #568:
records may attach a human-readable explanation alongside
stat/sevr. Empty means “no message”. Transferred from
namsg by rec_gbl_reset_alarms.
nsev: AlarmSeverity§nsta: u16§namsg: StringPending alarm message — set during process(), transferred to
amsg by rec_gbl_reset_alarms (epics-base PR #566).
acks: AlarmSeverity§ackt: bool§udf: u8UDF (DBF_UCHAR in dbCommon.dbd) — “value undefined”. C models it
as one epicsUInt8 that is BOTH the predicate (if (prec->udf)) and
the served byte: caput UDF 255 stores 255 and caget renders it
signed DBR_CHAR (-1). Modeled as the raw u8 so the byte round-trips
on records that do not re-derive it; every predicate reader tests
!= 0, and the record-facing crate::server::record::ProcessContext::udf boundary keeps the
bool view.
udfs: i16UDFS (DBF_MENU menu(menuAlarmSevr)) — the severity raised for a UDF
record. Holds the raw stored ordinal (see AnalogAlarmConfig): C
stores (epicsEnum16) verbatim on a numeric put, so an out-of-range
UDFS round-trips (caput REC.UDFS 4 → 4); the alarm meaning is
AlarmSeverity::from_u16(udfs as u16).
scan: ScanType§sscn: SimModeScan§oldsimm: i16OLDSIMM (DBF_MENU menu(menuSimm), special(SPC_NOMOD)) — the
PREVIOUS simulation mode, the latch C’s recGblSaveSimm
(recGbl.c:421-425) writes and recGblCheckSimm (recGbl.c:427-437)
compares against to detect a SIMM transition and swap SCAN with SSCN.
C declares it per record (in each of the 21 dbd files that carry SSCN);
this port keeps it next to sscn in the common fields, for the same
reason sscn lives here — it is framework state, written by exactly one
owner (PvDatabase::rec_gbl_save_simm) and read by exactly one
(rec_gbl_check_simm). Read-only to clients (SPC_NOMOD).
pini: i16PINI is DBF_MENU/menu(menuPini) — a six-choice lifecycle
selector, not a flag (see crate::server::record::PiniMode for the choice semantics). Holds
the raw stored ordinal as i16: C stores (epicsEnum16) verbatim on
a numeric put, so caput REC.PINI 6 keeps 6 and caput REC.PINI -1
keeps 65535. doRecordPini compares against the exact valid indices,
so any out-of-range ordinal simply matches no lifecycle pass — read a
choice with PiniMode::from_u16(pini as u16).
tpro: u8TPRO (DBF_UCHAR in dbCommon.dbd) — trace-processing flag. C
stores the raw put byte and serves it as SIGNED DBR_CHAR
(caput TPRO 255 → caget = -1). Modeled as the raw u8, like
Self::bkpt, so the byte round-trips; consumers test != 0.
bkpt: u8§flnk: String§inp: String§out: String§dtyp: String§time: SystemTime§tse: i16§tsel: String§utag: u64Time-tag — C dbCommon.dbd.pod field(UTAG,DBF_UINT64). A
64-bit user/hardware tag set alongside time by
recGblGetTimeStampSimm via dbGetTimeStampTag. Zero when no
time-tag source is configured.
analog_alarm: Option<AnalogAlarmConfig>§asg: StringAccess security group — C dbCommon.ASG, a DBF_STRING with NO
initial() in dbCommon.dbd, so a record that does not name a group
holds the EMPTY string and caget -t REC.ASG on any C IOC prints an
empty line. It is asAddMember (asLibRoutines.c:893-928) that resolves
an empty or unknown name to the DEFAULT group — the FIELD never says
“DEFAULT” unless the .db put it there. Ask Self::access_group for
the group to evaluate against; read this only to serve the field.
asl: u8Access security level. C dbCommon.ASL
(0 or 1, default 0). Compared against RULE(N, …) levels
in crate::server::access_security::AccessSecurityConfig::check_access_method —
a rule with RULE(M, …) only applies when ASL ≤ M. The
earlier code hard-coded ASL=0 at every ACF call site
(CA tcp.rs, PVA native_source GET/PUT/MONITOR), so every
RULE(N>0, WRITE) was always considered “applicable” and
the per-record ASL gate was silently inert.
desc: PvStringDescription — C dbCommon field(DESC,DBF_STRING) size(41). A
genuine DBF_STRING data field served verbatim to clients, so it is
a byte-preserving PvString (a non-UTF-8 DESC put must round-trip
unchanged, matching EPICS fixed-size char-array string semantics).
phas: i16§evnt: StringEvent name for SCAN="Event" records. C dbCommon.dbd.pod:
field(EVNT,DBF_STRING) { size(40) } — since EPICS 7 this is
an event name (resolved by eventNameToHandle), not a
numeric subscript. A numeric string (“5”) still works for
backward compatibility. Empty means “no event”.
prio: i16§disv: i16§disa: i16§sdis: String§diss: i16DISS (DBF_MENU menu(menuAlarmSevr)) — the severity a disabled record
takes. Holds the raw stored ordinal (see AnalogAlarmConfig).
hyst: f64§lcnt: i16§disp: u8§putf: bool§rpro: u8§proc_field: u8§mlst: Option<f64>§alst: Option<f64>Implementations§
Source§impl CommonFields
impl CommonFields
Sourcepub fn access_group(&self) -> &str
pub fn access_group(&self) -> &str
The single owner of “which access group does this record belong to” —
C asAddMember(&prec->asp, prec->asg), whose asAddMemberPvt
(asLibRoutines.c:893-928) resolves an empty or unknown group name to the
always-present DEFAULT group.
Every access-security call site asks this, never Self::asg directly:
the FIELD is what the .db wrote (empty by default, and that is what the
wire must show), the GROUP is what the ACF is evaluated against. Three
call sites used to spell the empty→DEFAULT rule out for themselves and a
fourth (the CA server) relied on the config lookup missing — which is a
different rule (C’s unknown-NAME reassignment) that happened to have the
same effect.
Sourcepub fn process_context(&self) -> ProcessContext
pub fn process_context(&self) -> ProcessContext
Build a ProcessContext
snapshot of the framework-owned state a record’s process() or
device support’s read() needs to observe during the cycle.
Sourcepub fn callback_priority(&self) -> CallbackPriority
pub fn callback_priority(&self) -> CallbackPriority
The callback band this record’s PRIO selects — C
callbackSetPriority(prec->prio, ...) (seqRecord.c:146).
Trait Implementations§
Source§impl Clone for CommonFields
impl Clone for CommonFields
Source§fn clone(&self) -> CommonFields
fn clone(&self) -> CommonFields
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more