Class TimedataDummy
java.lang.Object
io.openems.backend.common.component.AbstractOpenemsBackendComponent
io.openems.backend.timedata.dummy.TimedataDummy
- All Implemented Interfaces:
BackendTimedata
,Timedata
,CommonTimedataService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionid()
Returns a unique ID for this OpenEMS component.SortedMap
<ZonedDateTime, SortedMap<ChannelAddress, com.google.gson.JsonElement>> queryHistoricData
(String edgeId, ZonedDateTime fromDate, ZonedDateTime toDate, Set<ChannelAddress> channels, Resolution resolution) Queries historic data.SortedMap
<ChannelAddress, com.google.gson.JsonElement> queryHistoricEnergy
(String edgeId, ZonedDateTime fromDate, ZonedDateTime toDate, Set<ChannelAddress> channels) Queries historic energy.SortedMap
<ZonedDateTime, SortedMap<ChannelAddress, com.google.gson.JsonElement>> queryHistoricEnergyPerPeriod
(String edgeId, ZonedDateTime fromDate, ZonedDateTime toDate, Set<ChannelAddress> channels, Resolution resolution) Queries historic energy per period.void
write
(String edgeId, AggregatedDataNotification data) Sends the data points to the Timedata service.void
write
(String edgeId, ResendDataNotification data) Sends the data points to the Timedata service.void
write
(String edgeId, TimestampedDataNotification data) Sends the data points to the Timedata service.Methods inherited from class io.openems.backend.common.component.AbstractOpenemsBackendComponent
getName, logDebug, logDebug, logError, logError, logInfo, logInfo, logWarn, logWarn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.backend.common.timedata.BackendTimedata
queryFirstValueBefore
Methods inherited from interface io.openems.common.timedata.CommonTimedataService
handleQueryHistoricTimeseriesExportXlxsRequest, queryHistoricData
-
Constructor Details
-
TimedataDummy
public TimedataDummy()
-
-
Method Details
-
write
Description copied from interface:BackendTimedata
Sends the data points to the Timedata service.- Specified by:
write
in interfaceBackendTimedata
- Parameters:
edgeId
- The unique Edge-IDdata
- Table of timestamp (epoch in milliseconds), Channel-Address and the Channel value as JsonElement. Sorted by timestamp.
-
write
Description copied from interface:BackendTimedata
Sends the data points to the Timedata service.- Specified by:
write
in interfaceBackendTimedata
- Parameters:
edgeId
- The unique Edge-IDdata
- Table of timestamp (epoch in milliseconds), Channel-Address and the Channel value as AggregatedData. Sorted by timestamp.
-
write
Description copied from interface:BackendTimedata
Sends the data points to the Timedata service.- Specified by:
write
in interfaceBackendTimedata
- Parameters:
edgeId
- The unique Edge-IDdata
- Table of timestamp (epoch in milliseconds), Channel-Address and the Channel value as ResendData. Sorted by timestamp.
-
queryHistoricData
public SortedMap<ZonedDateTime,SortedMap<ChannelAddress, queryHistoricDatacom.google.gson.JsonElement>> (String edgeId, ZonedDateTime fromDate, ZonedDateTime toDate, Set<ChannelAddress> channels, Resolution resolution) throws OpenemsError.OpenemsNamedException Description copied from interface:CommonTimedataService
Queries historic data.- Specified by:
queryHistoricData
in interfaceCommonTimedataService
- Parameters:
edgeId
- the Edge-ID; or null query allfromDate
- the From-DatetoDate
- the To-Datechannels
- the Channelsresolution
- theResolution
- Returns:
- the query result; possibly null
- Throws:
OpenemsError.OpenemsNamedException
-
queryHistoricEnergy
public SortedMap<ChannelAddress,com.google.gson.JsonElement> queryHistoricEnergy(String edgeId, ZonedDateTime fromDate, ZonedDateTime toDate, Set<ChannelAddress> channels) throws OpenemsError.OpenemsNamedException Description copied from interface:CommonTimedataService
Queries historic energy.- Specified by:
queryHistoricEnergy
in interfaceCommonTimedataService
- Parameters:
edgeId
- the Edge-ID; or null query allfromDate
- the From-DatetoDate
- the To-Datechannels
- the Channels- Returns:
- the query result; possibly null
- Throws:
OpenemsError.OpenemsNamedException
-
queryHistoricEnergyPerPeriod
public SortedMap<ZonedDateTime,SortedMap<ChannelAddress, queryHistoricEnergyPerPeriodcom.google.gson.JsonElement>> (String edgeId, ZonedDateTime fromDate, ZonedDateTime toDate, Set<ChannelAddress> channels, Resolution resolution) throws OpenemsError.OpenemsNamedException Description copied from interface:CommonTimedataService
Queries historic energy per period.This is for use-cases where you want to get the energy for each period (with
Resolution
) per Channel, e.g. to visualize energy in a histogram chart. For each period the energy is calculated by subtracting first value of the period from the last value of the period.- Specified by:
queryHistoricEnergyPerPeriod
in interfaceCommonTimedataService
- Parameters:
edgeId
- the Edge-ID; or null query allfromDate
- the From-DatetoDate
- the To-Datechannels
- the Channelsresolution
- theResolution
- Returns:
- the query result; possibly null
- Throws:
OpenemsError.OpenemsNamedException
-
id
Description copied from interface:Timedata
Returns a unique ID for this OpenEMS component.
-