pub struct SimplePvStore { /* private fields */ }Expand description
A simple in-memory PV store.
Implementations§
Source§impl SimplePvStore
impl SimplePvStore
Sourcepub async fn set_registry(&self, registry: Arc<MonitorRegistry>)
pub async fn set_registry(&self, registry: Arc<MonitorRegistry>)
Attach the MonitorRegistry so that set_value can push updates
to PVAccess monitor clients. Called automatically by [PvaServer::run].
Sourcepub async fn insert(&self, name: String, record: RecordInstance)
pub async fn insert(&self, name: String, record: RecordInstance)
Insert or replace a PV record at runtime.
Sourcepub async fn get_value(&self, name: &str) -> Option<ScalarValue>
pub async fn get_value(&self, name: &str) -> Option<ScalarValue>
Read the current ScalarValue of a PV.
Sourcepub async fn get_record(&self, name: &str) -> Option<RecordInstance>
pub async fn get_record(&self, name: &str) -> Option<RecordInstance>
Read a clone of the full RecordInstance backing a PV.
Used by RecordFieldSource
to serve <name>.<FIELD> channels.
Sourcepub async fn set_value(&self, name: &str, value: ScalarValue) -> bool
pub async fn set_value(&self, name: &str, value: ScalarValue) -> bool
Write a ScalarValue to a PV (bypasses on_put).
Sourcepub async fn set_array_value(&self, name: &str, value: ScalarArrayValue) -> bool
pub async fn set_array_value(&self, name: &str, value: ScalarArrayValue) -> bool
Write a ScalarArrayValue to an array PV (bypasses on_put).
Sourcepub async fn put_nt(&self, name: &str, payload: NtPayload) -> bool
pub async fn put_nt(&self, name: &str, payload: NtPayload) -> bool
Write a full NtPayload to a PV (bypasses on_put).
Sourcepub async fn set_alarm(
&self,
name: &str,
severity: i32,
status: i32,
message: &str,
) -> bool
pub async fn set_alarm( &self, name: &str, severity: i32, status: i32, message: &str, ) -> bool
Explicitly set a record’s alarm fields (severity/status/message),
independent of its value. Unlike SimplePvStore::set_value, alarm
transitions always post — there is no MDEL deadband gating and no
link evaluation (alarm changes don’t propagate links). Returns
false if the alarm state is unchanged (idempotent) or the record
doesn’t support alarm fields (Table/NdArray/Generic) or doesn’t
exist.
Trait Implementations§
Source§impl Source for SimplePvStore
impl Source for SimplePvStore
Source§fn claim(
&self,
name: &str,
) -> Pin<Box<dyn Future<Output = Option<PvInfo>> + Send + '_>>
fn claim( &self, name: &str, ) -> Pin<Box<dyn Future<Output = Option<PvInfo>> + Send + '_>>
name and, if so, return its metadata. Read more