Package com.ed.data.history
Class DayDataItem
- java.lang.Object
-
- com.ed.data.history.ADataItem
-
- com.ed.data.history.DayDataItem
-
- All Implemented Interfaces:
java.lang.Comparable<DayDataItem>
public class DayDataItem extends ADataItem implements java.lang.Comparable<DayDataItem>
History Day data block
-
-
Field Summary
Fields Modifier and Type Field Description static int
byteArrayLen
-
Constructor Summary
Constructors Constructor Description DayDataItem(byte[] ba)
Create object representing Day History dataDayDataItem(java.util.Date d)
Create object representing empty Day data
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(DayDataItem t)
int
compareTo(java.util.Date t)
Compare datesfloat
getCompensationEnergy()
Get Self Consumption (compensation) energyfloat
getGridConsEnergy()
Get Grid Consumption energy counterfloat
getGridInjEnergy()
Get Grid Feed In energy counterADataItem
getInstance(byte[] b)
Factory, create objectADataItem
getInstance(java.util.Date d)
Factory, create empty objectfloat
getInvConsEnergy()
Get Inverter consumption energyfloat
getInvInjEnergy()
Get Inverter Feed In energyfloat
getQAcc()
Get battery Ampere-hour counterjava.lang.String
getTabName()
Get data block namelong
getTsEnd()
Get end of current time periodlong
getTsStart()
Get start of current time periodjava.util.Date
setNextTimePeriod(int amount)
Add time-
Methods inherited from class com.ed.data.history.ADataItem
equals, getDlByts, getId, getS16Value, getS32Value, getS8Value, getTime, getTimestamp, getU16Value, getU32Value, getU8Value, initDataItem, isValid, qXToFloat, toString, writeCs
-
-
-
-
Field Detail
-
byteArrayLen
public static final int byteArrayLen
- See Also:
- Constant Field Values
-
-
Method Detail
-
compareTo
public int compareTo(DayDataItem t)
- Specified by:
compareTo
in interfacejava.lang.Comparable<DayDataItem>
-
compareTo
public int compareTo(java.util.Date t)
Description copied from class:ADataItem
Compare dates
-
setNextTimePeriod
public java.util.Date setNextTimePeriod(int amount)
Description copied from class:ADataItem
Add time- Specified by:
setNextTimePeriod
in classADataItem
- Parameters:
amount
- of time periods to add- Returns:
- new date
-
getInvInjEnergy
public float getInvInjEnergy() throws java.lang.Exception
Get Inverter Feed In energy- Returns:
- Energy [Wh]
- Throws:
java.lang.Exception
- wrong parameters or no inverter data available
-
getInvConsEnergy
public float getInvConsEnergy() throws java.lang.Exception
Get Inverter consumption energy- Returns:
- Energy [Wh]
- Throws:
java.lang.Exception
- wrong parameters or no inverter data available
-
getGridInjEnergy
public float getGridInjEnergy() throws java.lang.Exception
Get Grid Feed In energy counter- Returns:
- Energy [Wh]
- Throws:
java.lang.Exception
- wrong parameters or no inverter data available
-
getGridConsEnergy
public float getGridConsEnergy() throws java.lang.Exception
Get Grid Consumption energy counter- Returns:
- Energy [Wh]
- Throws:
java.lang.Exception
- wrong parameters or no inverter data available
-
getCompensationEnergy
public float getCompensationEnergy() throws java.lang.Exception
Get Self Consumption (compensation) energy- Returns:
- Energy [Wh]
- Throws:
java.lang.Exception
- wrong parameters or no inverter data available
-
getQAcc
public float getQAcc() throws java.lang.Exception
Get battery Ampere-hour counter- Returns:
- Battery Ampere-hour [Ah]
- Throws:
java.lang.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 classADataItem
- Returns:
- time period start, time stamp [ms]
-
getTsEnd
public long getTsEnd()
Description copied from class:ADataItem
Get end of current time period
-
getTabName
public java.lang.String getTabName()
Description copied from class:ADataItem
Get data block name- Specified by:
getTabName
in classADataItem
- Returns:
- name
-
getInstance
public ADataItem getInstance(byte[] b)
Description copied from class:ADataItem
Factory, create object- Specified by:
getInstance
in classADataItem
- Parameters:
b
- raw data- Returns:
- current data item
-
getInstance
public ADataItem getInstance(java.util.Date d)
Description copied from class:ADataItem
Factory, create empty object- Specified by:
getInstance
in classADataItem
- Parameters:
d
- by time- Returns:
- current data item
-
-