Skip to main content

FrameLayout

Trait FrameLayout 

Source
pub trait FrameLayout:
    Copy
    + Default
    + 'static {
    const N_DATA: u32;
    const N_SYNC: u32;
    const N_SYMBOLS: u32;
    const N_RAMP: u32;
    const SYNC_MODE: SyncMode;
    const T_SLOT_S: f32;
    const TX_START_OFFSET_S: f32;
    const CODEWORD_INTERLEAVE: Option<&'static [u16]> = None;
}
Expand description

Frame structure: data / sync symbol counts, the ordered list of sync blocks, and the TX-side nominal start offset.

Required Associated Constants§

Source

const N_DATA: u32

Data symbols carrying FEC-coded payload.

Source

const N_SYNC: u32

Sync symbols (sum of pattern.len() across SYNC_BLOCKS).

Source

const N_SYMBOLS: u32

Total channel symbols per frame (= N_DATA + N_SYNC). Excludes any GFSK ramp-up / ramp-down symbols that are a shaping artifact.

Source

const N_RAMP: u32

Extra symbol slots on each side of the frame reserved for amplitude ramp (FT4 has 1 each side = 2; FT8 has 0 — ramp absorbed into the first/last data symbol envelope). Applied at the transmitter.

Source

const SYNC_MODE: SyncMode

Sync-symbol layout. Most WSJT protocols use SyncMode::Block with dedicated Costas blocks (FT8/FT4/FST4); WSPR uses SyncMode::Interleaved with a per-symbol sync bit. Callers that only support block sync should read SYNC_MODE.blocks() and treat an empty slice as “unsupported”.

Source

const T_SLOT_S: f32

Nominal TX/RX slot length in seconds (informational — used by schedulers and UI, not by the DSP pipeline). FT8 = 15 s, FT4 = 7.5 s.

Source

const TX_START_OFFSET_S: f32

Time (seconds) from the start of the slot-audio buffer to the start of the first frame symbol — the “dt = 0” reference point used by sync, signal subtraction, and DT reporting. FT8 = 0.5, FT4 = 0.5.

Provided Associated Constants§

Source

const CODEWORD_INTERLEAVE: Option<&'static [u16]> = None

Optional bit interleaver: permutation table such that cw[CODEWORD_INTERLEAVE[j]] is the codeword bit transmitted at channel-bit position j. Length must equal <Self as Protocol>::Fec::N when Some.

None (default) means the codeword bits flow into the channel in natural order — what FT8 / FT4 / FST4 / WSPR / JT9 / JT65 / Q65 all do, since their existing FECs and operating channels make burst-error tolerance a non-issue (or it’s handled inside the FEC, as Q65’s QRA does symbol-level dispersion).

Some(table) is for codecs targeting time-selective fading channels where a deep fade null can wipe out consecutive channel bits. The interleaver spreads consecutive codeword bits across the frame so the same fade null hits scattered codeword bits, which soft-decision LDPC handles well. The table is a permutation of 0..codeword_bits; a polynomial form INTERLEAVE[j] = (s * j) mod n with gcd(s, n) = 1 gives uniform stride spacing.

Both crate::core::tx::codeword_to_itone and the pipeline’s LLR-deinterleave step honour this constant; protocols that override get TX/RX symmetry for free.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl FrameLayout for Fst4s60

Source§

impl FrameLayout for Ft4

Source§

impl FrameLayout for Ft8

Source§

impl FrameLayout for Jt9

Source§

impl FrameLayout for Jt65

Source§

impl FrameLayout for Q65a30

Source§

impl FrameLayout for Q65a60

Source§

impl FrameLayout for Q65b60

Source§

impl FrameLayout for Q65c60

Source§

impl FrameLayout for Q65d60

Source§

impl FrameLayout for Q65e60

Source§

impl FrameLayout for UvExpress

Source§

impl FrameLayout for UvFast

Source§

impl FrameLayout for UvRobust

Source§

impl FrameLayout for UvStandard

Source§

impl FrameLayout for Wspr