pub struct OfdmFrameMod { /* private fields */ }Expand description
The OFDM frame modulator.
Implementations§
Source§impl OfdmFrameMod
impl OfdmFrameMod
Sourcepub fn new(cfg: OfdmConfig, mcs_table: McsTable, preamble: OfdmPreamble) -> Self
pub fn new(cfg: OfdmConfig, mcs_table: McsTable, preamble: OfdmPreamble) -> Self
Creates a frame modulator over cfg, an mcs_table, and the
acquisition preamble (which should carry a training symbol sized to
the plan for the receiver’s channel estimation). The modulator owns a
fresh, private CodecCache; use with_cache to
share one with a demodulator.
Sourcepub fn with_cache(
cfg: OfdmConfig,
mcs_table: McsTable,
preamble: OfdmPreamble,
cache: Arc<CodecCache>,
) -> Self
pub fn with_cache( cfg: OfdmConfig, mcs_table: McsTable, preamble: OfdmPreamble, cache: Arc<CodecCache>, ) -> Self
Like new, but reuses the caller-provided cache — share
one Arc<CodecCache> across a modulator/demodulator pair (or several
links on the same MCS) so each FEC code is constructed only once.
pub fn config(&self) -> &OfdmConfig
Sourcepub fn preamble(&self) -> &OfdmPreamble
pub fn preamble(&self) -> &OfdmPreamble
The training-symbol-carrying preamble prepended to every frame.
Sourcepub fn modulate_frame(
&self,
frame: &FramePacket,
per_frame_seed: u32,
) -> Vec<C32> ⓘ
pub fn modulate_frame( &self, frame: &FramePacket, per_frame_seed: u32, ) -> Vec<C32> ⓘ
Modulates a whole FramePacket into a flat IQ stream:
[preamble+training][header][payload].
per_frame_seed supplies the scrambler seed for a PerFrameRandom
configuration (ignored otherwise); it is recorded in the header so the
receiver can rebuild the descrambler.
Trait Implementations§
Source§impl Clone for OfdmFrameMod
impl Clone for OfdmFrameMod
Source§fn clone(&self) -> OfdmFrameMod
fn clone(&self) -> OfdmFrameMod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more