public interface Card
Card
interface provides a general definition of card services in a POS (Point of Sale) system.
It facilitates operations such as connecting or disconnecting a card to/from the card reader device and
allows retrieval of basic card information like ATR (Answer To Reset), ID, and status.Modifier and Type | Field and Description |
---|---|
static int |
PROTOCOL_RFCARD_TYPE_A
ISO14443 TYPE A protocol.
|
static int |
PROTOCOL_RFCARD_TYPE_B
ISO14443 TYPE B protocol.
|
static int |
PROTOCOL_T_0
The asynchronous half-duplex communication protocol of T=0.
|
static int |
PROTOCOL_T_1
The asynchronous half-duplex communication protocol of T=1.
|
static int |
PROTOCOL_UNKNOWN
Unknown communication protocol.
|
static int |
STATUS_ABSENT
Card slot status indicating the card is removed or absent.
|
static int |
STATUS_CONNECTED
Card slot status indicating the card is connected.
|
static int |
STATUS_DISCONNECTED
Card slot status indicating the card is disconnected.
|
Modifier and Type | Method and Description |
---|---|
int |
getCardStatus()
Retrieves the current status of the card in the card slot.
|
byte[] |
getID()
Retrieves the ID of the card.
|
byte[] |
getIDInfo()
Retrieves extended ID information of the card.
|
int |
getProtocol()
Retrieves the protocol used for communication between the card and the card slot.
|
static final int PROTOCOL_RFCARD_TYPE_A
static final int PROTOCOL_RFCARD_TYPE_B
static final int PROTOCOL_T_0
static final int PROTOCOL_T_1
static final int PROTOCOL_UNKNOWN
static final int STATUS_CONNECTED
static final int STATUS_DISCONNECTED
static final int STATUS_ABSENT
byte[] getID() throws DeviceException
DeviceException
- for standard reasons as documented in DeviceException
.byte[] getIDInfo() throws DeviceException
DeviceException
- for standard reasons as documented in DeviceException
.int getProtocol() throws DeviceException
PROTOCOL_RFCARD_TYPE_A
, PROTOCOL_RFCARD_TYPE_B
, PROTOCOL_T_0
,
PROTOCOL_T_1
, or PROTOCOL_UNKNOWN
.DeviceException
- for standard reasons as documented in DeviceException
.int getCardStatus() throws DeviceException
STATUS_CONNECTED
,
STATUS_DISCONNECTED
, or STATUS_ABSENT
.DeviceException
- for standard reasons as documented in DeviceException
.