|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.dalsemi.onewire.container.OneWireContainer
|
+--com.dalsemi.onewire.container.OneWireContainer1D
1-Wire container for 512 byte memory with external counters, DS2423. This container encapsulates the functionality of the 1-Wire family type 1D (hex)
This 1-Wire device is primarily used as a counter with memory.
Each counter is assosciated with a memory page. The counters for pages
12 and 13 are incremented with a write to the memory on that page. The counters
for pages 14 and 15 are externally triggered. See the method
readCounter to read a counter directly. Note that the
the counters may also be read with the PagedMemoryBank interface
as 'extra' information on a page read.
The memory can be accessed through the objects that are returned
from the getMemoryBanks method.
MemoryBank,
PagedMemoryBank
MemoryBank,
PagedMemoryBank
MemoryBank,
PagedMemoryBank
MemoryBank,
PagedMemoryBank
System.out.print("Counter on page 14: " + owd.readCounter(14));
System.out.print("Counter on page 15: " + owd.readCounter(15));
OneWireContainer
to enumerate the MemoryBanks.
MemoryBank and
PagedMemoryBank
for bank specific operations.
MemoryBank,
PagedMemoryBank| Constructor Summary | |
OneWireContainer1D()
Create an empty container that is not complete until after a call to setupContainer. |
|
OneWireContainer1D(DSPortAdapter sourceAdapter,
byte[] newAddress)
Create a container with the provided adapter instance and the address of the iButton or 1-Wire device. |
|
OneWireContainer1D(DSPortAdapter sourceAdapter,
long newAddress)
Create a container with the provided adapter instance and the address of the iButton or 1-Wire device. |
|
OneWireContainer1D(DSPortAdapter sourceAdapter,
String newAddress)
Create a container with the provided adapter instance and the address of the iButton or 1-Wire device. |
|
| Method Summary | |
String |
getDescription()
Get a short description of the function of this iButton or 1-Wire Device type. |
int |
getMaxSpeed()
Get the maximum speed this iButton or 1-Wire device can communicate at. |
Enumeration |
getMemoryBanks()
Get an enumeration of memory bank instances that implement one or more of the following interfaces: MemoryBank,
PagedMemoryBank,
and OTPMemoryBank. |
String |
getName()
Get the Dallas Semiconductor part number of the iButton or 1-Wire Device as a string. |
long |
readCounter(int counterPage)
Read the counter value associated with a page on this 1-Wire Device. |
| Methods inherited from class com.dalsemi.onewire.container.OneWireContainer |
doSpeed, getAdapter, getAddress, getAddressAsLong, getAddressAsString, getAlternateNames, isAlarming, isPresent, setSpeed, setupContainer, setupContainer, setupContainer |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public OneWireContainer1D()
setupContainer. This is one of the methods to construct a container. The others are through creating a OneWireContainer with parameters.
super.setupContainer()
public OneWireContainer1D(DSPortAdapter sourceAdapter,
byte[] newAddress)
This is one of the methods to construct a container. The other is through creating a OneWireContainer with NO parameters.
sourceAdapter - adapter instance used to communicate with
this iButtonnewAddress - Address
of this 1-Wire deviceOneWireContainer1D,
utils.Address
public OneWireContainer1D(DSPortAdapter sourceAdapter,
long newAddress)
This is one of the methods to construct a container. The other is through creating a OneWireContainer with NO parameters.
sourceAdapter - adapter instance used to communicate with
this 1-Wire devicenewAddress - Address
of this 1-Wire deviceOneWireContainer1D,
utils.Address
public OneWireContainer1D(DSPortAdapter sourceAdapter,
String newAddress)
This is one of the methods to construct a container. The other is through creating a OneWireContainer with NO parameters.
sourceAdapter - adapter instance used to communicate with
this 1-Wire devicenewAddress - Address
of this 1-Wire deviceOneWireContainer1D,
utils.Address| Method Detail |
public String getName()
getName in class OneWireContainerpublic String getDescription()
getDescription in class OneWireContainerpublic int getMaxSpeed()
getMaxSpeed in class OneWireContainersuper.setSpeed,
DSPortAdapter.SPEED_REGULAR,
DSPortAdapter.SPEED_OVERDRIVE,
DSPortAdapter.SPEED_FLEXpublic Enumeration getMemoryBanks()
MemoryBank,
PagedMemoryBank,
and OTPMemoryBank.getMemoryBanks in class OneWireContainerEnumeration of memory banks
public long readCounter(int counterPage)
throws OneWireIOException,
OneWireException
counterPage - page number of the counter to readOneWireIOException - on a 1-Wire communication error such as
no 1-Wire device present. This could be
caused by a physical interruption in the 1-Wire Network due to
shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.OneWireException - on a communication or setup error with the 1-Wire
adapter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||