Interface OTPMemoryBank

    • Method Detail

      • canRedirectPage

        boolean canRedirectPage()
        Checks to see if this memory bank has pages that can be redirected to a new page. This is used in Write-Once memory to provide a means to update.
        Returns:
        true if this memory bank pages can be redirected to a new page
        See Also:
        redirectPage, getRedirectedPage
      • canLockPage

        boolean canLockPage()
        Checks to see if this memory bank has pages that can be locked. A locked page would prevent any changes to it's contents.
        Returns:
        true if this memory bank has pages that can be locked
        See Also:
        lockPage, isPageLocked
      • canLockRedirectPage

        boolean canLockRedirectPage()
        Checks to see if this memory bank has pages that can be locked from being redirected. This would prevent a Write-Once memory from being updated.
        Returns:
        true if this memory bank has pages that can be locked from being redirected to a new page
        See Also:
        lockRedirectPage, isRedirectPageLocked
      • lockPage

        void lockPage​(int page)
               throws OneWireIOException,
                      OneWireException
        Locks the specified page in this memory bank. Not supported by all devices.
        Parameters:
        page - number of page to lock
        Throws:
        OneWireIOException - on a 1-Wire communication error such as no device present or a read back verification fails. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
        OneWireException - on a communication or setup error with the 1-Wire adapter. It will also be thrown if the device needs 'program' voltage and the adapter used by this device does not support it.
        See Also:
        isPageLocked, canLockPage, DSPortAdapter.canProgram()
      • isPageLocked

        boolean isPageLocked​(int page)
                      throws OneWireIOException,
                             OneWireException
        Checks to see if the specified page is locked.
        Parameters:
        page - page to check
        Returns:
        true if page is locked
        Throws:
        OneWireIOException - on a 1-Wire communication error such as no device present or a CRC read from the device is incorrect. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
        OneWireException - on a communication or setup error with the 1-Wire adapter.
        See Also:
        lockPage, canLockPage
      • redirectPage

        void redirectPage​(int page,
                          int newPage)
                   throws OneWireIOException,
                          OneWireException
        Redirects the specified page to a new page. Not supported by all devices.
        Parameters:
        page - number of page to redirect
        newPage - new page number to redirect to
        Throws:
        OneWireIOException - on a 1-Wire communication error such as no device present or a CRC read from the device is incorrect. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
        OneWireException - on a communication or setup error with the 1-Wire adapter. It will also be thrown if the device needs 'program' voltage and the adapter used by this device does not support it.
        See Also:
        canRedirectPage, getRedirectedPage, DSPortAdapter.canProgram()
      • isPageRedirected

        int isPageRedirected​(int page)
                      throws OneWireIOException,
                             OneWireException
        Deprecated.
        As of 1-Wire API 0.01, replaced by getRedirectedPage(int)
        Checks to see if the specified page is redirected. Not supported by all devices.
        Parameters:
        page - page to check for redirection
        Returns:
        the new page number or 0 if not redirected
        Throws:
        OneWireIOException - on a 1-Wire communication error such as no device present or a CRC read from the device is incorrect. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
        OneWireException - on a communication or setup error with the 1-Wire adapter.
        See Also:
        canRedirectPage, redirectPage
      • getRedirectedPage

        int getRedirectedPage​(int page)
                       throws OneWireIOException,
                              OneWireException
        Gets the page redirection of the specified page. Not supported by all devices.
        Parameters:
        page - page to check for redirection
        Returns:
        the new page number or 0 if not redirected
        Throws:
        OneWireIOException - on a 1-Wire communication error such as no device present or a CRC read from the device is incorrect. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
        OneWireException - on a communication or setup error with the 1-Wire adapter.
        Since:
        1-Wire API 0.01
        See Also:
        canRedirectPage, redirectPage
      • lockRedirectPage

        void lockRedirectPage​(int page)
                       throws OneWireIOException,
                              OneWireException
        Locks the redirection of the specified page. Not supported by all devices.
        Parameters:
        page - page to redirect
        Throws:
        OneWireIOException - on a 1-Wire communication error such as no device present or a CRC read from the device is incorrect. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
        OneWireException - on a communication or setup error with the 1-Wire adapter. It will also be thrown if the device needs 'program' voltage and the adapter used by this device does not support it.
        See Also:
        canLockRedirectPage, isRedirectPageLocked, DSPortAdapter.canProgram()
      • isRedirectPageLocked

        boolean isRedirectPageLocked​(int page)
                              throws OneWireIOException,
                                     OneWireException
        Checks to see if the specified page has redirection locked. Not supported by all devices.
        Parameters:
        page - page to check for locked redirection
        Returns:
        true if redirection is locked for this page
        Throws:
        OneWireIOException - on a 1-Wire communication error such as no device present or a CRC read from the device is incorrect. This could be caused by a physical interruption in the 1-Wire Network due to shorts or a newly arriving 1-Wire device issuing a 'presence pulse'.
        OneWireException - on a communication or setup error with the 1-Wire adapter.
        See Also:
        canLockRedirectPage, lockRedirectPage