docs(historian): fix-wave docs and stale comments
- Historian.md: Empty samples always Bad (writer/updater/read clamp), long-name refusal, 5 s bootstrap failure cache, AtTime after now, info-bit masking, HistoryUpdate does NOT type-check (M-1 decision), DeleteRaw needs both bounds, reverse Raw paging, the historian/historization metric prefixes, and provisioning numeric-only lines qualified as Gateway. - CLAUDE.md numeric-only lines qualified as Gateway backend. - Stale 'sole historian' lines in DriverLifecycle, ServiceHosting and the retired Wonderware stub; Client.CLI exit-code contract. - ServerHistorianOptions: Endpoint/Backend XML docs untangled, Validate() indented; Program.cs comments are backend-neutral; T10 week-test day count. Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
@@ -265,30 +265,29 @@ if (hasDriver)
|
||||
|
||||
// Config-gated server-side HistoryRead backend. When the ServerHistorian section is enabled this
|
||||
// overrides the NullHistorianDataSource default from AddOtOpcUaRuntime (last registration wins) with
|
||||
// a read-only HistorianGateway-backed data source the node manager's HistoryRead overrides
|
||||
// block-bridge to. The factory lives in the Gateway driver (which owns the package-client adapter
|
||||
// and the ServerHistorianOptions -> client-options mapping); Runtime owns the gating.
|
||||
// the selected backend's data source (Gateway or SqlServer, built by the resolved provider) that the
|
||||
// node manager's HistoryRead overrides block-bridge to. Runtime owns the gating.
|
||||
builder.Services.AddServerHistorian(
|
||||
builder.Configuration,
|
||||
(_, sp) => historianProvider.CreateDataSource(sp));
|
||||
|
||||
// Config-gated historian tag provisioning. When the ServerHistorian section is enabled this registers the
|
||||
// gateway-backed GatewayTagProvisioner (overriding the NullHistorianProvisioning default) so that deploying
|
||||
// a historized tag auto-ensures it in the historian via the gateway's EnsureTags. The AddressSpaceApplier
|
||||
// (constructed in WithOtOpcUaRuntimeActors) resolves IHistorianProvisioning and fires a non-blocking
|
||||
// EnsureTagsAsync for added historized tags on every deploy; without this registration the applier falls
|
||||
// back to the no-op NullHistorianProvisioning and provisioning never reaches the gateway. Gated on the SAME
|
||||
// ServerHistorian:Enabled flag as the read path — both target the same single gateway.
|
||||
// selected backend's provisioner (GatewayTagProvisioner -> the gateway's EnsureTags, or the SqlServer Tag-row
|
||||
// MERGE), overriding the NullHistorianProvisioning default, so deploying a historized tag auto-ensures it in
|
||||
// the historian. The AddressSpaceApplier (constructed in WithOtOpcUaRuntimeActors) resolves
|
||||
// IHistorianProvisioning and fires a non-blocking EnsureTagsAsync for added/changed historized tags on every
|
||||
// deploy; without this registration the applier falls back to the no-op NullHistorianProvisioning. Gated on
|
||||
// the SAME ServerHistorian:Enabled flag as the read path — both use the one resolved backend.
|
||||
builder.Services.AddHistorianProvisioning(
|
||||
builder.Configuration,
|
||||
(_, sp) => historianProvider.CreateProvisioning(sp));
|
||||
|
||||
// Continuous historization of driver (non-Galaxy) tag values. Gated on ContinuousHistorization:Enabled
|
||||
// AND the ServerHistorian gateway being configured: the recorder drains driver-tag live values to the
|
||||
// SAME single gateway's WriteLiveValues SQL path, sourcing endpoint/key/TLS from the ServerHistorian
|
||||
// section (this section carries only the recorder + outbox knobs). When both are on, register the durable
|
||||
// crash-safe outbox + the gateway-backed live-value writer here; WithOtOpcUaRuntimeActors (below) spawns
|
||||
// the recorder actor itself, gated on the same options.
|
||||
// AND ServerHistorian:Enabled: the recorder drains driver-tag live values through the selected backend's
|
||||
// value writer (the gateway's WriteLiveValues, or the SqlServer Sample table), which takes its connection
|
||||
// from the ServerHistorian section (this section carries only the recorder + outbox knobs). When both are
|
||||
// on, register the durable crash-safe outbox + the backend's live-value writer here;
|
||||
// WithOtOpcUaRuntimeActors (below) spawns the recorder actor itself, gated on the same options.
|
||||
var continuousHistorizationOptions = builder.Configuration
|
||||
.GetSection(ContinuousHistorizationOptions.SectionName).Get<ContinuousHistorizationOptions>()
|
||||
?? new ContinuousHistorizationOptions();
|
||||
@@ -317,8 +316,9 @@ if (hasDriver)
|
||||
return outbox;
|
||||
});
|
||||
|
||||
// Gateway-backed live-value writer over its OWN gRPC channel to the same single gateway (a second
|
||||
// channel to a co-located sidecar is cheap — the gateway pools the historian sessions server-side).
|
||||
// The backend's live-value writer. On Gateway it opens its OWN gRPC channel to the same gateway (a second
|
||||
// channel to a co-located sidecar is cheap — the gateway pools the historian sessions server-side); on
|
||||
// SqlServer it shares the provider's connection helper, schema bootstrapper and tag catalog.
|
||||
builder.Services.AddSingleton<IHistorianValueWriter>(sp => historianProvider.CreateValueWriter(sp));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user