pub enum ParamValue {
Show 16 variants
Int32(i32),
Int64(i64),
UInt64(u64),
Float64(f64),
Octet(String),
UInt32Digital(u32),
Int8Array(Arc<[i8]>),
Int16Array(Arc<[i16]>),
Int32Array(Arc<[i32]>),
Int64Array(Arc<[i64]>),
UInt64Array(Arc<[u64]>),
Float32Array(Arc<[f32]>),
Float64Array(Arc<[f64]>),
Enum {
index: usize,
choices: Arc<[EnumEntry]>,
},
GenericPointer(Arc<dyn Any + Send + Sync>),
Undefined,
}Expand description
Parameter value. Arrays use Arc<[T]> for cheap cloning during interrupt broadcast.
Octet uses String (typically short; not intended for large binary data).
Variants§
Int32(i32)
Int64(i64)
UInt64(u64)
Unsigned 64-bit integer (asyn upstream issue #231).
Float64(f64)
Octet(String)
UInt32Digital(u32)
Int8Array(Arc<[i8]>)
Int16Array(Arc<[i16]>)
Int32Array(Arc<[i32]>)
Int64Array(Arc<[i64]>)
UInt64Array(Arc<[u64]>)
Unsigned 64-bit integer array (asyn upstream issue #231).
Float32Array(Arc<[f32]>)
Float64Array(Arc<[f64]>)
Enum
GenericPointer(Arc<dyn Any + Send + Sync>)
Undefined
Implementations§
Source§impl ParamValue
impl ParamValue
pub fn type_name(&self) -> &'static str
Sourcepub fn as_int32(&self) -> AsynResult<i32>
pub fn as_int32(&self) -> AsynResult<i32>
Read this value through the asynInt32 interface — the single owner
of that interface’s read rule, shared by the parameter-store getters
(ParamList::get_int32) and the device-support I/O-Intr path, so a
value delivered to a record cannot be typed differently from the same
value read by a poll.
A parameter whose type the interface cannot read is an
AsynError::TypeMismatch, never a coercion: C keeps one interrupt
list per interface, so a record on asynInt32 is only ever handed an
int32 (an enum’s index included — asynInt32 reads an enum’s index
transparently).
Sourcepub fn as_int64(&self) -> AsynResult<i64>
pub fn as_int64(&self) -> AsynResult<i64>
Read this value through the asynInt64 interface. See Self::as_int32.
Sourcepub fn as_float64(&self) -> AsynResult<f64>
pub fn as_float64(&self) -> AsynResult<f64>
Read this value through the asynFloat64 interface. See Self::as_int32.
Sourcepub fn as_octet(&self) -> AsynResult<&str>
pub fn as_octet(&self) -> AsynResult<&str>
Read this value through the asynOctet interface. See Self::as_int32.
Sourcepub fn as_uint32(&self) -> AsynResult<u32>
pub fn as_uint32(&self) -> AsynResult<u32>
Read this value through the asynUInt32Digital interface. See
Self::as_int32.
Sourcepub fn as_enum(&self) -> AsynResult<(usize, Arc<[EnumEntry]>)>
pub fn as_enum(&self) -> AsynResult<(usize, Arc<[EnumEntry]>)>
Read this value through the asynEnum interface. See Self::as_int32.
Sourcepub fn is_array(&self) -> bool
pub fn is_array(&self) -> bool
Whether this is an array or generic-pointer value. C asynPortDriver
fires interrupts for these through the per-type doCallbacks*Array /
doCallbacksGenericPointer paths, NOT paramList::callCallbacks
(whose switch at asynPortDriver.cpp:846-865 handles only scalars).
The callCallbacks isDefined gate (:845) therefore does not govern
them, so the Rust flush must keep firing array triggers regardless
of the defined flag.
Trait Implementations§
Source§impl Clone for ParamValue
impl Clone for ParamValue
Source§fn clone(&self) -> ParamValue
fn clone(&self) -> ParamValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more