|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--opencard.opt.terminal.protocol.T1Protocol
T1Protocol is a small subset of the T1 block protocol. NOTE: T1Protocol IS NOT IN FINAL STATE!!!!!!!!!!!!!!! - chaining is not supported - EDC-byte calculation only with LDR (XORed), CRC is not provided. see ISO7816_3P9
Constructor Summary | |
T1Protocol(int stdHostAddress,
int stdRemoteAddress,
int timeout)
Constructor with specification of the host- and remoteaddress |
Method Summary | |
void |
close()
close should be called to deinitialize the object |
protected abstract T1Block |
exchangeData(T1Block sendBlock)
exchangeData responsible for the real data-transfer. |
int |
getBlockWaitingTime()
getBlockWaitingTime returns the currently used block waiting time in milliseconds. |
int |
getHostAddress()
getHostAddress |
int |
getRecvSequenceCounter()
getRecvSequenceCounter |
int |
getRemoteAddress()
getRemoteAddress |
int |
getSendSequenceCounter()
getSendSequenceCounter |
void |
incRecvSequenceCounter()
incRecvSequenceCounter |
void |
incSendSequenceCounter()
incSendSequenceCounter |
protected T1Block |
internalTransmit(int retryCount,
T1Block dataBlock)
internalTransmit exchanges blocks with T1 protocol handling. |
protected boolean |
isBlockComplete(byte[] rawBytes,
int len)
|
void |
open()
open should be called after creating a new object of this class. |
void |
setBlockWaitingTime(int timeout)
setBlockWaitingTime sets the block waiting time in milliseconds. |
void |
setRecvSequenceCounter(int val)
setRecvSequenceCounter |
void |
setSendSequenceCounter(int val)
setSendSequenceCounter |
byte[] |
transmit(byte[] sendData)
transmit sends the data to the terminal and waits for result until timeout is reached. transmit handles a subset of T1 error-recognition and -recovering. |
byte[] |
transmit(int remoteAddress,
byte[] sendData)
transmit sends the data to the terminal and waits for result until timeout is reached. transmit handles a subset of T1 error-recognition and -recovering. |
byte[] |
transmit(int hostAddress,
int remoteAddress,
byte[] sendData)
transmit sends the data to the terminal and waits for result until timeout is reached. transmit handles a subset of T1 error-recognition and -recovering. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public T1Protocol(int stdHostAddress, int stdRemoteAddress, int timeout)
Method Detail |
public void open() throws T1Exception
public void close()
public int getBlockWaitingTime()
public void setBlockWaitingTime(int timeout)
public int getHostAddress()
public int getRemoteAddress()
public int getSendSequenceCounter()
public void setSendSequenceCounter(int val)
public void incSendSequenceCounter()
public int getRecvSequenceCounter()
public void setRecvSequenceCounter(int val)
public void incRecvSequenceCounter()
public byte[] transmit(byte[] sendData) throws T1IOException, T1TimeoutException, T1Exception
sendData
- data for the terminalpublic byte[] transmit(int remoteAddress, byte[] sendData) throws T1IOException, T1TimeoutException, T1Exception
remoteAddress
- sendData
- data for the terminalpublic byte[] transmit(int hostAddress, int remoteAddress, byte[] sendData) throws T1IOException, T1TimeoutException, T1Exception
hostAddress
- remoteAddress
- use another remote-address as previously given by constructor.sendData
- data for the terminalprotected boolean isBlockComplete(byte[] rawBytes, int len)
protected T1Block internalTransmit(int retryCount, T1Block dataBlock) throws T1Exception
retryCount
- number of retries left for transmitting data
if retryCount = 0 reached, transfer faileddataBlock
- application data block.protected abstract T1Block exchangeData(T1Block sendBlock) throws T1IOException, T1TimeoutException, T1BlockLengthException, T1UnknownBlockException, T1BlockEDCErrorException
sendBlock
- the T1-block with the send-data inside.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |