Package org.yamcs.tctm
Class Iso16CrcCalculator
java.lang.Object
org.yamcs.tctm.Iso16CrcCalculator
- All Implemented Interfaces:
ErrorDetectionWordCalculator
ISO CRC calculator as described in ECSS-E-ST-70-41C 15 April 2016, appendix B.2
It has been devised by John G. Fletcher.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compute
(byte[] data, int offset, int length) Compute the checksum on the data buffer starting at offset and taking into account length bytesint
-
Constructor Details
-
Iso16CrcCalculator
public Iso16CrcCalculator()
-
-
Method Details
-
compute
public int compute(byte[] data, int offset, int length) Description copied from interface:ErrorDetectionWordCalculator
Compute the checksum on the data buffer starting at offset and taking into account length bytes- Specified by:
compute
in interfaceErrorDetectionWordCalculator
- Returns:
-
sizeInBits
public int sizeInBits()- Specified by:
sizeInBits
in interfaceErrorDetectionWordCalculator
- Returns:
- size in bits of the calculated checksum (max 32)
-