Package io.openems.edge.common.channel
Interface Doc
-
- All Known Implementing Classes:
AbstractDoc
,BooleanDoc
,DoubleDoc
,EnumDoc
,ErrorDoc
,FloatDoc
,IntegerDoc
,LongDoc
,OpenemsTypeDoc
,ShortDoc
,StateChannelDoc
,StateCollectorChannelDoc
,StringDoc
public interface Doc
Provides static meta information for aChannel
.Possible meta information include:
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <C extends Channel<?>>
CcreateChannelInstance(OpenemsComponent component, ChannelId channelId)
Creates an instance ofChannel
for the given Channel-ID using its Channel-AbstractDoc
.AccessMode
getAccessMode()
Gets the 'Access-Mode' information.ChannelCategory
getChannelCategory()
Gets theChannelCategory
of the Channel of this Doc.PersistencePriority
getPersistencePriority()
Gets the Persistence Priority.java.lang.String
getText()
Gets the descriptive text.OpenemsType
getType()
Gets the OpenemsType.Unit
getUnit()
Gets the Unit.boolean
isDebug()
Is the more verbose debug mode activated?.static StateChannelDoc
of(Level level)
Create a Channel-Doc for aStateChannel
with a givenLevel
.static OpenemsTypeDoc<?>
of(OpenemsType type)
Create a Channel-Doc with a specific OpenemsType.static EnumDoc
of(OptionsEnum[] options)
Create a Channel-Doc with specific options defined by anOptionsEnum
.Doc
text(java.lang.String text)
Sets the descriptive text.
-
-
-
Method Detail
-
of
static OpenemsTypeDoc<?> of(OpenemsType type)
Create a Channel-Doc with a specific OpenemsType.use like this:
Doc.of(OpenemsType.INTEGER)
- Parameters:
type
- the OpenemsType- Returns:
- an instance of
OpenemsTypeDoc
-
of
static EnumDoc of(OptionsEnum[] options)
Create a Channel-Doc with specific options defined by anOptionsEnum
.use like this:
Doc.of([YourOptionsEnum].values())
- Parameters:
options
- the possible options as an OptionsEnum- Returns:
- an instance of
EnumDoc
-
of
static StateChannelDoc of(Level level)
- Parameters:
level
- the Level- Returns:
- an instance of
StateChannelDoc
-
getChannelCategory
ChannelCategory getChannelCategory()
Gets theChannelCategory
of the Channel of this Doc.- Returns:
- the ChannelCategory
-
getType
OpenemsType getType()
Gets the OpenemsType.- Returns:
- the OpenemsType
-
getAccessMode
AccessMode getAccessMode()
Gets the 'Access-Mode' information.- Returns:
- the
AccessMode
-
getUnit
Unit getUnit()
Gets the Unit. Defaults to NONE.- Returns:
- the unit
-
getPersistencePriority
PersistencePriority getPersistencePriority()
Gets the Persistence Priority. Defaults to VERY_LOW.This parameter may be used by persistence services to decide, if the Channel should be persisted to the hard disk.
- Returns:
- the
PersistencePriority
-
text
Doc text(java.lang.String text)
Sets the descriptive text. Defaults to an empty string.- Parameters:
text
- the text- Returns:
- myself
-
getText
java.lang.String getText()
Gets the descriptive text. Defaults to empty String.- Returns:
- the text
-
isDebug
boolean isDebug()
Is the more verbose debug mode activated?.- Returns:
- true for debug mode
-
createChannelInstance
<C extends Channel<?>> C createChannelInstance(OpenemsComponent component, ChannelId channelId)
Creates an instance ofChannel
for the given Channel-ID using its Channel-AbstractDoc
.- Type Parameters:
C
- the type of the Channel- Parameters:
component
- theOpenemsComponent
channelId
- the Channel-ID- Returns:
- the Channel
-
-