pub struct CircularBuffer { /* private fields */ }Expand description
Circular buffer state for pre/post-trigger capture.
Implementations§
Source§impl CircularBuffer
impl CircularBuffer
pub fn new( pre_count: usize, post_count: usize, condition: TriggerCondition, ) -> Self
Sourcepub fn set_preset_trigger_count(&mut self, count: usize)
pub fn set_preset_trigger_count(&mut self, count: usize)
Set the preset trigger count (0 = unlimited).
Sourcepub fn trigger_count(&self) -> usize
pub fn trigger_count(&self) -> usize
Get the current trigger count.
Sourcepub fn status(&self) -> BufferStatus
pub fn status(&self) -> BufferStatus
Get the current buffer status.
Sourcepub fn set_flush_on_soft_trigger(&mut self, flush: bool)
pub fn set_flush_on_soft_trigger(&mut self, flush: bool)
Set flush_on_soft_trigger flag.
Sourcepub fn push(&mut self, array: Arc<NDArray>) -> bool
pub fn push(&mut self, array: Arc<NDArray>) -> bool
Push an array into the circular buffer. Returns true if a complete capture sequence is ready.
Sourcepub fn take_captured(&mut self) -> Vec<Arc<NDArray>>
pub fn take_captured(&mut self) -> Vec<Arc<NDArray>>
Take the captured arrays (pre + post trigger).
pub fn is_triggered(&self) -> bool
pub fn pre_buffer_len(&self) -> usize
pub fn reset(&mut self)
Auto Trait Implementations§
impl Freeze for CircularBuffer
impl RefUnwindSafe for CircularBuffer
impl Send for CircularBuffer
impl Sync for CircularBuffer
impl Unpin for CircularBuffer
impl UnsafeUnpin for CircularBuffer
impl UnwindSafe for CircularBuffer
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