Class DefaultHistoryColumn
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.sqltags.history.query.AbstractHistoryNode
-
- com.inductiveautomation.ignition.gateway.sqltags.history.query.columns.DefaultHistoryColumn
-
- All Implemented Interfaces:
HistoryColumn
,HistoryNode
public class DefaultHistoryColumn extends AbstractHistoryNode implements HistoryColumn
This is the most general-purpose implementation of a history node. It is provided raw values for a given column, and generates block results. It has pluggable support for aggregates, interpolation, and value validation.NOTE: This type currently has a large flaw in that it cannot properly handle raw queries. It expects the block size from the controller to be > 1.
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.ignition.gateway.sqltags.history.query.AbstractHistoryNode
type
-
-
Constructor Summary
Constructors Constructor Description DefaultHistoryColumn(java.lang.String name, QueryController controller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finishAggregationWindow()
Locks in values from previous aggregation window, updates currentBlock valueQualityCode
getQuality()
Gets the quality that corresponds to the last call to getValuejava.lang.Object
getValue(long blockId, int level)
boolean
hasMore()
Indicates whether the node has more data for the last time used with getValue.protected void
logAggValue(long ts, ProcessedValue v)
void
process(HistoricalValue value)
This receives a new raw value from the data source and processes it.void
setAggregationFunction(AggregationFunction func)
protected void
setController(QueryController controller)
void
setInterpolator(Interpolator value)
protected boolean
valueInterpolated(ProcessedValue v)
protected boolean
valueIsProvisional(ProcessedValue value)
boolean
wasValueInterpolated()
Returns whether the the last value provided by getValue was purely interpolated- not based on any actual data.-
Methods inherited from class com.inductiveautomation.ignition.gateway.sqltags.history.query.AbstractHistoryNode
getDataType, getErrorCode, getName, getNext, getPrevious, isErrored, markCompleted, maxAvailableTime, setDataType, setErrored, setNext, setNextAvailableTime, setPrevious, sortNode, swapNodes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.gateway.sqltags.history.query.HistoryNode
getDataType, getName, getNext, getPrevious, markCompleted, maxAvailableTime, setNext, setPrevious
-
-
-
-
Constructor Detail
-
DefaultHistoryColumn
public DefaultHistoryColumn(java.lang.String name, QueryController controller)
-
-
Method Detail
-
setAggregationFunction
public void setAggregationFunction(AggregationFunction func)
-
setInterpolator
public void setInterpolator(Interpolator value)
-
setController
protected void setController(QueryController controller)
-
logAggValue
protected void logAggValue(long ts, ProcessedValue v)
-
valueIsProvisional
protected boolean valueIsProvisional(@Nullable ProcessedValue value)
-
valueInterpolated
protected boolean valueInterpolated(@Nullable ProcessedValue v)
-
process
public void process(HistoricalValue value)
This receives a new raw value from the data source and processes it.- Specified by:
process
in interfaceHistoryColumn
-
finishAggregationWindow
protected void finishAggregationWindow()
Locks in values from previous aggregation window, updates currentBlock value
-
getValue
public java.lang.Object getValue(long blockId, int level)
- Specified by:
getValue
in interfaceHistoryNode
-
getQuality
public QualityCode getQuality()
Description copied from interface:HistoryNode
Gets the quality that corresponds to the last call to getValue- Specified by:
getQuality
in interfaceHistoryNode
-
hasMore
public boolean hasMore()
Description copied from interface:HistoryNode
Indicates whether the node has more data for the last time used with getValue.- Specified by:
hasMore
in interfaceHistoryNode
-
wasValueInterpolated
public boolean wasValueInterpolated()
Description copied from interface:HistoryNode
Returns whether the the last value provided by getValue was purely interpolated- not based on any actual data.- Specified by:
wasValueInterpolated
in interfaceHistoryNode
-
-