Class ClusterVersionB
- java.lang.Object
-
- io.openems.edge.common.component.AbstractOpenemsComponent
-
- io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
-
- io.openems.edge.battery.soltaro.cluster.versionb.ClusterVersionB
-
- All Implemented Interfaces:
Battery
,SoltaroCluster
,ModbusComponent
,OpenemsComponent
,ModbusSlave
,StartStoppable
,org.osgi.service.event.EventHandler
public class ClusterVersionB extends AbstractOpenemsModbusComponent implements SoltaroCluster, Battery, ModbusComponent, OpenemsComponent, org.osgi.service.event.EventHandler, ModbusSlave, StartStoppable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
AbstractOpenemsModbusComponent.BitConverter, AbstractOpenemsModbusComponent.ChannelMapper<T extends AbstractModbusElement<?>>
-
Nested classes/interfaces inherited from interface io.openems.edge.battery.api.Battery
Battery.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.bridge.modbus.api.ModbusComponent
ModbusComponent.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.battery.soltaro.cluster.SoltaroCluster
SoltaroCluster.ChannelId
-
Nested classes/interfaces inherited from interface io.openems.edge.common.startstop.StartStoppable
StartStoppable.ChannelId
-
-
Field Summary
Fields Modifier and Type Field Description protected org.osgi.service.cm.ConfigurationAdmin
cm
protected ComponentManager
componentManager
protected java.util.function.Consumer<java.lang.Integer>
parseSubMasterCommunicationFailure
This method is used as callback for Modbus register 0x1082, which is holding bitwise information on the communication status of each rack.
-
Constructor Summary
Constructors Constructor Description ClusterVersionB()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Channel<?>
addChannel(ChannelId channelId)
Initializes the given Channel-ID.java.lang.String
debugLog()
Gets some output that is suitable for a continuous Debug log.protected ModbusProtocol
defineModbusProtocol()
Defines the Modbus protocol.java.lang.String
getModbusBridgeId()
Gets the ModbusBridgeId.ModbusSlaveTable
getModbusSlaveTable(AccessMode accessMode)
Gets the Modbus-Slave-Table for this OpenEMS-Component.State
getStateMachineState()
Gets the StateMachineState.void
handleEvent(org.osgi.service.event.Event event)
protected AbstractModbusElement<?>
map(BitsWordElement bitsWordElement)
protected AbstractModbusElement<?>
map(ChannelId channelId, AbstractModbusElement<?> element)
protected AbstractModbusElement<?>
map(ChannelId channelId, AbstractModbusElement<?> element, ElementToChannelConverter converter)
protected void
recalculateMaxCellTemperature()
protected void
recalculateMaxCellVoltage()
protected void
recalculateMinCellTemperature()
protected void
recalculateMinCellVoltage()
protected void
recalculateSoc()
protected void
setModbus(BridgeModbus modbus)
Set the Modbus bridge.void
setStartStop(StartStop value)
Starts or stops the device or service represented by this OpenEMS Component.void
setStateMachineState(State state)
Sets the StateMachineState.-
Methods inherited from class io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
activate, activate, activate, deactivate, getBridgeModbus, getModbusProtocol, getUnitId, m, m, m, m, m, m, modified, modified, unsetModbus
-
Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, 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.battery.api.Battery
_setCapacity, _setCapacity, _setChargeMaxCurrent, _setChargeMaxCurrent, _setChargeMaxVoltage, _setChargeMaxVoltage, _setCurrent, _setCurrent, _setDischargeMaxCurrent, _setDischargeMaxCurrent, _setDischargeMinVoltage, _setDischargeMinVoltage, _setMaxCellTemperature, _setMaxCellTemperature, _setMaxCellVoltage, _setMaxCellVoltage, _setMinCellTemperature, _setMinCellTemperature, _setMinCellVoltage, _setMinCellVoltage, _setSoc, _setSoc, _setSoh, _setSoh, _setVoltage, _setVoltage, getCapacity, getCapacityChannel, getChargeMaxCurrent, getChargeMaxCurrentChannel, getChargeMaxVoltage, getChargeMaxVoltageChannel, getCurrent, getCurrentChannel, getDischargeMaxCurrent, getDischargeMaxCurrentChannel, getDischargeMinVoltage, getDischargeMinVoltageChannel, getMaxCellTemperature, getMaxCellTemperatureChannel, getMaxCellVoltage, getMaxCellVoltageChannel, getMinCellTemperature, getMinCellTemperatureChannel, getMinCellVoltage, getMinCellVoltageChannel, getSoc, getSocChannel, getSoh, getSohChannel, getVoltage, getVoltageChannel
-
Methods inherited from interface io.openems.edge.bridge.modbus.api.ModbusComponent
_setModbusCommunicationFailed, getModbusCommunicationFailed, getModbusCommunicationFailedChannel
-
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
Methods inherited from interface io.openems.edge.battery.soltaro.cluster.SoltaroCluster
_setClusterStartStop, getClusterStartStop, getClusterStartStopChannel, setClusterStartStop
-
Methods inherited from interface io.openems.edge.common.startstop.StartStoppable
_setStartStop, getStartStop, getStartStopChannel, isStarted, isStopped, start, stop
-
-
-
-
Field Detail
-
cm
protected org.osgi.service.cm.ConfigurationAdmin cm
-
componentManager
protected ComponentManager componentManager
-
parseSubMasterCommunicationFailure
protected final java.util.function.Consumer<java.lang.Integer> parseSubMasterCommunicationFailure
This method is used as callback for Modbus register 0x1082, which is holding bitwise information on the communication status of each rack. This method parses the state for all active racks and sets the StateChannels (e.g. SoltaroCluster.ChannelId.SUB_MASTER_1_COMMUNICATION_FAILURE) accordingly.
-
-
Method Detail
-
setModbus
protected void setModbus(BridgeModbus modbus)
Description copied from class:AbstractOpenemsModbusComponent
Set the Modbus bridge. Should be called by @Reference- Overrides:
setModbus
in classAbstractOpenemsModbusComponent
- Parameters:
modbus
- the BridgeModbus Reference
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event)
- Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
-
addChannel
protected Channel<?> addChannel(ChannelId channelId)
Description copied from class:AbstractOpenemsComponent
Initializes the given Channel-ID.- Creates an object instance from Channel-Doc
- Registers the Channel
- Overrides:
addChannel
in classAbstractOpenemsComponent
- Parameters:
channelId
- the given Channel-ID- Returns:
- the newly created Channel
-
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
-
getModbusBridgeId
public java.lang.String getModbusBridgeId()
Gets the ModbusBridgeId.- Returns:
- String
-
getStateMachineState
public State getStateMachineState()
Gets the StateMachineState.- Returns:
- State
-
setStateMachineState
public void setStateMachineState(State state)
Sets the StateMachineState.- Parameters:
state
- theState
-
defineModbusProtocol
protected ModbusProtocol defineModbusProtocol() throws OpenemsException
Description copied from class:AbstractOpenemsModbusComponent
Defines the Modbus protocol.- Specified by:
defineModbusProtocol
in classAbstractOpenemsModbusComponent
- Returns:
- the ModbusProtocol
- Throws:
OpenemsException
- on error
-
map
protected final AbstractModbusElement<?> map(ChannelId channelId, AbstractModbusElement<?> element)
-
map
protected final AbstractModbusElement<?> map(ChannelId channelId, AbstractModbusElement<?> element, ElementToChannelConverter converter)
-
map
protected final AbstractModbusElement<?> map(BitsWordElement bitsWordElement)
-
recalculateSoc
protected void recalculateSoc()
-
recalculateMaxCellVoltage
protected void recalculateMaxCellVoltage()
-
recalculateMinCellVoltage
protected void recalculateMinCellVoltage()
-
recalculateMaxCellTemperature
protected void recalculateMaxCellTemperature()
-
recalculateMinCellTemperature
protected void recalculateMinCellTemperature()
-
getModbusSlaveTable
public ModbusSlaveTable getModbusSlaveTable(AccessMode accessMode)
Description copied from interface:ModbusSlave
Gets the Modbus-Slave-Table for this OpenEMS-Component.- Specified by:
getModbusSlaveTable
in interfaceModbusSlave
- Parameters:
accessMode
- filters the Modbus-Records that should be shown- Returns:
- the Modbus-Slave-Table
-
setStartStop
public void setStartStop(StartStop value) throws OpenemsError.OpenemsNamedException
Description copied from interface:StartStoppable
Starts or stops the device or service represented by this OpenEMS Component.- Specified by:
setStartStop
in interfaceStartStoppable
- Parameters:
value
- targetStartStop
state- Throws:
OpenemsError.OpenemsNamedException
- on error
-
-