pub struct AttrPlotProcessor { /* private fields */ }Expand description
Processor that tracks attribute values over time in circular buffers.
Implementations§
Source§impl AttrPlotProcessor
impl AttrPlotProcessor
Sourcepub fn new(max_points: usize) -> Self
pub fn new(max_points: usize) -> Self
Create a new processor with the given maximum buffer size.
Sourcepub fn attributes(&self) -> &[String]
pub fn attributes(&self) -> &[String]
Get the list of tracked attribute names.
Sourcepub fn buffer(&self, index: usize) -> Option<&VecDeque<f64>>
pub fn buffer(&self, index: usize) -> Option<&VecDeque<f64>>
Get the circular buffer for a specific attribute index.
Sourcepub fn uid_buffer(&self) -> &VecDeque<f64>
pub fn uid_buffer(&self) -> &VecDeque<f64>
Get the unique_id buffer.
Sourcepub fn num_attributes(&self) -> usize
pub fn num_attributes(&self) -> usize
Get the number of tracked attributes.
Sourcepub fn find_attribute(&self, name: &str) -> Option<usize>
pub fn find_attribute(&self, name: &str) -> Option<usize>
Find the index of a named attribute. Returns None if not tracked.
Trait Implementations§
Source§impl NDPluginProcess for AttrPlotProcessor
impl NDPluginProcess for AttrPlotProcessor
Source§fn 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.
Source§fn plugin_type(&self) -> &str
fn plugin_type(&self) -> &str
Plugin type name for PLUGIN_TYPE param.
Source§fn 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.
Source§fn on_param_change(&mut self, _reason: usize, _params: &PluginParamSnapshot)
fn on_param_change(&mut self, _reason: usize, _params: &PluginParamSnapshot)
Called when a param changes. Reason is the param index.
Auto Trait Implementations§
impl Freeze for AttrPlotProcessor
impl RefUnwindSafe for AttrPlotProcessor
impl Send for AttrPlotProcessor
impl Sync for AttrPlotProcessor
impl Unpin for AttrPlotProcessor
impl UnsafeUnpin for AttrPlotProcessor
impl UnwindSafe for AttrPlotProcessor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more