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 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 + '_>>
Check whether this source owns
name and, if so, return its metadata. Read moreSource§fn get(
&self,
name: &str,
) -> Pin<Box<dyn Future<Output = Option<NtPayload>> + Send + '_>>
fn get( &self, name: &str, ) -> Pin<Box<dyn Future<Output = Option<NtPayload>> + Send + '_>>
Read the current value of a PV. Read more
Source§fn put(
&self,
name: &str,
value: &DecodedValue,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, NtPayload)>, String>> + Send + '_>>
fn put( &self, name: &str, value: &DecodedValue, ) -> Pin<Box<dyn Future<Output = Result<Vec<(String, NtPayload)>, String>> + Send + '_>>
Apply a PUT value to a PV. Read more
Source§fn subscribe(
&self,
name: &str,
) -> Pin<Box<dyn Future<Output = Option<Receiver<NtPayload>>> + Send + '_>>
fn subscribe( &self, name: &str, ) -> Pin<Box<dyn Future<Output = Option<Receiver<NtPayload>>> + Send + '_>>
Subscribe to value-change notifications on a PV. Read more
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