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

ScratchPad Interface Reference

Scratchpad interface for Memory banks that require it. More...

Inherited by MemoryBankScratch.

List of all members.

Public Member Functions

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 writeScratchpad (int startAddr, byte[] writeBuf, int offset, int len) throws OneWireIOException, OneWireException
 Write to the scratchpad page of memory a NVRAM device.
void copyScratchpad (int startAddr, int len) throws OneWireIOException, OneWireException
 Copy the scratchpad page to memory.
int getExtraInfoLength ()
 Query to get the length in bytes of extra information that is read when read a page in the current memory bank.
void checkSpeed () throws OneWireIOException, OneWireException
 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.

Detailed Description

Scratchpad interface for Memory banks that require it.

Version:
0.00, 28 Aug 2000
Author:
DS

Member Function Documentation

void checkSpeed ( ) throws OneWireIOException, OneWireException

Check the device speed if has not been done before or if an error was detected.

Exceptions:
OneWireIOException
OneWireException

Implemented in MemoryBankScratch.

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

Implemented in MemoryBankScratch, MemoryBankScratchCRCPW, MemoryBankScratchEE, MemoryBankScratchEx, and MemoryBankScratchSHAEE.

int getExtraInfoLength ( )

Query to get the length in bytes of extra information that is read when read a page in the current memory bank.

See 'hasExtraInfo()'.

Returns:
number of bytes in Extra Information read when reading pages in the current memory bank.

Implemented in 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

Implemented in MemoryBankScratch, MemoryBankScratchCRC, MemoryBankScratchCRCPW, and MemoryBankScratchSHAEE.

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

Implemented in MemoryBankScratch, MemoryBankScratchCRCPW, MemoryBankScratchEE, MemoryBankScratchEx, MemoryBankScratchSHA, and MemoryBankScratchSHAEE.


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