docs(historian): design §4 AtTime — inside an outage returns the Bad neighbour's code (T10 review)

Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
Joseph Doherty
2026-10-09 13:25:31 -04:00
parent 65e6352dad
commit d6afb39413
@@ -213,7 +213,10 @@ next call (not latched).
value + status. Otherwise Double/Int64 linearly interpolated (status `Good` with the historian
*Interpolated* info bits), Boolean/String/DateTime stepped from the previous
sample (status keeps the previous sample's code + Interpolated bit); no previous sample ⇒ `BadNoData`.
If either neighbour is Bad, the result is `UncertainDataSubNormal`.
If the **previous** neighbour is Bad, the requested time lies inside an outage: the result is a null value
carrying that neighbour's Bad code (never better than its source, per the quality contract; corrected after the
T10 review). If the previous neighbour is usable and the **next** is Bad, the previous value is held (stepped,
not interpolated into the outage) with `UncertainDataSubNormal`.
- **Events:** `TOP(@maxEvents)` from `{s}.Event` filtered by `SourceName = @source` (null ⇒ all) and
`EventTimeUtc` range, ordered ascending. `HistoricalEvent(EventId, SourceName, EventTimeUtc,
ReceivedTimeUtc, Message, (ushort)Severity)`.