org.openmuc.jmbus.internal
Class MBusLPdu

java.lang.Object
  extended by org.openmuc.jmbus.internal.MBusLPdu

public class MBusLPdu
extends java.lang.Object

Represent and parse a data link layer message. Data link layer according to EN 13757-2 (wired MBUS). Such messages are in format FT 1.2 according to IEC 870-5-2:1992.


Field Summary
 byte aField
           
protected  int apduLength
           
protected  int apduStart
           
 byte cField
           
 short checksum
           
 short ciField
           
 short length
           
protected  byte[] lpdu
           
static int MSG_TYPE_LONG_MSG
           
static int MSG_TYPE_SHORT_MSG
           
static int MSG_TYPE_SIMPLE_CHAR
           
static int MSG_TYPE_UNKNOWN
           
 int msgType
           
 
Constructor Summary
MBusLPdu(byte[] lpdu)
           
 
Method Summary
 byte getAField()
           
 java.nio.ByteBuffer getAPDU()
           
 byte getCField()
           
 byte[] getRawMessage()
           
 int getType()
           
 void parse()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MSG_TYPE_SIMPLE_CHAR

public static final int MSG_TYPE_SIMPLE_CHAR
See Also:
Constant Field Values

MSG_TYPE_SHORT_MSG

public static final int MSG_TYPE_SHORT_MSG
See Also:
Constant Field Values

MSG_TYPE_LONG_MSG

public static final int MSG_TYPE_LONG_MSG
See Also:
Constant Field Values

MSG_TYPE_UNKNOWN

public static final int MSG_TYPE_UNKNOWN
See Also:
Constant Field Values

msgType

public int msgType

cField

public byte cField

ciField

public short ciField

aField

public byte aField

length

public short length

checksum

public short checksum

lpdu

protected byte[] lpdu

apduStart

protected int apduStart

apduLength

protected int apduLength
Constructor Detail

MBusLPdu

public MBusLPdu(byte[] lpdu)
Method Detail

getAPDU

public java.nio.ByteBuffer getAPDU()

getAField

public byte getAField()

getCField

public byte getCField()

getType

public int getType()

parse

public void parse()
           throws java.io.IOException
Throws:
java.io.IOException

getRawMessage

public byte[] getRawMessage()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object