com.dalsemi.onewire.container
Interface OTPMemoryBank

All Superinterfaces:
MemoryBank, PagedMemoryBank

public interface OTPMemoryBank
extends PagedMemoryBank

Memory bank interface for iButtons (or 1-Wire devices) that have one-time-programmable features. This class should be implemented for each applicable memory bank.

Version:
0.00, 28 Aug 2000

Method Summary
 boolean canLockPage()
          Query to see if current memory bank pages can be locked.
 boolean canLockRedirectPage()
          Query to see if current memory bank pages can be locked from being redirected.
 boolean canRedirectPage()
          Query to see if current memory bank pages can be redirected to another pages.
 boolean isPageLocked(int page)
          Query to see if the specified page is locked.
 int isPageRedirected(int page)
          Query to see if the specified page is redirected.
 boolean isRedirectPageLocked(int page)
          Query to see if the specified page has redirection locked.
 void lockPage(int page)
          Lock the specifed page in the current memory bank.
 void lockRedirectPage(int page)
          Lock the redirection option for the specifed page in the current memory bank.
 void redirectPage(int page, int newPage)
          Redirect the specifed page in the current memory bank to a new page.
 
Methods inherited from interface com.dalsemi.onewire.container.PagedMemoryBank
getExtraInfoDescription, getExtraInfoLength, getMaxPacketDataLength, getNumberPages, getPageLength, hasPageAutoCRC, haveExtraInfo, readPage, readPage, readPageCRC, readPageCRC, readPagePacket, readPagePacket, writePagePacket
 
Methods inherited from interface com.dalsemi.onewire.container.MemoryBank
getBankDescription, getSize, getStartPhysicalAddress, isGeneralPurposeMemory, isNonVolatile, isReadOnly, isReadWrite, isWriteOnce, needsPowerDelivery, needsProgramPulse, read, setWriteVerification, write
 

Method Detail

canRedirectPage

public boolean canRedirectPage()
Query to see if current memory bank pages can be redirected to another pages. This is mostly used in Write-Once memory to provide a means to update.
Returns:
'true' if current memory bank pages can be redirected to a new page.

canLockPage

public boolean canLockPage()
Query to see if current memory bank pages can be locked. A locked page would prevent any changes to the memory.
Returns:
'true' if current memory bank pages can be redirected to a new page.

canLockRedirectPage

public boolean canLockRedirectPage()
Query to see if current memory bank pages can be locked from being redirected. This would prevent a Write-Once memory from being updated.
Returns:
'true' if current memory bank pages can be locked from being redirected to a new page.

lockPage

public void lockPage(int page)
              throws OneWireIOException,
                     OneWireException
Lock the specifed page in the current memory bank. Not supported by all devices. See the method 'canLockPage()'.
Parameters:
page - number of page to lock
Throws:
OneWireIOException -  
OneWireException -  

isPageLocked

public boolean isPageLocked(int page)
                     throws OneWireIOException,
                            OneWireException
Query to see if the specified page is locked. See the method 'canLockPage()'.
Parameters:
page - number of page to see if locked
Returns:
'true' if page locked.
Throws:
OneWireIOException -  
OneWireException -  

redirectPage

public void redirectPage(int page,
                         int newPage)
                  throws OneWireIOException,
                         OneWireException
Redirect the specifed page in the current memory bank to a new page. Not supported by all devices. See the method 'canRedirectPage()'.
Parameters:
page - number of page to redirect
newPage - new page number to redirect to
Throws:
OneWireIOException -  
OneWireException -  

isPageRedirected

public int isPageRedirected(int page)
                     throws OneWireIOException,
                            OneWireException
Query to see if the specified page is redirected. Not supported by all devices. See the method 'canRedirectPage()'.
Parameters:
page - number of page check for redirection
Returns:
return the new page number or 0 if not redirected
Throws:
OneWireIOException -  
OneWireException -  

lockRedirectPage

public void lockRedirectPage(int page)
                      throws OneWireIOException,
                             OneWireException
Lock the redirection option for the specifed page in the current memory bank. Not supported by all devices. See the method 'canLockRedirectPage()'.
Parameters:
page - number of page to redirect
Throws:
OneWireIOException -  
OneWireException -  

isRedirectPageLocked

public boolean isRedirectPageLocked(int page)
                             throws OneWireIOException,
                                    OneWireException
Query to see if the specified page has redirection locked. Not supported by all devices. See the method 'canRedirectPage()'.
Parameters:
page - number of page check for locked redirection
Returns:
return 'true' if redirection is locked for this page
Throws:
OneWireIOException -  
OneWireException -