Class AggregatorChannel
- java.lang.Object
-
- org.openmuc.framework.driver.aggregator.AggregatorChannel
-
- Direct Known Subclasses:
AverageAggregation,DiffAggregation,LastAggregation,PulseEnergyAggregation
public abstract class AggregatorChannel extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.openmuc.framework.dataaccess.ChannelaggregatedChannelprotected longaggregationIntervalprotected longaggregationSamplingTimeOffsetprotected ChannelAddresschannelAddressprotected org.openmuc.framework.dataaccess.ChannelsourceChannelprotected longsourceLoggingInterval
-
Constructor Summary
Constructors Constructor Description AggregatorChannel(ChannelAddress channelAddress, org.openmuc.framework.dataaccess.DataAccessService dataAccessService)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract doubleaggregate(long currentTimestamp, long endTimestamp)Performs aggregation.java.util.List<org.openmuc.framework.data.Record>getLoggedRecords(long currentTimestamp, long endTimestamp)
-
-
-
Field Detail
-
channelAddress
protected ChannelAddress channelAddress
-
aggregatedChannel
protected org.openmuc.framework.dataaccess.Channel aggregatedChannel
-
sourceChannel
protected org.openmuc.framework.dataaccess.Channel sourceChannel
-
sourceLoggingInterval
protected long sourceLoggingInterval
-
aggregationInterval
protected long aggregationInterval
-
aggregationSamplingTimeOffset
protected long aggregationSamplingTimeOffset
-
-
Constructor Detail
-
AggregatorChannel
public AggregatorChannel(ChannelAddress channelAddress, org.openmuc.framework.dataaccess.DataAccessService dataAccessService) throws AggregationException
- Throws:
AggregationException
-
-
Method Detail
-
aggregate
public abstract double aggregate(long currentTimestamp, long endTimestamp) throws AggregationExceptionPerforms aggregation.- Parameters:
currentTimestamp- start TS.endTimestamp- stop TS.- Returns:
- the aggregated value.
- Throws:
AggregationException- if an error occurs.
-
getLoggedRecords
public java.util.List<org.openmuc.framework.data.Record> getLoggedRecords(long currentTimestamp, long endTimestamp) throws org.openmuc.framework.dataaccess.DataLoggerNotAvailableException, java.io.IOException, AggregationException- Throws:
org.openmuc.framework.dataaccess.DataLoggerNotAvailableExceptionjava.io.IOExceptionAggregationException
-
-