Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## opencard.opt.terminal.protocol
Class T1Block

    java.lang.Object
      opencard.opt.terminal.protocol.T1Block

    public class T1Block

extends java.lang.Object

`T1Block` represents T1 block (see ISO7816-3)

Version:
  $Id: T1Block.java,v 1.2 1999/10/20 13:15:00 damke Exp $
Author:
  Stephan Breideneich (sbreiden@de.ibm.com)

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

### EDC_LDR

    public static final int EDC_LDR

  use LDR (XOR) algorithm for EDC byte

  See Also:
    Constant Field Values

### EDC_CRC

    public static final int EDC_CRC

  use CRC16 algorithm for EDC byte - not implemented

  See Also:
    Constant Field Values

### ERROR_NONE

    public static final int ERROR_NONE

  indicates error free operation

  See Also:
    Constant Field Values

### ERROR_EDC

    public static final int ERROR_EDC

  indicates EDC error

  See Also:
    Constant Field Values

### ERROR_OTHER

    public static final int ERROR_OTHER

  indicates other error

  See Also:
    Constant Field Values

### S_RESYNCH_REQUEST

    public static final int S_RESYNCH_REQUEST

  S_RESYNCH_REQUEST

  See Also:
    Constant Field Values

### S_RESYNCH_RESPONSE

    public static final int S_RESYNCH_RESPONSE

  S_RESYNCH_RESPONSE

  See Also:
    Constant Field Values

### S_IFS_REQUEST

    public static final int S_IFS_REQUEST

  S_IFS_REQUEST

  See Also:
    Constant Field Values

### S_IFS_RESPONSE

    public static final int S_IFS_RESPONSE

  S_IFS_RESPONSE

  See Also:
    Constant Field Values

### S_ABORT_REQUEST

    public static final int S_ABORT_REQUEST

  S_ABORT_REQUEST

  See Also:
    Constant Field Values

### S_ABORT_RESPONSE

    public static final int S_ABORT_RESPONSE

  S_ABORT_RESPONSE

  See Also:
    Constant Field Values

### S_WTX_REQUEST

    public static final int S_WTX_REQUEST

  S_WTX_REQUEST

  See Also:
    Constant Field Values

### S_WTX_RESPONSE

    public static final int S_WTX_RESPONSE

  S_WTX_RESPONSE

  See Also:
    Constant Field Values

### S_VPP_STATE_ERROR_RESPONSE

    public static final int S_VPP_STATE_ERROR_RESPONSE

  S_VPP_STATE_ERR_RESPONSE

  See Also:
    Constant Field Values

### I_BLOCK

    public static final int I_BLOCK

  I-block

  See Also:
    Constant Field Values

### R_BLOCK

    public static final int R_BLOCK

  R-block

  See Also:
    Constant Field Values

### S_BLOCK

    public static final int S_BLOCK

  S-block

  See Also:
    Constant Field Values

Constructor Detail

### T1Block

    public T1Block(int src,
                   int dest,
                   int pcb,
                   byte[] dat,
                   int edcInfo)
            throws T1BlockLengthException,
                   T1BlockEDCErrorException

  `Constructor`

  Parameters:
    `src` - source-address for T1 block
    `dest` - destination-address for T1-Block
    `pcb` - protocol control byte
    `dat` - info data within T1 block set to null for no data available
    `edcInfo` - EDC_LDR (XOR) or EDC_CRC
  Throws:
    `T1BlockLengthException`
    `T1BlockEDCErrorException`

### T1Block

    public T1Block(byte[] rawBytes,
                   int edcInfo)
            throws T1BlockLengthException,
                   T1BlockEDCErrorException

  create Block object from raw T1-Block

  Throws:
    `T1BlockLengthException`
    `T1BlockEDCErrorException`

Method Detail

### calcEDC

    public int calcEDC()

  calcEDC calculates the EDC-field according to the used EDC algorithm

### checkEDC

    public boolean checkEDC()

  checks the correctness of the given EDC byte (true, if EDC is correct)

### getBlock

    public byte[] getBlock()

  returns byte array with raw block data

### getBlockType

    public int getBlockType()
                     throws T1UnknownBlockException

  Throws:
    `T1UnknownBlockException`

### getNAD

    public byte getNAD()

### getSourceID

    public int getSourceID()

### getDestID

    public int getDestID()

### getPCB

    public byte getPCB()

### getLEN

    public int getLEN()

### getDATA

    public byte[] getDATA()

### getEDC

    public int getEDC()

### getEDCAlgorithm

    public int getEDCAlgorithm()

### getControlBits

    public int getControlBits()
                       throws T1Exception

  `getControlBits` returns block-specific controlbits without the blocktype

  Throws:
    `T1Exception`

### toString

    public java.lang.String toString()

  toString returns informations about this block object (not yet optimized)

  Overrides:
    `toString` in class `java.lang.Object`

### getSourceAddress

    public int getSourceAddress()

### getDestinationAddress

    public int getDestinationAddress()

### getRequestedSequenceNumber

    public int getRequestedSequenceNumber()
                                   throws T1Exception

  Throws:
    `T1Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD