public class T1Block
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
T1Block(byte[] rawBytes,
int edcInfo)
create Block object from raw T1-Block
|
T1Block(int src,
int dest,
int pcb,
byte[] dat,
int edcInfo)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
addDATA(byte[] data) |
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() |
boolean |
hasMoreData() |
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
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_CRCT1BlockLengthExceptionT1BlockEDCErrorExceptionpublic T1Block(byte[] rawBytes,
int edcInfo)
throws T1BlockLengthException,
T1BlockEDCErrorException
public int calcEDC()
public boolean checkEDC()
public byte[] getBlock()
public int getBlockType()
throws T1UnknownBlockException
T1UnknownBlockExceptionpublic boolean hasMoreData()
public byte getNAD()
public int getSourceID()
public int getDestID()
public byte getPCB()
public int getLEN()
public byte[] getDATA()
public byte[] addDATA(byte[] data)
public int getEDC()
public int getEDCAlgorithm()
public int getControlBits()
throws T1Exception
T1Exceptionpublic int getSourceAddress()
public int getDestinationAddress()
public int getRequestedSequenceNumber()
throws T1Exception
T1ExceptionCopyright © 2025. All rights reserved.