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 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).
Trait Implementations§
Source§impl PvStore for SimplePvStore
impl PvStore for SimplePvStore
Source§fn has_pv(&self, name: &str) -> impl Future<Output = bool> + Send
fn has_pv(&self, name: &str) -> impl Future<Output = bool> + Send
Check whether a PV name exists in this store.
Source§fn get_snapshot(
&self,
name: &str,
) -> impl Future<Output = Option<NtPayload>> + Send
fn get_snapshot( &self, name: &str, ) -> impl Future<Output = Option<NtPayload>> + Send
Get the current value of a PV as an
NtPayload snapshot.Source§fn get_descriptor(
&self,
name: &str,
) -> impl Future<Output = Option<StructureDesc>> + Send
fn get_descriptor( &self, name: &str, ) -> impl Future<Output = Option<StructureDesc>> + Send
Get the structure descriptor for a PV (used by GET init and GET_FIELD).
Source§fn put_value(
&self,
name: &str,
value: &DecodedValue,
) -> impl Future<Output = Result<Vec<(String, NtPayload)>, String>> + Send
fn put_value( &self, name: &str, value: &DecodedValue, ) -> impl Future<Output = Result<Vec<(String, NtPayload)>, String>> + Send
Apply a PUT value to a PV. Returns the list of (pv_name, updated_payload)
pairs for all PVs that changed as a result (e.g. forward-link processing
may cause multiple PVs to update).
Source§fn is_writable(&self, name: &str) -> impl Future<Output = bool> + Send
fn is_writable(&self, name: &str) -> impl Future<Output = bool> + Send
Check whether a PV is writable.
Auto Trait Implementations§
impl !Freeze for SimplePvStore
impl !RefUnwindSafe for SimplePvStore
impl Send for SimplePvStore
impl Sync for SimplePvStore
impl Unpin for SimplePvStore
impl UnsafeUnpin for SimplePvStore
impl !UnwindSafe for SimplePvStore
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