Search in sources :

Example 16 with AnalogStatistics

use of com.serotonin.m2m2.view.stats.AnalogStatistics in project ma-core-public by infiniteautomation.

the class NumericPointWrapper method getStats.

public AnalogStatisticsWrapper getStats(long from, long to) {
    PointValueTime start = point.getPointValueBefore(from);
    List<PointValueTime> values = point.getPointValuesBetween(from, to);
    AnalogStatistics stats = new AnalogStatistics(from, to, start, values);
    AnalogStatisticsWrapper wrapper = new AnalogStatisticsWrapper(stats);
    return wrapper;
}
Also used : PointValueTime(com.serotonin.m2m2.rt.dataImage.PointValueTime) AnalogStatistics(com.infiniteautomation.mango.statistics.AnalogStatistics)

Aggregations

AnalogStatistics (com.infiniteautomation.mango.statistics.AnalogStatistics)10 IOException (java.io.IOException)9 Test (org.junit.Test)9 NumericValue (com.serotonin.m2m2.rt.dataImage.types.NumericValue)8 NextTimePeriodAdjuster (com.infiniteautomation.mango.util.datetime.NextTimePeriodAdjuster)7 IdPointValueTime (com.serotonin.m2m2.rt.dataImage.IdPointValueTime)7 ZonedDateTime (java.time.ZonedDateTime)7 MutableInt (org.apache.commons.lang3.mutable.MutableInt)7 ArrayList (java.util.ArrayList)6 PointValueTime (com.serotonin.m2m2.rt.dataImage.PointValueTime)4 AnalogStatistics (com.serotonin.m2m2.view.stats.AnalogStatistics)4 ValueChangeCounter (com.serotonin.m2m2.view.stats.ValueChangeCounter)4 ShouldNeverHappenException (com.serotonin.ShouldNeverHappenException)3 StatisticsGenerator (com.serotonin.m2m2.view.stats.StatisticsGenerator)2 DataPointVO (com.serotonin.m2m2.vo.DataPointVO)2 StartsAndRuntime (com.infiniteautomation.mango.statistics.StartsAndRuntime)1 StartsAndRuntimeList (com.infiniteautomation.mango.statistics.StartsAndRuntimeList)1 PointValueFacade (com.serotonin.m2m2.rt.dataImage.PointValueFacade)1 BinaryValue (com.serotonin.m2m2.rt.dataImage.types.BinaryValue)1 DataValue (com.serotonin.m2m2.rt.dataImage.types.DataValue)1