Package io.openems.edge.common.filter
Class RampFilter
java.lang.Object
io.openems.edge.common.filter.RampFilter
- Direct Known Subclasses:
DisabledRampFilter
A controller that applies a ramp to a given value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFilteredValueAsInteger
(float lastValue, Float targetValue, float maxChangePerCall) Get filtered value using the given lastValue, the value to reach and a fixed maximum change per call.getFilteredValueAsInteger
(float lastValue, Float targetValue, float maximumLimit, float increaseRate) Get filtered value using the given lastValue, the value to reach and a calculated maximum change per call.getFilteredValueAsInteger
(Float targetValue, float maxChangePerCall) Get filtered value using the present lastValue, the value to reach and a fixed maximum change per call.
-
Constructor Details
-
RampFilter
public RampFilter() -
RampFilter
-
-
Method Details
-
getFilteredValueAsInteger
Get filtered value using the present lastValue, the value to reach and a fixed maximum change per call.- Parameters:
targetValue
- Value to reachmaxChangePerCall
- Fixed change per call- Returns:
- value as Integer with applied ramp filter
-
getFilteredValueAsInteger
public Integer getFilteredValueAsInteger(float lastValue, Float targetValue, float maximumLimit, float increaseRate) Get filtered value using the given lastValue, the value to reach and a calculated maximum change per call.- Parameters:
targetValue
- Value to reachlastValue
- Last or current value that needs to be adjustedmaximumLimit
- Maximum limit used to calculate a fixed change per callincreaseRate
- Increasing rate used to calculate a fixed change per call- Returns:
- value as Integer with applied ramp filter
-
getFilteredValueAsInteger
public Integer getFilteredValueAsInteger(float lastValue, Float targetValue, float maxChangePerCall) Get filtered value using the given lastValue, the value to reach and a fixed maximum change per call.- Parameters:
targetValue
- Value to reachlastValue
- Last or current value that needs to be adjustedmaxChangePerCall
- Fixed change per call- Returns:
- value as Integer with applied ramp filter
-