GNU Radio's DSD Package
p25p1_check_hdu.h File Reference

Go to the source code of this file.

Functions

int check_and_fix_golay_24_6 (char *hex, char *parity, int *fixed_errors)
 
int check_and_fix_golay_24_12 (char *dodeca, char *parity, int *fixed_errors)
 
void encode_golay_24_6 (char *hex, char *out_parity)
 
void encode_golay_24_12 (char *dodeca, char *out_parity)
 
int check_and_fix_redsolomon_36_20_17 (char *data, char *parity)
 
void encode_reedsolomon_36_20_17 (char *hex_data, char *fixed_parity)
 

Function Documentation

◆ check_and_fix_golay_24_12()

int check_and_fix_golay_24_12 ( char *  dodeca,
char *  parity,
int *  fixed_errors 
)

Attempts to correct a 12-bit word using the Golay(24,12,8) FEC.

Parameters
dodecaThe 12-bit word to error correct, given as a char array of 12 elements, one bit each.
parityA 12-bit word with the Golay parity data, given as a char array of 12 elements.
fixed_errorOutput. Filled with the number of errors fixed in the input.
Returns
1 if there were uncorrectable errors in the input, 0 otherwise.

◆ check_and_fix_golay_24_6()

int check_and_fix_golay_24_6 ( char *  hex,
char *  parity,
int *  fixed_errors 
)

Attempts to correct an hex (6-bit) word using the Golay(24,12,8) FEC.

Parameters
hexThe 6-bit word to error correct, given as a char array of 6 elements, one bit each.
parityA 12-bit word with the Golay parity data, given as a char array of 12 elements.
fixed_errorOutput. Filled with the number of errors fixed in the input.
Returns
1 if there were uncorrectable errors in the input, 0 otherwise.

◆ check_and_fix_redsolomon_36_20_17()

int check_and_fix_redsolomon_36_20_17 ( char *  data,
char *  parity 
)

Attempts to correct 20 hex words using the Reed-Solomon(36,20,17) FEC.

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

◆ encode_golay_24_12()

void encode_golay_24_12 ( char *  dodeca,
char *  out_parity 
)

Encodes an 12-bitword using the Golay(24,12,8) FEC.

Parameters
dodecaA 12-bit word to encode.
out_parityThe address to be filled with the calculated Golay parity.

◆ encode_golay_24_6()

void encode_golay_24_6 ( char *  hex,
char *  out_parity 
)

Encodes an hex word using the Golay(24,12,8) FEC.

Parameters
hexA 6-bit word to encode.
out_parityThe address to be filled with the calculated Golay parity.

◆ encode_reedsolomon_36_20_17()

void encode_reedsolomon_36_20_17 ( char *  hex_data,
char *  fixed_parity 
)

Calculates the Reed-Solomon parity of 20 words of 6 bits each.

Parameters
hex_dataThe address with the words whose parity we want to calculate.
fixed_parityThe address to be filled with the calculated parity. 16 words of 6 bits are produced.