1-Wire API for .NET Version 4.00
Public Member Functions | Public Attributes | Protected Attributes

MemoryBankScratchCRCPW Class Reference

Memory bank class for the Scratchpad section of NVRAM iButtons and 1-Wire devices with password protected memory pages. More...

Inherits com::dalsemi::onewire::container::MemoryBankScratchEx.

List of all members.

Public Member Functions

 MemoryBankScratchCRCPW (PasswordContainer ibutton)
 Memory bank contstuctor.
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.
void readScratchpad (byte[] readBuf, int offset, int len, byte[] extraInfo) throws OneWireIOException, OneWireException
 Read the scratchpad page of memory from a NVRAM device This method reads and returns the entire scratchpad after the byte offset regardless of the actual ending offset.
void copyScratchpad (int startAddr, int len) throws OneWireIOException, OneWireException
 Copy the scratchpad page to memory.
void writeScratchpad (int startAddr, byte[] writeBuf, int offset, int len) throws OneWireIOException, OneWireException
 Write to the scratchpad page of memory a NVRAM device.

Public Attributes

boolean enablePower = false
 Enable Provided Power for some Password checking.

Protected Attributes

PasswordContainer ibPass = null
 The Password container to acces the 8 byte passwords.

Detailed Description

Memory bank class for the Scratchpad section of NVRAM iButtons and 1-Wire devices with password protected memory pages.

Version:
1.00, 11 Aug 2002
Author:
SH

Constructor & Destructor Documentation

Memory bank contstuctor.

Requires reference to the OneWireContainer this memory bank resides on.


Member Function Documentation

void copyScratchpad ( int  startAddr,
int  len 
) throws OneWireIOException, OneWireException

Copy the scratchpad page to memory.

Parameters:
startAddrstarting address
lenlength in bytes that was written already
Exceptions:
OneWireIOException
OneWireException

Reimplemented from MemoryBankScratchEx.

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()'.

Parameters:
pagepage number to read
readContinueif '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.
readBufbyte array to put data read. Must have at least 'getMaxPacketDataLength()' elements.
offsetoffset into readBuf to place data
Exceptions:
OneWireIOException
OneWireException

Reimplemented from MemoryBankScratch.

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.

Parameters:
pagepage number to read
readContinueif '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.
readBufbyte array to put data read. Must have at least 'getMaxPacketDataLength()' elements.
offsetoffset into readBuf to place data
extraInfobyte array to put extra info read into
Exceptions:
OneWireIOException
OneWireException

Reimplemented from MemoryBankScratch.

void readScratchpad ( byte[]  readBuf,
int  offset,
int  len,
byte[]  extraInfo 
) throws OneWireIOException, OneWireException

Read the scratchpad page of memory from a NVRAM device This method reads and returns the entire scratchpad after the byte offset regardless of the actual ending offset.

Parameters:
readBufbyte array to place read data into length of array is always pageLength.
offsetoffset into readBuf to pug data
lenlength in bytes to read
extraInfobyte array to put extra info read into (TA1, TA2, e/s byte) length of array is always extraInfoLength. Can be 'null' if extra info is not needed.
Exceptions:
OneWireIOException
OneWireException

Reimplemented from MemoryBankScratch.

void writeScratchpad ( int  startAddr,
byte[]  writeBuf,
int  offset,
int  len 
) throws OneWireIOException, OneWireException

Write to the scratchpad page of memory a NVRAM device.

Parameters:
startAddrstarting address
writeBufbyte array containing data to write
offsetoffset into readBuf to place data
lenlength in bytes to write
Exceptions:
OneWireIOException
OneWireException

Reimplemented from MemoryBankScratchEx.


The documentation for this class was generated from the following file: