Class AbstractContext<PARENT extends OpenemsComponent>

java.lang.Object
io.openems.edge.common.statemachine.AbstractContext<PARENT>
Direct Known Subclasses:
AbstractForceChargeDischarge.Context, Context, Context, Context, Context, Context, Context, Context, Context, Context, Context, Context, Context, Context, Context, Context, Context

public class AbstractContext<PARENT extends OpenemsComponent> extends Object
  • Constructor Details

    • AbstractContext

      public AbstractContext()
      Constructs an AbstractContext without useful logging.
    • AbstractContext

      public AbstractContext(PARENT parent)
      Constructs an AbstractContext.
      Parameters:
      parent - the parent OpenemsComponent. This is used to provide useful logging.
  • Method Details

    • getParent

      public PARENT getParent()
      Gets the parent OpenemsComponent.
      Returns:
      the parent
    • logDebug

      public void logDebug(org.slf4j.Logger log, String message)
      Log a debug message including the Component ID.
      Parameters:
      log - the Logger instance
      message - the message
    • logInfo

      public void logInfo(org.slf4j.Logger log, String message)
      Log an info message including the Component ID.
      Parameters:
      log - the Logger instance
      message - the message
    • logWarn

      public void logWarn(org.slf4j.Logger log, String message)
      Log a warn message including the Component ID.
      Parameters:
      log - the Logger instance
      message - the message
    • logError

      public void logError(org.slf4j.Logger log, String message)
      Log an error message including the Component ID.
      Parameters:
      log - the Logger instance
      message - the message