pub struct Numerology {
pub mu: u32,
pub extended_cp: bool,
}Expand description
A numerology of NR: $\Delta f = 2^{\mu} \cdot 15$ kHz (see the module).
Fields§
§mu: u32$\mu$, 0 to 4.
extended_cp: boolThe extended cyclic prefix (12 symbols per slot; $\mu = 2$ only in NR, and the extended prefix of LTE at $\mu = 0$).
Implementations§
Source§impl Numerology
impl Numerology
Sourcepub fn new(mu: u32, extended_cp: bool) -> Result<Numerology>
pub fn new(mu: u32, extended_cp: bool) -> Result<Numerology>
The numerology $\mu$.
§Errors
comnum_core::Error::Config for $\mu > 4$, or an extended prefix with $\mu \notin {0, 2}$.
Sourcepub fn subcarrier_spacing_hz(&self) -> f64
pub fn subcarrier_spacing_hz(&self) -> f64
The subcarrier spacing $2^{\mu} \cdot 15$ kHz (Hz).
Sourcepub fn slots_per_subframe(&self) -> usize
pub fn slots_per_subframe(&self) -> usize
Slots per 1 ms subframe, $2^{\mu}$.
Sourcepub fn slots_per_frame(&self) -> usize
pub fn slots_per_frame(&self) -> usize
Slots per 10 ms frame.
Sourcepub fn symbols_per_slot(&self) -> usize
pub fn symbols_per_slot(&self) -> usize
OFDM symbols per slot: 14, or 12 with the extended prefix.
Sourcepub fn sample_rate(&self, n_fft: usize) -> f64
pub fn sample_rate(&self, n_fft: usize) -> f64
The sampling rate $N_{\mathrm{FFT}}\Delta f$ (Hz).
Sourcepub fn cp_lengths(&self, n_fft: usize) -> Result<Vec<usize>>
pub fn cp_lengths(&self, n_fft: usize) -> Result<Vec<usize>>
The cyclic prefixes (samples) of the symbols of one subframe at the FFT size
n_fft (see the module).
§Errors
comnum_core::Error::Config when n_fft is not a multiple of 128 (the prefixes would not be
whole samples).
Trait Implementations§
Source§impl Clone for Numerology
impl Clone for Numerology
impl Copy for Numerology
Source§impl Debug for Numerology
impl Debug for Numerology
impl Eq for Numerology
Source§impl PartialEq for Numerology
impl PartialEq for Numerology
impl StructuralPartialEq for Numerology
Auto Trait Implementations§
impl Forget for Numerology
impl Freeze for Numerology
impl RefUnwindSafe for Numerology
impl Send for Numerology
impl Sync for Numerology
impl Unpin for Numerology
impl UnsafeUnpin for Numerology
impl UnwindSafe for Numerology
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