com.datecs.rfid

## Class ContactlessCard

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

- Direct Known Subclasses:
    FeliCaCard, ISO14443Card, ISO15693Card, STSRICard

      public abstract class ContactlessCard
      extends java.lang.Object

  This class represents basic functionality of contactless card.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `byte` | `afi` The card AFI (Available for ISO15 cards only).
    `short` | `atqa` The card ATQA (Available for MIFARE cards only).
    `int` | `blockSize` The card block size (Available for ISO15 cards only).
    `int` | `capacity` The card capacity.
    `static int` | `CARD_EPASSPORT` E Passport.
    `static int` | `CARD_FELICA` FeliCa
    `static int` | `CARD_ISO14443A` ISO 14443A.
    `static int` | `CARD_ISO14443B` ISO 14443B.
    `static int` | `CARD_ISO15693` ISO 15693.
    `static int` | `CARD_MIFARE_CLASSIC_1K` Mifare Classic 1K.
    `static int` | `CARD_MIFARE_CLASSIC_4K` Mifare Classic 4K.
    `static int` | `CARD_MIFARE_DESFIRE` Mifare Desfire.
    `static int` | `CARD_MIFARE_MINI` Mifare Mini.
    `static int` | `CARD_MIFARE_PLUS` Mifare Plus.
    `static int` | `CARD_MIFARE_ULTRALIGHT` Mifare Ultralight.
    `static int` | `CARD_MIFARE_ULTRALIGHT_C` Mifare Ultralight C.
    `static int` | `CARD_PAYMENT` Payment card.
    `static int` | `CARD_PICOPASS_14443B` PicoPass 15693.
    `static int` | `CARD_PICOPASS_15693` PicoPass 15693.
    `static int` | `CARD_ST_SRI` ST SRI
    `static int` | `CARD_UNKNOWN` Unknown card.
    `int` | `channel` The card channel.
    `byte` | `dsfid` The card data storage format identifier (Available for ISO15 cards only).
    `boolean` | `hyatt64Card` The HYATT card enabled.
    `int` | `maxBlocks` The card max block size (Available for ISO15 cards only).
    `protected RC663` | `mModule` The instance of RC663 module.
    `short` | `sak` The card SAK (Available for MIFARE cards only).
    `int` | `type` The card type.
    `byte[]` | `uid` The card UID.

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract boolean` | `deinitialise()` Deinitialise card.
    `RFID` | `getModule()` Get RFID for this card.
    `java.lang.String` | `getTypeName()` Get card type name.
    `protected abstract boolean` | `initialize()` Initialize card.
    `void` | `waitRemove()` Call this function once you are done with the card.

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

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

- - ### Field Detail

    - #### CARD_UNKNOWN

          public static final int CARD_UNKNOWN

      Unknown card.
      See Also:
        Constant Field Values

    - #### CARD_MIFARE_MINI

          public static final int CARD_MIFARE_MINI

      Mifare Mini.
      See Also:
        Constant Field Values

    - #### CARD_MIFARE_CLASSIC_1K

          public static final int CARD_MIFARE_CLASSIC_1K

      Mifare Classic 1K.
      See Also:
        Constant Field Values

    - #### CARD_MIFARE_CLASSIC_4K

          public static final int CARD_MIFARE_CLASSIC_4K

      Mifare Classic 4K.
      See Also:
        Constant Field Values

    - #### CARD_MIFARE_ULTRALIGHT

          public static final int CARD_MIFARE_ULTRALIGHT

      Mifare Ultralight.
      See Also:
        Constant Field Values

    - #### CARD_MIFARE_ULTRALIGHT_C

          public static final int CARD_MIFARE_ULTRALIGHT_C

      Mifare Ultralight C.
      See Also:
        Constant Field Values

    - #### CARD_ISO14443A

          public static final int CARD_ISO14443A

      ISO 14443A.
      See Also:
        Constant Field Values

    - #### CARD_MIFARE_PLUS

          public static final int CARD_MIFARE_PLUS

      Mifare Plus.
      See Also:
        Constant Field Values

    - #### CARD_ISO15693

          public static final int CARD_ISO15693

      ISO 15693.
      See Also:
        Constant Field Values

    - #### CARD_MIFARE_DESFIRE

          public static final int CARD_MIFARE_DESFIRE

      Mifare Desfire.
      See Also:
        Constant Field Values

    - #### CARD_ISO14443B

          public static final int CARD_ISO14443B

      ISO 14443B.
      See Also:
        Constant Field Values

    - #### CARD_FELICA

          public static final int CARD_FELICA

      FeliCa
      See Also:
        Constant Field Values

    - #### CARD_ST_SRI

          public static final int CARD_ST_SRI

      ST SRI
      See Also:
        Constant Field Values

    - #### CARD_PAYMENT

          public static final int CARD_PAYMENT

      Payment card.
      See Also:
        Constant Field Values

    - #### CARD_PICOPASS_15693

          public static final int CARD_PICOPASS_15693

      PicoPass 15693.
      See Also:
        Constant Field Values

    - #### CARD_PICOPASS_14443B

          public static final int CARD_PICOPASS_14443B

      PicoPass 15693.
      See Also:
        Constant Field Values

    - #### CARD_EPASSPORT

          public static final int CARD_EPASSPORT

      E Passport.
      See Also:
        Constant Field Values

    - #### hyatt64Card

          public boolean hyatt64Card

      The HYATT card enabled.

    - #### channel

          public int channel

      The card channel.

    - #### type

          public int type

      The card type.

    - #### uid

          public byte[] uid

      The card UID.

    - #### capacity

          public int capacity

      The card capacity.

    - #### atqa

          public short atqa

      The card ATQA (Available for MIFARE cards only).

    - #### sak

          public short sak

      The card SAK (Available for MIFARE cards only).

    - #### afi

          public byte afi

      The card AFI (Available for ISO15 cards only).

    - #### dsfid

          public byte dsfid

      The card data storage format identifier (Available for ISO15 cards only).

    - #### blockSize

          public int blockSize

      The card block size (Available for ISO15 cards only).

    - #### maxBlocks

          public int maxBlocks

      The card max block size (Available for ISO15 cards only).

    - #### mModule

          protected RC663 mModule

      The instance of RC663 module.

  - ### Constructor Detail

    - #### ContactlessCard

          public ContactlessCard(RC663 module)

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

  - ### Method Detail

    - #### initialize

          protected abstract 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.

    - #### deinitialise

          protected abstract boolean deinitialise()
                                           throws java.io.IOException

      Deinitialise card.
      Returns:
        on success returns true, otherwise returns false.
      Throws:
        `java.io.IOException` - if an I/O error occurs.

    - #### waitRemove

          public void waitRemove()
                          throws java.io.IOException

      Call this function once you are done with the card.
      Throws:
        `java.io.IOException` - if an I/O error occurs.

    - #### getModule

          public RFID getModule()

      Get RFID for this card.
      Returns:
        the RFID module.

    - #### getTypeName

          public java.lang.String getTypeName()

      Get card type name.
      Returns:
        name.