Class OcppServerImpl

    • Field Detail

      • config

        protected io.openems.edge.evcs.ocpp.server.Config config
      • activeEvcsSessions

        protected final java.util.Map<java.util.UUID,​java.util.List<AbstractManagedOcppEvcsComponent>> activeEvcsSessions
        Currently connected sessions with their related evcs components.
      • ocppSessions

        protected java.util.Map<java.lang.String,​java.util.UUID> ocppSessions
        Current sessions (Existing connections between server and evcs hardware).
    • Constructor Detail

      • OcppServerImpl

        public OcppServerImpl()
    • Method Detail

      • 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
      • handleEvent

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

        public java.util.concurrent.CompletionStage<eu.chargetime.ocpp.model.Confirmation> send​(java.util.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,
                            java.lang.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,
                               java.lang.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,
                                java.lang.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