Package io.openems.edge.battery.api
Interface Battery
- All Superinterfaces:
OpenemsComponent
,StartStoppable
- All Known Subinterfaces:
BatteryFeneconCommercial
,BatteryFeneconHome
,BatterySoltaroClusterVersionB
,BatterySoltaroClusterVersionC
,BatterySoltaroSingleRackVersionA
,BatterySoltaroSingleRackVersionB
,BatterySoltaroSingleRackVersionC
,BydBatteryBoxCommercialC130
,SimulatorBattery
,SoltaroBatteryVersionC
,SoltaroCluster
- All Known Implementing Classes:
AbstractDummyBattery
,BatteryFeneconCommercialImpl
,BatteryFeneconHomeImpl
,BatterySoltaroClusterVersionBImpl
,BatterySoltaroClusterVersionCImpl
,BatterySoltaroSingleRackVersionAImpl
,BatterySoltaroSingleRackVersionBImpl
,BatterySoltaroSingleRackVersionCImpl
,BmwBatteryImpl
,BydBatteryBoxCommercialC130Impl
,DummyBattery
,SimulatorBatteryImpl
Represents a Battery.
To indicate, that the Battery is ready for charging/discharging, the following Channels need to be set:
- StartStoppable.ChannelId.START_STOP must be set to 'START'
- No 'Fault'-StateChannels are set (i.e. 'OpenemsComponent.ChannelId.STATE' is invalid input: '<' 3)
- CHARGE_MAX_VOLTAGE, CHARGE_MAX_CURRENT, DISCHARGE_MIN_VOLTAGE and DISCHARGE_MAX_CURRENT are != null
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
_setCapacity
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.CAPACITY
Channel.default void
_setCapacity
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.CAPACITY
Channel.default void
_setChargeMaxCurrent
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.CHARGE_MAX_CURRENT
Channel.default void
_setChargeMaxCurrent
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.CHARGE_MAX_CURRENT
Channel.default void
_setChargeMaxVoltage
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.CHARGE_MAX_VOLTAGE
Channel.default void
_setChargeMaxVoltage
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.CHARGE_MAX_VOLTAGE
Channel.default void
_setCurrent
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.CURRENT
Channel.default void
_setCurrent
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.CURRENT
Channel.default void
_setDischargeMaxCurrent
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.DISCHARGE_MAX_CURRENT
Channel.default void
_setDischargeMaxCurrent
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.DISCHARGE_MAX_CURRENT
Channel.default void
_setDischargeMinVoltage
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.DISCHARGE_MIN_VOLTAGE
Channel.default void
_setDischargeMinVoltage
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.DISCHARGE_MIN_VOLTAGE
Channel.default void
_setMaxCellTemperature
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.MAX_CELL_TEMPERATURE
Channel.default void
_setMaxCellTemperature
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.MAX_CELL_TEMPERATURE
Channel.default void
_setMaxCellVoltage
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.MAX_CELL_VOLTAGE
Channel.default void
_setMaxCellVoltage
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.MAX_CELL_VOLTAGE
Channel.default void
_setMinCellTemperature
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.MIN_CELL_TEMPERATURE
Channel.default void
_setMinCellTemperature
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.MIN_CELL_TEMPERATURE
Channel.default void
_setMinCellVoltage
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.MIN_CELL_VOLTAGE
Channel.default void
_setMinCellVoltage
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.MIN_CELL_VOLTAGE
Channel.default void
_setSoc
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.SOC
Channel.default void
Internal method to set the 'nextValue' onBattery.ChannelId.SOC
Channel.default void
_setSoh
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.SOH
Channel.default void
Internal method to set the 'nextValue' onBattery.ChannelId.SOH
Channel.default void
_setVoltage
(int value) Internal method to set the 'nextValue' onBattery.ChannelId.VOLTAGE
Channel.default void
_setVoltage
(Integer value) Internal method to set the 'nextValue' onBattery.ChannelId.VOLTAGE
Channel.static String
generateDebugLog
(Battery battery, AbstractStateMachine<?, ?> stateMachine) Generates a default DebugLog message forBattery
implementations with a State-Machine.Gets the Capacity in [Wh].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.CAPACITY
.Gets the Charge Max Current in [A].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.CHARGE_MAX_CURRENT
.Gets the Charge Max Voltage in [V].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.CHARGE_MAX_VOLTAGE
.Gets the Current in [mA].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.CURRENT
.Gets the Discharge Max Current in [A].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.DISCHARGE_MAX_CURRENT
.Gets the Discharge Min Voltage in [V].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.DISCHARGE_MIN_VOLTAGE
.Gets the Maximum Cell Temperature in [degC].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.MAX_CELL_TEMPERATURE
.Gets the Maximum Cell Voltage in [mV].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.MAX_CELL_VOLTAGE
.Gets the Minimal Cell Temperature in [degC].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.MIN_CELL_TEMPERATURE
.Gets the Minimum Cell Voltage in [mV].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.MIN_CELL_VOLTAGE
.static ModbusSlaveNatureTable
getModbusSlaveNatureTable
(AccessMode accessMode) Used for Modbus/TCP Api Controller.getSoc()
Gets the State of Charge in [%], range 0..100 %.default IntegerReadChannel
Gets the Channel forBattery.ChannelId.SOC
.getSoh()
Gets the State of Health in [%], range 0..100 %.default IntegerReadChannel
Gets the Channel forBattery.ChannelId.SOH
.Gets the Voltage in [V].default IntegerReadChannel
Gets the Channel forBattery.ChannelId.VOLTAGE
.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
Methods inherited from interface io.openems.edge.common.startstop.StartStoppable
_setStartStop, getStartStop, getStartStopChannel, isStarted, isStopped, setStartStop, start, stop
-
Method Details
-
getModbusSlaveNatureTable
Used for Modbus/TCP Api Controller. Provides a Modbus table for the Channels of this Component.- Parameters:
accessMode
- filters the Modbus-Records that should be shown- Returns:
- the
ModbusSlaveNatureTable
-
getSocChannel
Gets the Channel forBattery.ChannelId.SOC
.- Returns:
- the Channel
-
getSoc
Gets the State of Charge in [%], range 0..100 %. SeeBattery.ChannelId.SOC
.- Returns:
- the Channel
Value
-
_setSoc
Internal method to set the 'nextValue' onBattery.ChannelId.SOC
Channel.- Parameters:
value
- the next value
-
_setSoc
default void _setSoc(int value) Internal method to set the 'nextValue' onBattery.ChannelId.SOC
Channel.- Parameters:
value
- the next value
-
getSohChannel
Gets the Channel forBattery.ChannelId.SOH
.- Returns:
- the Channel
-
getSoh
Gets the State of Health in [%], range 0..100 %. SeeBattery.ChannelId.SOH
.- Returns:
- the Channel
Value
-
_setSoh
Internal method to set the 'nextValue' onBattery.ChannelId.SOH
Channel.- Parameters:
value
- the next value
-
_setSoh
default void _setSoh(int value) Internal method to set the 'nextValue' onBattery.ChannelId.SOH
Channel.- Parameters:
value
- the next value
-
getCapacityChannel
Gets the Channel forBattery.ChannelId.CAPACITY
.- Returns:
- the Channel
-
getCapacity
Gets the Capacity in [Wh]. SeeBattery.ChannelId.CAPACITY
.- Returns:
- the Channel
Value
-
_setCapacity
Internal method to set the 'nextValue' onBattery.ChannelId.CAPACITY
Channel.- Parameters:
value
- the next value
-
_setCapacity
default void _setCapacity(int value) Internal method to set the 'nextValue' onBattery.ChannelId.CAPACITY
Channel.- Parameters:
value
- the next value
-
getDischargeMinVoltageChannel
Gets the Channel forBattery.ChannelId.DISCHARGE_MIN_VOLTAGE
.- Returns:
- the Channel
-
getDischargeMinVoltage
Gets the Discharge Min Voltage in [V]. SeeBattery.ChannelId.DISCHARGE_MIN_VOLTAGE
.- Returns:
- the Channel
Value
-
_setDischargeMinVoltage
Internal method to set the 'nextValue' onBattery.ChannelId.DISCHARGE_MIN_VOLTAGE
Channel.- Parameters:
value
- the next value
-
_setDischargeMinVoltage
default void _setDischargeMinVoltage(int value) Internal method to set the 'nextValue' onBattery.ChannelId.DISCHARGE_MIN_VOLTAGE
Channel.- Parameters:
value
- the next value
-
getDischargeMaxCurrentChannel
Gets the Channel forBattery.ChannelId.DISCHARGE_MAX_CURRENT
.- Returns:
- the Channel
-
getDischargeMaxCurrent
Gets the Discharge Max Current in [A]. SeeBattery.ChannelId.DISCHARGE_MAX_CURRENT
.- Returns:
- the Channel
Value
-
_setDischargeMaxCurrent
Internal method to set the 'nextValue' onBattery.ChannelId.DISCHARGE_MAX_CURRENT
Channel.- Parameters:
value
- the next value
-
_setDischargeMaxCurrent
default void _setDischargeMaxCurrent(int value) Internal method to set the 'nextValue' onBattery.ChannelId.DISCHARGE_MAX_CURRENT
Channel.- Parameters:
value
- the next value
-
getChargeMaxVoltageChannel
Gets the Channel forBattery.ChannelId.CHARGE_MAX_VOLTAGE
.- Returns:
- the Channel
-
getChargeMaxVoltage
Gets the Charge Max Voltage in [V]. SeeBattery.ChannelId.CHARGE_MAX_VOLTAGE
.- Returns:
- the Channel
Value
-
_setChargeMaxVoltage
Internal method to set the 'nextValue' onBattery.ChannelId.CHARGE_MAX_VOLTAGE
Channel.- Parameters:
value
- the next value
-
_setChargeMaxVoltage
default void _setChargeMaxVoltage(int value) Internal method to set the 'nextValue' onBattery.ChannelId.CHARGE_MAX_VOLTAGE
Channel.- Parameters:
value
- the next value
-
getChargeMaxCurrentChannel
Gets the Channel forBattery.ChannelId.CHARGE_MAX_CURRENT
.- Returns:
- the Channel
-
getChargeMaxCurrent
Gets the Charge Max Current in [A]. SeeBattery.ChannelId.CHARGE_MAX_CURRENT
.- Returns:
- the Channel
Value
-
_setChargeMaxCurrent
Internal method to set the 'nextValue' onBattery.ChannelId.CHARGE_MAX_CURRENT
Channel.- Parameters:
value
- the next value
-
_setChargeMaxCurrent
default void _setChargeMaxCurrent(int value) Internal method to set the 'nextValue' onBattery.ChannelId.CHARGE_MAX_CURRENT
Channel.- Parameters:
value
- the next value
-
getMinCellTemperatureChannel
Gets the Channel forBattery.ChannelId.MIN_CELL_TEMPERATURE
.- Returns:
- the Channel
-
getMinCellTemperature
Gets the Minimal Cell Temperature in [degC]. SeeBattery.ChannelId.MIN_CELL_TEMPERATURE
.- Returns:
- the Channel
Value
-
_setMinCellTemperature
Internal method to set the 'nextValue' onBattery.ChannelId.MIN_CELL_TEMPERATURE
Channel.- Parameters:
value
- the next value
-
_setMinCellTemperature
default void _setMinCellTemperature(int value) Internal method to set the 'nextValue' onBattery.ChannelId.MIN_CELL_TEMPERATURE
Channel.- Parameters:
value
- the next value
-
getMaxCellTemperatureChannel
Gets the Channel forBattery.ChannelId.MAX_CELL_TEMPERATURE
.- Returns:
- the Channel
-
getMaxCellTemperature
Gets the Maximum Cell Temperature in [degC]. SeeBattery.ChannelId.MAX_CELL_TEMPERATURE
.- Returns:
- the Channel
Value
-
_setMaxCellTemperature
Internal method to set the 'nextValue' onBattery.ChannelId.MAX_CELL_TEMPERATURE
Channel.- Parameters:
value
- the next value
-
_setMaxCellTemperature
default void _setMaxCellTemperature(int value) Internal method to set the 'nextValue' onBattery.ChannelId.MAX_CELL_TEMPERATURE
Channel.- Parameters:
value
- the next value
-
getVoltageChannel
Gets the Channel forBattery.ChannelId.VOLTAGE
.- Returns:
- the Channel
-
getVoltage
Gets the Voltage in [V]. SeeBattery.ChannelId.VOLTAGE
.- Returns:
- the Channel
Value
-
_setVoltage
Internal method to set the 'nextValue' onBattery.ChannelId.VOLTAGE
Channel.- Parameters:
value
- the next value
-
_setVoltage
default void _setVoltage(int value) Internal method to set the 'nextValue' onBattery.ChannelId.VOLTAGE
Channel.- Parameters:
value
- the next value
-
getCurrentChannel
Gets the Channel forBattery.ChannelId.CURRENT
.- Returns:
- the Channel
-
getCurrent
Gets the Current in [mA]. SeeBattery.ChannelId.CURRENT
.- Returns:
- the Channel
Value
-
_setCurrent
Internal method to set the 'nextValue' onBattery.ChannelId.CURRENT
Channel.- Parameters:
value
- the next value
-
_setCurrent
default void _setCurrent(int value) Internal method to set the 'nextValue' onBattery.ChannelId.CURRENT
Channel.- Parameters:
value
- the next value
-
getMinCellVoltageChannel
Gets the Channel forBattery.ChannelId.MIN_CELL_VOLTAGE
.- Returns:
- the Channel
-
getMinCellVoltage
Gets the Minimum Cell Voltage in [mV]. SeeBattery.ChannelId.MIN_CELL_VOLTAGE
.- Returns:
- the Channel
Value
-
_setMinCellVoltage
Internal method to set the 'nextValue' onBattery.ChannelId.MIN_CELL_VOLTAGE
Channel.- Parameters:
value
- the next value
-
_setMinCellVoltage
default void _setMinCellVoltage(int value) Internal method to set the 'nextValue' onBattery.ChannelId.MIN_CELL_VOLTAGE
Channel.- Parameters:
value
- the next value
-
getMaxCellVoltageChannel
Gets the Channel forBattery.ChannelId.MAX_CELL_VOLTAGE
.- Returns:
- the Channel
-
getMaxCellVoltage
Gets the Maximum Cell Voltage in [mV]. SeeBattery.ChannelId.MAX_CELL_VOLTAGE
.- Returns:
- the Channel
Value
-
_setMaxCellVoltage
Internal method to set the 'nextValue' onBattery.ChannelId.MAX_CELL_VOLTAGE
Channel.- Parameters:
value
- the next value
-
_setMaxCellVoltage
default void _setMaxCellVoltage(int value) Internal method to set the 'nextValue' onBattery.ChannelId.MAX_CELL_VOLTAGE
Channel.- Parameters:
value
- the next value
-
generateDebugLog
Generates a default DebugLog message forBattery
implementations with a State-Machine.- Parameters:
battery
- theBattery
stateMachine
- the actual StateMachine (extendsAbstractStateMachine
)- Returns:
- a debug log String
-