Class Statistics


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

      Constructors 
      Constructor Description
      Statistics()  
    • Constructor Detail

      • Statistics

        public Statistics()
    • Method Detail

      • getCount

        public int getCount()
      • getGrid

        public int getGrid()
      • getDataTimeRaw

        public java.lang.Long getDataTimeRaw()
        Get the raw timestamp in seconds since epoch.
        Returns:
        raw timestamp or null if not available
      • getDataTime

        public java.time.Instant getDataTime()
        Get the timestamp.
        Returns:
        timestamp or null if not available
      • getCsvValues

        public java.lang.String getCsvValues()
        Provide the gathered data as provided by Fritz!Box
        Returns:
        data provided by the Fritz!Box
      • 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:
        the gathered data
      • 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:
        the measurement unit
      • setMeasurementUnit

        public void setMeasurementUnit​(MeasurementUnit measurementUnit)
      • computeValue

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