Package org.yamcs.tctm
Class Running16BitChecksumCalculator
- java.lang.Object
-
- org.yamcs.tctm.Running16BitChecksumCalculator
-
- All Implemented Interfaces:
ErrorDetectionWordCalculator
public class Running16BitChecksumCalculator extends Object implements ErrorDetectionWordCalculator
-
-
Constructor Summary
Constructors Constructor Description Running16BitChecksumCalculator()
-
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)
-
-