Checksum
@SerialInfo
Annotation added for serializing using BluetoothFormat
Adds a com.splendo.kaluga.base.bytes.CRC value of size width to the end of the body (before any prefix) If the decoded checksum does not match the calculated checksum of the body and BluetoothFormat.validateChecksum is true will result in a InvalidChecksumException.
Parameters
width
the width of the CRC in bits. Must be between 1 and 64 bits.
polynomial
the polynomial used to compute the CRC.
init
the initial value of the CRC.
xorOut
the value to XOR with the result to get the final CRC.
reflectIn
whether to reflect the input bytes before computing the CRC.
reflectOut
whether to reflect the output bytes after computing the CRC.