Package io.openems.edge.evcs.cluster
Class EvcsClusterImpl
- java.lang.Object
-
- io.openems.edge.common.component.AbstractOpenemsComponent
-
- io.openems.edge.evcs.cluster.EvcsClusterImpl
-
- All Implemented Interfaces:
OpenemsComponent
,Controller
,Evcs
,EvcsCluster
,org.osgi.service.event.EventHandler
public class EvcsClusterImpl extends AbstractOpenemsComponent implements OpenemsComponent, Evcs, org.osgi.service.event.EventHandler, EvcsCluster, Controller
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.openems.edge.controller.api.Controller
Controller.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.evcs.api.Evcs
Evcs.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.evcs.cluster.EvcsCluster
EvcsCluster.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
-
Field Summary
Fields Modifier and Type Field Description protected org.osgi.service.cm.ConfigurationAdmin
cm
protected ComponentManager
componentManager
protected Sum
sum
-
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 Constructor Description EvcsClusterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addEvcs(Evcs evcs)
protected void
deactivate()
Handles @Deactivate of implementations.int
getAvailableGridPower()
Maximum available grid power.int
getMaximumPowerToDistribute()
Maximum power to distribute.java.util.List<Evcs>
getSortedEvcss()
Sorted list of the EVCSs in the cluster.void
handleEvent(org.osgi.service.event.Event event)
protected void
limitEvcss()
Depending on the excess power, the EVCSs will be charged.protected void
logInfoInDebugmode(org.slf4j.Logger log, java.lang.String string)
protected void
removeEvcs(Evcs evcs)
void
run()
Executes the Controller logic.-
Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, activate, activate, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, 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.controller.api.Controller
_setRunFailed, getRunFailed, getRunFailedChannel
-
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.cluster.EvcsCluster
_setEvcsBlockedChargePower, _setEvcsBlockedChargePower, _setEvcsClusterStatus, getEvcsBlockedChargePower, getEvcsBlockedChargePowerChannel, getEvcsClusterStatus, getEvcsClusterStatusChannel
-
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
-
-
-
Field Detail
-
cm
protected org.osgi.service.cm.ConfigurationAdmin cm
-
componentManager
protected ComponentManager componentManager
-
sum
protected Sum sum
-
-
Method Detail
-
addEvcs
protected void addEvcs(Evcs evcs)
-
removeEvcs
protected void removeEvcs(Evcs evcs)
-
deactivate
protected void deactivate()
Description copied from class:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsComponent
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event)
- Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
-
limitEvcss
protected void limitEvcss()
Depending on the excess power, the EVCSs will be charged. Distributing the maximum allowed charge distribution power (given by the implementation) to each evcs.
-
getSortedEvcss
public java.util.List<Evcs> getSortedEvcss()
Sorted list of the EVCSs in the cluster.List of EVCSs that should be considered in the cluster sorted by prioritisation.
- Returns:
- Sorted EVCS list
-
getMaximumPowerToDistribute
public int getMaximumPowerToDistribute()
Maximum power to distribute.Calculate the maximum power to distribute, like excess power or excess power + storage.
- Returns:
- Maximum Power in Watt
-
getAvailableGridPower
public int getAvailableGridPower()
Maximum available grid power.Calculate the maximum available power from the grid. This value is used as a fallback option when it becomes negative.
- Returns:
- Current grid power in W
-
logInfoInDebugmode
protected void logInfoInDebugmode(org.slf4j.Logger log, java.lang.String string)
-
run
public void run() throws OpenemsError.OpenemsNamedException
Description copied from interface:Controller
Executes the Controller logic.- Specified by:
run
in interfaceController
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
-