Package io.openems.common.types
Class EdgeConfig.Component.Channel
- java.lang.Object
-
- io.openems.common.types.EdgeConfig.Component.Channel
-
- Enclosing class:
- EdgeConfig.Component
public static class EdgeConfig.Component.Channel extends java.lang.Object
Represents a Channel of an OpenEMS Component.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
EdgeConfig.Component.Channel.ChannelDetail
static class
EdgeConfig.Component.Channel.ChannelDetailEnum
Channel-Details for EnumChannel.static class
EdgeConfig.Component.Channel.ChannelDetailOpenemsType
Channel-Details for OpenemsType-Channel.static class
EdgeConfig.Component.Channel.ChannelDetailState
Channel-Details for StateChannel.
-
Constructor Summary
Constructors Constructor Description Channel(java.lang.String id, OpenemsType type, AccessMode accessMode, java.lang.String text, Unit unit, EdgeConfig.Component.Channel.ChannelDetail detail)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EdgeConfig.Component.Channel
fromJson(java.lang.String channelId, com.google.gson.JsonElement json)
Creates a Channel from JSON.AccessMode
getAccessMode()
EdgeConfig.Component.Channel.ChannelDetail
getDetail()
java.lang.String
getId()
java.lang.String
getText()
OpenemsType
getType()
Unit
getUnit()
com.google.gson.JsonObject
toJson()
Gets the JSON representation of this Channel.
-
-
-
Constructor Detail
-
Channel
public Channel(java.lang.String id, OpenemsType type, AccessMode accessMode, java.lang.String text, Unit unit, EdgeConfig.Component.Channel.ChannelDetail detail)
-
-
Method Detail
-
fromJson
public static EdgeConfig.Component.Channel fromJson(java.lang.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
public java.lang.String getId()
-
getType
public OpenemsType getType()
-
getAccessMode
public AccessMode getAccessMode()
-
getText
public java.lang.String getText()
-
getUnit
public Unit getUnit()
-
getDetail
public EdgeConfig.Component.Channel.ChannelDetail getDetail()
-
toJson
public com.google.gson.JsonObject toJson()
Gets the JSON representation of this Channel.- Returns:
- a JsonObject
-
-