Package io.openems.edge.evcs.api
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
,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); }
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.openems.edge.evcs.api.Evcs
Evcs.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.evcs.api.ManagedEvcs
ManagedEvcs.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
-
Field Summary
-
Fields inherited from interface io.openems.edge.evcs.api.Evcs
DEFAULT_MAXIMUM_HARDWARE_CURRENT, DEFAULT_MAXIMUM_HARDWARE_POWER, DEFAULT_MINIMUM_HARDWARE_CURRENT, DEFAULT_MINIMUM_HARDWARE_POWER, DEFAULT_POWER_RECISION, DEFAULT_VOLTAGE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractManagedEvcsComponent(ChannelId[] firstInitialChannelIds, ChannelId[]... furtherInitialChannelIds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(org.osgi.service.component.ComponentContext context, java.lang.String id, java.lang.String alias, boolean enabled)
Handles @Activate of implementations.java.lang.String
debugLog()
Gets some output that is suitable for a continuous Debug log.ChargeStateHandler
getChargeStateHandler()
Get charge state handler.void
handleEvent(org.osgi.service.event.Event event)
void
logDebug(java.lang.String message)
Log debug usingManagedEvcs
Logger.protected void
logDebug(org.slf4j.Logger log, java.lang.String message)
Log a debug message including the Component ID.protected void
logInfo(org.slf4j.Logger log, java.lang.String message)
Log an info message including the Component ID.protected void
logWarn(org.slf4j.Logger log, java.lang.String message)
Log a warn message including the Component ID.-
Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, activate, addChannel, addChannels, addChannels, alias, channels, deactivate, getComponentContext, id, isEnabled, logError, modified, removeChannel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.openems.edge.evcs.api.Evcs
_setActiveConsumptionEnergy, _setActiveConsumptionEnergy, _setChargePower, _setChargePower, _setChargingstationCommunicationFailed, _setChargingType, _setEnergySession, _setEnergySession, _setFixedMaximumHardwarePower, _setFixedMaximumHardwarePower, _setFixedMinimumHardwarePower, _setFixedMinimumHardwarePower, _setMaximumPower, _setMaximumPower, _setMinimumPower, _setMinimumPower, _setPhases, _setPhases, _setStatus, getActiveConsumptionEnergy, getActiveConsumptionEnergyChannel, getChargePower, getChargePowerChannel, getChargingstationCommunicationFailed, getChargingstationCommunicationFailedChannel, getChargingType, getChargingTypeChannel, getEnergySession, getEnergySessionChannel, getFixedMaximumHardwarePower, getFixedMaximumHardwarePowerChannel, getFixedMinimumHardwarePower, getFixedMinimumHardwarePowerChannel, getMaximumHardwarePower, getMaximumHardwarePowerChannel, getMaximumPower, getMaximumPowerChannel, getMinimumHardwarePower, getMinimumHardwarePowerChannel, getMinimumPower, getMinimumPowerChannel, getPhases, getPhasesAsInt, getPhasesChannel, getStatus, getStatusChannel
-
Methods inherited from interface io.openems.edge.evcs.api.ManagedEvcs
_setChargeMode, _setIsClustered, _setPowerPrecision, _setPowerPrecision, _setSetChargePowerLimit, _setSetChargePowerLimit, _setSetChargePowerLimitWithFilter, _setSetChargePowerLimitWithFilter, _setSetChargePowerRequest, _setSetChargePowerRequest, _setSetDisplayText, _setSetEnergyLimit, _setSetEnergyLimit, applyChargePowerLimit, applyDisplayText, getChargeMode, getChargeModeChannel, getChargeState, getChargeStateChannel, getConfiguredDebugMode, getConfiguredMaximumHardwarePower, getConfiguredMinimumHardwarePower, getEvcsPower, getIsClustered, getIsClusteredChannel, getMinimumTimeTillChargingLimitTaken, getPowerPrecision, getPowerPrecisionChannel, getSetChargePowerLimit, getSetChargePowerLimitChannel, getSetChargePowerLimitWithFilter, getSetChargePowerLimitWithFilterChannel, getSetChargePowerRequest, getSetChargePowerRequestChannel, getSetDisplayText, getSetDisplayTextChannel, getSetEnergyLimit, getSetEnergyLimitChannel, getWriteInterval, pauseChargeProcess, setChargePowerLimit, setChargePowerLimitWithFilter, setChargePowerRequest, setDisplayText, setEnergyLimit
-
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
-
-
-
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 classAbstractOpenemsComponent
- Parameters:
context
- the OSGi ComponentContextid
- the unique OpenEMS Component IDalias
- Human-readable name of this Component. Typically 'config.alias()'. Defaults to 'id' if emptyenabled
- is the Component enabled?
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event)
- Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
-
getChargeStateHandler
public ChargeStateHandler getChargeStateHandler()
Description copied from interface:ManagedEvcs
Get charge state handler.- Specified by:
getChargeStateHandler
in interfaceManagedEvcs
- Returns:
- charge state handler
-
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 classAbstractOpenemsComponent
- Parameters:
log
- the Logger instancemessage
- 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 classAbstractOpenemsComponent
- Parameters:
log
- the Logger instancemessage
- 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 classAbstractOpenemsComponent
- Parameters:
log
- the Logger instancemessage
- the message
-
logDebug
public void logDebug(java.lang.String message)
Description copied from interface:ManagedEvcs
Log debug usingManagedEvcs
Logger.- Specified by:
logDebug
in interfaceManagedEvcs
- 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 interfaceOpenemsComponent
- Returns:
- the debug log output
-
-