Class Statistics
- java.lang.Object
-
- com.github.kaklakariada.fritzbox.model.homeautomation.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.NumbercomputeValue(java.lang.String aValue)intgetCount()java.lang.StringgetCsvValues()Provide the gathered data as provided by Fritz!Boxjava.time.InstantgetDataTime()Get the timestamp.java.lang.LonggetDataTimeRaw()Get the raw timestamp in seconds since epoch.intgetGrid()MeasurementUnitgetMeasurementUnit()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 AVMvoidsetMeasurementUnit(MeasurementUnit measurementUnit)
-
-
-
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
nullif not available
-
getDataTime
public java.time.Instant getDataTime()
Get the timestamp.- Returns:
- timestamp or
nullif 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
- Returns:
- the measurement unit
-
setMeasurementUnit
public void setMeasurementUnit(MeasurementUnit measurementUnit)
-
computeValue
protected java.lang.Number computeValue(java.lang.String aValue)
-
-