Class CalculateLongSum
- java.lang.Object
-
- io.openems.edge.common.channel.calculate.CalculateLongSum
-
public class CalculateLongSum extends java.lang.Object
Helper class to sum up Long-Channels.
-
-
Constructor Summary
Constructors Constructor Description CalculateLongSum()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(Channel<java.lang.Long> channel)
Adds a Channel-Value.java.lang.Long
calculate()
Calculates the sum.
-
-
-
Method Detail
-
addValue
public void addValue(Channel<java.lang.Long> channel)
Adds a Channel-Value.- Parameters:
channel
- the Channel
-
calculate
public java.lang.Long calculate() throws java.util.NoSuchElementException
Calculates the sum.- Returns:
- the sum or null
- Throws:
java.util.NoSuchElementException
- on error
-
-