org.openmuc.jmbus
Class VariableDataBlock
java.lang.Object
org.openmuc.jmbus.VariableDataBlock
public class VariableDataBlock
- extends java.lang.Object
Representation of a Variable Data Block.
A variable data block is the basic data entity in the M-Bus application layer. They form parts of different types of
M-Bus messages (e.g. a VariableDataResponse - RESP-UD). It encodes information on the data type, status, meaning,
unit and value of a date. Data type and status are encoded in the DIB (Data Information Block) whilst meaning and
unit are encoded in the VIB (Value Information Block).
Constructor Summary |
VariableDataBlock(byte[] dib,
byte[] vib,
byte[] data,
java.lang.Integer lvar)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VariableDataBlock
public VariableDataBlock(byte[] dib,
byte[] vib,
byte[] data,
java.lang.Integer lvar)
getLvar
public java.lang.Integer getLvar()
getDIB
public byte[] getDIB()
getVIB
public byte[] getVIB()
getDataBytes
public byte[] getDataBytes()
getData
public java.lang.Object getData()
getDataType
public VariableDataBlock.DataType getDataType()
getScaledValue
public java.lang.Double getScaledValue()
- Returns the data (value) multiplied by the multiplier as a Double. If the data is not a number than null is
returned.
- Returns:
- the data (value) multiplied by the multiplier as a Double
getFunctionField
public VariableDataBlock.FunctionField getFunctionField()
getDataField
public byte getDataField()
getStorageNumber
public long getStorageNumber()
getTariff
public int getTariff()
getDeviceUnit
public short getDeviceUnit()
getDescription
public VariableDataBlock.Description getDescription()
getMultiplier
public byte getMultiplier()
getUnit
public int getUnit()
parse
public void parse()
throws java.text.ParseException
- Throws:
java.text.ParseException