Package org.yamcs.tctm
Class Running16BitChecksumCalculator
java.lang.Object
org.yamcs.tctm.Running16BitChecksumCalculator
- All Implemented Interfaces:
ErrorDetectionWordCalculator
-
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
-
Running16BitChecksumCalculator
public Running16BitChecksumCalculator()
-
-
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)
-