Class EvcsOcppServer

java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.evcs.ocpp.server.EvcsOcppServer
All Implemented Interfaces:
OpenemsComponent, OcppServer, org.osgi.service.event.EventHandler

public class EvcsOcppServer extends AbstractOpenemsComponent implements OpenemsComponent, OcppServer, org.osgi.service.event.EventHandler
  • Field Details

  • Constructor Details

    • EvcsOcppServer

      public EvcsOcppServer()
  • Method Details

    • addEvcs

      protected void addEvcs(Evcs evcs)
      Adds each Evcs component to a list and checks whether there is a matching session.
      Parameters:
      evcs - new Evcs
    • removeEvcs

      protected void removeEvcs(Evcs evcs)
      Removes the given Evcs component from the list and checks whether there is a present session that should be removed.
      Parameters:
      evcs - Evcs that should be removed
    • deactivate

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

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

      public CompletionStage<eu.chargetime.ocpp.model.Confirmation> send(UUID session, eu.chargetime.ocpp.model.Request request) throws eu.chargetime.ocpp.OccurenceConstraintException, eu.chargetime.ocpp.UnsupportedFeatureException, eu.chargetime.ocpp.NotConnectedException
      Description copied from interface: OcppServer
      Send message to EVCS.

      Example:

       send(session, request).whenComplete((confirmation, throwable) -> {
              this.logInfo(log, confirmation.toString());
       });
       
      Specified by:
      send in interface OcppServer
      Parameters:
      session - Current session
      request - Request that will be sent
      Returns:
      When the request has been sent and a confirmation is received
      Throws:
      eu.chargetime.ocpp.OccurenceConstraintException - occurenceConstraintException
      eu.chargetime.ocpp.UnsupportedFeatureException - unsupportedFeatureException
      eu.chargetime.ocpp.NotConnectedException - notConnectedException
    • logInfo

      public 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