Inherited by MemoryBankNVCRCPW.
Public Member Functions | |
MemoryBankNVCRC (OneWireContainer ibutton, ScratchPad scratch) | |
Memory bank contstuctor. | |
void | readPage (int page, boolean readContinue, byte[] readBuf, int offset) throws OneWireIOException, OneWireException |
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) throws OneWireIOException, OneWireException |
Read page with extra information in the current bank with no CRC checking (device or data). | |
int | readPagePacket (int page, boolean readContinue, byte[] readBuf, int offset, byte[] extraInfo) throws OneWireIOException, OneWireException |
Read a Universal Data Packet and extra information. | |
void | readPageCRC (int page, boolean readContinue, byte[] readBuf, int offset) throws OneWireIOException, OneWireException |
Read a complete memory page with CRC verification provided by the device. | |
void | readPageCRC (int page, boolean readContinue, byte[] readBuf, int offset, byte[] extraInfo) throws OneWireIOException, OneWireException |
Read a complete memory page with CRC verification provided by the device with extra information. | |
Static Public Attributes | |
static final byte | READ_PAGE_WITH_CRC = ( byte ) 0xA5 |
Write Scratchpad Command. | |
Protected Member Functions | |
void | readPageCRC (int page, boolean readContinue, byte[] readBuf, int offset, byte[] extraInfo, int extraLength) throws OneWireIOException, OneWireException |
Read a complete memory page with CRC verification provided by the device with extra information. | |
Protected Attributes | |
boolean | readContinuePossible |
Flag to indicate if read-continue is possible. | |
int | numVerifyBytes |
Number of extra verify byte in the read CRC page. |
MemoryBankNVCRC | ( | OneWireContainer | ibutton, | |
ScratchPad | scratch | |||
) |
Memory bank contstuctor.
Requires reference to the OneWireContainer this memory bank resides on.
void readPage | ( | int | page, | |
boolean | readContinue, | |||
byte[] | readBuf, | |||
int | offset | |||
) | throws OneWireIOException, OneWireException |
Read page in the current bank with no CRC checking (device or data).
The resulting data from this API may or may not be what is on the 1-Wire device. It is recommends that the data contain some kind of checking (CRC) like in the readPagePacket() method or have the 1-Wire device provide the CRC as in readPageCRC(). readPageCRC() however is not supported on all memory types, see 'hasPageAutoCRC()'. If neither is an option then this method could be called more then once to at least verify that the same thing is read consistantly.
page | page number to read packet from | |
readContinue | 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 into | |
offset | offset into readBuf to place data |
OneWireIOException | ||
OneWireException |
Reimplemented from MemoryBankNV.
void readPage | ( | int | page, | |
boolean | readContinue, | |||
byte[] | readBuf, | |||
int | offset, | |||
byte[] | extraInfo | |||
) | throws OneWireIOException, OneWireException |
Read page with extra information in the current bank with no CRC checking (device or data).
The resulting data from this API may or may not be what is on the 1-Wire device. It is recommends that the data contain some kind of checking (CRC) like in the readPagePacket() method or have the 1-Wire device provide the CRC as in readPageCRC(). readPageCRC() however is not supported on all memory types, see 'hasPageAutoCRC()'. If neither is an option then this method could be called more then once to at least verify that the same thing is read consistantly. See the method 'hasExtraInfo()' for a description of the optional extra information some devices have.
page | page number to read packet from | |
readContinue | 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 into | |
offset | offset into readBuf to place data | |
extraInfo | byte array to put extra info read into |
OneWireIOException | ||
OneWireException |
Reimplemented from MemoryBankNV.
int readPagePacket | ( | int | page, | |
boolean | readContinue, | |||
byte[] | readBuf, | |||
int | offset, | |||
byte[] | extraInfo | |||
) | throws OneWireIOException, OneWireException |
Read a Universal Data Packet and extra information.
See the method 'readPagePacket()' for a description of the packet structure. See the method 'hasExtraInfo()' for a description of the optional extra information some devices have.
page | page number to read packet from | |
readContinue | 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 data | |
extraInfo | byte array to put extra info read into |
OneWireIOException | ||
OneWireException |
Reimplemented from MemoryBankNV.
void readPageCRC | ( | int | page, | |
boolean | readContinue, | |||
byte[] | readBuf, | |||
int | offset | |||
) | throws OneWireIOException, OneWireException |
Read a complete memory page with CRC verification provided by the device.
Not supported by all devices. See the method 'hasPageAutoCRC()'.
page | page number to read | |
readContinue | 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 data |
OneWireIOException | ||
OneWireException |
Reimplemented from MemoryBankNV.
void readPageCRC | ( | int | page, | |
boolean | readContinue, | |||
byte[] | readBuf, | |||
int | offset, | |||
byte[] | extraInfo | |||
) | throws OneWireIOException, OneWireException |
Read a complete memory page with CRC verification provided by the device with extra information.
Not supported by all devices. See the method 'hasPageAutoCRC()'. See the method 'hasExtraInfo()' for a description of the optional extra information.
page | page number to read | |
readContinue | 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 data | |
extraInfo | byte array to put extra info read into |
OneWireIOException | ||
OneWireException |
Reimplemented from MemoryBankNV.
Reimplemented in MemoryBankNVCRCPW.
void readPageCRC | ( | int | page, | |
boolean | readContinue, | |||
byte[] | readBuf, | |||
int | offset, | |||
byte[] | extraInfo, | |||
int | extraLength | |||
) | throws OneWireIOException, OneWireException [protected] |
Read a complete memory page with CRC verification provided by the device with extra information.
Not supported by all devices. If not extra information available then just call with extraLength=0.
page | page number to read | |
readContinue | 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 data | |
extraInfo | byte array to put extra info read into | |
extraLength | length of extra information |
OneWireIOException | ||
OneWireException |
Reimplemented in MemoryBankNVCRCPW.