Class Statistics


  • public class Statistics
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Statistics()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Number computeValue​(java.lang.String aValue)  
      int getCount()  
      java.lang.String getCsvValues()
      Provide the gathered data as provided by Fritz!Box
      int getGrid()  
      MeasurementUnit getMeasurementUnit()
      Provide the measurement unit to be used with the statistics.
      java.util.List<java.util.Optional<java.lang.Number>> getValues()
      Provide the gathered data as computed as meant to be used by AVM
      protected void setCsvValues​(java.lang.String csvValues)
      Just for unit test provided.
      void setMeasurementUnit​(MeasurementUnit measurementUnit)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Statistics

        public Statistics()
    • Method Detail

      • getCount

        public int getCount()
      • getGrid

        public int getGrid()
      • getCsvValues

        public java.lang.String getCsvValues()
        Provide the gathered data as provided by Fritz!Box
        Returns:
      • setCsvValues

        protected void setCsvValues​(java.lang.String csvValues)
        Just for unit test provided. Therefore it is set to protected
      • getValues

        public java.util.List<java.util.Optional<java.lang.Number>> getValues()
        Provide the gathered data as computed as meant to be used by AVM
        Returns:
      • getMeasurementUnit

        public MeasurementUnit getMeasurementUnit()
        Provide the measurement unit to be used with the statistics.

        Consists of:

        • measurment unit [V, W, Wh, %]
        • precision as double to multiply with the gathered Integer
        Sample: The Voltage is measured in 'V' (Volt) and has a precision of '0.001'. The number 237123 provided by the statistics must be multiplied by the precision which gives us 237.123 V.
        Returns:
      • setMeasurementUnit

        public void setMeasurementUnit​(MeasurementUnit measurementUnit)
      • computeValue

        protected java.lang.Number computeValue​(java.lang.String aValue)