|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttuwien.auto.calimero.datapoint.Datapoint
public abstract class Datapoint
Represents a KNX datapoint configuration.
It stores knowledge about a datapoint in the KNX network, used for communication within
Calimero, the KNX network, and the user.
The datapoint is identified through a KNX group address. A name is supplied to allow a
more friendly interaction with the user, the selected name does not have to be unique.
Information exchanged between datapoints consists of a certain encoding, defined by a
datapoint type (DPT). This information exchange is done through messages, which are
sent with a Priority
associated with the respective datapoint. Every datapoint
object can have its own DPT and priority set by using datapoint methods.
Note, only information for how to handle interaction is stored within a datapoint type.
Neither datapoint values (states or events), nor any datapoint messages are stored.
A KNX datapoint is either state based StateDP
or command based
CommandDP
.
Method Summary | |
---|---|
static Datapoint |
create(XMLReader r)
Creates a new datapoint from XML input. |
java.lang.String |
getDPT()
Returns the datapoint type ID of a DPT translator to use for datapoint value translation. |
GroupAddress |
getMainAddress()
Returns the datapoint main address, a KNX group address identifying this datapoint. |
int |
getMainNumber()
Returns the main number of the data type to use for datapoint value translation. |
java.lang.String |
getName()
Returns the datapoint name. |
Priority |
getPriority()
Returns the KNX message priority assigned to this datapoint. |
boolean |
isStateBased()
Returns whether this datapoint is state or command based. |
void |
save(XMLWriter w)
Saves this datapoint in XML format to the supplied XML writer. |
void |
setDPT(int mainNumber,
java.lang.String dptID)
Sets the datapoint type to use for translation of datapoint values. |
void |
setName(java.lang.String friendlyName)
Sets the datapoint name. |
void |
setPriority(Priority p)
Sets the priority used for KNX messages of this datapoint. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static Datapoint create(XMLReader r) throws KNXMLException
If the current XML element position is no start tag, the next element tag is read. The datapoint element is then expected to be the current element in the reader.
r
- a XML reader
StateDP
or CommandDP
KNXMLException
- if the XML element is no datapoint or could not be read
correctlypublic final java.lang.String getDPT()
public final GroupAddress getMainAddress()
public final int getMainNumber()
If the DPT (see getDPT()
) assigned to this datapoint unambiguously
identifies the DPT translator, the returned main number might be left 0 by the user
of this datapoint.
public final java.lang.String getName()
public final Priority getPriority()
public final boolean isStateBased()
true
if datapoint is state based, false
for
command basedpublic void save(XMLWriter w) throws KNXMLException
w
- a XML writer
KNXMLException
- on error saving this datapointpublic final void setDPT(int mainNumber, java.lang.String dptID)
A datapoint type is used with DPTXlator
s for value translation.
mainNumber
- main number of the data type used for translation of a datapoint
value; if the used dptID
argument unambiguously identifies a
DPT translator, main number might be left 0dptID
- the datapoint type used for translation in a DPT translatorpublic final void setName(java.lang.String friendlyName)
The datapoint name might be any user defined name, it is only used for interaction with the user.
friendlyName
- user friendly name of the datapointpublic final void setPriority(Priority p)
p
- the new priority to assignpublic 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 |