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 int
compute(byte[] data, int offset, int length)
Compute the checksum on the data buffer starting at offset and taking into account length bytesint
sizeInBits()
-
-
-
Method Detail
-
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)
-
-