|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibutton.tmex.utils.CRC16
iButtonCRC is a class to contain an implementation of the Cyclic-Redundency-Check (CRC) CRC16. The CRC16 is used in iButton memory packet structure.
CRC16 is based on the polynomial = X^16 + X^15 + X^2 + 1.
| Constructor Summary | |
CRC16()
Construct this object with both the crc8 and crc16 initial seeded to 0. |
|
| Method Summary | |
int |
doCRC16(char dataToCrc)
Perform the CRC16 on the data element based on the private crc16 value. |
int |
doCRC16(char[] dataToCrc)
Perform the CRC16 on an array of data elements based on the private crc16 value. |
int |
getCRC16()
Retrieve the current CRC16 value |
int |
getInvCRC16()
Retrieve the inverted current CRC16 value. |
void |
seedCRC16(int crcSeed)
Seed the crc16 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 CRC16()
| Method Detail |
public int getCRC16()
public void seedCRC16(int crcSeed)
crcSeed - crc16 value to setpublic int getInvCRC16()
The inverted CRC16 is used when writing to the memory iButtons for short condition reasons.
public int doCRC16(char dataToCrc)
CRC16 is based on the polynomial = X^16 + X^15 + X^2 + 1.
dataToCrc - data element to perform crc16 onpublic int doCRC16(char[] dataToCrc)
CRC16 is based on the polynomial = X^16 + X^15 + X^2 + 1.
dataToCrc - array of data elements to perform crc16 on
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||