|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--opencard.opt.terminal.protocol.T1Block
T1Block represents T1 block (see ISO7816-3)
Field Summary | |
static int |
EDC_CRC
use CRC16 algorithm for EDC byte - not implemented |
static int |
EDC_LDR
use LDR (XOR) algorithm for EDC byte |
static int |
ERROR_EDC
indicates EDC error |
static int |
ERROR_NONE
indicates error free operation |
static int |
ERROR_OTHER
indicates other error |
static int |
I_BLOCK
I-block |
static int |
R_BLOCK
R-block |
static int |
S_ABORT_REQUEST
S_ABORT_REQUEST |
static int |
S_ABORT_RESPONSE
S_ABORT_RESPONSE |
static int |
S_BLOCK
S-block |
static int |
S_IFS_REQUEST
S_IFS_REQUEST |
static int |
S_IFS_RESPONSE
S_IFS_RESPONSE |
static int |
S_RESYNCH_REQUEST
S_RESYNCH_REQUEST |
static int |
S_RESYNCH_RESPONSE
S_RESYNCH_RESPONSE |
static int |
S_VPP_STATE_ERROR_RESPONSE
S_VPP_STATE_ERR_RESPONSE |
static int |
S_WTX_REQUEST
S_WTX_REQUEST |
static int |
S_WTX_RESPONSE
S_WTX_RESPONSE |
Constructor Summary | |
T1Block(byte[] rawBytes,
int edcInfo)
create Block object from raw T1-Block |
|
T1Block(int src,
int dest,
int pcb,
byte[] dat,
int edcInfo)
Constructor |
Method Summary | |
int |
calcEDC()
calcEDC calculates the EDC-field according to the used EDC algorithm |
boolean |
checkEDC()
checks the correctness of the given EDC byte (true, if EDC is correct) |
byte[] |
getBlock()
returns byte array with raw block data |
int |
getBlockType()
|
int |
getControlBits()
getControlBits returns block-specific controlbits without the blocktype |
byte[] |
getDATA()
|
int |
getDestID()
|
int |
getDestinationAddress()
|
int |
getEDC()
|
int |
getEDCAlgorithm()
|
int |
getLEN()
|
byte |
getNAD()
|
byte |
getPCB()
|
int |
getRequestedSequenceNumber()
|
int |
getSourceAddress()
|
int |
getSourceID()
|
java.lang.String |
toString()
toString returns informations about this block object (not yet optimized) |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int EDC_LDR
public static final int EDC_CRC
public static final int ERROR_NONE
public static final int ERROR_EDC
public static final int ERROR_OTHER
public static final int S_RESYNCH_REQUEST
public static final int S_RESYNCH_RESPONSE
public static final int S_IFS_REQUEST
public static final int S_IFS_RESPONSE
public static final int S_ABORT_REQUEST
public static final int S_ABORT_RESPONSE
public static final int S_WTX_REQUEST
public static final int S_WTX_RESPONSE
public static final int S_VPP_STATE_ERROR_RESPONSE
public static final int I_BLOCK
public static final int R_BLOCK
public static final int S_BLOCK
Constructor Detail |
public T1Block(int src, int dest, int pcb, byte[] dat, int edcInfo) throws T1BlockLengthException, T1BlockEDCErrorException
src
- source-address for T1 blockdest
- destination-address for T1-Blockpcb
- protocol control bytedat
- info data within T1 block
set to null for no data availableedcInfo
- EDC_LDR (XOR) or EDC_CRCpublic T1Block(byte[] rawBytes, int edcInfo) throws T1BlockLengthException, T1BlockEDCErrorException
Method Detail |
public int calcEDC()
public boolean checkEDC()
public byte[] getBlock()
public int getBlockType() throws T1UnknownBlockException
public byte getNAD()
public int getSourceID()
public int getDestID()
public byte getPCB()
public int getLEN()
public byte[] getDATA()
public int getEDC()
public int getEDCAlgorithm()
public int getControlBits() throws T1Exception
public java.lang.String toString()
public int getSourceAddress()
public int getDestinationAddress()
public int getRequestedSequenceNumber() throws T1Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |