pub struct QrsDetector<FMW, FB>{ /* private fields */ }
Expand description
Find QRS complex in real-time sampled ECG signal.
§Type parameters:
The QrsDetector
is built upon generic_array
.
This has an unfortunate implementation detail where the internal buffer sizes must be set on
the type level.
FMW
- number of samples representing 350ms, astypenum::U*
FB
- number of samples representing 50ms, astypenum::U*
These type parameters are checked at runtime and if incorrect and the error message will contain the correct sizes.
Implementations§
Source§impl<FMW, FB> QrsDetector<FMW, FB>
impl<FMW, FB> QrsDetector<FMW, FB>
Sourcepub fn new(fs: SamplingFrequency) -> Self
pub fn new(fs: SamplingFrequency) -> Self
Returns a new QRS detector for signals sampled at fs
sampling frequency.
§Arguments
fs
- The sampling frequency of the processed signal. For more information seeSamplingFrequencyExt
.
§Example
use qrs_detector::sampling::*;
use qrs_detector::QrsDetector;
use qrs_detector::typenum::{U150, U25};
// Assuming 500 samples per second
// Type parameters must be 300ms and 50ms in number of samples
let detector: QrsDetector<U150, U25> = QrsDetector::new(500.sps());
Auto Trait Implementations§
impl<FMW, FB> Freeze for QrsDetector<FMW, FB>where
<FMW as ArrayLength<MaybeUninit<f32>>>::ArrayType: Freeze,
<FB as ArrayLength<MaybeUninit<f32>>>::ArrayType: Freeze,
impl<FMW, FB> RefUnwindSafe for QrsDetector<FMW, FB>where
<FMW as ArrayLength<MaybeUninit<f32>>>::ArrayType: RefUnwindSafe,
<FB as ArrayLength<MaybeUninit<f32>>>::ArrayType: RefUnwindSafe,
impl<FMW, FB> Send for QrsDetector<FMW, FB>
impl<FMW, FB> Sync for QrsDetector<FMW, FB>
impl<FMW, FB> Unpin for QrsDetector<FMW, FB>where
<FMW as ArrayLength<MaybeUninit<f32>>>::ArrayType: Unpin,
<FB as ArrayLength<MaybeUninit<f32>>>::ArrayType: Unpin,
impl<FMW, FB> UnwindSafe for QrsDetector<FMW, FB>where
<FMW as ArrayLength<MaybeUninit<f32>>>::ArrayType: UnwindSafe,
<FB as ArrayLength<MaybeUninit<f32>>>::ArrayType: 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