tuwien.auto.eibxlator

Class PointPDUXlator_2ByteFloat


public class PointPDUXlator_2ByteFloat
extends PointPDUXlator

This class implements the EIB Application Layer type EIS 5. This type is a two byte floating format with the granularity of 0.01 and the max. Value of 670760.

Field Summary

static String[]
DPT_AIR_PRESSURE
Nr.
static String[]
DPT_ELECTRICAL_CURRENT
Nr.
static String[]
DPT_INTENSITY_OF_LIGHT
Nr.
static String[]
DPT_TEMPERATURE
Nr.
static String[]
DPT_TEMPERATURE_DIFFERENCE
Nr.
static String[]
DPT_TEMPERATURE_GRADIENT
Nr.
static String[]
DPT_TIME_DIFFERENCE1
Nr.
static String[]
DPT_TIME_DIFFERENCE2
Nr.
static String[]
DPT_VOLTAGE
Nr.
static String[]
DPT_WIND_SPEED
Nr.

Fields inherited from class tuwien.auto.eibxlator.PointPDUXlator

A_GROUPVALUE_READ, A_GROUPVALUE_RESPONSE, A_GROUPVALUE_WRITE

Constructor Summary

PointPDUXlator_2ByteFloat()
Dummy constructor only used for initialising the eiclMap.
PointPDUXlator_2ByteFloat(String _PointType_Minor)
Initializes the object and sets the minor point type.

Method Summary

byte[]
getAPDUByteArray()
Returns the APDU Byte array.
float
getASDUasFloat()
Returns the ASDU value as float.
String
getASDUasString()
Returns the ASDU in string format with the addition of the corresponding unit of measurement.
EICLMap
getMinorTypes()
Get the type specific minor types
String
getPointTypeMinor()
Returns the set minor type.
void
setASDUfromFloat(float _ASDU)
Sets the ASDU bytes from float values.
void
setASDUfromString(String _ASDU)
Set the ASDU from a string value.

Methods inherited from class tuwien.auto.eibxlator.PointPDUXlator

getAPDUByteArray, getASDUasString, getMinorTypes, getPointTypeMinor, getServiceType, setAPDUByteArray, setASDUfromString, setServiceType

Field Details

DPT_AIR_PRESSURE

public static final String[] DPT_AIR_PRESSURE
Nr. 5.006 Data Point Type Air pressure; values from 0 to 670760 Pa

DPT_ELECTRICAL_CURRENT

public static final String[] DPT_ELECTRICAL_CURRENT
Nr. 5.021 Data Point Type Electrical Current; values from +/-670760 mA

DPT_INTENSITY_OF_LIGHT

public static final String[] DPT_INTENSITY_OF_LIGHT
Nr. 5.004 Data Point Type Intensity of light; values from 0 to 670760 Lux

DPT_TEMPERATURE

public static final String[] DPT_TEMPERATURE
Nr. 5.001 Data Point Type Temperature; values from -273 to +670670 degrees C

DPT_TEMPERATURE_DIFFERENCE

public static final String[] DPT_TEMPERATURE_DIFFERENCE
Nr. 5.002 Data Point Type Temperature difference; values of +/- 670760 K

DPT_TEMPERATURE_GRADIENT

public static final String[] DPT_TEMPERATURE_GRADIENT
Nr. 5.003 Data Point Type Temperature gradient; values of +/- 670760 K/h

DPT_TIME_DIFFERENCE1

public static final String[] DPT_TIME_DIFFERENCE1
Nr. 5.010 Data Point Type Time difference1; values of +/-670760 s

DPT_TIME_DIFFERENCE2

public static final String[] DPT_TIME_DIFFERENCE2
Nr. 5.011 Data Point Type Time difference 2; values of +/-670760 ms

DPT_VOLTAGE

public static final String[] DPT_VOLTAGE
Nr. 5.020 Data Point Type Voltage; values of +/-670760 mV

DPT_WIND_SPEED

public static final String[] DPT_WIND_SPEED
Nr. 5.005 Data Point Type Wind speed; values from 0 to 670760 m/s

Constructor Details

PointPDUXlator_2ByteFloat

public PointPDUXlator_2ByteFloat()
Dummy constructor only used for initialising the eiclMap. Don't use this.

PointPDUXlator_2ByteFloat

public PointPDUXlator_2ByteFloat(String _PointType_Minor)
            throws EICLException
Initializes the object and sets the minor point type.
Parameters:
_PointType_Minor - The minor point type.
Throws:
EICLException - The Exception is thrown if the minor point type doesn't exist.

Method Details

getAPDUByteArray

public byte[] getAPDUByteArray()
Returns the APDU Byte array. This method is thought for encoding.
Overrides:
getAPDUByteArray in interface PointPDUXlator

getASDUasFloat

public float getASDUasFloat()
Returns the ASDU value as float. If the ASDU has not the expected format (To few bytes for example) 0 is returned.
Returns:
The ASDU value turned in float value.

getASDUasString

public String getASDUasString()
Returns the ASDU in string format with the addition of the corresponding unit of measurement.
Overrides:
getASDUasString in interface PointPDUXlator

getMinorTypes

public EICLMap getMinorTypes()
Get the type specific minor types
Overrides:
getMinorTypes in interface PointPDUXlator
Returns:
the minor types

getPointTypeMinor

public String getPointTypeMinor()
Returns the set minor type.
Overrides:
getPointTypeMinor in interface PointPDUXlator
Returns:
The minor type

setASDUfromFloat

public void setASDUfromFloat(float _ASDU)
            throws EICLException
Sets the ASDU bytes from float values.
Parameters:
_ASDU - The ASDU float value.
Throws:
EICLException - If the exponent is > 15.

setASDUfromString

public void setASDUfromString(String _ASDU)
            throws EICLException
Set the ASDU from a string value. The string is interpreted as float value.
Overrides:
setASDUfromString in interface PointPDUXlator
Parameters:
_ASDU - The float value in string format