Package com.ed.data

Class History

java.lang.Object
com.ed.data.History
All Implemented Interfaces:
DataSet

public final class History extends Object implements DataSet
Inverter history
  • Field Details

  • Constructor Details

    • History

      public History() throws Exception
      Creates a object representing inverter history
      Throws:
      Exception - wrong parameters
  • Method Details

    • setRequiredData

      public void setRequiredData(int type)
      Set required history data block
      Parameters:
      type - History.HOUR, History.DAY, History.MONTH or History.YEAR
    • hasNext

      public boolean hasNext()
    • setNext

      public void setNext()
    • setDataIndex

      public void setDataIndex(int ix)
    • registerData

      public void registerData(Client cl)
      Description copied from interface: DataSet
      Register all internal data
      Specified by:
      registerData in interface DataSet
      Parameters:
      cl - client connected to inverter
    • refresh

      public void refresh()
      Description copied from interface: DataSet
      Put refresh request
      Specified by:
      refresh in interface DataSet
    • dataReady

      public boolean dataReady()
      Description copied from interface: DataSet
      Get data status
      Specified by:
      dataReady in interface DataSet
      Returns:
      true if internal data was read after last refresh request
    • getData

      public ADataItem getData()
      Get History data block
      Returns:
      required data
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getHistoryYear

      public SortedMap<Date,SortedMap<String,Float>> getHistoryYear() throws InterruptedException
      Get history year record
      Returns:
      All recorded energy valuesper year sorted by year in ascending order
      Throws:
      InterruptedException
    • getHistoryMonth

      public SortedMap<Date,SortedMap<String,Float>> getHistoryMonth() throws InterruptedException
      Get history month record
      Returns:
      All recorded energy values per month sorted by month in ascending order
      Throws:
      InterruptedException
    • getHistoryDay

      public SortedMap<Date,SortedMap<String,Float>> getHistoryDay() throws InterruptedException
      Get history day record
      Returns:
      All recorded energy values per day sorted by day in ascending order.
      Throws:
      InterruptedException
    • getHistoryHour

      public SortedMap<Date,SortedMap<String,float[]>> getHistoryHour(Date reqDate) throws InterruptedException
      Get history hour record
      Parameters:
      reqDate - Date of the requested day
      Returns:

      All recorded performance values in per hour of the requested day sorted by hour in ascending order. The values are stored in arrays of lenght 30 and 12. Arrays of length 30 represent 2 minute average values, arrays of 12 represent 5 minute average values.

      For example: Date -> 06:00:00

      p_pv[0] = 06:00:00, p_pv[1] = 06:02:00 ... p_pv[length - 1] = 06:58:00

      soc[0] = 06:00:00, soc[1] = 06:05:00 ... soc[length - 1] = 06:55:00

      Throws:
      InterruptedException