Class SetChannelValueRequest
java.lang.Object
io.openems.common.jsonrpc.base.JsonrpcMessage
io.openems.common.jsonrpc.base.AbstractJsonrpcRequest
io.openems.common.jsonrpc.base.JsonrpcRequest
io.openems.common.jsonrpc.request.SetChannelValueRequest
Sets the write value of a Channel.
{ "jsonrpc": "2.0", "id": "UUID", "method": "setChannelValue", "params": { "componentId": string, "channelId": string, "value": any } }
-
Field Summary
Fields inherited from class io.openems.common.jsonrpc.base.JsonrpcRequest
DEFAULT_TIMEOUT_SECONDS, id, NO_TIMEOUT, timeoutOpt
Fields inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
JSONRPC_VERSION
-
Constructor Summary
ConstructorDescriptionSetChannelValueRequest
(String componentId, String channelId, com.google.gson.JsonElement value) -
Method Summary
Modifier and TypeMethodDescriptionstatic SetChannelValueRequest
CreateSetChannelValueRequest
from a templateJsonrpcRequest
.Gets theChannelAddress
.Gets the Channel-ID.Gets the Component-ID.com.google.gson.JsonObject
Gets the paramsJsonObject
of theJsonrpcRequest
.com.google.gson.JsonElement
getValue()
Gets the Value.Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcRequest
getId, getTimeout, toJsonObject
Methods inherited from class io.openems.common.jsonrpc.base.AbstractJsonrpcRequest
getFullyQualifiedMethod, getMethod
Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
from, from, toString
-
Field Details
-
METHOD
- See Also:
-
-
Constructor Details
-
SetChannelValueRequest
-
-
Method Details
-
from
public static SetChannelValueRequest from(JsonrpcRequest r) throws OpenemsError.OpenemsNamedException CreateSetChannelValueRequest
from a templateJsonrpcRequest
.- Parameters:
r
- the templateJsonrpcRequest
- Returns:
- the
SetChannelValueRequest
- Throws:
OpenemsError.OpenemsNamedException
- on parse error
-
getParams
public com.google.gson.JsonObject getParams()Description copied from class:AbstractJsonrpcRequest
Gets the paramsJsonObject
of theJsonrpcRequest
.- Specified by:
getParams
in classAbstractJsonrpcRequest
- Returns:
- the params as
JsonObject
-
getComponentId
Gets the Component-ID.- Returns:
- Component-ID
-
getChannelId
Gets the Channel-ID.- Returns:
- Channel-ID
-
getChannelAddress
Gets theChannelAddress
.- Returns:
- ChannelAddress
-
getValue
public com.google.gson.JsonElement getValue()Gets the Value.- Returns:
- Value
-