|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.jc.JCTerminal
com.ibm.jc.terminal.TimeJCTerminal
| Field Summary | |
static int |
MAX_TIMINGS
|
protected JCTerminal |
terminal
Original terminal. |
| Fields inherited from class com.ibm.jc.JCTerminal |
CARD_PRESENT, ERROR, NOT_CONNECTED, PROTOCOL_T0, PROTOCOL_T1, PROTOCOL_TCL, SLOT_EMPTY |
| Constructor Summary | |
TimeJCTerminal()
Default constructor for generic instanciation. |
|
| Method Summary | |
void |
close()
Close connection to card terminal. |
void |
generateParityError(int n)
Schedule generation of parity error for the n-th character to be transmitted (in or out). |
long |
getCmdTime(int i)
Allows external world access to the collected measurements. |
java.lang.String |
getErrorMessage()
|
JCTerminal |
getOriginal()
|
int |
getState()
|
JCTerminal |
init(java.lang.Object param)
Initialize trace terminal with the terminal that is being traced. |
void |
open()
Open the card terminal. |
void |
pps(int proto,
int param)
Select protocol and parameters for subsequent communication (can only be applied immediately after card reset). |
void |
reset()
Resets timing number counter -- discards previous measurements |
byte[] |
send(int nad,
byte[] toSend,
int offset,
int len)
Send data to the card (using the negotiated protocol). |
byte[] |
sendraw(byte[] toSend,
int offset,
int len,
int timeout)
Send data to the card (using *no* protocol, raw bytes are transmitted without modification). |
void |
setOverhead(int overhead)
Set Overhead as determined by some application command |
void |
sum()
Switch to add-only mode. |
byte[] |
waitForCard(int time)
Wait for insertion of a card and return ATR (answer to reset). |
| Methods inherited from class com.ibm.jc.JCTerminal |
filterFor, filterFor, getInstance, ioctl, send, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MAX_TIMINGS
protected JCTerminal terminal
| Constructor Detail |
public TimeJCTerminal()
| Method Detail |
public void reset()
public void sum()
public void setOverhead(int overhead)
public long getCmdTime(int i)
i - index of timing information requested
public JCTerminal init(java.lang.Object param)
init in class JCTerminalparam - either an initialized JCTerminal instance or a string
of the form "term:param". The part term is passed
JCTerminal,getInstance() to create the observed
terminal and param is used to initialize it.
public void open()
JCTerminal
open in class JCTerminalpublic void close()
JCTerminal
close in class JCTerminalJCTerminal.open()public byte[] waitForCard(int time)
JCTerminalNote, not all terminals support the time parameter. It is only guaranteed that the call will not block longer than the specified time. It might return immediately with null.
waitForCard in class JCTerminaltime - the calls blocks for specified milliseconds.
public java.lang.String getErrorMessage()
getErrorMessage in class JCTerminalpublic int getState()
getState in class JCTerminal
public byte[] send(int nad,
byte[] toSend,
int offset,
int len)
JCTerminalJCard.send() should be used)
send in class JCTerminalnad - node address to which data is being sent (high nibble = destination
address, low = source address). Address values: 2=host, 1=terminal, 0=card.
A value of 0 means from host to card.toSend - byte array containing APDU data to be sentoffset - offset starting at which APDU data sending is to beginlen - number of bytes to be transmitted
com.ibm.jc.JCard.send
public byte[] sendraw(byte[] toSend,
int offset,
int len,
int timeout)
JCTerminal
sendraw in class JCTerminaltoSend - byte array containing raw data to be sentoffset - offset starting at which raw data sending is to beginlen - number of bytes to be transmittedtimeout - time to wait for response data (time unit is device-dependent, ignored by some readers)
public void pps(int proto,
int param)
JCTerminal
pps in class JCTerminalproto - protocol type to be used (PROTOCOL_T0 or PROTOCOL_T1 in contact mode, PROTOCOL_TCL in contact-less mode)param - baud ratePROTOCOL_T0,
PROTOCOL_T1,
PROTOCOL_TCL,
sendpublic void generateParityError(int n)
JCTerminal
generateParityError in class JCTerminaln - index of character to manipulate (0-based)public JCTerminal getOriginal()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||