Class QueryHistoricTimeseriesDataRequest
- 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.QueryHistoricTimeseriesDataRequest
-
public class QueryHistoricTimeseriesDataRequest extends JsonrpcRequest
Represents a JSON-RPC Request for 'queryHistoricTimeseriesData'.{ "jsonrpc": "2.0", "id": "UUID", "method": "queryHistoricTimeseriesData", "params": { "fromDate": YYYY-MM-DD, "toDate": YYYY-MM-DD, "channels": ChannelAddress[], "timezone": String, "resolution"?: { "value": Number, "unit":
ChronoUnit
} } }
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
METHOD
-
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
Constructors Constructor Description QueryHistoricTimeseriesDataRequest(java.time.ZonedDateTime fromDate, java.time.ZonedDateTime toDate, java.util.Optional<Resolution> resolution)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static QueryHistoricTimeseriesDataRequest
from(JsonrpcRequest r)
CreateQueryHistoricTimeseriesDataRequest
from a templateJsonrpcRequest
.java.util.TreeSet<ChannelAddress>
getChannels()
Gets theChannelAddress
es.java.time.ZonedDateTime
getFromDate()
Gets the From-Date.com.google.gson.JsonObject
getParams()
Gets the paramsJsonObject
of theJsonrpcRequest
.java.util.Optional<Resolution>
getResolution()
Gets the requested Resolution.java.time.ZonedDateTime
getToDate()
Gets the To-Date.-
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 Detail
-
METHOD
public static final java.lang.String METHOD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QueryHistoricTimeseriesDataRequest
public QueryHistoricTimeseriesDataRequest(java.time.ZonedDateTime fromDate, java.time.ZonedDateTime toDate, java.util.Optional<Resolution> resolution) throws OpenemsError.OpenemsNamedException
-
-
Method Detail
-
from
public static QueryHistoricTimeseriesDataRequest from(JsonrpcRequest r) throws OpenemsError.OpenemsNamedException
CreateQueryHistoricTimeseriesDataRequest
from a templateJsonrpcRequest
.- Parameters:
r
- the templateJsonrpcRequest
- Returns:
- the
QueryHistoricTimeseriesDataRequest
- 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
-
getFromDate
public java.time.ZonedDateTime getFromDate()
Gets the From-Date.- Returns:
- From-Date
-
getToDate
public java.time.ZonedDateTime getToDate()
Gets the To-Date.- Returns:
- To-Date
-
getChannels
public java.util.TreeSet<ChannelAddress> getChannels()
Gets theChannelAddress
es.- Returns:
- Set of
ChannelAddress
-
getResolution
public java.util.Optional<Resolution> getResolution()
Gets the requested Resolution.- Returns:
- Resolution
-
-