Package io.openems.edge.timedata.api
Interface Timedata
- All Superinterfaces:
CommonTimedataService
,OpenemsComponent
- All Known Subinterfaces:
SimulatorApp
,SimulatorTimedata
,TimedataInfluxDb
,TimedataRrd4j
- All Known Implementing Classes:
DummyTimedata
,SimulatorAppImpl
,SimulatorTimedataImpl
,TimedataInfluxDbImpl
,TimedataRrd4jImpl
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetLatestValue
(ChannelAddress channelAddress) Gets the latest known value for the givenChannelAddress
.getResendTimeranges
(ChannelAddress notSendChannel, long lastResendTimestamp) Gets theTimeranges
to data which got not send.SortedMap
<Long, SortedMap<ChannelAddress, com.google.gson.JsonElement>> queryResendData
(ZonedDateTime fromDate, ZonedDateTime toDate, Set<ChannelAddress> channels) Queries data to resend.Methods inherited from interface io.openems.common.timedata.CommonTimedataService
handleQueryHistoricTimeseriesExportXlxsRequest, queryHistoricData, queryHistoricData, queryHistoricEnergy, queryHistoricEnergyPerPeriod
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, debugLog, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
Method Details
-
getLatestValue
Gets the latest known value for the givenChannelAddress
.- Parameters:
channelAddress
- the ChannelAddress to be queried- Returns:
- the latest known value or Empty
-
getResendTimeranges
Timeranges getResendTimeranges(ChannelAddress notSendChannel, long lastResendTimestamp) throws OpenemsError.OpenemsNamedException Gets theTimeranges
to data which got not send. The not send data gets determined with the notSendChannel and the lastResendTimestamp.- Parameters:
notSendChannel
- the channel with the timestamps where the data got not sendlastResendTimestamp
- the timestamp of the last resend; negativ if there is no lastResendTimestamp- Returns:
- the
Timeranges
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
queryResendData
SortedMap<Long,SortedMap<ChannelAddress, queryResendDatacom.google.gson.JsonElement>> (ZonedDateTime fromDate, ZonedDateTime toDate, Set<ChannelAddress> channels) throws OpenemsError.OpenemsNamedException Queries data to resend.- Parameters:
fromDate
- the start datetoDate
- the end datechannels
- the channels to resend- Returns:
- the query result; possibly null
- Throws:
OpenemsError.OpenemsNamedException
- on error
-