com.datecs.rfid

## Class ISO15693Card

- java.lang.Object
- - com.datecs.rfid.ContactlessCard
  - - com.datecs.rfid.ISO15693Card

-     public class ISO15693Card
      extends ContactlessCard

  A class that represents ISO15693 cards.

- - ### Field Summary

    - ### Fields inherited from class com.datecs.rfid.ContactlessCard

      `afi, atqa, blockSize, capacity, CARD_EPASSPORT, CARD_FELICA, CARD_ISO14443A, CARD_ISO14443B, CARD_ISO15693, CARD_MIFARE_CLASSIC_1K, CARD_MIFARE_CLASSIC_4K, CARD_MIFARE_DESFIRE, CARD_MIFARE_MINI, CARD_MIFARE_PLUS, CARD_MIFARE_ULTRALIGHT, CARD_MIFARE_ULTRALIGHT_C, CARD_PAYMENT, CARD_PICOPASS_14443B, CARD_PICOPASS_15693, CARD_ST_SRI, CARD_UNKNOWN, channel, dsfid, hyatt64Card, maxBlocks, mModule, sak, type, uid`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ISO15693Card(RC663 module)` Constructs a new instance of this class.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `deinitialise()` Deinitialise card.
    `byte[]` | `getBlocksSecurityStatus(int startBlock, int blocks)` Reads the security status of one more more blocks from ISO 15693 card.
    `boolean` | `initialize()` Initialize card.
    `void` | `lockAFI()` Locks ISO 15693 AFI preventing further changes.
    `void` | `lockBlock(int block)` Locks a single ISO 15693 card block.
    `void` | `lockDSFID()` Locks ISO 15693 card DSFID preventing further changes.
    `byte[]` | `read(int startBlock, int blocks)` Reads one more more blocks of data from ISO 15693 card.
    `int` | `write(int startBlock, byte[] data)` Writes one more more blocks of data to ISO 15693 card.
    `void` | `writeAFI(byte afi)` Changes ISO 15693 card AFI.
    `void` | `writeDSFID(byte dsfid)` Changes ISO 15693 card DSFID.

    - ### Methods inherited from class com.datecs.rfid.ContactlessCard

      `getModule, getTypeName, waitRemove`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ISO15693Card

          public ISO15693Card(RC663 module)

      Constructs a new instance of this class.
      Parameters:
        `module` - The instance of `RC663` module.

  - ### Method Detail

    - #### deinitialise

          protected boolean deinitialise()
                                  throws java.io.IOException

      Description copied from class: `ContactlessCard`
      Deinitialise card.
      Specified by:
        `deinitialise` in class `ContactlessCard`
      Returns:
        on success returns true, otherwise returns false.
      Throws:
        `java.io.IOException` - if an I/O error occurs.

    - #### initialize

          public boolean initialize()
                             throws java.io.IOException

      Initialize card.
      Specified by:
        `initialize` in class `ContactlessCard`
      Returns:
        On success returns true, otherwise returns false.
      Throws:
        `java.io.IOException` - if an I/O error occurs.

    - #### lockBlock

          public void lockBlock(int block)
                         throws java.io.IOException,
                                RFIDException

      Locks a single ISO 15693 card block.

      Locked blocks cannot be written upon anymore.

      Parameters:
        `block` - The block index to lock.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `RFIDException` - if an RF663 error occurs.

    - #### read

          public byte[] read(int startBlock,
                             int blocks)
                      throws java.io.IOException,
                             RFIDException

      Reads one more more blocks of data from ISO 15693 card.
      Parameters:
        `startBlock` - The starting block to read from.
        `blocks` - The number of bytes to read, this must be multiple of block size.
      Returns:
        The data.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `RFIDException` - if an RF663 error occurs.

    - #### write

          public int write(int startBlock,
                           byte[] data)
                    throws java.io.IOException,
                           RFIDException

      Writes one more more blocks of data to ISO 15693 card.
      Parameters:
        `startBlock` - The starting block to write to.
        `data` - The data to write, it must be multiple of block size.
      Returns:
        The number of bytes written.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `RFIDException` - if an RF663 error occurs.

    - #### writeAFI

          public void writeAFI(byte afi)
                        throws java.io.IOException,
                               RFIDException

      Changes ISO 15693 card AFI.
      Parameters:
        `afi` - New AFI value.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `RFIDException` - if an RF663 error occurs.

    - #### lockAFI

          public void lockAFI()
                       throws java.io.IOException,
                              RFIDException

      Locks ISO 15693 AFI preventing further changes.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `RFIDException` - if an RF663 error occurs.

    - #### writeDSFID

          public void writeDSFID(byte dsfid)
                          throws java.io.IOException,
                                 RFIDException

      Changes ISO 15693 card DSFID.
      Parameters:
        `dsfid` - The new DSFID value.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `RFIDException` - if an RF663 error occurs.

    - #### lockDSFID

          public void lockDSFID()
                         throws java.io.IOException,
                                RFIDException

      Locks ISO 15693 card DSFID preventing further changes.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `RFIDException` - if an RF663 error occurs.

    - #### getBlocksSecurityStatus

          public byte[] getBlocksSecurityStatus(int startBlock,
                                                int blocks)
                                         throws java.io.IOException,
                                                RFIDException

      Reads the security status of one more more blocks from ISO 15693 card.
      Parameters:
        `startBlock` - The starting block to read from.
        `blocks` - The number of blocks to get the security status.
      Returns:
        The data.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `RFIDException` - if an RF663 error occurs.