public class DummyManagedSymmetricEss extends AbstractOpenemsComponent implements ManagedSymmetricEss, SymmetricEss, OpenemsComponent
Modifier and Type | Class and Description |
---|---|
static class |
DummyManagedSymmetricEss.SymmetricApplyPowerRecord |
ManagedSymmetricEss.ChannelId
Modifier and Type | Field and Description |
---|---|
static int |
MAX_APPARENT_POWER |
POWER_DOC_TEXT
Modifier | Constructor and Description |
---|---|
|
DummyManagedSymmetricEss(java.lang.String id) |
|
DummyManagedSymmetricEss(java.lang.String id,
Power power) |
protected |
DummyManagedSymmetricEss(java.lang.String id,
Power power,
ChannelId[] firstInitialChannelIds,
ChannelId[]... furtherInitialChannelIds) |
Modifier and Type | Method and Description |
---|---|
void |
applyPower(int activePower,
int reactivePower)
Apply the calculated Power.
|
Power |
getPower()
Gets an instance of the 'Power' class, which allows to set limitations to
Active and Reactive Power.
|
int |
getPowerPrecision()
Gets the smallest positive power that can be set (in W, VA or var).
|
DummyManagedSymmetricEss |
withAllowedChargePower(int value)
Set
ManagedSymmetricEss.ChannelId#ALLOWED_CHARGE_POWER of this
DummyManagedSymmetricEss . |
DummyManagedSymmetricEss |
withAllowedDischargePower(int value)
Set
ManagedSymmetricEss.ChannelId#ALLOWED_DISCHARGE_POWER of this
DummyManagedSymmetricEss . |
DummyManagedSymmetricEss |
withCapacity(int value)
Set
SymmetricEss.ChannelId#CAPACITY of this
DummyManagedSymmetricEss . |
DummyManagedSymmetricEss |
withGridMode(GridMode value)
Set
SymmetricEss.ChannelId#GRID_MODE of this
DummyManagedSymmetricEss . |
DummyManagedSymmetricEss |
withMaxApparentPower(int value)
Set
SymmetricEss.ChannelId#MAX_APPARENT_POWER of this
DummyManagedSymmetricEss . |
DummyManagedSymmetricEss |
withPowerPrecision(int value)
Set Power Precision of this
DummyManagedSymmetricEss . |
DummyManagedSymmetricEss |
withSoc(int value)
Set
SymmetricEss.ChannelId#SOC of this
DummyManagedSymmetricEss . |
DummyManagedSymmetricEss |
withSymmetricApplyPowerCallback(java.util.function.Consumer<DummyManagedSymmetricEss.SymmetricApplyPowerRecord> callback)
Set callback for applyPower() of this
DummyManagedSymmetricEss . |
_channel, activate, addChannel, addChannels, addChannels, alias, channels, deactivate, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, modified, removeChannel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_setAllowedChargePower, _setAllowedChargePower, _setAllowedDischargePower, _setAllowedDischargePower, _setApplyPowerFailed, _setDebugSetActivePower, _setDebugSetActivePower, _setDebugSetReactivePower, _setDebugSetReactivePower, addPowerConstraint, addPowerConstraintAndValidate, createPowerConstraint, getAllowedChargePower, getAllowedChargePowerChannel, getAllowedDischargePower, getAllowedDischargePowerChannel, getApplyPowerFailed, getApplyPowerFailedChannel, getDebugSetActivePower, getDebugSetActivePowerChannel, getDebugSetReactivePower, getDebugSetReactivePowerChannel, getModbusSlaveNatureTable, getSetActivePowerEqualsChannel, getSetActivePowerEqualsWithPidChannel, getSetActivePowerGreaterOrEqualsChannel, getSetActivePowerLessOrEqualsChannel, getSetReactivePowerEqualsChannel, getSetReactivePowerGreaterOrEqualsChannel, getSetReactivePowerLessOrEqualsChannel, getStaticConstraints, setActivePowerEquals, setActivePowerEqualsWithPid, setActivePowerGreaterOrEquals, setActivePowerLessOrEquals, setReactivePowerEquals, setReactivePowerGreaterOrEquals, setReactivePowerLessOrEquals
_setActiveChargeEnergy, _setActiveChargeEnergy, _setActiveDischargeEnergy, _setActiveDischargeEnergy, _setActivePower, _setActivePower, _setCapacity, _setCapacity, _setGridMode, _setMaxApparentPower, _setMaxApparentPower, _setMaxCellTemperature, _setMaxCellTemperature, _setMaxCellVoltage, _setMaxCellVoltage, _setMinCellTemperature, _setMinCellTemperature, _setMinCellVoltage, _setMinCellVoltage, _setReactivePower, _setReactivePower, _setSoc, _setSoc, getActiveChargeEnergy, getActiveChargeEnergyChannel, getActiveDischargeEnergy, getActiveDischargeEnergyChannel, getActivePower, getActivePowerChannel, getCapacity, getCapacityChannel, getGridMode, getGridModeChannel, getMaxApparentPower, getMaxApparentPowerChannel, getMaxCellTemperature, getMaxCellTemperatureChannel, getMaxCellVoltage, getMaxCellVoltageChannel, getMinCellTemperature, getMinCellTemperatureChannel, getMinCellVoltage, getMinCellVoltageChannel, getReactivePower, getReactivePowerChannel, getSoc, getSocChannel
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, logDebug, logError, logInfo, logWarn, serviceFactoryPid, servicePid, updateConfigurationProperty, updateReferenceFilter
public static final int MAX_APPARENT_POWER
protected DummyManagedSymmetricEss(java.lang.String id, Power power, ChannelId[] firstInitialChannelIds, ChannelId[]... furtherInitialChannelIds)
public DummyManagedSymmetricEss(java.lang.String id, Power power)
public DummyManagedSymmetricEss(java.lang.String id)
public Power getPower()
ManagedSymmetricEss
getPower
in interface ManagedSymmetricEss
public int getPowerPrecision()
ManagedSymmetricEss
getPowerPrecision
in interface ManagedSymmetricEss
public DummyManagedSymmetricEss withSoc(int value)
SymmetricEss.ChannelId#SOC
of this
DummyManagedSymmetricEss
.value
- the state-of-chargepublic DummyManagedSymmetricEss withCapacity(int value)
SymmetricEss.ChannelId#CAPACITY
of this
DummyManagedSymmetricEss
. *value
- the capacitypublic DummyManagedSymmetricEss withGridMode(GridMode value)
SymmetricEss.ChannelId#GRID_MODE
of this
DummyManagedSymmetricEss
. *value
- the GridMode
public DummyManagedSymmetricEss withMaxApparentPower(int value)
SymmetricEss.ChannelId#MAX_APPARENT_POWER
of this
DummyManagedSymmetricEss
. *value
- the max apparent powerpublic DummyManagedSymmetricEss withAllowedChargePower(int value)
ManagedSymmetricEss.ChannelId#ALLOWED_CHARGE_POWER
of this
DummyManagedSymmetricEss
. *value
- the allowed charge powerpublic DummyManagedSymmetricEss withAllowedDischargePower(int value)
ManagedSymmetricEss.ChannelId#ALLOWED_DISCHARGE_POWER
of this
DummyManagedSymmetricEss
. *value
- the allowed discharge powerpublic DummyManagedSymmetricEss withPowerPrecision(int value)
DummyManagedSymmetricEss
.value
- the power precisionpublic DummyManagedSymmetricEss withSymmetricApplyPowerCallback(java.util.function.Consumer<DummyManagedSymmetricEss.SymmetricApplyPowerRecord> callback)
DummyManagedSymmetricEss
.callback
- the callbackpublic void applyPower(int activePower, int reactivePower)
ManagedSymmetricEss
Careful: do not adjust activePower and reactivePower in this method, e.g.
setting it to zero on error. The purpose of this method is solely to apply
the calculated power to the ESS. If you need to constrain the allowed power,
add Constraints using the ManagedSymmetricEss.getStaticConstraints()
method.
applyPower
in interface ManagedSymmetricEss
activePower
- the active power in [W]reactivePower
- the reactive power in [var]