[abcip] AbCip — Descriptions to OPC UA Description #348

Merged
dohertj2 merged 1 commits from auto/abcip/2.3 into auto/driver-gaps 2026-04-25 18:26:01 -04:00
Owner

Summary

Wires AbCip tag descriptions all the way through to OPC UA Description.

  • Core.Abstractions/DriverAttributeInfo.csDescription (string?, default null, trailing optional param). Back-compat for the 9 other drivers that name-construct DriverAttributeInfo.
  • AbCipTagDefinition + AbCipStructureMember + L5kMember gain Description.
  • L5kParser.ParseMemberEntry reads Description := from member attribute blocks.
  • L5xParser.ReadMember / ReadAddOnInstruction parameter loop reads the <Description> child node (CDATA-aware, same shape as the existing tag-level handling).
  • L5kIngest forwards both tag- and member-level descriptions into the produced AbCipTagDefinition / AbCipStructureMember.
  • AbCipDriver.DiscoverAsync (UDT fan-out) and the ToAttributeInfo helper for atomic tags populate DriverAttributeInfo.Description.
  • DriverNodeManager.Variable(...) sets BaseDataVariableState.Description from it. Null-safe — empty/null strings leave Description unset, preserving prior behaviour.

Test plan

  • dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.AbCip — clean (0 / 0)
  • dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Tests299 / 299 passed (5 new in AbCipDescriptionThreadingTests: L5K member-attr capture, L5X CDATA-wrapped member capture, L5kIngest tag+member threading, DiscoverAsync sets Description on atomic and UDT-member DriverAttributeInfos)
  • Integration tests — skipped (live PLC required)

Note: An unrelated DriverSubscriptionBridge.cs cref-ambiguity error pre-exists on master; verified by stashing this branch's changes — the error reproduces on the unmodified parent.

🤖 Auto-generated by the Mode-B execution loop. Closes #231.

Closes #231

## Summary Wires AbCip tag descriptions all the way through to OPC UA `Description`. - **`Core.Abstractions/DriverAttributeInfo.cs`** — `Description` (string?, default null, trailing optional param). Back-compat for the 9 other drivers that name-construct `DriverAttributeInfo`. - **`AbCipTagDefinition`** + **`AbCipStructureMember`** + **`L5kMember`** gain `Description`. - **`L5kParser.ParseMemberEntry`** reads `Description :=` from member attribute blocks. - **`L5xParser.ReadMember`** / **`ReadAddOnInstruction`** parameter loop reads the `<Description>` child node (CDATA-aware, same shape as the existing tag-level handling). - **`L5kIngest`** forwards both tag- and member-level descriptions into the produced `AbCipTagDefinition` / `AbCipStructureMember`. - **`AbCipDriver.DiscoverAsync`** (UDT fan-out) and the `ToAttributeInfo` helper for atomic tags populate `DriverAttributeInfo.Description`. - **`DriverNodeManager.Variable(...)`** sets `BaseDataVariableState.Description` from it. Null-safe — empty/null strings leave Description unset, preserving prior behaviour. ## Test plan - [x] `dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.AbCip` — clean (0 / 0) - [x] `dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Tests` — **299 / 299 passed** (5 new in `AbCipDescriptionThreadingTests`: L5K member-attr capture, L5X CDATA-wrapped member capture, L5kIngest tag+member threading, DiscoverAsync sets Description on atomic and UDT-member `DriverAttributeInfo`s) - [ ] Integration tests — skipped (live PLC required) > Note: An unrelated `DriverSubscriptionBridge.cs` cref-ambiguity error pre-exists on master; verified by stashing this branch's changes — the error reproduces on the unmodified parent. 🤖 Auto-generated by the Mode-B execution loop. Closes #231. Closes #231
dohertj2 added 1 commit 2026-04-25 18:25:57 -04:00
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
dohertj2 merged commit 7ee0cbc3f4 into auto/driver-gaps 2026-04-25 18:26:01 -04:00
dohertj2 deleted branch auto/abcip/2.3 2026-04-25 18:26:02 -04:00
Sign in to join this conversation.