fix(opcua): array equipment-tag nodes are read-only (array writes out of scope, review M-1)

This commit is contained in:
Joseph Doherty
2026-06-16 22:31:15 -04:00
parent 5f7a2acd27
commit 3bb2031d1d
2 changed files with 65 additions and 1 deletions
@@ -211,7 +211,11 @@ public sealed class Phase7Applier
string? historianTagname = tag.IsHistorized
? (string.IsNullOrWhiteSpace(tag.HistorianTagname) ? tag.FullName : tag.HistorianTagname)
: null;
SafeEnsureVariable(nodeId, parent, tag.Name, tag.DataType, tag.Writable, historianTagname, tag.IsArray, tag.ArrayLength);
// Array writes are out of scope (Phase 4c read-only surface): force array tags read-only
// even if authored ReadWrite, so a client write cannot reach the driver write path which
// does not handle arrays (e.g. S7 BoxValueForWrite would crash).
var writable = tag.Writable && !tag.IsArray;
SafeEnsureVariable(nodeId, parent, tag.Name, tag.DataType, writable, historianTagname, tag.IsArray, tag.ArrayLength);
}
}