mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-20 20:55:40 -05:00
Added error correction to the metadata of LDU1 and LDU2.
Refactored implementation of p25p1_ldu1.c and p25p1_ldu2.c. There are less duplicities now and hopefully is easier to read and maintain. Added a unit test for the Hamming algorithm.
This commit is contained in:
30
p25p1_check_ldu.h
Normal file
30
p25p1_check_ldu.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef __P25P1_CHECK_LDU_H__
|
||||
#define __P25P1_CHECK_LDU_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int check_and_fix_hamming_10_12_13(char* hex, char* parity);
|
||||
|
||||
/**
|
||||
* Attempts to correct 12 hex words using the Reed-Solomon(24,12,13) FEC.
|
||||
* \param data The packed hex words, each of 6 chars, one after the other.
|
||||
* \param parity The corresponding 12 hex words with the parity information.
|
||||
* \return 1 if irrecoverable errors have been detected, 0 otherwise.
|
||||
*/
|
||||
int check_and_fix_redsolomon_24_12_13(char* data, char* parity);
|
||||
|
||||
/**
|
||||
* Attempts to correct 16 hex words using the Reed-Solomon(24,16,9) FEC.
|
||||
* \param data The packed hex words, each of 6 chars, one after the other.
|
||||
* \param parity The corresponding 8 hex words with the parity information.
|
||||
* \return 1 if irrecoverable errors have been detected, 0 otherwise.
|
||||
*/
|
||||
int check_and_fix_redsolomon_24_16_9(char* data, char* parity);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __P25P1_CHECK_LDU_H__
|
||||
Reference in New Issue
Block a user