public class ClusterVersionCImpl extends AbstractOpenemsModbusComponent implements ClusterVersionC, SoltaroBatteryVersionC, SoltaroCluster, Battery, OpenemsComponent, org.osgi.service.event.EventHandler, ModbusSlave
AbstractOpenemsModbusComponent.BitConverter, AbstractOpenemsModbusComponent.ChannelMapper<T extends AbstractModbusElement<?>>
ClusterVersionC.ChannelId
Modifier and Type | Field and Description |
---|---|
protected org.osgi.service.cm.ConfigurationAdmin |
cm |
Constructor and Description |
---|
ClusterVersionCImpl() |
Modifier and Type | Method and Description |
---|---|
<T extends Channel<?>> |
channel(Rack rack,
RackChannel rackChannel)
Gets the Channel for a Rack.
|
java.lang.String |
debugLog()
Gets some output that is suitable for a continuous Debug log.
|
protected ModbusProtocol |
defineModbusProtocol()
Defines the Modbus protocol.
|
java.util.Optional<PreChargeControl> |
getCommonPreChargeControl()
Gets the common
PreChargeControl . |
ModbusSlaveTable |
getModbusSlaveTable(AccessMode accessMode)
Gets the Modbus-Slave-Table for this OpenEMS-Component.
|
java.util.Set<Rack> |
getRacks()
Gets the active Racks.
|
StartStop |
getStartStopTarget()
Gets the target Start/Stop mode from config or StartStop-Channel.
|
void |
handleEvent(org.osgi.service.event.Event event) |
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.
|
activate, activate, activate, deactivate, getBridgeModbus, getModbusProtocol, getUnitId, m, m, m, m, unsetModbus
_channel, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, modified, removeChannel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
_setMaxStartAttempts, _setMaxStopAttempts, getMaxStartAttempts, getMaxStartAttemptsChannel, getMaxStopAttempts, getMaxStopAttemptsChannel
_setClusterStartStop, getClusterStartStop, getClusterStartStopChannel, setClusterStartStop
_setCapacity, _setCapacity, _setChargeMaxCurrent, _setChargeMaxCurrent, _setChargeMaxVoltage, _setChargeMaxVoltage, _setCurrent, _setCurrent, _setDischargeMaxCurrent, _setDischargeMaxCurrent, _setDischargeMinVoltage, _setDischargeMinVoltage, _setForceChargeActive, _setForceChargeActive, _setForceDischargeActive, _setForceDischargeActive, _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, getForceChargeActive, getForceChargeActiveChannel, getForceDischargeActive, getForceDischargeActiveChannel, getMaxCellTemperature, getMaxCellTemperatureChannel, getMaxCellVoltage, getMaxCellVoltageChannel, getMinCellTemperature, getMinCellTemperatureChannel, getMinCellVoltage, getMinCellVoltageChannel, getModbusSlaveNatureTable, getSoc, getSocChannel, getSoh, getSohChannel, getVoltage, getVoltageChannel
_setStartStop, getStartStop, getStartStopChannel, isStarted, isStopped, start, stop
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
public java.lang.String debugLog()
OpenemsComponent
debugLog
in interface OpenemsComponent
protected ModbusProtocol defineModbusProtocol() throws OpenemsException
AbstractOpenemsModbusComponent
defineModbusProtocol
in class AbstractOpenemsModbusComponent
OpenemsException
- on errorpublic ModbusSlaveTable getModbusSlaveTable(AccessMode accessMode)
ModbusSlave
getModbusSlaveTable
in interface ModbusSlave
accessMode
- filters the Modbus-Records that should be shownpublic <T extends Channel<?>> T channel(Rack rack, RackChannel rackChannel)
ClusterVersionC
channel
in interface ClusterVersionC
T
- the expected typed Channelrack
- the Rack
rackChannel
- the RackChannel
public java.util.Optional<PreChargeControl> getCommonPreChargeControl()
ClusterVersionC
PreChargeControl
. If all Racks share the same
PreChargeControl
state, that one is returned; otherwise
Optional.empty.getCommonPreChargeControl
in interface ClusterVersionC
PreChargeControl
state of all Reacks; or empty if they
are differentpublic java.util.Set<Rack> getRacks()
ClusterVersionC
getRacks
in interface ClusterVersionC
public void setStartStop(StartStop value)
StartStoppable
setStartStop
in interface StartStoppable
value
- target StartStop
statepublic StartStop getStartStopTarget()
ClusterVersionC
getStartStopTarget
in interface ClusterVersionC
StartStop