Class DataSet


  • public class DataSet
    extends java.lang.Object
    A data message contains a list of data sets. Each data set consists of 3 fields "address", "value", and "unit". Each of these fields is optional an may thus be equal to the empty string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAddress()
      Returns the address/ID of this data set.
      java.lang.String getUnit()
      Returns the unit of this data set as a string.
      java.lang.String getValue()
      Returns the value of this data set as a string.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getAddress

        public java.lang.String getAddress()
        Returns the address/ID of this data set.

        The address is usually an OBIS code of the format A-B:C.D.E*F or on older EDIS code of the format C.D.E. that specifies exactly what the value of this data set represents. C is the type of the measured quantity (e.g 1 = positive active power), D describes the measurement mode and E is the tariff (e.g. 0 for total or 1 for tariff 1 only) associated with this value.

        If this data set contains no address this function returns the empty string.

        Returns:
        the address
      • getValue

        public java.lang.String getValue()
        Returns the value of this data set as a string.

        The value is usually a decimal number that can be converted to a Double using Double.parseDouble(String). But the value may also be a date or have some other format.

        If this data set contains no value this function returns the empty string.

        Returns:
        the value
      • getUnit

        public java.lang.String getUnit()
        Returns the unit of this data set as a string.

        If this data set contains no unit this function returns the empty string.

        Returns:
        the unit
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object