org.flexiblepower.efi.buffer
Q
- The quantity that describes what is stored in the buffer (e.g. temperature or electricity)public class BufferStateUpdate<Q extends javax.measure.quantity.Quantity> extends BufferUpdate
Constructor and Description |
---|
BufferStateUpdate(BufferRegistration<Q> bufferRegistration,
java.util.Date timestamp,
java.util.Date validFrom,
javax.measure.Measurable<Q> currentFillLevel,
java.util.Set<ActuatorUpdate> currentRunningMode)
Constructs a new
BufferStateUpdate message with the specific validFrom |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
javax.measure.Measurable<Q> |
getCurrentFillLevel() |
double |
getCurrentFillLevelAsDouble(javax.measure.unit.Unit<Q> unit) |
java.util.Set<ActuatorUpdate> |
getCurrentRunningMode() |
int |
hashCode() |
protected void |
toString(java.lang.StringBuilder sb) |
getValidFrom
getResourceId, getResourceMessageId, getTimestamp, toString
public BufferStateUpdate(BufferRegistration<Q> bufferRegistration, java.util.Date timestamp, java.util.Date validFrom, javax.measure.Measurable<Q> currentFillLevel, java.util.Set<ActuatorUpdate> currentRunningMode)
BufferStateUpdate
message with the specific validFrombufferRegistration
- The registration message to which this update is referring totimestamp
- The moment when this constructor is calledvalidFrom
- This timestamp indicates from which moment on this update is valid.currentFillLevel
- This value represents the current fill level of the buffer.currentRunningMode
- This is a set of zero or more current running modes. For every actuator there will be one current
running mode.public javax.measure.Measurable<Q> getCurrentFillLevel()
public double getCurrentFillLevelAsDouble(javax.measure.unit.Unit<Q> unit)
unit
- The unit in which we want the current fill level to be expressedpublic java.util.Set<ActuatorUpdate> getCurrentRunningMode()
public int hashCode()
hashCode
in class ControlSpaceUpdate
public boolean equals(java.lang.Object obj)
equals
in class ControlSpaceUpdate
protected void toString(java.lang.StringBuilder sb)
toString
in class ControlSpaceUpdate