SeriesResolutionRequest
Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData
Input to the resolution-aware series resolver (ISeriesResolutionService): a logical series
(addressed by an archive family plus optional rtId / OBIS scope), a time range, and the target
number of display points. The resolver picks the archive to query — it does not run the query.
See concept-resolution-aware-series-queries.md §5.1.
public record SeriesResolutionRequest : IEquatable<SeriesResolutionRequest>
Inheritance Object → SeriesResolutionRequest
Implements IEquatable<SeriesResolutionRequest>
Fields
DefaultMinRollupPoints
Default of SeriesResolutionRequest.MinRollupPoints: a rollup that delivers at least 150 points is preferred over the base archive. A 7-day window over an hourly rollup (168 points) reads the rollup, a 1-day window (24 points) keeps the 15-minute base data.
public static int DefaultMinRollupPoints;
Properties
BaseArchiveRtId
The base (raw / time-range) archive of the family. Mutually complementary with SeriesResolutionRequest.TargetCkTypeId: at least one must be supplied so the service can identify the family. When both are set, SeriesResolutionRequest.BaseArchiveRtId wins.
public Nullable<OctoObjectId> BaseArchiveRtId { get; set; }
Property Value
TargetCkTypeId
The archived CK type (e.g. Basic.Energy/EnergyMeasurement) used to locate the base archive
when SeriesResolutionRequest.BaseArchiveRtId is not supplied.
public RtCkId<CkTypeId> TargetCkTypeId { get; set; }
Property Value
RtCkId<CkTypeId>
From
Inclusive start of the query window (UTC).
public DateTime From { get; set; }
Property Value
To
Exclusive end of the query window (UTC).
public DateTime To { get; set; }
Property Value
TargetPoints
The desired number of output points (pixel-driven, ~600 default). Must be positive.
public int TargetPoints { get; set; }
Property Value
RequiredAggregation
The aggregation function the series must be reduced with (decision O2: caller-supplied, never guessed — energy ⇒ CkRollupFunction.Sum, demand ⇒ CkRollupFunction.Max, etc.). A rollup rung is a valid source only when its stored function equals this; on the base archive it is the only semantic source and drives the downsampling reducer.
public CkRollupFunction RequiredAggregation { get; set; }
Property Value
SourcePath
The logical CK attribute path of the measured column the series reduces (e.g.
Amount.Value). Used to match a rollup's aggregation spec: a rollup rung is eligible only
when it aggregates this path with SeriesResolutionRequest.RequiredAggregation.
public string SourcePath { get; set; }
Property Value
RtIds
Optional runtime scope override — the source entity rtIds the series is restricted to . Advisory to the resolver; forwarded by the caller to the downsampling query.
public IReadOnlyList<OctoObjectId> RtIds { get; set; }
Property Value
QueryTimeZone
Optional IANA time zone (e.g. Europe/Vienna) the query is resolved in (decision T1). Under SeriesComparisonPolicy.PerQuery it is applied uniformly so
calendar (day/week/month/year) rungs are selected and aligned on this zone's DST-correct civil
boundaries; a calendar rung whose stored zone differs holds a different zone's civil buckets
and is excluded. null ⇒ UTC calendar boundaries (legacy behaviour). Sub-day fixed-size
rungs are unaffected (decision T3). Ignored under
SeriesComparisonPolicy.PerSeries, where each rung uses its own stored zone.
public string QueryTimeZone { get; set; }
Property Value
QueryDayStartOffsetMs
Local time of day at which a calendar-day bucket of this query starts, in milliseconds after
local midnight. null or 0 ⇒ midnight days (every request before System.StreamData
1.22.0). Under SeriesComparisonPolicy.PerQuery a BucketAlignment.CalendarDay
rung whose own day start differs holds other days' buckets and is excluded, so a midnight chart never
reads gas days. Ignored under SeriesComparisonPolicy.PerSeries.
public Nullable<long> QueryDayStartOffsetMs { get; set; }
Property Value
ComparisonPolicy
How civil boundaries are resolved when the series spans multiple reference time zones (decision T2). Defaults to SeriesComparisonPolicy.PerQuery.
public SeriesComparisonPolicy ComparisonPolicy { get; set; }
Property Value
MinRollupPoints
Rollup preference threshold. When no compatible rollup is fine enough for SeriesResolutionRequest.TargetPoints,
the base archive used to win whenever its native resolution fit the target, so a 7-day window at 800 points read
672 raw windows per series instead of the 168 points of an hourly rollup. Now the finest compatible rollup is
chosen (signal SeriesResolutionSignal.ResolutionLimited) when it delivers at least this many points
over the window, whether or not the base would fit. 0 turns the preference off (the base wins when it fits,
as in older versions); a negative value is refused. Default SeriesResolutionRequest.DefaultMinRollupPoints.
public int MinRollupPoints { get; set; }
Property Value
Constructors
SeriesResolutionRequest(Nullable<OctoObjectId>, RtCkId<CkTypeId>, DateTime, DateTime, Int32, CkRollupFunction, String)
Input to the resolution-aware series resolver (ISeriesResolutionService): a logical series
(addressed by an archive family plus optional rtId / OBIS scope), a time range, and the target
number of display points. The resolver picks the archive to query — it does not run the query.
See concept-resolution-aware-series-queries.md §5.1.
public SeriesResolutionRequest(Nullable<OctoObjectId> BaseArchiveRtId, RtCkId<CkTypeId> TargetCkTypeId, DateTime From, DateTime To, int TargetPoints, CkRollupFunction RequiredAggregation, string SourcePath)
Parameters
BaseArchiveRtId Nullable<OctoObjectId>
The base (raw / time-range) archive of the family. Mutually complementary with
SeriesResolutionRequest.TargetCkTypeId: at least one must be supplied so the service can identify the
family. When both are set, SeriesResolutionRequest.BaseArchiveRtId wins.
TargetCkTypeId RtCkId<CkTypeId>
The archived CK type (e.g. Basic.Energy/EnergyMeasurement) used to locate the base archive
when SeriesResolutionRequest.BaseArchiveRtId is not supplied.
From DateTime
Inclusive start of the query window (UTC).
To DateTime
Exclusive end of the query window (UTC).
TargetPoints Int32
The desired number of output points (pixel-driven, ~600 default). Must be positive.
RequiredAggregation CkRollupFunction
The aggregation function the series must be reduced with (decision O2: caller-supplied, never
guessed — energy ⇒ CkRollupFunction.Sum, demand ⇒ CkRollupFunction.Max,
etc.). A rollup rung is a valid source only when its stored function equals this; on the base
archive it is the only semantic source and drives the downsampling reducer.
SourcePath String
The logical CK attribute path of the measured column the series reduces (e.g.
Amount.Value). Used to match a rollup's aggregation spec: a rollup rung is eligible only
when it aggregates this path with SeriesResolutionRequest.RequiredAggregation.
Methods
ForQueryFunction(OctoObjectId, DateTime, DateTime, Int32, AggregationFunction, String)
Builds a request for the aggregation function the caller will run on the chosen archive. The
stored rollup function a rung must carry is derived with
RollupQueryFunction.RequiredStoredFunction(AggregationFunction) — for
AggregationFunction.Integral that is CkRollupFunction.TimeWeightedAvg,
so Integral is routed to exactly the rungs a TimeWeightedAverage query would use. Without
such a rung the base archive is handled as for any other function: chosen when it fits the target
points, otherwise named with a refusal signal (SeriesResolutionSignal.NoSuitableRollup,
or SeriesResolutionSignal.UnknownBaseGrain when its grain is undeclared). The result's
reducer names the stored function; the caller still runs queryFunction against
the chosen archive.
public static SeriesResolutionRequest ForQueryFunction(OctoObjectId baseArchiveRtId, DateTime from, DateTime to, int targetPoints, AggregationFunction queryFunction, string sourcePath)
Parameters
baseArchiveRtId OctoObjectId
from DateTime
to DateTime
targetPoints Int32
queryFunction AggregationFunction
sourcePath String