Struct hexodsp::monitor::MonitorProcessor
source · [−]pub struct MonitorProcessor {
rb_mon_con: Consumer<MonitorBufPtr>,
rb_recycle_prod: Producer<MonitorBufPtr>,
new_data: bool,
procs: Vec<MonitorMinMax>,
}
Expand description
Coordinates the processing of incoming MonitorBufs.
Fields
rb_mon_con: Consumer<MonitorBufPtr>
rb_recycle_prod: Producer<MonitorBufPtr>
new_data: bool
procs: Vec<MonitorMinMax>
Implementations
sourceimpl MonitorProcessor
impl MonitorProcessor
pub fn new(
rb_mon_con: Consumer<MonitorBufPtr>,
rb_recycle_prod: Producer<MonitorBufPtr>
) -> Self
sourcepub fn minmax_slice_for_signal(&self, idx: usize) -> (usize, &[(f32, f32)])
pub fn minmax_slice_for_signal(&self, idx: usize) -> (usize, &[(f32, f32)])
Helper function for tests, to access the current state of the min/max buffers.
sourcefn process_mon_buf(&mut self, mon_buf: &mut MonitorBufPtr)
fn process_mon_buf(&mut self, mon_buf: &mut MonitorBufPtr)
Internal helper function for process
.
sourcepub fn process(&mut self)
pub fn process(&mut self)
Processes all queued MonitorBuf instances and sends then back to the MonitorBackend thread after used for recycling.
sourcepub fn check_new_data(&mut self) -> bool
pub fn check_new_data(&mut self) -> bool
Returns true, when a new data point was received. Resets the internal flag until the next time new data is received.
Auto Trait Implementations
impl !RefUnwindSafe for MonitorProcessor
impl Send for MonitorProcessor
impl Sync for MonitorProcessor
impl Unpin for MonitorProcessor
impl !UnwindSafe for MonitorProcessor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more