Class AbstractMaxCurrentHandler.Builder<T extends AbstractMaxCurrentHandler.Builder<?>>

java.lang.Object
io.openems.edge.battery.protection.currenthandler.AbstractMaxCurrentHandler.Builder<T>
Direct Known Subclasses:
ChargeMaxCurrentHandler.Builder, DischargeMaxCurrentHandler.Builder
Enclosing class:
AbstractMaxCurrentHandler

public abstract static class AbstractMaxCurrentHandler.Builder<T extends AbstractMaxCurrentHandler.Builder<?>> extends Object
  • Field Details

    • clockProvider

      protected final ClockProvider clockProvider
    • initialBmsMaxEverCurrent

      protected final int initialBmsMaxEverCurrent
    • voltageToPercent

      protected PolyLine voltageToPercent
    • temperatureToPercent

      protected PolyLine temperatureToPercent
    • maxIncreasePerSecond

      protected Double maxIncreasePerSecond
  • Constructor Details

    • Builder

      protected Builder(ClockProvider clockProvider, int initialBmsMaxEverCurrent)
      Parameters:
      clockProvider - a ClockProvider, mainly for JUnit tests
      initialBmsMaxEverCurrent - the (estimated) maximum allowed current. This is used as a reference for percentage values. If during runtime a higher value is provided, that one is taken from then on.
  • Method Details

    • setVoltageToPercent

      public T setVoltageToPercent(PolyLine voltageToPercent)
      Sets the Voltage-To-Percent characteristics.
      Parameters:
      voltageToPercent - the PolyLine
      Returns:
      a AbstractMaxCurrentHandler.Builder
    • setTemperatureToPercent

      public T setTemperatureToPercent(PolyLine temperatureToPercent)
      Sets the Temperature-To-Percent characteristics.
      Parameters:
      temperatureToPercent - the PolyLine
      Returns:
      a AbstractMaxCurrentHandler.Builder
    • setMaxIncreasePerSecond

      public T setMaxIncreasePerSecond(double maxIncreasePerSecond)
      Sets the Max-Increase-Per-Second parameter in [A].
      Parameters:
      maxIncreasePerSecond - value in [A] per Second.
      Returns:
      a AbstractMaxCurrentHandler.Builder
    • self

      protected abstract T self()