Class AbstractManagedEvcsComponent

java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.evcs.api.AbstractManagedEvcsComponent
All Implemented Interfaces:
OpenemsComponent, Evcs, ManagedEvcs, org.osgi.service.event.EventHandler
Direct Known Subclasses:
AbstractManagedOcppEvcsComponent, DummyManagedEvcs, EvcsDezonyImpl, EvcsGoeChargerHomeImpl, EvcsHardyBarthImpl, EvcsKebaKeContactImpl, SimulatorEvcsImpl

public abstract class AbstractManagedEvcsComponent extends AbstractOpenemsComponent implements Evcs, ManagedEvcs, org.osgi.service.event.EventHandler
Abstract Managed EVCS Component.

Includes the logic for the write handler - that is sending the limits depending on the 'send' logic of each implementation. The SET_CHARGE_POWER_LIMIT or SET_CHARGE_POWER_LIMIT_WITH_FILTER Channel are usually set by the evcs Controller.

Please ensure to add the event topics at in the properties of the subclass:

 @EventTopics({ //
   EdgeEventConstants.TOPIC_CYCLE_EXECUTE_WRITE, //
 })
 

and also call "super.handleEvent(event)" in the subclass:

 @Override
 public void handleEvent(Event event) {
        super.handleEvent(event);
 }
 
  • Constructor Details

    • AbstractManagedEvcsComponent

      protected AbstractManagedEvcsComponent(ChannelId[] firstInitialChannelIds, ChannelId[]... furtherInitialChannelIds)
  • Method Details

    • activate

      protected void activate(org.osgi.service.component.ComponentContext context, String id, String alias, boolean enabled)
      Description copied from class: AbstractOpenemsComponent
      Handles @Activate of implementations. Prints log output.
      Overrides:
      activate in class AbstractOpenemsComponent
      Parameters:
      context - the OSGi ComponentContext
      id - the unique OpenEMS Component ID
      alias - Human-readable name of this Component. Typically 'config.alias()'. Defaults to 'id' if empty
      enabled - is the Component enabled?
    • handleEvent

      public void handleEvent(org.osgi.service.event.Event event)
      Specified by:
      handleEvent in interface org.osgi.service.event.EventHandler
    • getChargeStateHandler

      public ChargeStateHandler getChargeStateHandler()
      Description copied from interface: ManagedEvcs
      Get charge state handler.
      Specified by:
      getChargeStateHandler in interface ManagedEvcs
      Returns:
      charge state handler
    • logInfo

      protected void logInfo(org.slf4j.Logger log, String message)
      Description copied from class: AbstractOpenemsComponent
      Log an info message including the Component ID.
      Overrides:
      logInfo in class AbstractOpenemsComponent
      Parameters:
      log - the Logger instance
      message - the message
    • logWarn

      protected void logWarn(org.slf4j.Logger log, String message)
      Description copied from class: AbstractOpenemsComponent
      Log a warn message including the Component ID.
      Overrides:
      logWarn in class AbstractOpenemsComponent
      Parameters:
      log - the Logger instance
      message - the message
    • logDebug

      protected void logDebug(org.slf4j.Logger log, String message)
      Description copied from class: AbstractOpenemsComponent
      Log a debug message including the Component ID.
      Overrides:
      logDebug in class AbstractOpenemsComponent
      Parameters:
      log - the Logger instance
      message - the message
    • logDebug

      public void logDebug(String message)
      Description copied from interface: ManagedEvcs
      Log debug using ManagedEvcs Logger.
      Specified by:
      logDebug in interface ManagedEvcs
      Parameters:
      message - message
    • debugLog

      public String debugLog()
      Description copied from interface: OpenemsComponent
      Gets some output that is suitable for a continuous Debug log. Returns 'null' by default which causes no output.
      Specified by:
      debugLog in interface OpenemsComponent
      Returns:
      the debug log output