AggregationFunction
Namespace: Meshmakers.Octo.Runtime.Contracts.Repositories.Query
Aggregation functions supported by the runtime query contracts layer.
Mirrors the values of the CK-generated System AggregationTypes enum and the
transport-level AggregationTypesDto. Defined here to keep Runtime.Contracts
self-contained (no dependency on generated System CK model types).
public enum AggregationFunction
Inheritance Object → ValueType → Enum → AggregationFunction
Implements IComparable, ISpanFormattable, IFormattable, IConvertible
Fields
| Name | Value | Description |
|---|---|---|
| Count | 0 | Count of non-null values. |
| Minimum | 1 | Minimum value. |
| Maximum | 2 | Maximum value. |
| Average | 3 | Arithmetic mean. |
| Sum | 4 | Sum of values. |
| TimeWeightedAverage | 5 | Time-weighted average (LOCF interval weighting) for event-based archives. Resolvable against rollup archives that materialise a TimeWeightedAvg aggregation (integral/duration pair).. |
| StateDuration | 6 | Absolute time (milliseconds) an event-based signal held the column's AggregationColumn.ComparisonValue within the window, with LOCF semantics. Supported over raw event archives (query-time LOCF) and rollup archives that materialise a StateDuration aggregation.. |
| Integral | 7 | Step integral ∫v dt of a numeric event-based signal over the half-open query window [from, to), in value unit × hours (kW → kWh, W → Wh). Last observation carried forward: each value holds until the next row of the same rtId or the window end, and the last row before from opens the window; that carry-in row is looked up at most 35 days back (engine default lookback), an older row is not carried. Several rtIds in scope are summed. An empty window (no row in the window and no carry-in row) yields null, and so does a window whose rows all carry no value (only NULL observations: no measured energy, not zero). Requires both from and to. Served over raw event archives at query time and over rollup archives that materialise a TimeWeightedAvg aggregation on the column, read as the sum of the stored per-bucket integrals over the buckets that overlap the window. |