|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Paged Memory bank interface for iButtons (or 1-Wire devices) with page based memory. This class should be implemented for each applicable memory bank.
Method Summary | |
java.lang.String |
getExtraInfoDescription()
Query to get a string description of what is contained in the Extra Informationed return when reading pages in the current memory bank. |
int |
getExtraInfoLength()
Query to get the length in bytes of extra information that is read when read a page in the current memory bank. |
int |
getMaxPacketDataLength()
Query to get Maximum data page length in bytes for a packet read or written in the current memory bank. |
int |
getNumberPages()
Query to get the number of pages in current memory bank. |
int |
getPageLength()
Query to get raw page length in bytes in current memory bank. |
boolean |
hasPageAutoCRC()
Query to see if current memory bank pages can be read with the contents being verified by a device generated CRC. |
boolean |
haveExtraInfo()
Query to see if current memory bank pages when read deliver extra information outside of the normal data space. |
void |
readPage(int page,
boolean readContinue,
byte[] readBuf,
int offset)
Read page in the current bank with no CRC checking (device or data). |
void |
readPage(int page,
boolean readContinue,
byte[] readBuf,
int offset,
byte[] extraInfo)
Read page with extra information in the current bank with no CRC checking (device or data). |
void |
readPageCRC(int page,
boolean readContinue,
byte[] readBuf,
int offset)
Read a complete memory page with CRC verification provided by the device. |
void |
readPageCRC(int page,
boolean readContinue,
byte[] readBuf,
int offset,
byte[] extraInfo)
Read a complete memory page with CRC verification provided by the device with extra information. |
int |
readPagePacket(int page,
boolean readContinue,
byte[] readBuf,
int offset)
Read a Universal Data Packet. |
int |
readPagePacket(int page,
boolean readContinue,
byte[] readBuf,
int offset,
byte[] extraInfo)
Read a Universal Data Packet and extra information. |
void |
writePagePacket(int page,
byte[] writeBuf,
int offset,
int len)
Write a Universal Data Packet. |
Methods inherited from interface com.dalsemi.onewire.container.MemoryBank |
getBankDescription, getSize, getStartPhysicalAddress, isGeneralPurposeMemory, isNonVolatile, isReadOnly, isReadWrite, isWriteOnce, needsPowerDelivery, needsProgramPulse, read, setWriteVerification, write |
Method Detail |
public int getNumberPages()
public int getPageLength()
public int getMaxPacketDataLength()
public boolean hasPageAutoCRC()
public boolean haveExtraInfo()
public int getExtraInfoLength()
public java.lang.String getExtraInfoDescription()
public void readPage(int page, boolean readContinue, byte[] readBuf, int offset) throws OneWireIOException, OneWireException
page
- page number to read packet fromreadContinue
- if 'true' then device read is continued without
re-selecting. This can only be used if the new
readPage() continious where the last one
led off and it is inside a
'beginExclusive/endExclusive' block.readBuf
- byte array to place read data intooffset
- offset into readBuf to place dataOneWireIOException
- OneWireException
- public void readPage(int page, boolean readContinue, byte[] readBuf, int offset, byte[] extraInfo) throws OneWireIOException, OneWireException
page
- page number to read packet fromreadContinue
- if 'true' then device read is continued without
re-selecting. This can only be used if the new
readPage() continious where the last one
led off and it is inside a
'beginExclusive/endExclusive' block.readBuf
- byte array to place read data intooffset
- offset into readBuf to place dataextraInfo
- byte array to put extra info read intoOneWireIOException
- OneWireException
- public int readPagePacket(int page, boolean readContinue, byte[] readBuf, int offset) throws OneWireIOException, OneWireException
page
- page number to read packet fromreadContinue
- if 'true' then device read is continued without
re-selecting. This can only be used if the new
readPagePacket() continious where the last one
stopped and it is inside a
'beginExclusive/endExclusive' block.readBuf
- byte array to put data read. Must have at least
'getMaxPacketDataLength()' elements.offset
- offset into readBuf to place dataOneWireIOException
- OneWireException
- public int readPagePacket(int page, boolean readContinue, byte[] readBuf, int offset, byte[] extraInfo) throws OneWireIOException, OneWireException
page
- page number to read packet fromreadContinue
- if 'true' then device read is continued without
re-selecting. This can only be used if the new
readPagePacket() continious where the last one
stopped and it is inside a
'beginExclusive/endExclusive' block.readBuf
- byte array to put data read. Must have at least
'getMaxPacketDataLength()' elements.offset
- offset into readBuf to place dataextraInfo
- byte array to put extra info read intoOneWireIOException
- OneWireException
- public void writePagePacket(int page, byte[] writeBuf, int offset, int len) throws OneWireIOException, OneWireException
page
- page number to write packet towriteBuf
- data byte array to writeoffset
- offset into writeBuf where data to write islen
- number of bytes to writeOneWireIOException
- OneWireException
- public void readPageCRC(int page, boolean readContinue, byte[] readBuf, int offset) throws OneWireIOException, OneWireException
page
- page number to readreadContinue
- if 'true' then device read is continued without
re-selecting. This can only be used if the new
readPagePacket() continious where the last one
stopped and it is inside a
'beginExclusive/endExclusive' block.readBuf
- byte array to put data read. Must have at least
'getMaxPacketDataLength()' elements.offset
- offset into readBuf to place dataOneWireIOException
- OneWireException
- public void readPageCRC(int page, boolean readContinue, byte[] readBuf, int offset, byte[] extraInfo) throws OneWireIOException, OneWireException
page
- page number to readreadContinue
- if 'true' then device read is continued without
re-selecting. This can only be used if the new
readPagePacket() continious where the last one
stopped and it is inside a
'beginExclusive/endExclusive' block.readBuf
- byte array to put data read. Must have at least
'getMaxPacketDataLength()' elements.offset
- offset into readBuf to place dataextraInfo
- byte array to put extra info read intoOneWireIOException
- OneWireException
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |