int getCardState()

This function can be used to return the current card state from the reader. Valid return values are listed below:

0: CARD_UNKNOWN - The library is unaware of the current state of the reader.
1: CARD_ABSENT - There is no card in the reader.
2: CARD_PRESENT - There is a card in the reader, but it has not been moved into position for use.
3: CARD_SWALLOWED - There is a card in the reader in position for use. The card is not powered.
4: CARD_POWERED - Power is being provided to the card, but the library is unaware of the mode of the card.
5: CARD_NEGOTIABLE - The card has been reset and is awaiting PIN transaction security (PTS) negotiation.
6: CARD_SPECIFIC - The card has been reset, and specific communication protocols have been established.

Return

The card state as an integer (see above for possible values).