Package org.yamcs.tctm.ccsds.error
Class CrcCciitCalculator
java.lang.Object
org.yamcs.tctm.ccsds.error.CrcCciitCalculator
- All Implemented Interfaces:
ErrorDetectionWordCalculator
Cylcic Redundancy Check (CRC-CCIIT 0xFFFF) with the polynomial:
1 + x^5 + x^12 + x^16
Also specified in: CCSDS TC Space Data Link Protocol (CCSDS 232.0-B-3), CCSDS TM Space Data Link Protocol (CCSDS 132.0-B-3) and CCSDS AOS Space Data Link Protocol (CCSDS 732.0-B-4)
-
Constructor Summary
Constructors -
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
compute
(ByteBuffer data, int offset, int length) int
-
Constructor Details
-
CrcCciitCalculator
public CrcCciitCalculator() -
CrcCciitCalculator
-
-
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:
-
compute
-
sizeInBits
public int sizeInBits()- Specified by:
sizeInBits
in interfaceErrorDetectionWordCalculator
- Returns:
- size in bits of the calculated checksum (max 32)
-