Package io.openems.common.types
Class EdgeConfig.Component.Channel
java.lang.Object
io.openems.common.types.EdgeConfig.Component.Channel
- Enclosing class:
- EdgeConfig.Component
Represents a Channel of an OpenEMS Component.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static class
Channel-Details for EnumChannel.static class
Channel-Details for OpenemsType-Channel.static class
Channel-Details for StateChannel. -
Constructor Summary
ConstructorsConstructorDescriptionChannel
(String id, OpenemsType type, AccessMode accessMode, String text, Unit unit, EdgeConfig.Component.Channel.ChannelDetail detail) -
Method Summary
Modifier and TypeMethodDescriptionstatic EdgeConfig.Component.Channel
Creates a Channel from JSON.Gets theAccessMode
of the Channel.Gets the specificEdgeConfig.Component.Channel.ChannelDetail
object of the Channel.getId()
Gets the Channel-ID.getText()
Gets the descriptive text of the Channel.getType()
Gets theOpenemsType
of the Channel.getUnit()
Gets theUnit
of the Channel.com.google.gson.JsonObject
toJson()
Gets the JSON representation of this Channel.
-
Constructor Details
-
Channel
public Channel(String id, OpenemsType type, AccessMode accessMode, String text, Unit unit, EdgeConfig.Component.Channel.ChannelDetail detail)
-
-
Method Details
-
fromJson
public static EdgeConfig.Component.Channel fromJson(String channelId, com.google.gson.JsonElement json) throws OpenemsError.OpenemsNamedException Creates a Channel from JSON.- Parameters:
channelId
- the Channel-IDjson
- the JSON- Returns:
- the Channel
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
getId
Gets the Channel-ID.- Returns:
- the Channel-ID.
-
getType
Gets theOpenemsType
of the Channel.- Returns:
- the
OpenemsType
-
getAccessMode
Gets theAccessMode
of the Channel.- Returns:
- the
AccessMode
-
getText
Gets the descriptive text of the Channel.- Returns:
- the descriptive text
-
getUnit
Gets theUnit
of the Channel.- Returns:
- the
Unit
-
getDetail
Gets the specificEdgeConfig.Component.Channel.ChannelDetail
object of the Channel.- Returns:
- the
EdgeConfig.Component.Channel.ChannelDetail
-
toJson
public com.google.gson.JsonObject toJson()Gets the JSON representation of this Channel.- Returns:
- a JsonObject
-