crc16¶
- baseband.mark5b.header.crc16 = <baseband.base.utils.CRC object>¶
Cyclic Redundancy Check.
See https://en.wikipedia.org/wiki/Cyclic_redundancy_check
Once initialised, the instance can be used as a function that calculates the CRC, or one can use the
check
method to verify that the CRC in the lower bits of a value is correct.- Parameters:
- polynomialint
Binary encoded CRC divisor. For instance, that used by Mark 5B headers is 0x18005, or x^16 + x^15 + x^2 + 1.
See also
baseband.base.utils.CRCStack
for calculating CRC on arrays where each entry represents a bit.