Class AnalogFanCompressor
- java.lang.Object
-
- com.inductiveautomation.gateway.tags.history.actor.compression.AnalogFanCompressor
-
- All Implemented Interfaces:
ValueCompressor
public class AnalogFanCompressor extends java.lang.Object implements ValueCompressor
This compressor implements the SLIM1 algorithm.
-
-
Constructor Summary
Constructors Constructor Description AnalogFanCompressor(double tolerance, DataType dType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected QualifiedValue
emitPrevious(boolean emitRaw, boolean isBelow)
java.util.List<QualifiedValue>
flush()
Tells the compressor to return any values it can.InterpolationMode
getDeadbandMode()
java.util.List<QualifiedValue>
putValue(QualifiedValue inValue)
Places a value into the compressor to be processed.protected java.util.List<QualifiedValue>
putValue(QualifiedValue inValue, boolean force)
protected void
resetStats()
void
setTolerance(double val)
protected float
slope(double newValue, long newTime)
-
-
-
Constructor Detail
-
AnalogFanCompressor
public AnalogFanCompressor(double tolerance, DataType dType)
-
-
Method Detail
-
getDeadbandMode
public InterpolationMode getDeadbandMode()
- Specified by:
getDeadbandMode
in interfaceValueCompressor
-
setTolerance
public void setTolerance(double val)
-
resetStats
protected void resetStats()
-
putValue
public java.util.List<QualifiedValue> putValue(QualifiedValue inValue)
Description copied from interface:ValueCompressor
Places a value into the compressor to be processed. Any available processed values are returned. Will return an empty list if no values should be emitted (will not return null).Important: For performance reasons, the list returned may be the same object between calls. Therefore, it should not be held onto. The values should be utilized directly after calling this function.
- Specified by:
putValue
in interfaceValueCompressor
-
putValue
protected java.util.List<QualifiedValue> putValue(QualifiedValue inValue, boolean force)
-
slope
protected float slope(double newValue, long newTime)
-
flush
public java.util.List<QualifiedValue> flush()
Description copied from interface:ValueCompressor
Tells the compressor to return any values it can. Can be used before shutdown, or when the max-age has been reached in order to force values to be written.Important: For performance reasons, the list returned may be the same object between calls. Therefore, it should not be held onto. The values should be utilized directly after calling this function.
- Specified by:
flush
in interfaceValueCompressor
-
emitPrevious
protected QualifiedValue emitPrevious(boolean emitRaw, boolean isBelow)
-
-