java.lang.Object
org.yamcs.tctm.Running16BitChecksumCalculator
- All Implemented Interfaces:
ErrorDetectionWordCalculator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompute(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: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)
-