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,
) -> ParamChangeResult { ... }
fn array_data_handle(&self) -> Option<Arc<Mutex<Option<Arc<NDArray>>>>> { ... }
}Expand description
Pure processing logic. No threading concerns.
Required Methods§
Sourcefn process_array(
&mut self,
array: &NDArray,
pool: &NDArrayPool,
) -> ProcessResult
fn process_array( &mut self, array: &NDArray, pool: &NDArrayPool, ) -> ProcessResult
Process one array. Return output arrays and param updates.
Sourcefn plugin_type(&self) -> &str
fn plugin_type(&self) -> &str
Plugin type name for PLUGIN_TYPE param.
Provided Methods§
Sourcefn register_params(
&mut self,
_base: &mut PortDriverBase,
) -> Result<(), AsynError>
fn register_params( &mut self, _base: &mut PortDriverBase, ) -> Result<(), AsynError>
Register plugin-specific params on the base. Called once during construction.
Sourcefn on_param_change(
&mut self,
_reason: usize,
_params: &PluginParamSnapshot,
) -> ParamChangeResult
fn on_param_change( &mut self, _reason: usize, _params: &PluginParamSnapshot, ) -> ParamChangeResult
Called when a param changes. Reason is the param index. Return param updates to be written back to the port driver.