org.openmuc.core.datamanager.impl
Class DataStorageImpl
java.lang.Object
org.openmuc.core.datamanager.impl.DataStorageImpl
- All Implemented Interfaces:
- DataStorage
public class DataStorageImpl
- extends java.lang.Object
- implements DataStorage
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataStorageImpl
public DataStorageImpl(org.osgi.util.tracker.ServiceTracker listenerTracker,
ChannelConfiguration channelConfig,
DatabaseInterface database,
DeviceURI url,
DeviceDriverManager driverManager)
getCurrentValue
public Value getCurrentValue()
- Specified by:
getCurrentValue
in interface DataStorage
setDatabase
public void setDatabase(DatabaseInterface dbl)
addMeasurement
public boolean addMeasurement(Measurement msr)
- Specified by:
addMeasurement
in interface DataStorage
getMeanValue
public double getMeanValue()
getDataId
public ChannelIdentifier getDataId()
- Specified by:
getDataId
in interface DataStorage
getValue
public Value getValue(long timestamp)
- Description copied from interface:
DataStorage
- Get a Value object for the specified timestamp.
- Specified by:
getValue
in interface DataStorage
- Returns:
- a Value object or null if none was found.
getValues
public java.util.List<Value> getValues(long startTime)
- Description copied from interface:
DataStorage
- Get a list of Value objects (time serie).
- Specified by:
getValues
in interface DataStorage
- Returns:
- a list of Value objects or an empty list if no Value has been found.
getValues
public java.util.List<Value> getValues(long startTime,
long endTime)
- Description copied from interface:
DataStorage
- Get a list of Value objects (time serie).
- Specified by:
getValues
in interface DataStorage
- Returns:
- a list of Value objects or an empty list if no Value has been found.
getLastUpdateTime
public long getLastUpdateTime()
- Specified by:
getLastUpdateTime
in interface DataStorage
setValue
public void setValue(double value)
- Specified by:
setValue
in interface DataStorage
getState
public State getState()
- Specified by:
getState
in interface DataStorage
addListener
public void addListener(DataStorageListener listener)
- Specified by:
addListener
in interface DataStorage
getLabel
public java.lang.String getLabel()
- Specified by:
getLabel
in interface DataStorage
setState
public void setState(State state)
- Specified by:
setState
in interface DataStorage
getLowerLimit
public java.lang.Double getLowerLimit()
- Specified by:
getLowerLimit
in interface DataStorage
getUpperLimit
public java.lang.Double getUpperLimit()
- Specified by:
getUpperLimit
in interface DataStorage
getConfiguration
public ChannelConfiguration getConfiguration()
- Specified by:
getConfiguration
in interface DataStorage