Upgrade OPC UA SDK to 2.0.1 preserving application contracts #802

Merged
dohertj2 merged 111 commits from codex/opcua-sdk-2 into master 2026-11-10 20:30:53 -05:00
2 changed files with 7 additions and 4 deletions
Showing only changes of commit 344bc9df8a - Show all commits
@@ -120,7 +120,8 @@ public sealed class NodeManagerAlarmSourceFieldsTests : IDisposable
var condition = nm.TryGetAlarmCondition("alm-x", AddressSpaceRealm.Uns);
condition.ShouldNotBeNull();
condition.GetType().ShouldBe(typeof(AlarmConditionState)); // base-type fallback
condition.ShouldBeAssignableTo<AlarmConditionState>();
condition.TypeDefinitionId.ShouldBe(ObjectTypeIds.AlarmConditionType);
condition.EventType!.Value.ShouldBe(ObjectTypeIds.AlarmConditionType);
}
@@ -369,8 +369,9 @@ public sealed class SdkAddressSpaceSinkTests : IDisposable
var condition = nm.TryGetAlarmCondition("alm-x");
condition.ShouldNotBeNull();
// Base type exactly — NOT a LimitAlarmState (no limits to populate for a script alarm).
condition.GetType().ShouldBe(typeof(AlarmConditionState));
// The supported method adapter preserves the base UA type (there are no script limits).
condition.ShouldBeAssignableTo<AlarmConditionState>();
condition.TypeDefinitionId.ShouldBe(ObjectTypeIds.AlarmConditionType);
await host.DisposeAsync();
}
@@ -437,7 +438,8 @@ public sealed class SdkAddressSpaceSinkTests : IDisposable
var condition = nm.TryGetAlarmCondition("alm-base");
condition.ShouldNotBeNull();
condition.GetType().ShouldBe(typeof(AlarmConditionState)); // base type
condition.ShouldBeAssignableTo<AlarmConditionState>();
condition.TypeDefinitionId.ShouldBe(ObjectTypeIds.AlarmConditionType);
// Simulate a build where the optional Confirm sub-state machine was NOT created.
condition.ConfirmedState = null;