public class ClusterVersionB extends AbstractOpenemsModbusComponent implements SoltaroCluster, Battery, OpenemsComponent, org.osgi.service.event.EventHandler, ModbusSlave, StartStoppable
AbstractOpenemsModbusComponent.BitConverter, AbstractOpenemsModbusComponent.ChannelMapper<T extends AbstractModbusElement<?>>
SoltaroCluster.ChannelId
Modifier and Type | Field and Description |
---|---|
static int |
CHARGE_MAX_A |
protected org.osgi.service.cm.ConfigurationAdmin |
cm |
static int |
DISCHARGE_MAX_A |
Constructor and Description |
---|
ClusterVersionB() |
Modifier and Type | Method and 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() |
ModbusSlaveTable |
getModbusSlaveTable(AccessMode accessMode)
Gets the Modbus-Slave-Table for this OpenEMS-Component.
|
State |
getStateMachineState() |
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) |
activate, activate, activate, convert, deactivate, getUnitId, m, m, m, m, unsetModbus
_channel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, modified, removeChannel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_setClusterStartStop, getClusterStartStop, getClusterStartStopChannel, setClusterStartStop
_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, getModbusSlaveNatureTable, getSoc, getSocChannel, getSoh, getSohChannel, getVoltage, getVoltageChannel
_setStartStop, getStartStop, getStartStopChannel, isStarted, isStopped, start, stop
_channel, _getChannelAs, alias, channel, channel, channels, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid, updateConfigurationProperty, updateReferenceFilter
public static final int DISCHARGE_MAX_A
public static final int CHARGE_MAX_A
protected org.osgi.service.cm.ConfigurationAdmin cm
protected void setModbus(BridgeModbus modbus)
AbstractOpenemsModbusComponent
setModbus
in class AbstractOpenemsModbusComponent
modbus
- the BridgeModbus Referencepublic void handleEvent(org.osgi.service.event.Event event)
handleEvent
in interface org.osgi.service.event.EventHandler
protected Channel<?> addChannel(ChannelId channelId)
AbstractOpenemsComponent
addChannel
in class AbstractOpenemsComponent
channelId
- the given Channel-IDpublic java.lang.String debugLog()
OpenemsComponent
debugLog
in interface OpenemsComponent
public java.lang.String getModbusBridgeId()
public State getStateMachineState()
public void setStateMachineState(State state)
protected ModbusProtocol defineModbusProtocol() throws OpenemsException
AbstractOpenemsModbusComponent
defineModbusProtocol
in class AbstractOpenemsModbusComponent
OpenemsException
- on errorprotected final AbstractModbusElement<?> map(ChannelId channelId, AbstractModbusElement<?> element)
protected final AbstractModbusElement<?> map(ChannelId channelId, AbstractModbusElement<?> element, ElementToChannelConverter converter)
protected final AbstractModbusElement<?> map(BitsWordElement bitsWordElement)
protected void recalculateSoc()
protected void recalculateMaxCellVoltage()
protected void recalculateMinCellVoltage()
protected void recalculateMaxCellTemperature()
protected void recalculateMinCellTemperature()
public ModbusSlaveTable getModbusSlaveTable(AccessMode accessMode)
ModbusSlave
getModbusSlaveTable
in interface ModbusSlave
accessMode
- filters the Modbus-Records that should be shownpublic void setStartStop(StartStop value) throws OpenemsError.OpenemsNamedException
StartStoppable
setStartStop
in interface StartStoppable
value
- target StartStop
stateOpenemsError.OpenemsNamedException
- on error