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

RDS 26-bit checkwords, offset words, and streaming group synchronization. More...

Classes

class  RdsGroup
 Provide rds group behavior. More...
class  RdsBlockSynchronizer
 Stream RDS groups with strict acquisition and optional erasure recovery. More...

Functions

int syndrome (int word)
 Compute the 10-bit remainder of an MSB-first 26-bit RDS word.
int encode_block (int data, str offset)
 Construct an RDS block with the standard offset-masked checkword.
tuple[str, int]|None decode_block (int word, str|None expected=None)
 Return (offset_name, 16-bit payload) if the checkword is valid.

Variables

int POLYNOMIAL = 0x5B9
dict OFFSET_WORDS = {"A": 0x0FC, "B": 0x198, "C": 0x168, "C_prime": 0x350, "D": 0x1B4}
int BLOCK_BITS = 26
int GROUP_BITS = 104

Detailed Description

RDS 26-bit checkwords, offset words, and streaming group synchronization.

Function Documentation

◆ decode_block()

tuple[str, int] | None sdrforge.protocols.rds.rds_block_sync.decode_block ( int word,
str | None expected = None )

Return (offset_name, 16-bit payload) if the checkword is valid.

Parameters
wordThe word value.
expectedThe expected value.
Returns
The operation result.

◆ encode_block()

int sdrforge.protocols.rds.rds_block_sync.encode_block ( int data,
str offset )

Construct an RDS block with the standard offset-masked checkword.

Parameters
dataThe data value.
offsetThe offset value.
Returns
The operation result.

◆ syndrome()

int sdrforge.protocols.rds.rds_block_sync.syndrome ( int word)

Compute the 10-bit remainder of an MSB-first 26-bit RDS word.

Parameters
wordThe word value.
Returns
The operation result.

Variable Documentation

◆ BLOCK_BITS

int sdrforge.protocols.rds.rds_block_sync.BLOCK_BITS = 26

◆ GROUP_BITS

int sdrforge.protocols.rds.rds_block_sync.GROUP_BITS = 104

◆ OFFSET_WORDS

dict sdrforge.protocols.rds.rds_block_sync.OFFSET_WORDS = {"A": 0x0FC, "B": 0x198, "C": 0x168, "C_prime": 0x350, "D": 0x1B4}

◆ POLYNOMIAL

int sdrforge.protocols.rds.rds_block_sync.POLYNOMIAL = 0x5B9