GNU Radio's DSD Package
p25p1_check_nid.h File Reference

Go to the source code of this file.

Functions

int check_NID (char *bch_code, int *new_nac, char *new_duid, unsigned char parity)

Function Documentation

◆ check_NID()

int check_NID ( char * bch_code,
int * new_nac,
char * new_duid,
unsigned char parity )

Checks a NID value, returns the fixed NAC, DUID and also an indication if it failed to decode the NID.

Parameters
bch_codeInput. An array to the 63 bytes, each containing one bit of the NID. This includes the NAC (12 bits), DUID (4 bits) and 47 bits of BCH parity.
new_nacOutput. An address where to store the calculated NAC value after error correction. Should be large enough to accommodate for an integer.
new_duidOutput. An address where to store the calculated DUID value after error correction. Should be able to accommodate 3 chars.
parityInput. The parity value read.
Returns
0 if there were errors processing the NID.