Class ControllerIoAnalogImpl

java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.controller.io.analog.ControllerIoAnalogImpl
All Implemented Interfaces:
OpenemsComponent, Controller, ControllerIoAnalog, TimedataProvider

public class ControllerIoAnalogImpl extends AbstractOpenemsComponent implements ControllerIoAnalog, Controller, OpenemsComponent, TimedataProvider
  • Constructor Details

    • ControllerIoAnalogImpl

      public ControllerIoAnalogImpl()
    • ControllerIoAnalogImpl

      public ControllerIoAnalogImpl(Clock clock)
  • 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
    • calculateUsedPower

      protected static int calculateUsedPower(int maximumPower, float currentOutputPercent, PowerBehavior powerBehavior)
      Calculate the current power depending on the current settings.

      Attention: Even if the "Power Behaviour" is defining the hardware behavior, the real consumption depends on the device itself and we have to assume that the unit behaves in a similar way. For the exact values, a separate meter would be needed.

      Parameters:
      maximumPower - maximum power of the device
      currentOutputPercent - current output in %
      powerBehavior - the power behavior as PowerBehavior
      Returns:
      power used by the device
    • calculateSetPointFromPower

      protected static float calculateSetPointFromPower(int maximumPower, int targetPower, PowerBehavior powerBehavior)
      Calculate the set point depending on the current settings.

      Attention: Even if the "Power Behaviour" is defining the hardware behavior, the real consumption depends on the device itself and we have to assume that the unit behaves in a similar way and is using the calculated power.

      Parameters:
      maximumPower - maximum power of the device
      targetPower - target power
      powerBehavior - power behavior
      Returns:
      current set point in %
    • getTimedata

      public Timedata getTimedata()
      Description copied from interface: TimedataProvider
      Gets the Timedata service.
      Specified by:
      getTimedata in interface TimedataProvider
      Returns:
      the service or null if it is not (yet) available.