|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttuwien.auto.calimero.dptxlator.DPT
public class DPT
Stores information about a datapoint type.
Besides the subtype ID of the DPT, a general description, and the unit of measure (if
any), there are two additional informational values. They contain string
representations of translator values. The first one should contain the string
representation of a low value, if possible the lower bound of the supported value
range, and the second contains a corresponding upper bound string value representation.
Even though not enforced, the preferred way for identifying a DPT is to use a datapoint
type ID (dptID) value in the format "[main number].[sub number]".
Instances of this type are immutable.
Constructor Summary | |
---|---|
DPT(java.lang.String typeID,
java.lang.String description,
java.lang.String lower,
java.lang.String upper)
Creates a new datapoint type information structure for a DPT without a unit. |
|
DPT(java.lang.String typeID,
java.lang.String description,
java.lang.String lower,
java.lang.String upper,
java.lang.String unit)
Creates a new datapoint type information structure. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getDescription()
Returns the DPT description. |
java.lang.String |
getID()
Returns the DPT identifier. |
java.lang.String |
getLowerValue()
Returns a lower value information. |
java.lang.String |
getUnit()
Returns the unit of measure for this DPT. |
java.lang.String |
getUpperValue()
Returns an upper value information. |
int |
hashCode()
|
java.lang.String |
toString()
Returns the DPT's information in concise textual format. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DPT(java.lang.String typeID, java.lang.String description, java.lang.String lower, java.lang.String upper)
typeID
- datapoint type identifierdescription
- short textual descriptionlower
- lower value informationupper
- upper value informationpublic DPT(java.lang.String typeID, java.lang.String description, java.lang.String lower, java.lang.String upper, java.lang.String unit)
typeID
- datapoint type identifierdescription
- short textual descriptionlower
- lower value informationupper
- upper value informationunit
- unit of measure, use "" or null
for no unitMethod Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public final java.lang.String getDescription()
public final java.lang.String getID()
public final java.lang.String getLowerValue()
The value either contains a string value representation of some lower bound in the value range of this DPT, or a more general DPT encoding range information if practicable.
public final java.lang.String getUnit()
public final java.lang.String getUpperValue()
It contains an upper value representation in the value range for this DPT. The
corresponding method getLowerValue()
should contain the lower bound value
then.
If no information about an upper value can be given, a DPT might set this
information optional, and the empty string is returned.
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 All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |