Package com.ed.data
Class History
java.lang.Object
com.ed.data.History
- All Implemented Interfaces:
DataSet
Inverter history
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Get data statusgetData()
Get History data blockGet history day recordgetHistoryHour
(Date reqDate) Get history hour recordGet history month recordGet history year recordboolean
hasNext()
void
refresh()
Put refresh requestvoid
registerData
(Client cl) Register all internal datavoid
setDataIndex
(int ix) void
setNext()
void
setRequiredData
(int type) Set required history data blocktoString()
-
Field Details
-
HOUR
public static final int HOUR- See Also:
-
DAY
public static final int DAY- See Also:
-
MONTH
public static final int MONTH- See Also:
-
YEAR
public static final int YEAR- See Also:
-
-
Constructor Details
-
History
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
Description copied from interface:DataSet
Register all internal data- Specified by:
registerData
in interfaceDataSet
- Parameters:
cl
- client connected to inverter
-
refresh
public void refresh()Description copied from interface:DataSet
Put refresh request -
dataReady
public boolean dataReady()Description copied from interface:DataSet
Get data status -
getData
Get History data block- Returns:
- required data
-
toString
-
getHistoryYear
Get history year record- Returns:
- All recorded energy valuesper year sorted by year in ascending order
- Throws:
InterruptedException
-
getHistoryMonth
Get history month record- Returns:
- All recorded energy values per month sorted by month in ascending order
- Throws:
InterruptedException
-
getHistoryDay
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, getHistoryHourfloat[]>> (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
-