|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttuwien.auto.calimero.KNXAddress
tuwien.auto.calimero.IndividualAddress
public class IndividualAddress
Represents an immutable KNX individual address.
An individual address is built up from 3 levels: area.line.device (4.4.8 bits) with
separator of type '.' or '/'.
The sometimes used term "zone" is synonymous with "area".
Constructor Summary | |
---|---|
IndividualAddress(byte[] address)
Creates a KNX individual address from a byte array value. |
|
IndividualAddress(int address)
Creates a KNX individual address from a 16 Bit address value. |
|
IndividualAddress(int area,
int line,
int device)
Creates a KNX individual address from the 3-level notation area-, line- and device-address. |
|
IndividualAddress(java.lang.String address)
Creates a KNX individual address from a string address
representation. |
|
IndividualAddress(XMLReader r)
Creates a KNX individual address from xml input. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Returns whether obj is equal to this KNX address type. |
byte |
getArea()
Returns the area address. |
short |
getDevice()
Returns the device address. |
byte |
getLine()
Returns the line address. |
java.lang.String |
getType()
Returns the KNX address type, identifying a group or individual address. |
int |
hashCode()
|
java.lang.String |
toString()
Returns the address as a string using the 3-level "area.line.device" notation. |
Methods inherited from class tuwien.auto.calimero.KNXAddress |
---|
create, create, getRawAddress, save, toByteArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IndividualAddress(byte[] address)
The address is read out of the first 2 byte fields, while the address array itself
might be longer. The content of address
is not modified.
address
- the address byte array in big-endian format, with address.length > 1public IndividualAddress(int address)
address
- the address value in the range 0 <= value <= 0xFFFFpublic IndividualAddress(int area, int line, int device)
area
- area address value, in the range 0 <= value <= 0xFline
- line address value, in the range 0 <= value <= 0xFdevice
- device address value, in the range 0 <= value <= 0xFFpublic IndividualAddress(java.lang.String address) throws KNXFormatException
address
representation.
The address consists of 3 levels (see class header specification). Allowed separators are '.' or '/', mutually exclusive.
address
- string containing the KNX address
KNXFormatException
- on unknown address type, wrong address syntax, address
values out of range, or wrong separator usedpublic IndividualAddress(XMLReader r) throws KNXMLException
If the current XML element position is no start tag, the next element tag is read. The KNX address element is then expected to be the current element in the reader.
r
- a XML reader
KNXMLException
- if the XML element is no KNXAddress or the address couldn't
be read in correctlyMethod Detail |
---|
public boolean equals(java.lang.Object obj)
obj
is equal to this KNX address type.
equals
in class java.lang.Object
obj
- knx address object
true
iff obj
is of this type and contains the
same address, false
otherwisepublic final byte getArea()
The area address consists of the 4 most significant Bits in the address field.
public final short getDevice()
The device address consists of the low byte of the 16 Bit address field.
public final byte getLine()
The line address consists of 4 bits, starting with bit 8 to 11 in the address field.
public java.lang.String getType()
KNXAddress
getType
in class KNXAddress
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |