Class RampFilter

  • Direct Known Subclasses:
    DisabledRampFilter

    public class RampFilter
    extends java.lang.Object
    A controller that applies a ramp to a given value.
    • Constructor Summary

      Constructors 
      Constructor Description
      RampFilter()  
      RampFilter​(java.lang.Float initialValue)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Integer getFilteredValueAsInteger​(float lastValue, java.lang.Float targetValue, float maxChangePerCall)
      Get filtered value using the given lastValue, the value to reach and a fixed maximum change per call.
      java.lang.Integer getFilteredValueAsInteger​(float lastValue, java.lang.Float targetValue, float maximumLimit, float increaseRate)
      Get filtered value using the given lastValue, the value to reach and a calculated maximum change per call.
      java.lang.Integer getFilteredValueAsInteger​(java.lang.Float targetValue, float maxChangePerCall)
      Get filtered value using the present lastValue, the value to reach and a fixed maximum change per call.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RampFilter

        public RampFilter()
      • RampFilter

        public RampFilter​(java.lang.Float initialValue)
    • Method Detail

      • getFilteredValueAsInteger

        public java.lang.Integer getFilteredValueAsInteger​(java.lang.Float targetValue,
                                                           float maxChangePerCall)
        Get filtered value using the present lastValue, the value to reach and a fixed maximum change per call.
        Parameters:
        targetValue - Value to reach
        maxChangePerCall - Fixed change per call
        Returns:
        value as Integer with applied ramp filter
      • getFilteredValueAsInteger

        public java.lang.Integer getFilteredValueAsInteger​(float lastValue,
                                                           java.lang.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 reach
        lastValue - Last or current value that needs to be adjusted
        maximumLimit - Maximum limit used to calculate a fixed change per call
        increaseRate - Increasing rate used to calculate a fixed change per call
        Returns:
        value as Integer with applied ramp filter
      • getFilteredValueAsInteger

        public java.lang.Integer getFilteredValueAsInteger​(float lastValue,
                                                           java.lang.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 reach
        lastValue - Last or current value that needs to be adjusted
        maxChangePerCall - Fixed change per call
        Returns:
        value as Integer with applied ramp filter