public class StateCollectorChannel extends EnumReadChannel
StateChannel
s. This class is used for
the "State" Channel of every OpenEMS Component.NO_OF_PAST_VALUES, parent
Modifier | Constructor and Description |
---|---|
protected |
StateCollectorChannel(OpenemsComponent parent,
ChannelId channelId,
StateCollectorChannelDoc channelDoc) |
Modifier and Type | Method and Description |
---|---|
void |
addChannel(StateChannel channel)
Adds a Channel to this StateCollector.
|
java.lang.String |
listStates()
Lists all States as Text
|
java.lang.String |
listStates(Level fromLevel)
Lists all States that are at least 'fromLevel' as text.
|
void |
removeChannel(StateChannel channel)
Removes a Channel from this StateCollector.
|
Value<java.lang.Integer> |
value()
Gets the currently active value, wrapped in a @{link Value}.
|
_setNextValue, address, channelDoc, channelId, deactivate, getComponent, getNextValue, getOnSetNextWrites, getPastValues, getType, nextProcessImage, onChange, onSetNextValue, onUpdate, removeOnChangeCallback, removeOnSetNextValueCallback, removeOnUpdateCallback, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setNextValue
protected StateCollectorChannel(OpenemsComponent parent, ChannelId channelId, StateCollectorChannelDoc channelDoc)
public Value<java.lang.Integer> value()
Channel
value
in interface Channel<java.lang.Integer>
value
in class AbstractReadChannel<EnumDoc,java.lang.Integer>
public void addChannel(StateChannel channel)
channel
- the Channelpublic void removeChannel(StateChannel channel)
The onChange listener is removed by the Channel.deactivate()
method.
channel
- the Channelpublic java.lang.String listStates()
public java.lang.String listStates(Level fromLevel)
fromLevel
- the minimum Level