Package io.openems.edge.common.channel
Class BooleanDoc
java.lang.Object
io.openems.edge.common.channel.internal.AbstractDoc<T>
io.openems.edge.common.channel.internal.OpenemsTypeDoc<Boolean>
io.openems.edge.common.channel.BooleanDoc
- All Implemented Interfaces:
Doc
- Direct Known Subclasses:
StateChannelDoc
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
Debounce the State-Channel value: the StateChannel is only set to true after it had been set to true for at least "debounce" times.protected Debounce
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateChannelInstance
(OpenemsComponent component, ChannelId channelId) Creates an instance ofChannel
for the given Channel-ID using its Channel-AbstractDoc
.Add a debounce before actually setting the channel value.int
protected BooleanDoc
self()
Gets an instance of the correct subclass of myself.Methods inherited from class io.openems.edge.common.channel.internal.OpenemsTypeDoc
accessMode, getChannelCategory, getUnit, of, unit
Methods inherited from class io.openems.edge.common.channel.internal.AbstractDoc
debug, getAccessMode, getInitialValue, getOnInitCallbacks, getPersistencePriority, getText, getType, initialValue, isDebug, onInit, persistencePriority, text
-
Field Details
-
debounce
protected int debounceDebounce the State-Channel value: the StateChannel is only set to true after it had been set to true for at least "debounce" times. -
debounceMode
-
-
Constructor Details
-
BooleanDoc
public BooleanDoc()
-
-
Method Details
-
self
Description copied from class:AbstractDoc
Gets an instance of the correct subclass of myself.- Specified by:
self
in classAbstractDoc<Boolean>
- Returns:
- myself
-
createChannelInstance
Description copied from class:AbstractDoc
Creates an instance ofChannel
for the given Channel-ID using its Channel-AbstractDoc
.- Specified by:
createChannelInstance
in interfaceDoc
- Specified by:
createChannelInstance
in classAbstractDoc<Boolean>
- Parameters:
component
- theOpenemsComponent
channelId
- theChannelId
- Returns:
- the Channel
-
debounce
Add a debounce before actually setting the channel value.- Parameters:
debounce
- the debounce counterdebounceMode
- theDebounce
mode- Returns:
- myself
-
getDebounce
public int getDebounce() -
getDebounceMode
-