java.lang.Object
plp.link.PLPFrame
- public class PLPFrame
- extends java.lang.Object
Represents a PLPFrame for a Nokia 9210
and probrally others
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STX
public static final byte STX
- See Also:
- Constant Field Values
ETX
public static final byte ETX
- See Also:
- Constant Field Values
EOT
public static final byte EOT
- See Also:
- Constant Field Values
DLE
public static final byte DLE
- See Also:
- Constant Field Values
DC1
public static final byte DC1
- See Also:
- Constant Field Values
DC3
public static final byte DC3
- See Also:
- Constant Field Values
SYN
public static final byte SYN
- See Also:
- Constant Field Values
ETB
public static final byte ETB
- See Also:
- Constant Field Values
startBytes
private static final byte[] startBytes
stopBytesWithoutCRC16
private static final byte[] stopBytesWithoutCRC16
seq
private int seq
cont
private byte cont
data
private byte[] data
crc
private byte[] crc
calculatedCRC
private int calculatedCRC
dataStuffer
private static tools.bytestuffer.ByteStuffer dataStuffer
crcStuffer
private static tools.bytestuffer.ByteStuffer crcStuffer
parser
private static plp.link.plpframeparser.PLPFrameParser parser
MIN_LENGTH
public static final int MIN_LENGTH
- The minimin number of bytes this frame can be
- See Also:
- Constant Field Values
DEBUG
public static boolean DEBUG
PLPFrame
public PLPFrame()
PLPFrame
public PLPFrame(PLPFrame.PDU pduType,
byte[] data)
getMinLength
public static int getMinLength()
- The minimin number of bytes this frame can be
getStartBytes
public static byte[] getStartBytes()
getEndBytes
public static byte[] getEndBytes()
getData
public byte[] getData()
getCont
public byte getCont()
getSeq
public int getSeq()
setCont
public void setCont(byte cont)
setSeq
public void setSeq(int seq)
setData
public void setData(byte[] newData)
getContSeq
public byte[] getContSeq()
grabFrameFromBytes
public int grabFrameFromBytes(byte[] data)
grabFrameFromBytes
public int grabFrameFromBytes(byte[] data,
int endIndex)
getParser
protected static plp.link.plpframeparser.PLPFrameParser getParser()
getDataStuffer
protected tools.bytestuffer.ByteStuffer getDataStuffer()
getCRCStuffer
protected tools.bytestuffer.ByteStuffer getCRCStuffer()
stuff
public byte[] stuff(byte[] data)
getBytes
public byte[] getBytes()
- I can tell you which bytes to send over a serial line, by asking me
getBytes.
setCRC
public void setCRC(byte[] crc)
getCRC
public byte[] getCRC()
calculateCRC
protected int calculateCRC()
calculateCRCBytes
protected byte[] calculateCRCBytes()
isCRCCorrect
public boolean isCRCCorrect()
setPDUType
public void setPDUType(PLPFrame.PDU type)
getPDUType
public PLPFrame.PDU getPDUType()