pub struct Pv<T: PvScalar> { /* private fields */ }Expand description
Typed handle to a PV record. Cheap to clone; all clones share state.
Implementations§
Source§impl<T: PvScalar> Pv<T>
impl<T: PvScalar> Pv<T>
pub fn name(&self) -> &str
pub fn units(self, units: impl Into<String>) -> Self
pub fn prec(self, prec: i32) -> Self
pub fn desc(self, desc: impl Into<String>) -> Self
Sourcepub fn adel(self, deadband: f64) -> Self
pub fn adel(self, deadband: f64) -> Self
Archive deadband (parsed/exposed via field access; PVA monitors use MDEL).
Sourcepub fn mdel(self, deadband: f64) -> Self
pub fn mdel(self, deadband: f64) -> Self
Monitor deadband — suppresses monitor posts for changes smaller than this.
pub fn drive_limits(self, low: f64, high: f64) -> Self
pub fn alarm_limits(self, lolo: f64, low: f64, high: f64, hihi: f64) -> Self
Source§impl Pv<i32>
impl Pv<i32>
Sourcepub fn longin(name: impl Into<String>, initial: i32) -> Self
pub fn longin(name: impl Into<String>, initial: i32) -> Self
longin — 32-bit integer input record (read-only over the wire).
Sourcepub fn longout(name: impl Into<String>, initial: i32) -> Self
pub fn longout(name: impl Into<String>, initial: i32) -> Self
longout — 32-bit integer output record (writable).
Source§impl<T: PvScalar> Pv<T>
impl<T: PvScalar> Pv<T>
Sourcepub async fn set(&self, value: T) -> Result<(), PvError>
pub async fn set(&self, value: T) -> Result<(), PvError>
Write a value through the full posting pipeline (timestamp, alarms, MDEL gating, monitors, links).
Sourcepub async fn set_alarm(
&self,
severity: i32,
status: i32,
message: &str,
) -> Result<(), PvError>
pub async fn set_alarm( &self, severity: i32, status: i32, message: &str, ) -> Result<(), PvError>
Explicitly set the record’s alarm severity/status/message, independent
of its value. Alarm transitions always post (no MDEL gating, no link
evaluation). A no-op re-set (unchanged alarm) is Ok(()).
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Pv<T>
impl<T> RefUnwindSafe for Pv<T>
impl<T> Send for Pv<T>
impl<T> Sync for Pv<T>
impl<T> Unpin for Pv<T>
impl<T> UnsafeUnpin for Pv<T>
impl<T> UnwindSafe for Pv<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more