Package com.abc.bluetoothTerminalfactory

# Class AbCircleCardTerminalBluetooth

java.lang.Object
javax.smartcardio.CardTerminal
com.abc.bluetoothTerminalfactory.AbCircleCardTerminalBluetooth

public class AbCircleCardTerminalBluetooth extends CardTerminal
The `AbCircleCardTerminalBluetooth` class represents an AB Circle Bluetooth card terminal, which is an extension of the javax SmartcardIO Card Terminal.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Card`
  `connect(String protocol)`
  `void`
  `disconnect()`
  Disconnects the card terminal
  `int`
  `getBatteryLevel()`
  Gets the battery level from the reader as percentage (0xFF if charging)
  `int`
  `getBatteryLevel(int option)`
  Gets the battery level from the reader as percentage (0xFF if charging) or the voltage value in mV
  `String`
  `getFirmwareVersion()`
  Returns the firmware version of the terminal as ASCII string
  `String`
  `getName()`
  `String`
  `getSerialNumber()`
  Returns the serial number of the terminal as ASCII string
  `boolean`
  `isACKProtocolEnabled()`
  Indicates if the ACK protocol is enabled on the terminal
  `boolean`
  `isCardPresent()`
  `String`
  `toString()`
  Returns the terminal representation
  `boolean`
  `waitForCardAbsent(long timeout)`
  `boolean`
  `waitForCardPresent(long timeout)`

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

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

- ## Method Details

  - ### getName

    public String getName()
    Specified by:
      `getName` in class `CardTerminal`

  - ### connect

    public Card connect(String protocol) throws CardException
    Specified by:
      `connect` in class `CardTerminal`
    Throws:
      `CardException`

  - ### isCardPresent

    public boolean isCardPresent()
    Specified by:
      `isCardPresent` in class `CardTerminal`

  - ### waitForCardPresent

    public boolean waitForCardPresent(long timeout)
    Specified by:
      `waitForCardPresent` in class `CardTerminal`

  - ### waitForCardAbsent

    public boolean waitForCardAbsent(long timeout)
    Specified by:
      `waitForCardAbsent` in class `CardTerminal`

  - ### disconnect

    public void disconnect()
    Disconnects the card terminal

  - ### getBatteryLevel

    public int getBatteryLevel() throws IllegalAccessError
    Gets the battery level from the reader as percentage (0xFF if charging)
    Returns:
      integer representing the battery level
    Throws:
      `IllegalAccessError`

  - ### getBatteryLevel

    public int getBatteryLevel(int option) throws IllegalAccessError
    Gets the battery level from the reader as percentage (0xFF if charging) or the voltage value in mV
    Parameters:
      `option` - 1 to get percentage, 2 to get voltage value (in mV)
    Returns:
      Depending the option, an integer representing the level percentage or the voltage
    Throws:
      `IllegalAccessError`

  - ### getFirmwareVersion

    public String getFirmwareVersion() throws IllegalAccessError
    Returns the firmware version of the terminal as ASCII string
    Returns:
      firmware version in Ascii
    Throws:
      `IllegalAccessError`

  - ### getSerialNumber

    public String getSerialNumber() throws IllegalAccessError
    Returns the serial number of the terminal as ASCII string
    Returns:
      firmware version in Ascii
    Throws:
      `IllegalAccessError`

  - ### isACKProtocolEnabled

    public boolean isACKProtocolEnabled() throws IllegalAccessError
    Indicates if the ACK protocol is enabled on the terminal
    Returns:
      true if enabled, else false
    Throws:
      `IllegalAccessError`

  - ### toString

    public String toString()
    Returns the terminal representation
    Overrides:
      `toString` in class `Object`
    Returns:
      String