Class ControllerEssTimeslotPeakshavingImpl

java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.controller.timeslotpeakshaving.ControllerEssTimeslotPeakshavingImpl
All Implemented Interfaces:
OpenemsComponent, Controller, ControllerEssTimeslotPeakshaving

public class ControllerEssTimeslotPeakshavingImpl extends AbstractOpenemsComponent implements ControllerEssTimeslotPeakshaving, Controller, OpenemsComponent
  • Constructor Details

    • ControllerEssTimeslotPeakshavingImpl

      public ControllerEssTimeslotPeakshavingImpl()
  • Method Details

    • deactivate

      protected void deactivate()
      Description copied from class: AbstractOpenemsComponent
      Handles @Deactivate of implementations. Prints log output.
      Overrides:
      deactivate in class AbstractOpenemsComponent
    • run

      public void run() throws OpenemsError.OpenemsNamedException
      Description copied from interface: Controller
      Executes the Controller logic.
      Specified by:
      run in interface Controller
      Throws:
      OpenemsError.OpenemsNamedException - on error
    • isActiveDate

      protected static boolean isActiveDate(LocalDate startDate, LocalDate endDate, LocalDateTime dateTime)
      This method returns true if the Current date is within configured StartDate and endDate.
      Parameters:
      startDate - the configured start date
      endDate - the configured end date
      dateTime - the date to be tested
      Returns:
      boolean values which specify the current date is within the configured date range
    • isActiveTime

      protected static boolean isActiveTime(LocalTime startTime, LocalTime endTime, LocalDateTime dateTime)
      Is the time of 'dateTime' within startTime and endTime?.
      Parameters:
      startTime - the configured start time
      endTime - the configured end time
      dateTime - the time to be tested
      Returns:
      true if it is within startTime and endTime
    • convertTime

      protected static LocalTime convertTime(String time) throws OpenemsException
      Converts a string to a LocalTime.
      Parameters:
      time - the time as a string
      Returns:
      the converted time
      Throws:
      OpenemsException