Class GetSystemUpdateStateResponse
java.lang.Object
io.openems.common.jsonrpc.base.JsonrpcMessage
io.openems.common.jsonrpc.base.JsonrpcResponse
io.openems.common.jsonrpc.base.JsonrpcResponseSuccess
io.openems.edge.core.host.jsonrpc.GetSystemUpdateStateResponse
JSON-RPC Response to "getSystemUpdateState" Request.
{ "jsonrpc": "2.0", "id": "UUID", "result": { // State is unknown (e.g. internet connection limited by firewall) "unknown"?: { } // Latest version is already installed "updated"?: { "version": "XXXX" } // Update is available "available"?: { "currentVersion": "XXXX", "latestVersion": "XXXX" }, // Update is currently running "running"?: { "percentCompleted": number, "logs": string[] } } }
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
JSONRPC_VERSION
-
Method Summary
Modifier and TypeMethodDescriptionstatic GetSystemUpdateStateResponse
Builds aGetSystemUpdateStateResponse
forGetSystemUpdateStateResponse.Unknown
,GetSystemUpdateStateResponse.Updated
orGetSystemUpdateStateResponse.Available
state.com.google.gson.JsonObject
Gets the result of thisJsonrpcResponseSuccess
.static GetSystemUpdateStateResponse
isRunning
(UUID id, GetSystemUpdateStateResponse.UpdateState updateState) Builds aGetSystemUpdateStateResponse
forGetSystemUpdateStateResponse.Running
state.Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcResponseSuccess
from, toJsonObject
Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcResponse
from, getId
Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
toString
-
Method Details
-
isRunning
public static GetSystemUpdateStateResponse isRunning(UUID id, GetSystemUpdateStateResponse.UpdateState updateState) Builds aGetSystemUpdateStateResponse
forGetSystemUpdateStateResponse.Running
state.- Parameters:
id
- the request IDupdateState
- theGetSystemUpdateStateResponse.UpdateState
- Returns:
- the
GetSystemUpdateStateResponse
-
from
public static GetSystemUpdateStateResponse from(UUID id, String currentVersion, String latestVersion) Builds aGetSystemUpdateStateResponse
forGetSystemUpdateStateResponse.Unknown
,GetSystemUpdateStateResponse.Updated
orGetSystemUpdateStateResponse.Available
state.- Parameters:
id
- the request IDcurrentVersion
- the current versionlatestVersion
- the latest version- Returns:
- the
GetSystemUpdateStateResponse
-
getResult
public com.google.gson.JsonObject getResult()Description copied from class:JsonrpcResponseSuccess
Gets the result of thisJsonrpcResponseSuccess
.- Specified by:
getResult
in classJsonrpcResponseSuccess
- Returns:
- a JsonObject with the 'result' property of the response
-