Interface EnergyDatum
- All Superinterfaces:
Cloneable,net.solarnetwork.domain.datum.Datum,net.solarnetwork.domain.datum.EnergyDatum,net.solarnetwork.domain.datum.MutableDatum,MutableNodeDatum,NodeDatum
- All Known Subinterfaces:
AcDcEnergyDatum,AcEnergyDatum,DcEnergyDatum
- All Known Implementing Classes:
SimpleAcDcEnergyDatum,SimpleAcEnergyDatum,SimpleDcEnergyDatum,SimpleEnergyDatum
Standardized API for energy related datum to implement. By "energy" we simply
mean this datum represents information tracked during the production or
consumption of energy. For example current sensors can provide approximate
instantaneous watt readings, watt-hour meters can provide accumulated Wh
readings, and usually solar inverters can provide instantaneous generated
power and accumulated energy production readings.
- Version:
- 2.0
- Author:
- matt
-
Field Summary
Fields inherited from interface net.solarnetwork.domain.datum.Datum
DATUM_TYPE_PROPERTY, DATUM_TYPES_PROPERTY, OP_STATE, OP_STATES, REVERSE_ACCUMULATING_SUFFIX_KEY, SOURCE_ID, TIMESTAMPFields inherited from interface net.solarnetwork.domain.datum.EnergyDatum
TAG_CONSUMPTION, TAG_GENERATION, WATT_HOUR_READING_KEY, WATTS_KEYFields inherited from interface net.solarnetwork.node.domain.datum.NodeDatum
TIMESTAMP_UPLOAD -
Method Summary
Modifier and TypeMethodDescriptiondefault voidsetReverseWattHourReading(Long value) Set a reverse watt-hour reading.default voidsetWattHourReading(Long value) Set a watt-hour reading.default voidGet the instantaneous watts.default booleanTag this datum with the consumption tag, removing the generation tag.default booleanTag this datum with the generation tag, removing the consumption tag.Methods inherited from interface net.solarnetwork.domain.datum.Datum
asSampleOperations, asSimpleMap, getKind, getObjectId, getSampleData, getSourceId, getTimestampMethods inherited from interface net.solarnetwork.domain.datum.EnergyDatum
getReverseWattHourReading, getWattHourReading, getWatts, isConsumption, isGenerationMethods inherited from interface net.solarnetwork.domain.datum.MutableDatum
asMutableSampleOperationsMethods inherited from interface net.solarnetwork.node.domain.datum.MutableNodeDatum
cloneMethods inherited from interface net.solarnetwork.node.domain.datum.NodeDatum
copyWithId, copyWithSamples, getUploaded
-
Method Details
-
setWattHourReading
Set a watt-hour reading.- Parameters:
value- the watt hour reading
-
setReverseWattHourReading
Set a reverse watt-hour reading.- Parameters:
value- the reverse watt hour reading
-
setWatts
Get the instantaneous watts.- Parameters:
value- the watts
-
tagAsConsumption
default boolean tagAsConsumption()Tag this datum with the consumption tag, removing the generation tag.- Returns:
- true if the consumption tag as added
-
tagAsGeneration
default boolean tagAsGeneration()Tag this datum with the generation tag, removing the consumption tag.- Returns:
- true if the generation tag as added
-