|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibutton.tmex.utils.iButtonID
The iButtonID class encapsulates the 64 bit Read-Only-Memory (ROM) Identification (ID) number that all iButtons have. The iButtonID contains an 8 bit family code that indicates the feature set the iButton contains, a 48 bit unique serial number, and an 8 bit Cyclic-Redundency-Check (CRC) to verify the ID during intermittent communication.
| Field Summary | |
static int |
numIDElements
Number of iButton ID elements. |
| Constructor Summary | |
iButtonID()
Constructs an iButton ID with all 0's. |
|
iButtonID(int[] newID)
Constructs an iButton ID with a starting value specified as an array of ints. |
|
iButtonID(java.lang.String newID)
Constructs an iButton ID with a starting value specified as a string. |
|
| Method Summary | |
int |
getFamilyCode()
Get the Family code from the ID. |
int[] |
getID()
Get the ID as an array of ints. |
char[] |
getIDAsChars()
Get the ID as an array of chars. |
java.lang.String |
getIDString()
Get the ID as a String. |
boolean |
isValidID()
Checks the CRC8 calculation of this ID. |
void |
setID(char[] newID)
Set the ID using the provided array of chars. |
void |
setID(int[] newID)
Set the ID using the provided array of ints. |
void |
setID(java.lang.String newID)
Set the ID using the provided array of ints. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int numIDElements
| Constructor Detail |
public iButtonID()
public iButtonID(int[] newID)
newID - array of the new iButton IDpublic iButtonID(java.lang.String newID)
| Method Detail |
public void setID(int[] newID)
newID - array of the new iButton IDpublic void setID(char[] newID)
newID - array of the new iButton IDpublic void setID(java.lang.String newID)
newID - array of the new iButton IDpublic int[] getID()
public char[] getIDAsChars()
public java.lang.String getIDString()
public int getFamilyCode()
public boolean isValidID()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||