public abstract class T1Protocol
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
T1Protocol(int stdHostAddress,
int stdRemoteAddress,
int timeout)
Constructor with specification of the host- and remoteaddress
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract T1Block |
exchangeData(T1Block sendBlock)
exchangeData
responsible for the real data-transfer.
|
protected int |
getBlockWaitingTime()
getBlockWaitingTime returns the currently used block waiting
time in milliseconds.
|
protected int |
getHostAddress()
getHostAddress
|
protected int |
getRecvSequenceCounter()
getRecvSequenceCounter
|
protected int |
getRemoteAddress()
getRemoteAddress
|
protected int |
getSendSequenceCounter()
getSendSequenceCounter
|
protected void |
incRecvSequenceCounter()
incRecvSequenceCounter
|
protected void |
incSendSequenceCounter()
incSendSequenceCounter
|
protected void |
initT1Protocol(byte maxIFSD,
byte IFSC)
initProtocol initialize protocol.
|
protected T1Block |
internalTransmit(int retryCount,
T1Block dataBlock)
internalTransmit
exchanges blocks with T1 protocol handling.
|
protected boolean |
isBlockComplete(byte[] rawBytes,
int len) |
protected void |
setBlockWaitingTime(int timeout)
setBlockWaitingTime sets the block waiting time in milliseconds.
|
protected void |
setRecvSequenceCounter(int val)
setRecvSequenceCounter
|
protected void |
setSendSequenceCounter(int val)
setSendSequenceCounter
|
protected byte[] |
transmit(int remoteAddress,
byte[] sendData)
transmit sends the data to the terminal and waits for result
until timeout is reached.
|
protected byte[] |
transmit(int hostAddress,
int remoteAddress,
byte[] sendData)
transmit sends the data to the terminal and waits for result
until timeout is reached.
|
protected byte[] |
transmitT1(byte[] sendData)
transmit sends the data to the terminal and waits for result
until timeout is reached.
|
protected T1Protocol(int stdHostAddress,
int stdRemoteAddress,
int timeout)
protected int getBlockWaitingTime()
protected void setBlockWaitingTime(int timeout)
protected int getHostAddress()
protected int getRemoteAddress()
protected int getSendSequenceCounter()
protected void setSendSequenceCounter(int val)
protected void incSendSequenceCounter()
protected int getRecvSequenceCounter()
protected void setRecvSequenceCounter(int val)
protected void incRecvSequenceCounter()
protected byte[] transmitT1(byte[] sendData)
throws SCException
sendData - data for the terminalSCExceptionprotected byte[] transmit(int remoteAddress,
byte[] sendData)
throws SCException
remoteAddress - sendData - data for the terminalSCExceptionprotected byte[] transmit(int hostAddress,
int remoteAddress,
byte[] sendData)
throws SCException
hostAddress - remoteAddress - use another remote-address as previously given by constructor.sendData - data for the terminalSCExceptionprotected boolean isBlockComplete(byte[] rawBytes,
int len)
protected void initT1Protocol(byte maxIFSD,
byte IFSC)
throws SCException
T1Exception - thrown when error occurred.SCExceptionprotected T1Block internalTransmit(int retryCount, T1Block dataBlock) throws SCException
retryCount - number of retries left for transmitting data if retryCount = 0
reached, transfer faileddataBlock - application data block.SCExceptionT1Exception - thrown when error occurred.protected abstract T1Block exchangeData(T1Block sendBlock) throws T1IOException, T1TimeoutException, T1BlockLengthException, T1UnknownBlockException, T1BlockEDCErrorException, SCException
sendBlock - the T1-block with the send-data inside.T1TimeoutException - 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 valueSCExceptionT1IOExceptionCopyright © 2025. All rights reserved.