com.datecs.api.rfid
Class ISO15693Card

java.lang.Object
  extended by com.datecs.api.rfid.ContactlessCard
      extended by com.datecs.api.rfid.ISO15693Card

public class ISO15693Card
extends ContactlessCard

A class that represents ISO15693 cards.


Field Summary
 
Fields inherited from class com.datecs.api.rfid.ContactlessCard
afi, atqa, blockSize, capacity, 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_ST_SRI, CARD_UNKNOWN, channel, dsfid, hyatt64Card, maxBlocks, sak, type, uid
 
Constructor Summary
ISO15693Card(RC663 module)
          Constructs a new instance of this class.
 
Method Summary
 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.api.rfid.ContactlessCard
getModule, waitRemove
 
Methods inherited from class java.lang.Object
equals, 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

initialize

public boolean initialize()
                   throws java.io.IOException
Initialize card.

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.