GNU Radio's DSD Package
p25p1_check_ldu.h
Go to the documentation of this file.
1
2#ifndef P25P1_CHECK_LDU_H_c1734445a67e47caa25673d7a4ce7520
3#define P25P1_CHECK_LDU_H_c1734445a67e47caa25673d7a4ce7520
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9/**
10 * Attempts to error correct a hex (6-bit) word using the Hamming(10,6,3) FEC.
11 * \param hex The 6-bit word to error correct.
12 * \param parity The parity to use in the error correction. 4 bits.
13 * \return The estimated error count. It might be erroneous.
14 */
15int check_and_fix_hamming_10_6_3(char* hex, char* parity);
16
17/**
18 * Encodes an hex word with the Hamming(10,6,3) FEC.
19 * \param hex The 6-bit word to error correct.
20 * \param out_parity The address where to store the calculated parity. 4 bytes are used, one for each bit.
21 */
22void encode_hamming_10_6_3(char* hex, char* out_parity);
23
24/**
25 * Attempts to correct 12 hex words using the Reed-Solomon(24,12,13) FEC.
26 * \param data The packed hex words, each of 6 chars, one after the other.
27 * \param parity The corresponding 12 hex words with the parity information.
28 * \return 1 if irrecoverable errors have been detected, 0 otherwise.
29 */
30int check_and_fix_reedsolomon_24_12_13(char* data, char* parity);
31
32/**
33 * Encodes 12 hex words with the Reed-Solomon(24,12,13) FEC.
34 * \param hex_data The packed 12 hex words to encode.
35 * \fixed_parity The address were to store the 12 hex words with the Reed-Solomon parity.
36 */
37void encode_reedsolomon_24_12_13(char* hex_data, char* fixed_parity);
38
39/**
40 * Attempts to correct 16 hex words using the Reed-Solomon(24,16,9) FEC.
41 * \param data The packed 16 hex words, each of 6 chars, one after the other.
42 * \param parity The corresponding 8 hex words with the parity information.
43 * \return 1 if irrecoverable errors have been detected, 0 otherwise.
44 */
45int check_and_fix_reedsolomon_24_16_9(char* data, char* parity);
46
47/**
48 * Encodes 12 hex words with the Reed-Solomon(24,16,9) FEC.
49 * \param hex_data The packed 16 hex words to encode.
50 * \fixed_parity The address were to store the 8 hex words with the Reed-Solomon parity.
51 */
52void encode_reedsolomon_24_16_9(char* hex_data, char* fixed_parity);
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif // P25P1_CHECK_LDU_H_c1734445a67e47caa25673d7a4ce7520
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)
int check_and_fix_hamming_10_6_3(char *hex, char *parity)
void encode_hamming_10_6_3(char *hex, char *out_parity)
void encode_reedsolomon_24_16_9(char *hex_data, char *fixed_parity)