Package io.openems.edge.common.startstop
Interface StartStoppable
- All Superinterfaces:
OpenemsComponent
- All Known Subinterfaces:
Battery
,BatteryFeneconCommercial
,BatteryFeneconHome
,BatteryInverterKacoBlueplanetGridsave
,BatteryInverterRefuStore88k
,BatteryInverterSinexcel
,BatterySoltaroClusterVersionB
,BatterySoltaroClusterVersionC
,BatterySoltaroSingleRackVersionA
,BatterySoltaroSingleRackVersionB
,BatterySoltaroSingleRackVersionC
,BydBatteryBoxCommercialC130
,EssCluster
,EssGenericManagedSymmetric
,EssGenericOffGrid
,GenericManagedEss
,GoodWeBatteryInverter
,HybridManagedSymmetricBatteryInverter
,ManagedSymmetricBatteryInverter
,OffGridBatteryInverter
,SimulatorBattery
,SimulatorEssSymmetricReacting
,SoltaroBatteryVersionC
,SoltaroCluster
- All Known Implementing Classes:
AbstractDummyBattery
,AbstractDummyManagedSymmetricEss
,AbstractGenericManagedEss
,AbstractSunSpecBatteryInverter
,BatteryFeneconCommercialImpl
,BatteryFeneconHomeImpl
,BatteryInverterKacoBlueplanetGridsaveImpl
,BatteryInverterRefuStore88kImpl
,BatteryInverterSinexcelImpl
,BatterySoltaroClusterVersionBImpl
,BatterySoltaroClusterVersionCImpl
,BatterySoltaroSingleRackVersionAImpl
,BatterySoltaroSingleRackVersionBImpl
,BatterySoltaroSingleRackVersionCImpl
,BmwBatteryImpl
,BydBatteryBoxCommercialC130Impl
,DummyBattery
,DummyHybridEss
,DummyManagedAsymmetricEss
,DummyManagedSymmetricBatteryInverter
,DummyManagedSymmetricEss
,DummyMetaEss
,DummyOffGridBatteryInverter
,EssClusterImpl
,EssGenericManagedSymmetricImpl
,EssGenericOffGridImpl
,GoodWeBatteryInverterImpl
,SimulatorBatteryImpl
,SimulatorEssSymmetricReactingImpl
Declares an OpenEMS Component as being able to get started and stopped.
A device or service inside OpenEMS that implements this OpenEMS Nature can be started or stopped.
Implementing this Nature also requires the Component to have a configuration
property "startStop" of type StartStopConfig
that overrides the logic
of the setStartStop(StartStop)
method:
@AttributeDefinition(name = "Start/stop behaviour?", description = "Should this Component be forced to start or stop?") StartStopConfig startStop() default StartStopConfig.AUTO;
- if config is
StartStopConfig.START
-> always start - if config is
StartStopConfig.STOP
-> always stop - if config is
StartStopConfig.AUTO
-> startStartStop.UNDEFINED
and wait for a call tosetStartStop(StartStop)
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault void
_setStartStop
(StartStop value) Internal method to set the 'nextValue' onStartStoppable.ChannelId.START_STOP
Channel.static ModbusSlaveNatureTable
getModbusSlaveNatureTable
(AccessMode accessMode) Used for Modbus/TCP Api Controller.default StartStop
Gets the currentStartStop
state of theStartStoppable
Component.Gets the Channel forStartStoppable.ChannelId.START_STOP
.default boolean
Is this device or service started?.default boolean
Is this device or service stopped?.void
setStartStop
(StartStop value) Starts or stops the device or service represented by this OpenEMS Component.default void
start()
Starts the device or service represented by this OpenEMS Component.default void
stop()
Stops the device or service represented by this OpenEMS Component.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
-
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
-
getStartStopChannel
Gets the Channel forStartStoppable.ChannelId.START_STOP
.- Returns:
- the Channel
-
getStartStop
Gets the currentStartStop
state of theStartStoppable
Component. SeeStartStoppable.ChannelId.START_STOP
.- Returns:
- the Channel
Value
-
isStarted
default boolean isStarted()Is this device or service started?.- true - if (and only if)
StartStoppable.ChannelId.START_STOP
isStartStop.START
- false - if
StartStoppable.ChannelId.START_STOP
isStartStop.STOP
orStartStop.UNDEFINED
- Returns:
- true if started
- true - if (and only if)
-
isStopped
default boolean isStopped()Is this device or service stopped?.- true - if (and only if)
StartStoppable.ChannelId.START_STOP
isStartStop.STOP
- false - if
StartStoppable.ChannelId.START_STOP
isStartStop.START
orStartStop.UNDEFINED
- Returns:
- true if stopped
- true - if (and only if)
-
_setStartStop
Internal method to set the 'nextValue' onStartStoppable.ChannelId.START_STOP
Channel.- Parameters:
value
- the next value
-
setStartStop
Starts or stops the device or service represented by this OpenEMS Component.- Parameters:
value
- targetStartStop
state- Throws:
OpenemsError.OpenemsNamedException
- on error
-
start
Starts the device or service represented by this OpenEMS Component.This calls
setStartStop(StartStop)
withStartStop.START
.- Throws:
OpenemsError.OpenemsNamedException
- on error
-
stop
Stops the device or service represented by this OpenEMS Component.This calls
setStartStop(StartStop)
withStartStop.STOP
.- Throws:
OpenemsError.OpenemsNamedException
- on error
-