Skip to main content

ParamSetValue

Enum ParamSetValue 

Source
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 …).

Fields

§reason: usize
§addr: i32
§

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

§reason: usize
§addr: i32
§value: u32
§mask: u32
§interrupt_mask: u32

Bits to force into the I/O Intr callback mask even when the stored value is unchanged (C setUIntDigitalParam(.., interruptMask)); 0 for a plain value set.

§

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).

Fields

§reason: usize
§addr: i32
§status: AsynStatus
§alarm_status: u16
§alarm_severity: u16

Implementations§

Source§

impl ParamSetValue

Source

pub fn new(reason: usize, addr: i32, value: ParamValue) -> Self

Set reason at addr to value — any parameter type.

Source

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.

Source

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).

Source

pub fn addr(&self) -> i32

The address list this update lands in — the list whose changed flags a later callParamCallbacks has to consume for it to reach a record.

Trait Implementations§

Source§

impl Clone for ParamSetValue

Source§

fn clone(&self) -> ParamSetValue

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ParamSetValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more