Class StateCollectorChannel
java.lang.Object
io.openems.edge.common.channel.internal.AbstractReadChannel<EnumDoc,Integer>
io.openems.edge.common.channel.EnumReadChannel
io.openems.edge.common.channel.internal.StateCollectorChannel
Collects the values of all
StateChannel
s. This class is used for the
"State" Channel of every OpenEMS Component.-
Field Summary
Fields inherited from class io.openems.edge.common.channel.internal.AbstractReadChannel
parent
Fields inherited from interface io.openems.edge.common.channel.Channel
MAX_AGE_OF_PAST_VALUES
-
Constructor Summary
ModifierConstructorDescriptionprotected
StateCollectorChannel
(OpenemsComponent parent, ChannelId channelId, StateCollectorChannelDoc channelDoc) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChannel
(StateChannel channel) Adds a Channel to this StateCollector.Lists all States as Text.listStates
(Level fromLevel) Lists all States that are at least 'fromLevel' as text.void
removeChannel
(StateChannel channel) Removes a Channel from this StateCollector.value()
Gets the currently active value, wrapped in a @{link Value}.Methods inherited from class io.openems.edge.common.channel.EnumReadChannel
_setNextValue
Methods inherited from class io.openems.edge.common.channel.internal.AbstractReadChannel
address, channelDoc, channelId, deactivate, getComponent, getMetaInfo, getNextValue, getOnSetNextWrites, getPastValues, getType, nextProcessImage, onChange, onSetNextValue, onUpdate, removeOnChangeCallback, removeOnSetNextValueCallback, removeOnUpdateCallback, setMetaInfo, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.openems.edge.common.channel.Channel
setNextValue
-
Constructor Details
-
StateCollectorChannel
protected StateCollectorChannel(OpenemsComponent parent, ChannelId channelId, StateCollectorChannelDoc channelDoc)
-
-
Method Details
-
value
Description copied from interface:Channel
Gets the currently active value, wrapped in a @{link Value}. -
addChannel
Adds a Channel to this StateCollector.- Parameters:
channel
- the Channel
-
removeChannel
Removes a Channel from this StateCollector.The onChange listener is removed by the
Channel.deactivate()
method.- Parameters:
channel
- the Channel
-
listStates
Lists all States as Text.- Returns:
- the text
-
listStates
Lists all States that are at least 'fromLevel' as text.- Parameters:
fromLevel
- the minimum Level- Returns:
- the text
-