Auto: abcip-2.3 — descriptions to OPC UA Description

Threads tag/UDT-member descriptions captured by the L5K (#346) and L5X
(#347) parsers through AbCipTagDefinition + AbCipStructureMember into
DriverAttributeInfo, so the address-space builder sets the OPC UA
Description attribute on each Variable node. L5kMember and L5xParser
also now capture per-member descriptions (via the (Description := "...")
attribute block on L5K and the <Description> child on L5X), and
L5kIngest forwards them. DriverNodeManager surfaces
DriverAttributeInfo.Description as the Variable's Description property.

Description is added as a trailing optional parameter on
DriverAttributeInfo (default null) so every other driver continues
to construct the record unchanged.

Closes #231
This commit is contained in:
Joseph Doherty
2026-04-25 18:23:31 -04:00
parent e5b192fcb3
commit e5299cda5a
8 changed files with 248 additions and 11 deletions

View File

@@ -178,6 +178,13 @@ public sealed class DriverNodeManager : CustomNodeManager2, IAddressSpaceBuilder
NodeId = new NodeId(attributeInfo.FullName, NamespaceIndex),
BrowseName = new QualifiedName(browseName, NamespaceIndex),
DisplayName = new LocalizedText(displayName),
// Per Task #231 — surface the driver-supplied tag description as the OPC UA
// Description attribute on the Variable node. Drivers that don't carry
// descriptions pass null, leaving Description unset (the stack defaults to
// an empty LocalizedText, matching prior behaviour).
Description = string.IsNullOrEmpty(attributeInfo.Description)
? null
: new LocalizedText(attributeInfo.Description),
DataType = MapDataType(attributeInfo.DriverDataType),
ValueRank = attributeInfo.IsArray ? ValueRanks.OneDimension : ValueRanks.Scalar,
// Historized attributes get the HistoryRead access bit so the stack dispatches