Package com.abc.bluetoothTerminalfactory
Class AbCircleCardTerminalBluetooth
java.lang.Object
javax.smartcardio.CardTerminal
com.abc.bluetoothTerminalfactory.AbCircleCardTerminalBluetooth
The
AbCircleCardTerminalBluetooth
class represents an AB Circle Bluetooth card terminal,
which is an extension of the javax SmartcardIO Card Terminal.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Disconnects the card terminalint
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 mVReturns the firmware version of the terminal as ASCII stringgetName()
Returns the serial number of the terminal as ASCII stringboolean
Indicates if the ACK protocol is enabled on the terminalboolean
toString()
Returns the terminal representationboolean
waitForCardAbsent
(long timeout) boolean
waitForCardPresent
(long timeout)
-
Method Details
-
getName
- Specified by:
getName
in classCardTerminal
-
connect
- Specified by:
connect
in classCardTerminal
- Throws:
CardException
-
isCardPresent
public boolean isCardPresent()- Specified by:
isCardPresent
in classCardTerminal
-
waitForCardPresent
public boolean waitForCardPresent(long timeout) - Specified by:
waitForCardPresent
in classCardTerminal
-
waitForCardAbsent
public boolean waitForCardAbsent(long timeout) - Specified by:
waitForCardAbsent
in classCardTerminal
-
disconnect
public void disconnect()Disconnects the card terminal -
getBatteryLevel
Gets the battery level from the reader as percentage (0xFF if charging)- Returns:
- integer representing the battery level
- Throws:
IllegalAccessError
-
getBatteryLevel
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
Returns the firmware version of the terminal as ASCII string- Returns:
- firmware version in Ascii
- Throws:
IllegalAccessError
-
getSerialNumber
Returns the serial number of the terminal as ASCII string- Returns:
- firmware version in Ascii
- Throws:
IllegalAccessError
-
isACKProtocolEnabled
Indicates if the ACK protocol is enabled on the terminal- Returns:
- true if enabled, else false
- Throws:
IllegalAccessError
-
toString
Returns the terminal representation
-