public abstract class CCIDReader extends T1Protocol implements java.lang.Cloneable, IReader
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
arrayOfSupportedDataRates |
protected int |
bMessageType_OFFSET |
static int |
CARD_EVENT_DETECED
Smart card reader event message.
|
static int |
CARD_EVENT_REMOVED
Waiting card detected
|
protected int |
CCID_COMMAND_FAILED |
protected int |
CCID_ICC_ABSENT |
protected int |
CCID_ICC_PRESENT_ACTIVE |
protected int |
CCID_ICC_PRESENT_INACTIVE |
protected int |
CCID_TIME_EXTENSION |
protected int |
ERROR_OFFSET |
static int |
LOG_APDU |
static int |
LOG_CCID |
static int |
LOG_INFO |
protected double |
mCCIDVersion |
protected byte |
mClassEnvelope |
protected byte |
mClassGetResponse |
protected int |
mDataRate |
protected int |
mDefaultClock |
protected int |
mFeatures |
protected int |
mLcdLayout |
protected int |
mLogLevel |
protected byte |
mMaxCCIDBusySlots |
protected int |
mMaxCCIDMessageLength |
protected int |
mMaxClock |
protected int |
mMaxDataRate |
protected int |
mMaxIFSD |
protected int |
mMaxSlotIndex |
protected int |
mMechanical |
protected byte |
mNumClockSupported |
protected byte |
mNumDataRatesSupported |
protected byte |
mPINSupport |
protected int |
mProtocols |
protected int |
mSynchProtocols |
protected int |
mVoltageSupport |
protected int |
RDR_to_PC_SlotStatus |
protected int |
STATUS_OFFSET |
protected static java.lang.String |
VERSION |
| Constructor and Description |
|---|
CCIDReader()
Waiting card removed
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
byte[] |
ConnectCard(byte PreferredProtocols)
ConnectCard: connect card by default slot number=0 and Preferred
Protocols backward compatible
|
byte[] |
ConnectCard(int Slot,
byte PreferredProtocols)
ConnectCard: connect card by slot number and Preferred Protocols
|
Card |
ConnectCard(java.lang.String CardClass,
byte PreferredProtocols)
ConnectCard: connect and create specific card instance by default slot
number=0 and Preferred Protocols backward compatible
|
Card |
ConnectCard(java.lang.String CardClass,
int Slot,
byte PreferredProtocols)
ConnectCard: connect and create specific card instance by slot number and
Preferred Protocols
|
void |
DisConnectCard()
DisConnectCard: Disconnect and power off the card
|
byte[] |
Escape(byte[] espcmd)
Escape: implementation of PC_to_RDR_Escape
|
protected T1Block |
exchangeData(T1Block sendBlock)
exchangeData: implement T1Block exchangeData from T1Protocol class
|
protected void |
finalize() |
byte[] |
GetParameters()
SetParameters: implementation of PC_to_RDR_GetParameters
|
void |
getReaderDataRates(byte numDataRateSupported) |
int |
getSlotCount() |
int |
GetSlotStatus()
GetSlotStatus: implementation of PC_to_RDR_GetSlotStatus
|
boolean |
isCardPresent()
isCardPresent: check if the card is in the reader
|
protected void |
logCCID(java.lang.String message) |
protected void |
logData(java.lang.String title,
byte[] data) |
protected void |
logData(java.lang.String title,
byte[] data,
int length) |
protected void |
logData(java.lang.String module,
java.lang.String message) |
void |
logLevel(int level) |
void |
PowerOff()
PowerOff: implementation of PC_to_RDR_IccPowerOff
|
byte[] |
PowerOn()
PowerOn: Main PowerOn function
|
void |
SetParameters(byte protocol,
byte[] param)
SetParameters: implementation of PC_to_RDR_SetParameters
|
byte[] |
Transmit(byte[] apdu)
Transmit: function expose
|
void |
WaitCardEvent(int event)
WaitCardEvent: Wait card inserted or removed event
|
byte[] |
XfrBlock(byte[] apdu)
XfrBlock: Main XfrBlock function.
|
getBlockWaitingTime, getHostAddress, getRecvSequenceCounter, getRemoteAddress, getSendSequenceCounter, incRecvSequenceCounter, incSendSequenceCounter, initT1Protocol, internalTransmit, isBlockComplete, setBlockWaitingTime, setRecvSequenceCounter, setSendSequenceCounter, transmit, transmit, transmitT1protected static final java.lang.String VERSION
protected double mCCIDVersion
protected int mMaxSlotIndex
protected int mVoltageSupport
protected int mProtocols
protected int mDefaultClock
protected int mMaxClock
protected byte mNumClockSupported
protected int mDataRate
protected int mMaxDataRate
protected byte mNumDataRatesSupported
protected int mMaxIFSD
protected int mSynchProtocols
protected int mMechanical
protected int mFeatures
protected int mMaxCCIDMessageLength
protected byte mClassGetResponse
protected byte mClassEnvelope
protected int mLcdLayout
protected byte mPINSupport
protected byte mMaxCCIDBusySlots
protected int[] arrayOfSupportedDataRates
protected int mLogLevel
public static int LOG_INFO
public static int LOG_APDU
public static int LOG_CCID
public static int CARD_EVENT_DETECED
public static int CARD_EVENT_REMOVED
protected final int bMessageType_OFFSET
protected final int STATUS_OFFSET
protected final int ERROR_OFFSET
protected final int CCID_ICC_PRESENT_ACTIVE
protected final int CCID_ICC_PRESENT_INACTIVE
protected final int CCID_ICC_ABSENT
protected final int CCID_COMMAND_FAILED
protected final int CCID_TIME_EXTENSION
protected final int RDR_to_PC_SlotStatus
protected final void finalize()
finalize in class java.lang.Objectpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic int getSlotCount()
protected final void logCCID(java.lang.String message)
protected final void logData(java.lang.String module,
java.lang.String message)
protected final void logData(java.lang.String title,
byte[] data,
int length)
protected final void logData(java.lang.String title,
byte[] data)
public final byte[] PowerOn()
throws SCException
SCExceptionpublic final void PowerOff()
throws SCException
SCExceptionpublic final int GetSlotStatus()
throws SCException
SCExceptionprotected T1Block exchangeData(T1Block sendBlock) throws SCException, T1BlockEDCErrorException
exchangeData in class T1ProtocolsendBlock - : see T1Block.T1IOExceptionT1TimeoutException - thrown when time is elapsed receiving a T1-blockT1BlockLengthException - thrown when difference detected between calculated and
received block lengthT1UnknownBlockException - thrown when blocktype could not be recognizedT1BlockEDCErrorException - thrown when error detection code differs from the
calculated valueSCExceptionpublic final byte[] XfrBlock(byte[] apdu)
throws SCException
apdu - : APDU Command.SCExceptionpublic final byte[] Transmit(byte[] apdu)
throws SCException
Transmit in interface IReaderapdu - : APDU Command.SCExceptionpublic final byte[] GetParameters()
throws SCException
SCExceptionpublic final void SetParameters(byte protocol,
byte[] param)
throws SCException
protocol - , bProtocolNum 00h = Structure for protocol T=0, 01h =
Structure for protocol T=1param - , abProtocolDataStructure: Protocol Data StructureSCExceptionpublic final byte[] Escape(byte[] espcmd)
throws SCException
espcmd - : Escape Command.SCExceptionpublic final byte[] ConnectCard(int Slot,
byte PreferredProtocols)
throws SCException
Slot - : slot number, 0: slot 1, 1: slot2 ...PreferredProtocols - : Preferred Protocols ex: PROTOCOL_ANY = PROTOCOL_T0 |
PROTOCOL_T0SCExceptionpublic final byte[] ConnectCard(byte PreferredProtocols)
throws SCException
PreferredProtocols - : Preferred Protocols ex: PROTOCOL_ANY = PROTOCOL_T0 |
PROTOCOL_T0SCExceptionpublic final Card ConnectCard(java.lang.String CardClass, int Slot, byte PreferredProtocols) throws SCException
ConnectCard in interface IReaderCardClass - : card class to be created ex: "com.scdroid.smartcard.EMVCard"Slot - : slot number, 0: slot 1, 1: slot2 ...PreferredProtocols - : Preferred Protocols ex: PROTOCOL_ANY = PROTOCOL_T0 |
PROTOCOL_T0SCExceptionpublic final Card ConnectCard(java.lang.String CardClass, byte PreferredProtocols) throws SCException
ConnectCard in interface IReaderCardClass - : card class to be created ex: "com.scdroid.smartcard.EMVCard"PreferredProtocols - : Preferred Protocols ex: PROTOCOL_ANY = PROTOCOL_T0 |
PROTOCOL_T0SCExceptionpublic boolean isCardPresent()
throws SCException
isCardPresent in interface IReaderSCExceptionpublic final void DisConnectCard()
throws SCException
DisConnectCard in interface IReaderSCExceptionpublic void WaitCardEvent(int event)
throws SCException
WaitCardEvent in interface IReaderSCExceptionpublic void getReaderDataRates(byte numDataRateSupported)
Copyright © 2025. All rights reserved.