GNU Radio's DSD Package
p25p1_check_ldu.h File Reference

Go to the source code of this file.

Functions

int check_and_fix_hamming_10_6_3 (char *hex, char *parity)
void encode_hamming_10_6_3 (char *hex, char *out_parity)
int check_and_fix_reedsolomon_24_12_13 (char *data, char *parity)
void encode_reedsolomon_24_12_13 (char *hex_data, char *fixed_parity)
int check_and_fix_reedsolomon_24_16_9 (char *data, char *parity)
void encode_reedsolomon_24_16_9 (char *hex_data, char *fixed_parity)

Function Documentation

◆ check_and_fix_hamming_10_6_3()

int check_and_fix_hamming_10_6_3 ( char * hex,
char * parity )

Attempts to error correct a hex (6-bit) word using the Hamming(10,6,3) FEC.

Parameters
hexThe 6-bit word to error correct.
parityThe parity to use in the error correction. 4 bits.
Returns
The estimated error count. It might be erroneous.

◆ check_and_fix_reedsolomon_24_12_13()

int check_and_fix_reedsolomon_24_12_13 ( char * data,
char * parity )

Attempts to correct 12 hex words using the Reed-Solomon(24,12,13) FEC.

Parameters
dataThe packed hex words, each of 6 chars, one after the other.
parityThe corresponding 12 hex words with the parity information.
Returns
1 if irrecoverable errors have been detected, 0 otherwise.

◆ check_and_fix_reedsolomon_24_16_9()

int check_and_fix_reedsolomon_24_16_9 ( char * data,
char * parity )

Attempts to correct 16 hex words using the Reed-Solomon(24,16,9) FEC.

Parameters
dataThe packed 16 hex words, each of 6 chars, one after the other.
parityThe corresponding 8 hex words with the parity information.
Returns
1 if irrecoverable errors have been detected, 0 otherwise.

◆ encode_hamming_10_6_3()

void encode_hamming_10_6_3 ( char * hex,
char * out_parity )

Encodes an hex word with the Hamming(10,6,3) FEC.

Parameters
hexThe 6-bit word to error correct.
out_parityThe address where to store the calculated parity. 4 bytes are used, one for each bit.

◆ encode_reedsolomon_24_12_13()

void encode_reedsolomon_24_12_13 ( char * hex_data,
char * fixed_parity )

Encodes 12 hex words with the Reed-Solomon(24,12,13) FEC.

Parameters
hex_dataThe packed 12 hex words to encode. \fixed_parity The address were to store the 12 hex words with the Reed-Solomon parity.

◆ encode_reedsolomon_24_16_9()

void encode_reedsolomon_24_16_9 ( char * hex_data,
char * fixed_parity )

Encodes 12 hex words with the Reed-Solomon(24,16,9) FEC.

Parameters
hex_dataThe packed 16 hex words to encode. \fixed_parity The address were to store the 8 hex words with the Reed-Solomon parity.