com.ibutton
Class iButton

java.lang.Object
  |
  +--com.ibutton.iButton
Direct Known Subclasses:
JibButton

public class iButton
extends java.lang.Object

Class that represents a physical iButton attached to a port.


Constructor Summary
iButton(Access access, int[] romID)
          Constructor for the iButton object
 
Method Summary
 Access getAccess()
          Gets the Access object used to communicate with the physical iButton.
 int getFamilyCode()
          Get the Family code of the iButton this object represents.
 int[] getRomID()
          Gets the ROM ID of the iButton this object represents.
 boolean isRomID(int[] id)
          Checks to see if the id passed in matches the ROM ID of this iButton object.
 boolean select()
          Verifies that the iButton is still attached to the port.
 java.lang.String toString()
          Returns a string representing the ROM Id that this iButton object is associated with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

iButton

public iButton(Access access,
               int[] romID)
Constructor for the iButton object
Parameters:
comm - the cibComm object representing how this button will communicate with the physical button
Method Detail

getRomID

public int[] getRomID()
Gets the ROM ID of the iButton this object represents.
Returns:
integer array of the 8 byte ROM ID.

getFamilyCode

public int getFamilyCode()
Get the Family code of the iButton this object represents.
Returns:
the family Code byte.

select

public boolean select()
Verifies that the iButton is still attached to the port.
Returns:
true if the iButton is attached to the port, false if the iButton is not found.

isRomID

public boolean isRomID(int[] id)
Checks to see if the id passed in matches the ROM ID of this iButton object.
Parameters:
id - the ROM Id to check against this iButton object.
Returns:
true if the id passed in matches the ROM ID of this iButton object. false otherwise.

getAccess

public Access getAccess()
Gets the Access object used to communicate with the physical iButton.
Returns:
the Access object used to communicate with the physical iButton.

toString

public java.lang.String toString()
Returns a string representing the ROM Id that this iButton object is associated with.
Returns:
the string representation of a ROM Id.
Overrides:
toString in class java.lang.Object