java.lang.Object
io.openems.edge.common.statemachine.AbstractContext<ControllerEssCycleImpl>
io.openems.edge.controller.ess.cycle.statemachine.Context

public class Context extends AbstractContext<ControllerEssCycleImpl>
  • Field Details

    • config

      protected final Config config
    • ess

      protected final ManagedSymmetricEss ess
    • allowedChargePower

      protected final int allowedChargePower
    • allowedDischargePower

      protected final int allowedDischargePower
    • clock

      protected final Clock clock
    • startTime

      protected final LocalDateTime startTime
  • Constructor Details

  • Method Details

    • getAcPower

      protected int getAcPower(ManagedSymmetricEss ess, HybridEssMode hybridEssMode, int power)
      Gets the required AC power set-point for AC- or Hybrid-ESS.
      Parameters:
      ess - the ManagedSymmetricEss; checked for HybridEss
      hybridEssMode - the HybridEssMode
      power - the configured target power
      Returns:
      the AC power set-point
    • isStartTimeInitialized

      public boolean isStartTimeInitialized()
      Is Start Time Initialized?.
      Returns:
      true if the Controller should be executed now
    • waitForChangeState

      protected StateMachine.State waitForChangeState(StateMachine.State currentState, StateMachine.State nextState)
      Helper for a state change. If awaiting hysteresis time exceeded switches from currentState to NextState.
      Parameters:
      currentState - Used to output better log.
      nextState - state which will be switched to.
      Returns:
      StateMachine.State state.
    • updateLastStateChangeTime

      public void updateLastStateChangeTime()
      Updates the time when StateMachine StateMachine.State changed.