Go to the source code of this file.
|
| int | check_NID (char *bch_code, int *new_nac, char *new_duid, unsigned char parity) |
◆ 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_code | Input. 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_nac | Output. An address where to store the calculated NAC value after error correction. Should be large enough to accommodate for an integer. |
| new_duid | Output. An address where to store the calculated DUID value after error correction. Should be able to accommodate 3 chars. |
| parity | Input. The parity value read. |
- Returns
- 0 if there were errors processing the NID.