From 67682af5208360e1aef96c0afb684ba75b058b7f Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 3 Dec 2026 11:07:59 -0500 Subject: [PATCH] fix(opcuaclient): #992 name the BadTimeout constant after its OPC UA status (StatusCodeParityTests) --- .../OpcUaClientDriver.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/OpcUaClientDriver.cs b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/OpcUaClientDriver.cs index d946b1d77..b7ae756a0 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/OpcUaClientDriver.cs +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/OpcUaClientDriver.cs @@ -1626,7 +1626,7 @@ public sealed class OpcUaClientDriver : IDriver, ITagDiscovery, IReadable, IWrit // happen"). Downstream callers that need retry semantics check for BadTimeout // and can decide whether to re-issue. for (var w = 0; w < indexMap.Count; w++) - results[indexMap[w]] = new WriteResult(StatusBadTimeoutCode); + results[indexMap[w]] = new WriteResult(StatusBadTimeout); // No reply arrived. Only a timeout is a comms fault — a caller that cancelled says nothing about upstream. if (!cancellationToken.IsCancellationRequested) RecordCommsFault(generation, $"write: {ex.Message}"); } @@ -1636,7 +1636,7 @@ public sealed class OpcUaClientDriver : IDriver, ITagDiscovery, IReadable, IWrit // that closed under it) leaves the outcome unknown: BadTimeout, like a cancelled wait — never the // "definitely did not happen" BadCommunicationError, which would tell the operator a setpoint that // may have taken effect did not. Any other failure is a pre-wire transport fault. - var code = IsPossiblyDispatchedWriteFailure(ex) ? StatusBadTimeoutCode : StatusBadCommunicationError; + var code = IsPossiblyDispatchedWriteFailure(ex) ? StatusBadTimeout : StatusBadCommunicationError; for (var w = 0; w < indexMap.Count; w++) results[indexMap[w]] = new WriteResult(code); RecordCommsFault(generation, $"write: {ex.Message}"); @@ -1645,7 +1645,7 @@ public sealed class OpcUaClientDriver : IDriver, ITagDiscovery, IReadable, IWrit } /// OPC UA BadTimeout — "outcome unknown" for a write. - private const uint StatusBadTimeoutCode = 0x800A0000u; + private const uint StatusBadTimeout = 0x800A0000u; /// /// G-14: whether a write failure is one that can occur after the request reached the wire — a