pub struct SigMF {
pub samples: Vec<C64>,
pub num_channels: usize,
pub sample_rate: Option<f64>,
pub frequency: Option<f64>,
pub datatype: Datatype,
pub captures: Vec<Capture>,
pub annotations: Vec<Annotation>,
pub meta: Value,
}Expand description
A SigMF recording.
Fields§
§samples: Vec<C64>The samples, the channels interleaved (num_channels per instant).
num_channels: usizecore:num_channels (1 when absent).
sample_rate: Option<f64>core:sample_rate (Hz).
frequency: Option<f64>core:frequency of the first capture (Hz).
datatype: Datatypecore:datatype.
captures: Vec<Capture>The capture segments, in the order of their first sample.
annotations: Vec<Annotation>The annotations, in the order of their first sample.
meta: ValueThe whole metadata document.
Implementations§
Source§impl SigMF
impl SigMF
Sourcepub fn channel(&self, k: usize) -> Vec<C64> ⓘ
pub fn channel(&self, k: usize) -> Vec<C64> ⓘ
The samples of channel k (none beyond the last channel).
Sourcepub fn try_channel(&self, k: usize) -> Result<Vec<C64>>
pub fn try_channel(&self, k: usize) -> Result<Vec<C64>>
The samples of channel k, which must exist.
§Errors
Error::Config if the recording has no channel k.
Sourcepub fn full_scale(&self) -> Option<f64>
pub fn full_scale(&self) -> Option<f64>
The full scale of an integer type, $2^{b-1}$ for $b$ bits (None for floating
point): dividing by it gives the samples of sigmf-python with autoscale.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SigMF
impl RefUnwindSafe for SigMF
impl Send for SigMF
impl Sync for SigMF
impl Unpin for SigMF
impl UnsafeUnpin for SigMF
impl UnwindSafe for SigMF
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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