|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--cnrg.itx.datax.devices.FECBuffer
Class to implement the forward error correction mechanism. This class will be used to construct FEC buffers from single byte buffers. (July 1999 addition) No created buffer will be less than 1 byte in size.
| Field Summary | |
(package private) byte[][] |
fecBuffer
Attribute for storing the previous packets sent for Forward Error Correction. |
private int |
iPacketSize
attribute to hold packet size. |
private static int |
numFECPackets
Constant for specifying the number of packets to be used for Forward Error Correction. |
private static byte |
SILENCE
Constant for the value of a silence byte. |
| Constructor Summary | |
FECBuffer(int iPacketSize)
Default constructor for the FECBuffer object. |
|
| Method Summary | |
byte[] |
getBuffer(int index)
Method to get one of the buffers from the FEC buffer. |
int |
getNumFECPackets()
Accessor to get the number of FEC packets. |
private short |
getShort(byte[] packet,
int pos)
Method to get a short(16 bit) value from a position in a byte array. |
byte[] |
pack(byte[] packet)
Method to construct a FEC packet from a buffer. |
private void |
setShort(byte[] packet,
int pos,
short value)
Method to set a short(16 bit) value in a byte array. |
byte[] |
unpack(byte[] fecPacket)
Method to put in a FEC packet and split it into its components. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static final int numFECPackets
byte[][] fecBuffer
private int iPacketSize
private static final byte SILENCE
| Constructor Detail |
public FECBuffer(int iPacketSize)
| Method Detail |
public int getNumFECPackets()
public byte[] getBuffer(int index)
index - the index of the buffer to getpublic byte[] pack(byte[] packet)
packet - the buffer that needs to be forward error correctedpublic byte[] unpack(byte[] fecPacket)
fecPacket - the byte array for all the packets
private void setShort(byte[] packet,
int pos,
short value)
packet - the byte array to put the value inpos - the position at which the bytes need to be putvalue - the short value to be put
private short getShort(byte[] packet,
int pos)
packet - the byte array to get the value frompos - the position from which to get the 16 bit value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||