|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dalsemi.onewire.container.OneWireContainer
General iButton container class with basic communication functions. This class should only be used if a device specific class is not available or known. Most OneWireContainer classes will extend this basic class.
Constructor Summary | |
OneWireContainer()
Constructor OneWireContainer |
|
OneWireContainer(DSPortAdapter sourceAdapter,
byte[] newAddress)
Create a container with a provided adapter object and the address of the iButton or 1-Wire device. |
|
OneWireContainer(DSPortAdapter sourceAdapter,
long newAddress)
Create a container with a provided adapter object and the address of the iButton or 1-Wire device. |
|
OneWireContainer(DSPortAdapter sourceAdapter,
java.lang.String newAddress)
Create a container with a provided adapter object and the address of the iButton or 1-Wire device. |
Method Summary | |
void |
doSpeed()
Go to the specified speed for this container. |
DSPortAdapter |
getAdapter()
Retrieve the port adapter object used to create this container. |
byte[] |
getAddress()
Get the 1-Wire Network address of this device as an array of bytes. |
long |
getAddressAsLong()
Get this device's 1-Wire Network address as a long. |
java.lang.String |
getAddressAsString()
Get this device's 1-Wire Network address as a String. |
java.lang.String |
getAlternateNames()
Retrieve the alternate Dallas Semiconductor part numbers or names. |
java.lang.String |
getDescription()
Retrieve a short description of the function of the iButton type. |
int |
getMaxSpeed()
Returns the maximum speed this iButton or 1-Wire device can communicate at. |
java.util.Enumeration |
getMemoryBanks()
Return an enumeration of memory banks. |
java.lang.String |
getName()
Retrieve the Dallas Semiconductor part number of the iButton as a string. |
boolean |
isAlarming()
Verifies that the iButton or 1-Wire device specified is present on the 1-Wire Network and in an alarm state. |
boolean |
isPresent()
Verifies that the iButton or 1-Wire device specified is present on the 1-Wire Network. |
void |
setSpeed(int newSpeed,
boolean fallBack)
This method takes an int representing the speed of data transfer on the 1-Wire Network. |
void |
setupContainer(DSPortAdapter sourceAdapter,
byte[] newAddress)
Provide this container the adapter object used to access this device and provide the address of this iButton or 1-Wire device. |
void |
setupContainer(DSPortAdapter sourceAdapter,
long newAddress)
Provide this container the adapter object used to access this device and provide the address of this iButton or 1-Wire device. |
void |
setupContainer(DSPortAdapter sourceAdapter,
java.lang.String newAddress)
Provide this container the adapter object used to access this device and provide the address of this iButton or 1-Wire device. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OneWireContainer()
public OneWireContainer(DSPortAdapter sourceAdapter, byte[] newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire devicepublic OneWireContainer(DSPortAdapter sourceAdapter, long newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire devicepublic OneWireContainer(DSPortAdapter sourceAdapter, java.lang.String newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire deviceMethod Detail |
public void setupContainer(DSPortAdapter sourceAdapter, byte[] newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire devicepublic void setupContainer(DSPortAdapter sourceAdapter, long newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire devicepublic void setupContainer(DSPortAdapter sourceAdapter, java.lang.String newAddress)
sourceAdapter
- adapter object required to communicate with
this iButton.newAddress
- address of this 1-Wire devicepublic DSPortAdapter getAdapter()
public java.lang.String getName()
public java.lang.String getAlternateNames()
String
representation of the alternate names.public java.lang.String getDescription()
String
representation of the function description.public void setSpeed(int newSpeed, boolean fallBack)
speed
- newSpeed
- fallBack
- boolean indicating it is OK to fall back to a slower
speed if true.public int getMaxSpeed()
public byte[] getAddress()
public java.lang.String getAddressAsString()
String
representation of the iButton addresspublic long getAddressAsLong()
String
representation of the iButton addresspublic java.util.Enumeration getMemoryBanks()
public boolean isPresent() throws OneWireIOException, OneWireException
true
if device present on the 1-Wire Network.OneWireIOException
- OneWireException
- public boolean isAlarming() throws OneWireIOException, OneWireException
true
if device present and in alarm condition.OneWireIOException
- OneWireException
- public void doSpeed() throws OneWireIOException, OneWireException
OneWireIOException
- WHEN selected speed fails and fallback
is falseOneWireException
- WHEN hypterdrive is selected speed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |