Class CalculateAverage
java.lang.Object
io.openems.edge.common.channel.calculate.CalculateAverage
Helper class to calculate the average of Channel-Values.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CalculateAverage
public CalculateAverage()
-
-
Method Details
-
addValue
Adds a Channel-Value.- Parameters:
channel
- the channel
-
calculate
Calculates the average.- Returns:
- the average or null
- Throws:
NoSuchElementException
-
calculateRounded
Calculates the average and rounds to Integer.- Returns:
- the average or null
- Throws:
NoSuchElementException
-