Class MonthDataItem

java.lang.Object
com.ed.data.history.ADataItem
com.ed.data.history.MonthDataItem
All Implemented Interfaces:
Comparable<MonthDataItem>

public class MonthDataItem extends ADataItem implements Comparable<MonthDataItem>
History Month data block
  • Field Details

  • Constructor Details

    • MonthDataItem

      public MonthDataItem(byte[] ba)
      Create object representing month History data
      Parameters:
      ba - embedded data (raw)
    • MonthDataItem

      public MonthDataItem(Date d)
      Create object representing empty month data
      Parameters:
      d - time
  • Method Details

    • compareTo

      public int compareTo(MonthDataItem t)
      Specified by:
      compareTo in interface Comparable<MonthDataItem>
    • compareTo

      public int compareTo(Date t)
      Description copied from class: ADataItem
      Compare dates
      Specified by:
      compareTo in class ADataItem
      Parameters:
      t - Date to compare with data block time stamp
      Returns:
      0 - same time period, -1 - parameter is older than current data block 1 - parameter is younger than current data block
    • setNextTimePeriod

      public Date setNextTimePeriod(int amount)
      Description copied from class: ADataItem
      Add time
      Specified by:
      setNextTimePeriod in class ADataItem
      Parameters:
      amount - of time periods to add
      Returns:
      new date
    • getInvInjEnergy

      public float getInvInjEnergy() throws Exception
      Get Inverter Feed In energy
      Returns:
      Energy [Wh]
      Throws:
      Exception - wrong parameters or no inverter data available
    • getInvConsEnergy

      public float getInvConsEnergy() throws Exception
      Get Inverter consumption energy
      Returns:
      Energy [Wh]
      Throws:
      Exception - wrong parameters or no inverter data available
    • getGridInjEnergy

      public float getGridInjEnergy() throws Exception
      Get Grid Feed In energy counter
      Returns:
      Energy [Wh]
      Throws:
      Exception - wrong parameters or no inverter data available
    • getGridConsEnergy

      public float getGridConsEnergy() throws Exception
      Get Grid Consumption energy counter
      Returns:
      Energy [Wh]
      Throws:
      Exception - wrong parameters or no inverter data available
    • getCompensationEnergy

      public float getCompensationEnergy() throws Exception
      Get Self Consumption (compensation) energy
      Returns:
      Energy [Wh]
      Throws:
      Exception - wrong parameters or no inverter data available
    • getQAcc

      public float getQAcc() throws Exception
      Get battery Ampere-hour counter
      Returns:
      Battery Ampere-hour [Ah]
      Throws:
      Exception - wrong parameters or no inverter data available
    • getTsStart

      public long getTsStart()
      Description copied from class: ADataItem
      Get start of current time period
      Specified by:
      getTsStart in class ADataItem
      Returns:
      time period start, time stamp [ms]
    • getTsEnd

      public long getTsEnd()
      Description copied from class: ADataItem
      Get end of current time period
      Specified by:
      getTsEnd in class ADataItem
      Returns:
      time period start, time stamp [ms]
    • getTabName

      public String getTabName()
      Description copied from class: ADataItem
      Get data block name
      Specified by:
      getTabName in class ADataItem
      Returns:
      name
    • getInstance

      public ADataItem getInstance(byte[] b)
      Description copied from class: ADataItem
      Factory, create object
      Specified by:
      getInstance in class ADataItem
      Parameters:
      b - raw data
      Returns:
      current data item
    • getInstance

      public ADataItem getInstance(Date d)
      Description copied from class: ADataItem
      Factory, create empty object
      Specified by:
      getInstance in class ADataItem
      Parameters:
      d - by time
      Returns:
      current data item