pub enum RoundTripMeasurementPhase {
Idle,
CalibrationAmbient,
WaitingForEcho(usize),
}Expand description
High-level phases of the RoundTripMeasurementState state machine.
The machine progresses linearly through these phases on each measurement session:
CalibrationAmbient → WaitingForEcho(0) → WaitingForEcho(1) → … → IdleIt never transitions backwards. Once Idle is reached the session loop exits.
Variants§
Idle
The measurement has concluded (either successfully or via timeout).
The session loop writes silence to the output and exits on the next iteration.
CalibrationAmbient
The state machine is consuming ambient input samples to estimate the noise floor.
No impulses are emitted during this phase. Transitions to
WaitingForEcho(0) once CALIBRATION_SAMPLES have been processed.
WaitingForEcho(usize)
An impulse has been (or is about to be) emitted and the state machine is listening for its return on the input.
The usize payload is the zero-based index of the current impulse (0 …
IMPULSE_COUNT − 1). On a successful echo detection the index advances and
the machine stays in this variant; after the last echo it transitions to Idle.
Trait Implementations§
Source§impl Clone for RoundTripMeasurementPhase
impl Clone for RoundTripMeasurementPhase
Source§fn clone(&self) -> RoundTripMeasurementPhase
fn clone(&self) -> RoundTripMeasurementPhase
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RoundTripMeasurementPhase
impl Debug for RoundTripMeasurementPhase
impl Copy for RoundTripMeasurementPhase
impl Eq for RoundTripMeasurementPhase
impl StructuralPartialEq for RoundTripMeasurementPhase
Auto Trait Implementations§
impl Freeze for RoundTripMeasurementPhase
impl RefUnwindSafe for RoundTripMeasurementPhase
impl Send for RoundTripMeasurementPhase
impl Sync for RoundTripMeasurementPhase
impl Unpin for RoundTripMeasurementPhase
impl UnsafeUnpin for RoundTripMeasurementPhase
impl UnwindSafe for RoundTripMeasurementPhase
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.