Class AbstractManagedEvcsComponent

  • All Implemented Interfaces:
    OpenemsComponent, Evcs, ManagedEvcs, org.osgi.service.event.EventHandler
    Direct Known Subclasses:
    AbstractManagedOcppEvcsComponent, DummyManagedEvcs, GoeChargerHomeImpl, HardyBarthImpl, KebaKeContact, SimulatedEvcs

    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 Detail

      • AbstractManagedEvcsComponent

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

      • activate

        protected void activate​(org.osgi.service.component.ComponentContext context,
                                java.lang.String id,
                                java.lang.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
      • logInfo

        protected 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
      • logDebug

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

        public java.lang.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