pub struct FilePluginController<W: NDFileWriter> {
pub file_base: NDPluginFileBase,
pub writer: W,
pub params: FileParamIndices,
pub auto_save: bool,
pub capture_active: bool,
pub lazy_open: bool,
pub delete_driver_file: bool,
pub latest_array: Option<Arc<NDArray>>,
/* private fields */
}Expand description
Generic file plugin controller that wraps any NDFileWriter with the full C ADCore NDPluginFile control-plane logic: auto_save, capture, stream, temp_suffix rename, create_dir, param updates, error reporting.
Each file format plugin (TIFF, HDF5, JPEG) creates one of these and
delegates process_array, register_params, and on_param_change to it.
Fields§
§file_base: NDPluginFileBase§writer: W§params: FileParamIndices§auto_save: bool§capture_active: bool§lazy_open: bool§delete_driver_file: bool§latest_array: Option<Arc<NDArray>>Implementations§
Source§impl<W: NDFileWriter> FilePluginController<W>
impl<W: NDFileWriter> FilePluginController<W>
pub fn new(writer: W) -> Self
Sourcepub fn register_params(&mut self, base: &mut PortDriverBase) -> AsynResult<()>
pub fn register_params(&mut self, base: &mut PortDriverBase) -> AsynResult<()>
Look up all standard file param indices from the port driver base.
Sourcepub fn process_array(&mut self, array: &NDArray) -> ProcessResult
pub fn process_array(&mut self, array: &NDArray) -> ProcessResult
Process an incoming array: auto_save, capture buffering, stream write.
Sourcepub fn on_param_change(
&mut self,
reason: usize,
params: &PluginParamSnapshot,
) -> ParamChangeResult
pub fn on_param_change( &mut self, reason: usize, params: &PluginParamSnapshot, ) -> ParamChangeResult
Handle a control-plane param change. Returns true if the reason was handled.
Auto Trait Implementations§
impl<W> Freeze for FilePluginController<W>where
W: Freeze,
impl<W> RefUnwindSafe for FilePluginController<W>where
W: RefUnwindSafe,
impl<W> Send for FilePluginController<W>
impl<W> Sync for FilePluginController<W>
impl<W> Unpin for FilePluginController<W>where
W: Unpin,
impl<W> UnsafeUnpin for FilePluginController<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for FilePluginController<W>where
W: UnwindSafe,
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