|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dalsemi.onewire.container.MemoryBankSHAEE
Memory bank class for the DS1961S/DS2432.
Field Summary | |
static byte |
READ_AUTH_PAGE
Read Authenticate Page |
static byte |
READ_MEMORY
Read Memory Command |
Constructor Summary | |
MemoryBankSHAEE(OneWireContainer33 ibutton,
MemoryBankScratchSHAEE scratch)
Memory bank constructor. |
Method Summary | |
void |
checkSpeed()
Check the device speed if has not been done before or if an error was detected. |
void |
forceVerify()
Set the flag to indicate the next 'checkSpeed()' will force a speed set and verify 'doSpeed()'. |
String |
getBankDescription()
Query to see get a string description of the current memory bank. |
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 page length in bytes in current memory bank. |
int |
getSize()
Query to get the memory bank size in bytes. |
int |
getStartPhysicalAddress()
Query to get the starting physical address of this bank. |
boolean |
hasExtraInfo()
Checks to see if this memory bank's pages deliver extra information outside of the normal data space, when read. |
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()
Deprecated. As of 1-Wire API 0.01, replaced by hasExtraInfo() |
boolean |
isGeneralPurposeMemory()
Query to see if the current memory bank is general purpose user memory. |
boolean |
isNonVolatile()
Query to see if current memory bank non-volatile. |
boolean |
isReadOnly()
Query to see if current memory bank is read only. |
boolean |
isReadWrite()
Query to see if current memory bank is read/write. |
boolean |
isWriteOnce()
Query to see if current memory bank is write write once such as with EPROM technology. |
boolean |
needsPowerDelivery()
Query to see if current memory bank pages need the adapter to have a 'PowerDelivery' feature in order to write to the memory. |
boolean |
needsProgramPulse()
Query to see if current memory bank pages need the adapter to have a 'ProgramPulse' in order to write to the memory. |
void |
read(int startAddr,
boolean readContinue,
byte[] readBuf,
int offset,
int len)
Read memory in the current bank with no CRC checking (device or data). |
boolean |
readAuthenticatedPage(int page,
byte[] data,
int dataStart,
byte[] extra_info,
int extraStart)
Reads authenticated page. |
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 |
setEPROM()
Sets the EPROM mode for this page. |
void |
setWriteVerification(boolean doReadVerf)
Set the write verification for the 'write()' method. |
void |
write(int startAddr,
byte[] writeBuf,
int offset,
int len)
Write memory in the current bank. |
void |
writePagePacket(int page,
byte[] writeBuf,
int offset,
int len)
Write a Universal Data Packet. |
void |
writeprotect()
Write protect the memory bank. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte READ_MEMORY
public static final byte READ_AUTH_PAGE
Constructor Detail |
public MemoryBankSHAEE(OneWireContainer33 ibutton, MemoryBankScratchSHAEE scratch)
Method Detail |
public String getBankDescription()
getBankDescription
in interface MemoryBank
public boolean isGeneralPurposeMemory()
isGeneralPurposeMemory
in interface MemoryBank
public boolean isReadWrite()
isReadWrite
in interface MemoryBank
public boolean isWriteOnce()
isWriteOnce
in interface MemoryBank
public boolean isReadOnly()
isReadOnly
in interface MemoryBank
public boolean isNonVolatile()
isNonVolatile
in interface MemoryBank
public boolean needsProgramPulse()
needsProgramPulse
in interface MemoryBank
public boolean needsPowerDelivery()
needsPowerDelivery
in interface MemoryBank
public int getStartPhysicalAddress()
getStartPhysicalAddress
in interface MemoryBank
public int getSize()
getSize
in interface MemoryBank
public void setWriteVerification(boolean doReadVerf)
setWriteVerification
in interface MemoryBank
doReadVerf
- true (default) verify write in 'write'
false, don't verify write (used on
Write-Once bit manipulation)public int getNumberPages()
getNumberPages
in interface PagedMemoryBank
public int getPageLength()
getPageLength
in interface PagedMemoryBank
public boolean hasPageAutoCRC()
hasPageAutoCRC
in interface PagedMemoryBank
public boolean haveExtraInfo()
hasExtraInfo()
haveExtraInfo
in interface PagedMemoryBank
public boolean hasExtraInfo()
readPage
,
readPageCRC
, and
readPagePacket
.hasExtraInfo
in interface PagedMemoryBank
true
if reading the this memory bank's
pages provides extra informationreadPage(extra)
,
readPageCRC(extra)
,
readPagePacket(extra)
public int getExtraInfoLength()
getExtraInfoLength
in interface PagedMemoryBank
public String getExtraInfoDescription()
getExtraInfoDescription
in interface PagedMemoryBank
public int getMaxPacketDataLength()
getMaxPacketDataLength
in interface PagedMemoryBank
public void read(int startAddr, boolean readContinue, byte[] readBuf, int offset, int len) throws OneWireIOException, OneWireException
read
in interface MemoryBank
startAddr
- starting address, relative to physical address for
this memory bank.readContinue
- if 'true' then device read is continued without
re-selecting. This can only be used if the new
read() 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 datalen
- length in bytes to readOneWireIOException
- OneWireException
- public void write(int startAddr, byte[] writeBuf, int offset, int len) throws OneWireIOException, OneWireException
write
in interface MemoryBank
startAddr
- starting address, relative to the starting physical address
of this memory bankwriteBuf
- byte array containing data to writeoffset
- offset into writeBuf to get datalen
- length in bytes to writeOneWireIOException
- OneWireException
- public void readPage(int page, boolean readContinue, byte[] readBuf, int offset) throws OneWireIOException, OneWireException
readPage
in interface PagedMemoryBank
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
readPage
in interface PagedMemoryBank
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
readPagePacket
in interface PagedMemoryBank
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
readPagePacket
in interface PagedMemoryBank
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
writePagePacket
in interface PagedMemoryBank
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
readPageCRC
in interface PagedMemoryBank
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
readPageCRC
in interface PagedMemoryBank
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
- public void writeprotect()
public void setEPROM()
public void checkSpeed() throws OneWireIOException, OneWireException
OneWireIOException
- OneWireException
- public boolean readAuthenticatedPage(int page, byte[] data, int dataStart, byte[] extra_info, int extraStart) throws OneWireException, OneWireIOException
page
- the page number in this bank to read from.data
- the data read from the addressextra_info
- the MAC calculated for this functionOneWireIOException
- OneWireException
- public void forceVerify()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |