Class SetGridConnScheduleRequest.GridConnSchedule
java.lang.Object
io.openems.common.jsonrpc.request.SetGridConnScheduleRequest.GridConnSchedule
- Enclosing class:
- SetGridConnScheduleRequest
-
Constructor Summary
ConstructorsConstructorDescriptionGridConnSchedule
(long startTimestamp, int duration, int activePowerSetPoint) Construct an instance ofSetGridConnScheduleRequest.GridConnSchedule
. -
Method Summary
Modifier and TypeMethodDescriptionfrom
(com.google.gson.JsonArray j) Create a list ofSetGridConnScheduleRequest.GridConnSchedule
s from aJsonArray
.int
Gets the Active-Power Setpoint.int
Gets the duration in seconds.long
Gets the start timestamp in epoch seconds.protected com.google.gson.JsonObject
toJson()
-
Constructor Details
-
GridConnSchedule
public GridConnSchedule(long startTimestamp, int duration, int activePowerSetPoint) Construct an instance ofSetGridConnScheduleRequest.GridConnSchedule
.- Parameters:
startTimestamp
- epoch in secondsduration
- in secondsactivePowerSetPoint
- in Watt
-
-
Method Details
-
from
public static List<SetGridConnScheduleRequest.GridConnSchedule> from(com.google.gson.JsonArray j) throws OpenemsError.OpenemsNamedException Create a list ofSetGridConnScheduleRequest.GridConnSchedule
s from aJsonArray
.- Parameters:
j
- theJsonArray
- Returns:
- the list of
SetGridConnScheduleRequest.GridConnSchedule
s - Throws:
OpenemsError.OpenemsNamedException
- on parse error
-
getStartTimestamp
public long getStartTimestamp()Gets the start timestamp in epoch seconds.- Returns:
- start timestamp
-
getDuration
public int getDuration()Gets the duration in seconds.- Returns:
- duration
-
getActivePowerSetPoint
public int getActivePowerSetPoint()Gets the Active-Power Setpoint.- Returns:
- the setpoint
-
toJson
protected com.google.gson.JsonObject toJson()
-