pub struct ChannelStore { /* private fields */ }Expand description
Central channel value storage shared between monitor callbacks and state sets.
Each channel has its own Mutex<ChannelValueSlot>. Contention is low because
monitors write rarely and state sets read only during sync.
Implementations§
Source§impl ChannelStore
impl ChannelStore
pub fn new(num_channels: usize) -> Self
Sourcepub fn set(&self, ch_id: usize, value: EpicsValue)
pub fn set(&self, ch_id: usize, value: EpicsValue)
Update a channel’s value (called from monitor callback or pvGet).
Sourcepub fn set_full(
&self,
ch_id: usize,
value: EpicsValue,
status: i16,
severity: i16,
)
pub fn set_full( &self, ch_id: usize, value: EpicsValue, status: i16, severity: i16, )
Update a channel’s value with status/severity.
Sourcepub fn get(&self, ch_id: usize) -> Option<EpicsValue>
pub fn get(&self, ch_id: usize) -> Option<EpicsValue>
Read a channel’s current value.
Sourcepub fn get_full(&self, ch_id: usize) -> Option<ChannelValueSlot>
pub fn get_full(&self, ch_id: usize) -> Option<ChannelValueSlot>
Read a channel’s full slot (value + metadata).
pub fn num_channels(&self) -> usize
Auto Trait Implementations§
impl Freeze for ChannelStore
impl RefUnwindSafe for ChannelStore
impl Send for ChannelStore
impl Sync for ChannelStore
impl Unpin for ChannelStore
impl UnsafeUnpin for ChannelStore
impl UnwindSafe for ChannelStore
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