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