|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibutton.tmex.utils.iButtonCRC
iButtonCRC is a class to contain an implementation of the Cyclic-Redundency-Check CRC8 for the iButton. The CRC8 is used in the iButton ID number of all iButtons.
CRC8 is based on the polynomial = X^8 + X^5 + X^4 + 1.
| Constructor Summary | |
iButtonCRC()
Construct this object with both the crc8 and crc16 initial seeded to 0. |
|
| Method Summary | |
int |
doCRC(int dataToCRC)
Perform the CRC8 on the data element based on the private crc8 value. |
int |
doCRC(int[] dataToCrc)
Perform the CRC8 on an array of data elements based on the private crc8 value. |
int |
getCRC()
Retrieve the current CRC8 value |
void |
seedCRC(int crcSeed)
Seed the crc8 by setting it to the provided value |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public iButtonCRC()
| Method Detail |
public int getCRC()
public void seedCRC(int crcSeed)
crcSeed - crc8 value to setpublic int doCRC(int dataToCRC)
CRC8 is based on the polynomial = X^8 + X^5 + X^4 + 1.
dataToCrc - data element to perform crc8 onpublic int doCRC(int[] dataToCrc)
CRC8 is based on the polynomial = X^8 + X^5 + X^4 + 1.
dataToCrc - array of data elements to perform crc8 on
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||