From e2960515cfae3062df849be7903b78e22961b1d7 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Fri, 12 Jun 2026 12:02:05 -0400 Subject: [PATCH] chore(historian): drop dead pipe package ref + stale pipe strings (review) --- .../Internal/FrameChannel.cs | 12 ++++++------ .../WonderwareHistorianClient.cs | 6 +++--- .../WonderwareHistorianDriverProbe.cs | 16 +++++++--------- ...WW.OtOpcUa.Driver.Historian.Wonderware.csproj | 3 +-- .../Drivers/HistorianWonderwareDriverPage.razor | 2 +- .../ZB.MOM.WW.OtOpcUa.Host/appsettings.json | 1 - 6 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/Internal/FrameChannel.cs b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/Internal/FrameChannel.cs index 98991f91..2e678b0c 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/Internal/FrameChannel.cs +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/Internal/FrameChannel.cs @@ -8,12 +8,12 @@ using ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client.Ipc; namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client.Internal; /// -/// Owns one connection to the Wonderware historian sidecar pipe. Handles the Hello +/// Owns one TCP connection to the Wonderware historian sidecar. Handles the Hello /// handshake, serializes outgoing requests + waits for the matching reply frame, and /// reconnects on transport failure with exponential backoff. /// /// -/// Single in-flight call at a time — the sidecar's pipe protocol is request/response +/// Single in-flight call at a time — the sidecar's TCP protocol is request/response /// over a single bidirectional stream, so multiple concurrent /// calls would interleave replies. A serializes them. PR 6.x /// can layer batching on top. @@ -147,7 +147,7 @@ internal sealed class FrameChannel : IAsyncDisposable } catch (Exception ex) when (ex is IOException or EndOfStreamException or ObjectDisposedException) { - _logger.LogWarning(ex, "Sidecar pipe transport failure on {Kind}; reconnecting", requestKind); + _logger.LogWarning(ex, "Sidecar TCP transport failure on {Kind}; reconnecting", requestKind); ResetTransport(); await ConnectInternalAsync(timeout.Token).ConfigureAwait(false); // One retry. If the second attempt also fails, propagate. @@ -162,7 +162,7 @@ internal sealed class FrameChannel : IAsyncDisposable { await _writer!.WriteAsync(requestKind, request, ct).ConfigureAwait(false); var frame = await _reader!.ReadFrameAsync(ct).ConfigureAwait(false) - ?? throw new EndOfStreamException("Sidecar closed pipe before reply."); + ?? throw new EndOfStreamException("Sidecar closed connection before reply."); if (frame.Kind != expectedReplyKind) { throw new InvalidDataException( @@ -189,7 +189,7 @@ internal sealed class FrameChannel : IAsyncDisposable await _writer.WriteAsync(MessageKind.Hello, hello, ct).ConfigureAwait(false); var ackFrame = await _reader.ReadFrameAsync(ct).ConfigureAwait(false) - ?? throw new EndOfStreamException("Sidecar closed pipe before HelloAck."); + ?? throw new EndOfStreamException("Sidecar closed connection before HelloAck."); if (ackFrame.Kind != MessageKind.HelloAck) { ResetTransport(); @@ -204,7 +204,7 @@ internal sealed class FrameChannel : IAsyncDisposable $"Sidecar rejected Hello: {ack.RejectReason ?? ""}."); } - _logger.LogInformation("Sidecar pipe connected — host={Host}", ack.HostName); + _logger.LogInformation("Sidecar TCP connected — host={Host}", ack.HostName); } private void ResetTransport() diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/WonderwareHistorianClient.cs b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/WonderwareHistorianClient.cs index 481b55c8..c55a50ba 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/WonderwareHistorianClient.cs +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/WonderwareHistorianClient.cs @@ -210,11 +210,11 @@ public sealed class WonderwareHistorianClient : IHistorianDataSource, IAlarmHist } /// - /// Returns a snapshot of operation counters and the single pipe channel's connection + /// Returns a snapshot of operation counters and the single TCP channel's connection /// state. /// /// - /// This client owns one duplex named-pipe channel to the sidecar — it has no notion of + /// This client owns one TCP channel to the sidecar — it has no notion of /// separate process / event connections and no per-node telemetry. The single channel's /// connected state is reported for both /// and , and @@ -521,7 +521,7 @@ public sealed class WonderwareHistorianClient : IHistorianDataSource, IAlarmHist _ => throw new NotSupportedException($"Unknown HistoryAggregateType {aggregate}"), }; - /// Asynchronously disposes the client and its underlying pipe channel. + /// Asynchronously disposes the client and its underlying TCP channel. /// A task that completes when the client has been disposed. public ValueTask DisposeAsync() => _channel.DisposeAsync(); diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/WonderwareHistorianDriverProbe.cs b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/WonderwareHistorianDriverProbe.cs index 633c228c..3d26c449 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/WonderwareHistorianDriverProbe.cs +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client/WonderwareHistorianDriverProbe.cs @@ -6,11 +6,10 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client; /// /// Driver probe for the -shaped driver config. -/// The Wonderware Historian client communicates over a Windows named pipe (not a TCP socket), -/// so a cheap TCP-connect probe is not applicable for this transport. This probe always -/// returns a well-formed "not applicable" result so the AdminUI can display a meaningful -/// message instead of a red error. A full named-pipe connect + Hello-frame probe is a -/// documented follow-up. +/// The Wonderware Historian client communicates over TCP, but a lightweight TCP-connect + +/// Hello-frame probe is not yet implemented. This probe always returns a well-formed +/// "not applicable" result so the AdminUI can display a meaningful message instead of a +/// red error. A full TCP connect + Hello-frame probe is a documented follow-up. /// public sealed class WonderwareHistorianDriverProbe : IDriverProbe { @@ -36,12 +35,11 @@ public sealed class WonderwareHistorianDriverProbe : IDriverProbe if (opts is null) return Task.FromResult(new DriverProbeResult(false, "Config JSON deserialized to null.", null)); - // The Wonderware Historian sidecar communicates over a Windows named pipe; there is no - // TCP endpoint to connect to. A full pipe connect + Hello-frame probe is a follow-up. + // The Wonderware Historian sidecar communicates over TCP; a full TCP connect + + // Hello-frame probe is a documented follow-up. return Task.FromResult(new DriverProbeResult( false, - "TCP probe not applicable for this transport — the Historian sidecar uses a named pipe. " + - "A full named-pipe probe is a documented follow-up.", + "Full TCP probe (connect + Hello handshake) is not yet implemented for this driver — it is a documented follow-up.", null)); } } diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.csproj b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.csproj index a22fc759..b4d555b3 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.csproj +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware/ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.csproj @@ -21,8 +21,7 @@ - - + diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Clusters/Drivers/HistorianWonderwareDriverPage.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Clusters/Drivers/HistorianWonderwareDriverPage.razor index 333ba75b..692ff12c 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Clusters/Drivers/HistorianWonderwareDriverPage.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Clusters/Drivers/HistorianWonderwareDriverPage.razor @@ -100,7 +100,7 @@ else
-
Cap on pipe connect + Hello round-trip. Null = 10 s.
+
Cap on TCP connect + Hello round-trip. Null = 10 s.
diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.Host/appsettings.json b/src/Server/ZB.MOM.WW.OtOpcUa.Host/appsettings.json index 8f373da2..29d09f1d 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.Host/appsettings.json +++ b/src/Server/ZB.MOM.WW.OtOpcUa.Host/appsettings.json @@ -14,7 +14,6 @@ "AlarmHistorian": { "Enabled": false, "DatabasePath": "alarm-historian.db", - "PipeName": "OtOpcUaHistorian", "Host": "localhost", "Port": 32569, "UseTls": false,