|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttuwien.auto.calimero.KNXAddress
public abstract class KNXAddress
Represents a KNX address.
An address consists of a 16 Bit unsigned value. Concrete implementations of address are
GroupAddress and IndividualAddress. Instances of
KNXAddress are immutable.
Loading and saving KNX addresses in XML format is supported.
| Method Summary | |
|---|---|
static KNXAddress |
create(java.lang.String address)
Creates a KNX address from a string address representation. |
static KNXAddress |
create(XMLReader r)
Creates a KNX address from xml input. |
int |
getRawAddress()
Returns the KNX address in 16 Bit value representation. |
abstract java.lang.String |
getType()
Returns the KNX address type, identifying a group or individual address. |
void |
save(XMLWriter w)
Writes the KNX address in XML format to the supplied writer. |
byte[] |
toByteArray()
Returns the raw address value in a new byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static KNXAddress create(java.lang.String address)
throws KNXFormatException
address representation.
An address level separator of type '.' found in address indicates an
individual address, i.e. an IndividualAddress is created, otherwise a
GroupAddress is created.
Allowed separators are '.' or '/', mutually exclusive.
address - string containing the KNX address
GroupAddress or
IndividualAddress
KNXFormatException - thrown on unknown address type, wrong address syntax or
wrong separator used
public static KNXAddress create(XMLReader r)
throws KNXMLException
The KNX address element is expected to be the current or next element from the parser.
r - a XML reader
GroupAddress or
IndividualAddress
KNXMLException - if the XML element is no KNX address, on unknown address
type or wrong address syntaxpublic final int getRawAddress()
public abstract java.lang.String getType()
public void save(XMLWriter w)
throws KNXMLException
w - a XML writer
KNXMLException - on output errorpublic final byte[] toByteArray()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||