GNU Radio's DSD Package
p25p1_check_nid.h
Go to the documentation of this file.
1 
2 #ifndef P25P1_CHECK_NID_H_3af071e917ea43fdb51326e2cbfbde0a
3 #define P25P1_CHECK_NID_H_3af071e917ea43fdb51326e2cbfbde0a
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 /**
10  * Checks a NID value, returns the fixed NAC, DUID and also an indication if it failed to decode the NID.
11  * \param bch_code Input. An array to the 63 bytes, each containing one bit of the NID. This includes the
12  * NAC (12 bits), DUID (4 bits) and 47 bits of BCH parity.
13  * \param new_nac Output. An address where to store the calculated NAC value after error correction. Should
14  * be large enough to accommodate for an integer.
15  * \param new_duid Output. An address where to store the calculated DUID value after error correction. Should
16  * be able to accommodate 3 chars.
17  * \param parity Input. The parity value read.
18  * \return 0 if there were errors processing the NID.
19  */
20 int check_NID(char* bch_code, int* new_nac, char* new_duid, unsigned char parity);
21 
22 #ifdef __cplusplus
23 }
24 #endif
25 
26 #endif // P25P1_CHECK_NID_H_3af071e917ea43fdb51326e2cbfbde0a
int check_NID(char *bch_code, int *new_nac, char *new_duid, unsigned char parity)