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

public interface EnergyDatum extends net.solarnetwork.domain.datum.EnergyDatum, MutableNodeDatum
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, TIMESTAMP

    Fields inherited from interface net.solarnetwork.domain.datum.EnergyDatum

    TAG_CONSUMPTION, TAG_GENERATION, WATT_HOUR_READING_KEY, WATTS_KEY

    Fields inherited from interface net.solarnetwork.node.domain.datum.NodeDatum

    TIMESTAMP_UPLOAD
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Set a reverse watt-hour reading.
    default void
    Set a watt-hour reading.
    default void
    Get the instantaneous watts.
    default boolean
    Tag this datum with the consumption tag, removing the generation tag.
    default boolean
    Tag 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, getTimestamp

    Methods inherited from interface net.solarnetwork.domain.datum.EnergyDatum

    getReverseWattHourReading, getWattHourReading, getWatts, isConsumption, isGeneration

    Methods inherited from interface net.solarnetwork.domain.datum.MutableDatum

    asMutableSampleOperations

    Methods inherited from interface net.solarnetwork.node.domain.datum.MutableNodeDatum

    clone

    Methods inherited from interface net.solarnetwork.node.domain.datum.NodeDatum

    copyWithId, copyWithSamples, getUploaded
  • Method Details

    • setWattHourReading

      default void setWattHourReading(Long value)
      Set a watt-hour reading.
      Parameters:
      value - the watt hour reading
    • setReverseWattHourReading

      default void setReverseWattHourReading(Long value)
      Set a reverse watt-hour reading.
      Parameters:
      value - the reverse watt hour reading
    • setWatts

      default void setWatts(Integer value)
      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