tuwien.auto.eibxlator

Class PointPDUXlator_8BitUnsigned


public class PointPDUXlator_8BitUnsigned
extends PointPDUXlator

This class implements the KNX DPT 6 Application Layer type. The values are in the range of 0-255.

Field Summary

static String[]
DPT_ANGLE
Nr.
static String[]
DPT_SCALING
Nr.
static String[]
DPT_VALUE_1_UCOUNT
Nr.

Fields inherited from class tuwien.auto.eibxlator.PointPDUXlator

A_GROUPVALUE_READ, A_GROUPVALUE_RESPONSE, A_GROUPVALUE_WRITE

Constructor Summary

PointPDUXlator_8BitUnsigned()
Dummy constructor only used for initialising the eiclMap.
PointPDUXlator_8BitUnsigned(String _PointType_Minor_Key)
Inits the object with the requested minor type.

Method Summary

byte[]
getAPDUByteArray()
Converts the input values in the requested APDU/ASDU format.
short
getASDUasShort()
Returns the ASDU byte as short value.
short
getASDUasShortUnscaled()
The ASDU as short unscaled value.
String
getASDUasString()
Return a string interpretation of the ASDU byte.
EICLMap
getMinorTypes()
Get the type specific minor types
String
getPointTypeMinor()
Returns the set minor type.
void
setASDUfromShort(short _ASDU)
Sets the ASDU byte form a float.
void
setASDUfromShortUnscaled(short _ASDU)
Sets the ASDU byte from a unsigned unscaled short.
void
setASDUfromString(String _ASDU)
Sets the ASDU byte by parsing a string.

Methods inherited from class tuwien.auto.eibxlator.PointPDUXlator

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

Field Details

DPT_ANGLE

public static final String[] DPT_ANGLE
Nr. 5.003 Data Point Type Angle; values form 0 to 360 %

DPT_SCALING

public static final String[] DPT_SCALING
Nr. 5.001 Data Point Type Scaling; values from 0 to 100 %

DPT_VALUE_1_UCOUNT

public static final String[] DPT_VALUE_1_UCOUNT
Nr. 5.010 Data Point Type value 1 ucount; values from 0 to 255 counter pulses

Constructor Details

PointPDUXlator_8BitUnsigned

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

PointPDUXlator_8BitUnsigned

public PointPDUXlator_8BitUnsigned(String _PointType_Minor_Key)
            throws EICLException
Inits the object with the requested minor type.
Parameters:
_PointType_Minor_Key - the minor type key.
Throws:
EICLException - If the minor type key doesn't exist.

Method Details

getAPDUByteArray

public byte[] getAPDUByteArray()
Converts the input values in the requested APDU/ASDU format. The result is the complete Application Layer encoding.
Overrides:
getAPDUByteArray in interface PointPDUXlator
Returns:
the ASDU byte[]

getASDUasShort

public short getASDUasShort()
Returns the ASDU byte as short value. Note that DPT_SCALING and DPT_ANGLE are scaled.
Returns:
the ASDU as short.

getASDUasShortUnscaled

public short getASDUasShortUnscaled()
The ASDU as short unscaled value.
Returns:
The ASDU as short value.

getASDUasString

public String getASDUasString()
Return a string interpretation of the ASDU byte. The string is composed of the short value and 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

setASDUfromShort

public void setASDUfromShort(short _ASDU)
            throws EICLException
Sets the ASDU byte form a float. Note that DPT_SCALING and DPT_ANGLE values are interpreted scaled.
Parameters:
_ASDU - The ASDU short value.
Throws:
EICLException - If the conversion didn't succeed.

setASDUfromShortUnscaled

public void setASDUfromShortUnscaled(short _ASDU)
Sets the ASDU byte from a unsigned unscaled short.
Parameters:
_ASDU - The ASDU byte.

setASDUfromString

public void setASDUfromString(String _ASDU)
            throws EICLException
Sets the ASDU byte by parsing a string. The String is interpreted as short value. See setASDUfromShort() method for details.
Overrides:
setASDUfromString in interface PointPDUXlator