Package io.openems.edge.common.startstop
Interface StartStoppable
-
- All Superinterfaces:
OpenemsComponent
- All Known Subinterfaces:
Battery
,BatteryBoxC130
,ClusterVersionC
,FeneconHomeBattery
,GenericHybridManagedSymmetricEss
,GenericManagedEss
,GenericManagedSymmetricEss
,GoodWeBatteryInverter
,HybridManagedSymmetricBatteryInverter
,KacoBlueplanetGridsave
,ManagedSymmetricBatteryInverter
,RefuStore88k
,SingleRackVersionB
,SingleRackVersionC
,SoltaroBatteryVersionC
,SoltaroCluster
- All Known Implementing Classes:
AbstractGenericManagedEss
,AbstractSunSpecBatteryInverter
,BatteryBoxC130Impl
,BatteryDummy
,BmwBatteryImpl
,ClusterVersionB
,ClusterVersionCImpl
,DummyBattery
,DummyManagedSymmetricBatteryInverter
,FeneconHomeBatteryImpl
,GenericHybridManagedSymmetricEssImpl
,GenericManagedSymmetricEssImpl
,GoodWeBatteryInverterImpl
,KacoBlueplanetGridsaveImpl
,RefuStore88kImpl
,SingleRack
,SingleRackVersionBImpl
,SingleRackVersionCImpl
public interface StartStoppable extends OpenemsComponent
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 thesetStartStop(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 Modifier and Type Interface Description static class
StartStoppable.ChannelId
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
_setStartStop(StartStop value)
Internal method to set the 'nextValue' onStartStoppable.ChannelId.START_STOP
Channel.static ModbusSlaveNatureTable
getModbusSlaveNatureTable(AccessMode accessMode)
Gets theModbusSlaveNatureTable
forStartStoppable
used by the Modbus/TCP Slave API.default StartStop
getStartStop()
Gets the currentStartStop
state of theStartStoppable
Component.default Channel<StartStop>
getStartStopChannel()
Gets the Channel forStartStoppable.ChannelId.START_STOP
.default boolean
isStarted()
Is this device or service started?.default boolean
isStopped()
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 Detail
-
getModbusSlaveNatureTable
static ModbusSlaveNatureTable getModbusSlaveNatureTable(AccessMode accessMode)
Gets theModbusSlaveNatureTable
forStartStoppable
used by the Modbus/TCP Slave API.- Parameters:
accessMode
- theAccessMode
- Returns:
- the
ModbusSlaveNatureTable
-
getStartStopChannel
default Channel<StartStop> getStartStopChannel()
Gets the Channel forStartStoppable.ChannelId.START_STOP
.- Returns:
- the Channel
-
getStartStop
default StartStop 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
default void _setStartStop(StartStop value)
Internal method to set the 'nextValue' onStartStoppable.ChannelId.START_STOP
Channel.- Parameters:
value
- the next value
-
setStartStop
void setStartStop(StartStop value) throws OpenemsError.OpenemsNamedException
Starts or stops the device or service represented by this OpenEMS Component.- Parameters:
value
- targetStartStop
state- Throws:
OpenemsError.OpenemsNamedException
- on error
-
start
default void start() throws OpenemsError.OpenemsNamedException
Starts the device or service represented by this OpenEMS Component.This calls
setStartStop(StartStop)
withStartStop.START
.- Throws:
OpenemsError.OpenemsNamedException
- on error
-
stop
default void stop() throws OpenemsError.OpenemsNamedException
Stops the device or service represented by this OpenEMS Component.This calls
setStartStop(StartStop)
withStartStop.STOP
.- Throws:
OpenemsError.OpenemsNamedException
- on error
-
-