tuwien.auto.eibxlator

Class PointPDUXlator_3BitControlled


public class PointPDUXlator_3BitControlled
extends PointPDUXlator

This class implements the KNX DPT 3. Minor type dimming, blinds and boiler. This type consists of a increase, decrease bit and a 3 bit value.

Field Summary

static String[]
DPT_Control_Blinds
Nr.
static String[]
DPT_Control_Dimming
Nr.
static String[]
DPT_Mode_Boiler
Nr.

Fields inherited from class tuwien.auto.eibxlator.PointPDUXlator

A_GROUPVALUE_READ, A_GROUPVALUE_RESPONSE, A_GROUPVALUE_WRITE

Constructor Summary

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

Method Summary

byte[]
getAPDUByteArray()
Converts the input values in the requested APDU/ASDU format.
boolean
getASDUControlBit()
Retrieves the increase decrease boolean value
float
getASDUValueFieldScaled()
Returns the encapsulated ASDU value scaled in percent as float.
short
getASDUValueFieldUnscaled()
Return the ASDU value unscaled as short.
String
getASDUasString()
Returns a String composed by the control bit value, the step value and the to the minor type corresponding unit of measurement.
EICLMap
getMinorTypes()
Get the type specific minor types
String
getPointTypeMinor()
Returns the set minor type.
void
setASDUControlBit(boolean _Direction)
Sets the ASDU control bit to the specified direction. false is interpreted as negative (decrease), whereas true is interpreted as positive value(increase).
void
setASDUValueFieldScaled(float stepValue)
Sets the ASDU value form a scaled float value.
void
setASDUValueFieldUnsigned(short stepValue)
Sets the ASDU value from a unsigned unscaled short value.
void
setASDUfromString(String _ASDU)
Sets the ASDU from a String.

Methods inherited from class tuwien.auto.eibxlator.PointPDUXlator

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

Field Details

DPT_Control_Blinds

public static final String[] DPT_Control_Blinds
Nr. 1.008 Data Point Type Blinds Control; Values are boolean.updown

DPT_Control_Dimming

public static final String[] DPT_Control_Dimming
Nr. 1.007 Data Point Type Dimming Control; Values are boolean.step

DPT_Mode_Boiler

public static final String[] DPT_Mode_Boiler
Nr. 1.014 Data Point Type Boiler Mode; Values are boolean.inputsource

Constructor Details

PointPDUXlator_3BitControlled

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

PointPDUXlator_3BitControlled

public PointPDUXlator_3BitControlled(String _PointType_Minor_Key)
            throws EICLException
Inits the object with the given minor type
Parameters:
_PointType_Minor_Key - the requested minor type key
Throws:
EICLException - if the 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[]

getASDUControlBit

public boolean getASDUControlBit()
Retrieves the increase decrease boolean value
Returns:
True if the value is decrease. False if the message is an increase value.

getASDUValueFieldScaled

public float getASDUValueFieldScaled()
Returns the encapsulated ASDU value scaled in percent as float.
Returns:
The ASDU as float value.

getASDUValueFieldUnscaled

public short getASDUValueFieldUnscaled()
Return the ASDU value unscaled as short.
Returns:
The ASDU value.

getASDUasString

public String getASDUasString()
Returns a String composed by the control bit value, the step value and the to the minor type corresponding unit of measurement.
Overrides:
getASDUasString in interface PointPDUXlator
Returns:
The string interpretation of the ASDU.

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

setASDUControlBit

public void setASDUControlBit(boolean _Direction)
Sets the ASDU control bit to the specified direction. false is interpreted as negative (decrease), whereas true is interpreted as positive value(increase).
Parameters:
_Direction - The ASDU direction to be set.

setASDUValueFieldScaled

public void setASDUValueFieldScaled(float stepValue)
            throws EICLException
Sets the ASDU value form a scaled float value. Note that 000 corresponds to a step break.
Parameters:
stepValue - The ASDU value.
Throws:
EICLException - If the step value is outside 0..7.

setASDUValueFieldUnsigned

public void setASDUValueFieldUnsigned(short stepValue)
            throws EICLException
Sets the ASDU value from a unsigned unscaled short value. Note that 000 corresponds to a step break.
Parameters:
stepValue - The ASDU value.
Throws:
EICLException - If the step value is outside 0..7.

setASDUfromString

public void setASDUfromString(String _ASDU)
            throws EICLException
Sets the ASDU from a String. The string must be composed of the corresponding minor type control flag value separated by a blank from the value itself. Note that all values are interpreted unsigned short.
Overrides:
setASDUfromString in interface PointPDUXlator