libSDRForge
Loading...
Searching...
No Matches
sdrforge.protocols.rds.rds_erasure_recovery Namespace Reference

Optional CRC-guided erasure recovery for a single 26-bit RDS block. More...

Classes

class  RdsRecoveredBlock
 Provide rds recovered block behavior. More...

Functions

RdsRecoveredBlock|None recover_block (Sequence[int] bits, Sequence[bool] valid, Sequence[str] expected_offsets, *, int max_erasures=0)
 Decode a block only if exactly one CRC-valid assignment exists.

Detailed Description

Optional CRC-guided erasure recovery for a single 26-bit RDS block.

This module does not change strict synchronization or enable correction by default. A recovered block is experimental and must retain its provenance.

Function Documentation

◆ recover_block()

RdsRecoveredBlock | None sdrforge.protocols.rds.rds_erasure_recovery.recover_block ( Sequence[int] bits,
Sequence[bool] valid,
Sequence[str] expected_offsets,
* ,
int max_erasures = 0 )

Decode a block only if exactly one CRC-valid assignment exists.

The default max_erasures=0 preserves strict CRC-only behavior. Positions are MSB-first, 0..25. Invalid bits are unknown, not flips. Only 0, 1 or 2 erasures are supported to bound false positives.

Parameters
bitsThe bits value.
validThe valid value.
expected_offsetsThe expected_offsets value.
max_erasuresThe max_erasures value.
Returns
The operation result.