Files
lmxopcua/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.IntegrationTests/OpcPlcProfile.cs
T
Joseph Doherty 64e3fbe035
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
docs: backfill XML documentation across 756 files
Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public
members surfaced by commentchecker — resolves 5,847 of 5,869 issues
(99.6%) across three /fixdocs passes.
2026-05-28 08:10:17 -04:00

45 lines
2.2 KiB
C#

using ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient;
namespace ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.IntegrationTests;
/// <summary>
/// Driver-side configuration + well-known opc-plc node identifiers that the smoke
/// tests address. Node IDs are stable across opc-plc releases — the simulator
/// guarantees the same <c>ns=3;s=...</c> names shipped since v1.0. If a release
/// bump breaks these, the fixture's pinned image tag needs a coordinated bump.
/// </summary>
public static class OpcPlcProfile
{
/// <summary>opc-plc monotonically-increasing UInt32; ticks once per second under default opts.</summary>
public const string StepUp = "ns=3;s=StepUp";
/// <summary>opc-plc random Int32 node; new value ~every 100ms.</summary>
public const string RandomSignedInt32 = "ns=3;s=RandomSignedInt32";
/// <summary>opc-plc alternating boolean; flips every second.</summary>
public const string AlternatingBoolean = "ns=3;s=AlternatingBoolean";
/// <summary>opc-plc fast uint node — ticks every 100ms. Used for subscription-cadence tests.</summary>
public const string FastUInt1 = "ns=3;s=FastUInt1";
/// <summary>Builds driver options for the OPC PLC endpoint.</summary>
/// <param name="endpointUrl">The endpoint URL of the OPC PLC simulator.</param>
/// <returns>Configured driver options for the OPC PLC.</returns>
public static OpcUaClientDriverOptions BuildOptions(string endpointUrl) => new()
{
EndpointUrl = endpointUrl,
SecurityPolicy = OpcUaSecurityPolicy.None,
SecurityMode = OpcUaSecurityMode.None,
AuthType = OpcUaAuthType.Anonymous,
// opc-plc auto-accepts client certs (--aa) but we still present one; trust the
// server's cert back since the simulator regenerates it each container spin-up
// and there's no meaningful chain to validate against.
AutoAcceptCertificates = true,
Timeout = TimeSpan.FromSeconds(10),
SessionTimeout = TimeSpan.FromSeconds(30),
// opc-plc's standard address space mirrors verbatim — treat it as SystemPlatform so
// §8 namespace validation passes without requiring a UNS mapping table.
TargetNamespaceKind = OpcUaTargetNamespaceKind.SystemPlatform,
};
}