public class CRC8
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEBUG_LEV
For Debugging: Higher level equals more debug statements
|
Constructor and Description |
---|
CRC8()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
byte |
checksum()
Finalize the checksum, and return the value.
|
void |
reset()
Resets all stored data, preparing object for a new checksum.
|
byte |
updateCRC8(byte[] inSet,
int start,
int end)
Add data to the crc.
|
public static int DEBUG_LEV
public CRC8()
public byte updateCRC8(byte[] inSet, int start, int end)
inSet
- Array holding data to checksum.start
- Index of array holding first elementend
- Index to stop at. Last index used will be end-1.public byte checksum()
public void reset()