Package io.openems.edge.evcs.ocpp.common
Class ChargeSessionStamp
java.lang.Object
io.openems.edge.evcs.ocpp.common.ChargeSessionStamp
-
Constructor Summary
ConstructorDescriptionConstructor of a ChargeSession with no initial values.ChargeSessionStamp
(long energy) Constructor of a ChargeSession with the initial Energy.ChargeSessionStamp
(Instant time) Constructor of a ChargeSession with the initial Time.ChargeSessionStamp
(Instant time, long energy) Constructor of a ChargeSession with the given time and energy. -
Method Summary
Modifier and TypeMethodDescriptionlong
getTime()
boolean
protected void
void
Reset the Charge Session Timestamp.void
setChargeSessionStamp
(Instant time, long energy) void
setChargeSessionStampIfNotPresent
(Instant time, long energy) void
setEnergy
(long energy) void
-
Constructor Details
-
ChargeSessionStamp
Constructor of a ChargeSession with the given time and energy.- Parameters:
time
- theInstant
timeenergy
- the Energy
-
ChargeSessionStamp
public ChargeSessionStamp(long energy) Constructor of a ChargeSession with the initial Energy.The time will be initialized by Instant.now().
- Parameters:
energy
- the Energy
-
ChargeSessionStamp
Constructor of a ChargeSession with the initial Time.The energy will be initialized by 0.
- Parameters:
time
- theInstant
time
-
ChargeSessionStamp
public ChargeSessionStamp()Constructor of a ChargeSession with no initial values.
-
-
Method Details
-
getTime
-
setTime
-
getEnergy
public long getEnergy() -
setEnergy
public void setEnergy(long energy) -
isChargeSessionStampPresent
public boolean isChargeSessionStampPresent() -
setChargeSessionStamp
-
resetChargeSessionStamp
protected void resetChargeSessionStamp() -
setChargeSessionStampIfNotPresent
-
resetChargeSessionStampIfPresent
public void resetChargeSessionStampIfPresent()Reset the Charge Session Timestamp.
-