pub enum ParamSetValue {
Value {
reason: usize,
addr: i32,
value: ParamValue,
},
UInt32Digital {
reason: usize,
addr: i32,
value: u32,
mask: u32,
interrupt_mask: u32,
},
Status {
reason: usize,
addr: i32,
status: AsynStatus,
alarm_status: u16,
alarm_severity: u16,
},
}Expand description
A param value to set directly in the store (no writeInt32/on_param_change). Mirrors C ADCore’s setIntegerParam/setDoubleParam.
The value is a ParamValue, not one variant per type: this carrier used to
enumerate its own subset of the parameter types (Int32/Float64/Octet/
Int32Array/Float64Array/UInt32Digital), so a driver thread pushing any other
supported type — Int64, Int8Array, Int16Array, Int64Array,
Float32Array, Enum, GenericPointer — simply had no variant to put it in.
Carrying the store’s own value type means the two type sets cannot drift
apart again: the actor applies it through the single crate::param::ParamList::set_value
dispatch, whose exhaustive match makes a new ParamValue variant a compile
error rather than an update that never arrives.
Variants§
Value
Set a parameter of any type (C setIntegerParam / setDoubleParam /
setStringParam / doCallbacksXxxArray …).
UInt32Digital
asynUInt32Digital masked set — C setUIntDigitalParam(reason, value, mask, interruptMask), whose write mask and forced-callback mask a plain
Self::Value has no room for.
Fields
Status
C setParamStatus / setParamAlarmStatus / setParamAlarmSeverity
from a background thread — the alarm-push half of the C pattern
lock(); setParamStatus(..); callParamCallbacks(); unlock(). The
value is untouched; a status/alarm transition alone marks the param
changed so the flush delivers it (paramVal.cpp:71-104), and the
devEpics fill-in maps a non-Success status to the EPICS alarm
(asynDisconnected → COMM/INVALID) when alarm_status/alarm_severity
are left 0 (asynEpicsUtils.c:238-265).
Implementations§
Source§impl ParamSetValue
impl ParamSetValue
Sourcepub fn new(reason: usize, addr: i32, value: ParamValue) -> Self
pub fn new(reason: usize, addr: i32, value: ParamValue) -> Self
Set reason at addr to value — any parameter type.
Sourcepub fn uint32_digital(
reason: usize,
addr: i32,
value: u32,
mask: u32,
interrupt_mask: u32,
) -> Self
pub fn uint32_digital( reason: usize, addr: i32, value: u32, mask: u32, interrupt_mask: u32, ) -> Self
C setUIntDigitalParam: store value & mask, and force interrupt_mask
bits into the callback mask even when the stored value is unchanged.
Sourcepub fn status(
reason: usize,
addr: i32,
status: AsynStatus,
alarm_status: u16,
alarm_severity: u16,
) -> Self
pub fn status( reason: usize, addr: i32, status: AsynStatus, alarm_status: u16, alarm_severity: u16, ) -> Self
C setParamStatus(list, index, status) plus the alarm pair: set the
transport status and EPICS alarm without touching the value. Pass
alarm_status/alarm_severity 0 to let the record-side fill-in map
status itself (the C-normal path).
Trait Implementations§
Source§impl Clone for ParamSetValue
impl Clone for ParamSetValue
Source§fn clone(&self) -> ParamSetValue
fn clone(&self) -> ParamSetValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more