Skip to main content

NDPluginProcess

Trait NDPluginProcess 

Source
pub trait NDPluginProcess: Send + 'static {
    // Required methods
    fn process_array(
        &mut self,
        array: &NDArray,
        pool: &NDArrayPool,
    ) -> ProcessResult;
    fn plugin_type(&self) -> &str;

    // Provided methods
    fn register_params(
        &mut self,
        _base: &mut PortDriverBase,
    ) -> Result<(), AsynError> { ... }
    fn on_param_change(&mut self, _reason: usize, _params: &PluginParamSnapshot) { ... }
}
Expand description

Pure processing logic. No threading concerns.

Required Methods§

Source

fn process_array( &mut self, array: &NDArray, pool: &NDArrayPool, ) -> ProcessResult

Process one array. Return output arrays and param updates.

Source

fn plugin_type(&self) -> &str

Plugin type name for PLUGIN_TYPE param.

Provided Methods§

Source

fn register_params( &mut self, _base: &mut PortDriverBase, ) -> Result<(), AsynError>

Register plugin-specific params on the base. Called once during construction.

Source

fn on_param_change(&mut self, _reason: usize, _params: &PluginParamSnapshot)

Called when a param changes. Reason is the param index.

Implementors§