Skip to main content

ProgramVars

Trait ProgramVars 

Source
pub trait ProgramVars:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn get_channel_value(&self, ch_id: usize) -> EpicsValue;
    fn set_channel_value(&mut self, ch_id: usize, value: &EpicsValue);
}
Expand description

Trait implemented by generated program variable structs.

Each SNL program generates a struct holding all program variables. This trait provides channel-value accessors so the runtime can transfer values between the channel store and the local snapshot.

Required Methods§

Source

fn get_channel_value(&self, ch_id: usize) -> EpicsValue

Read the value of a channel-assigned variable.

Source

fn set_channel_value(&mut self, ch_id: usize, value: &EpicsValue)

Write a channel value into the local variable.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§