Interface AcEnergyDatum

All Superinterfaces:
net.solarnetwork.domain.datum.AcEnergyDatum, Cloneable, net.solarnetwork.domain.datum.Datum, net.solarnetwork.domain.datum.EnergyDatum, EnergyDatum, net.solarnetwork.domain.datum.MutableDatum, MutableNodeDatum, NodeDatum
All Known Subinterfaces:
AcDcEnergyDatum
All Known Implementing Classes:
SimpleAcDcEnergyDatum, SimpleAcEnergyDatum

public interface AcEnergyDatum extends EnergyDatum, net.solarnetwork.domain.datum.AcEnergyDatum
Standardized API for alternating current related energy datum to implement.

This API represents a single phase, either a direct phase measurement or an average or total measurement.

Version:
2.0
Author:
matt
  • Field Summary

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

    APPARENT_POWER_KEY, CURRENT_KEY, EFFECTIVE_POWER_FACTOR_KEY, FREQUENCY_KEY, LINE_VOLTAGE_KEY, NEUTRAL_CURRENT_KEY, PHASE_KEY, PHASE_VOLTAGE_KEY, POWER_FACTOR_KEY, REACTIVE_POWER_KEY, REAL_POWER_KEY, VOLTAGE_KEY

    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
    Populate phase-specific property values given a data accessor.
    default void
    setAcPhase(net.solarnetwork.domain.AcPhase value)
    Set the phase measured by this datum.
    default void
    Set the instantaneous apparent power, in volt-amperes (VA).
    default void
    Set the instantaneous current, in amps.
    default void
    setCurrent(net.solarnetwork.domain.AcPhase phase, Float value)
    Set the instantaneous current, in amps, for a specific phase.
    default void
    Set the instantaneous power factor.
    default void
    Set the instantaneous frequency, in hertz (Hz).
    default void
    Set the instantaneous phase-to-phase line voltage.
    default void
    setLineVoltage(net.solarnetwork.domain.AcPhase phase, Float value)
    Set the instantaneous phase-to-phase line voltage for a specific phase.
    default void
    Set the instantaneous neutral current, in amps.
    default void
    Set the instantaneous phase-to-neutral line voltage.
    default void
    Set the effective instantaneous power factor, as a value between -1 and 1.
    default void
    Set the instantaneous reactive power, in reactive volt-amperes (var).
    default void
    Set the instantaneous real power, in watts (W).
    default void
    Set the instantaneous neutral voltage.
    default void
    setVoltage(net.solarnetwork.domain.AcPhase phase, Float value)
    Set the instantaneous phase-to-neutral line voltage for a specific phase.

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

    getAcPhase, getApparentPower, getCurrent, getCurrent, getEffectivePowerFactor, getFrequency, getLineVoltage, getLineVoltage, getNeutralCurrent, getPhaseVoltage, getPowerFactor, getReactivePower, getRealPower, getVoltage, getVoltage

    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.node.domain.datum.EnergyDatum

    setReverseWattHourReading, setWattHourReading, setWatts, tagAsConsumption, tagAsGeneration

    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

    • populatePhaseMeasurementProperties

      default void populatePhaseMeasurementProperties(AcEnergyDataAccessor data)
      Populate phase-specific property values given a data accessor.

      This method will populate the following values for phases A, B, and C:

      Parameters:
      data - the data accessor
    • setAcPhase

      default void setAcPhase(net.solarnetwork.domain.AcPhase value)
      Set the phase measured by this datum.
      Parameters:
      value - the phase, if known
    • setRealPower

      default void setRealPower(Integer value)
      Set the instantaneous real power, in watts (W).

      This should return the same value as EnergyDatum.getWatts() but has this method to be explicit.

      Parameters:
      value - the real power in watts, or null if not available
    • setApparentPower

      default void setApparentPower(Integer value)
      Set the instantaneous apparent power, in volt-amperes (VA).
      Parameters:
      value - the apparent power in volt-amperes, or null if not available
    • setReactivePower

      default void setReactivePower(Integer value)
      Set the instantaneous reactive power, in reactive volt-amperes (var).
      Parameters:
      value - the reactive power in reactive volt-amperes, or null if not available
    • setPowerFactor

      default void setPowerFactor(Float value)
      Set the effective instantaneous power factor, as a value between -1 and 1. If the phase angle is positive (current leads voltage) this method returns a positive value. If the phase angle is negative (current lags voltage) this method returns a negative value.
      Parameters:
      value - the effective power factor
    • setEffectivePowerFactor

      default void setEffectivePowerFactor(Float value)
      Set the instantaneous power factor.
      Parameters:
      value - the effective power factor
    • setFrequency

      default void setFrequency(Float value)
      Set the instantaneous frequency, in hertz (Hz).
      Parameters:
      value - the frequency, or null if not known
    • setVoltage

      default void setVoltage(Float value)
      Set the instantaneous neutral voltage.
      Parameters:
      value - the volts, or null if not known
    • setVoltage

      default void setVoltage(net.solarnetwork.domain.AcPhase phase, Float value)
      Set the instantaneous phase-to-neutral line voltage for a specific phase.
      Parameters:
      phase - the phase
      value - the volts, or null if not known
    • setCurrent

      default void setCurrent(Float value)
      Set the instantaneous current, in amps.

      This method is equivalent to calling datum.getCurrent(datum.getPhase()).

      Parameters:
      value - the amps, or null if not known
    • setCurrent

      default void setCurrent(net.solarnetwork.domain.AcPhase phase, Float value)
      Set the instantaneous current, in amps, for a specific phase.
      Parameters:
      phase - the phase
      value - the phase
    • setNeutralCurrent

      default void setNeutralCurrent(Float value)
      Set the instantaneous neutral current, in amps.
      Parameters:
      value - the amps, or null if not known
    • setPhaseVoltage

      default void setPhaseVoltage(Float value)
      Set the instantaneous phase-to-neutral line voltage.

      This metnod is equivalent to calling datum.getPhaseVoltage(datum.getPhase()).

      Parameters:
      value - the volts, or null if not known
    • setLineVoltage

      default void setLineVoltage(Float value)
      Set the instantaneous phase-to-phase line voltage.
      Parameters:
      value - the line voltage
      See Also:
    • setLineVoltage

      default void setLineVoltage(net.solarnetwork.domain.AcPhase phase, Float value)
      Set the instantaneous phase-to-phase line voltage for a specific phase.
      Parameters:
      phase - the phase
      value - the line voltage