tuwien.auto.eibxlator

Class PointPDUXlator_String


public class PointPDUXlator_String
extends PointPDUXlator

This class implements KNX DPT 16 (String) with minor types 000 (ASCII string) and 001 (ISO 8859-1 encoded string).

Field Summary

static String[]
DPT_String_8859_1
Nr.
static String[]
DPT_String_ASCII
Nr.

Fields inherited from class tuwien.auto.eibxlator.PointPDUXlator

A_GROUPVALUE_READ, A_GROUPVALUE_RESPONSE, A_GROUPVALUE_WRITE

Constructor Summary

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

Method Summary

byte[]
getAPDUByteArray()
Converts the input values to the KNX/EIB network format.
String
getASDUasString()
Returns the String represented by the ASDU.
EICLMap
getMinorTypes()
Get the type specific minor types
String
getPointTypeMinor()
Returns the set minor type.
void
setASDUfromString(String content)
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_String_8859_1

public static final String[] DPT_String_8859_1
Nr. 16.001 Datapoint Type DPT_String_8859_1

DPT_String_ASCII

public static final String[] DPT_String_ASCII
Nr. 16.000 Datapoint Type DPT_String_ASCII

Constructor Details

PointPDUXlator_String

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

PointPDUXlator_String

public PointPDUXlator_String(String _PointType_Minor_Key)
            throws EICLException
Inits the object with the given minor type
Parameters:
_PointType_Minor_Key - the requested minor type key ("16.000", "16.001")
Throws:
EICLException - if the key is invalid

Method Details

getAPDUByteArray

public byte[] getAPDUByteArray()
Converts the input values to the KNX/EIB network format. The string defined via setASDUfromString() is converted to US-ASCII or ISO-8859-1 as defined by the chosen minor type. Unmappable characters are silently replaced, typically with question marks.
Overrides:
getAPDUByteArray in interface PointPDUXlator
Returns:
The TPDU, which is always 16 bytes in size for this DPT (1 octet TPCI/APCI, 1 octet APCI, 14 octets data).

getASDUasString

public String getASDUasString()
Returns the String represented by the ASDU.
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

setASDUfromString

public void setASDUfromString(String content)
            throws EICLException
Sets the ASDU from a String.
Overrides:
setASDUfromString in interface PointPDUXlator
Parameters:
content - The string to be converted.
Throws:
EICLException - if the maximum length is exceeded.