[abcip] AbCip — L5X (XML) parser + ingest #347

Merged
dohertj2 merged 1 commits from auto/abcip/2.2 into auto/driver-gaps 2026-04-25 18:13:16 -04:00
Owner

Summary

L5X (Studio 5000 XML export) parser. Reuses the L5kDocument bundle + L5kIngest from 2.1 — both formats are now consumed through a single ingest pipeline.

  • Import/L5xParser.cs (new) — System.Xml.XPath-backed parser:
    • Controller-scope and program-scope <Tag>
    • <DataType> / <Member> (skipping ZZZZZZZZZZ* BOOL host members)
    • <AddOnInstructionDefinition> surfaced as L5kDataType entries (hidden EnableIn/EnableOut params skipped). Full AOI directional modelling stays deferred to PR 2.6 per plan.
  • AbCipDriverOptions — parallel L5xImports collection (AbCipL5xImportOptions record mirrors the L5K shape).
  • AbCipDriver.InitializeAsync — now funnels both L5K and L5X through a shared MergeImport helper that differs only in the parser delegate.

Test plan

  • dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.AbCip — clean (0 / 0)
  • dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Tests294 / 294 passed (8 new L5X fixtures: controller-scope, program-scope, alias skip + ingest skip, UDT layout fan-out, AOI-typed tag with hidden-param/ZZZZ-host skips, missing-ExternalAccess default writable, empty-controller no-throw)
  • Integration tests — skipped (live PLC required)

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

Closes #230

## Summary L5X (Studio 5000 XML export) parser. Reuses the `L5kDocument` bundle + `L5kIngest` from 2.1 — both formats are now consumed through a single ingest pipeline. - **`Import/L5xParser.cs`** (new) — `System.Xml.XPath`-backed parser: - Controller-scope and program-scope `<Tag>` - `<DataType>` / `<Member>` (skipping `ZZZZZZZZZZ*` BOOL host members) - `<AddOnInstructionDefinition>` surfaced as `L5kDataType` entries (hidden `EnableIn`/`EnableOut` params skipped). Full AOI directional modelling stays deferred to PR 2.6 per plan. - **`AbCipDriverOptions`** — parallel `L5xImports` collection (`AbCipL5xImportOptions` record mirrors the L5K shape). - **`AbCipDriver.InitializeAsync`** — now funnels both L5K and L5X through a shared `MergeImport` helper that differs only in the parser delegate. ## 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` — **294 / 294 passed** (8 new L5X fixtures: controller-scope, program-scope, alias skip + ingest skip, UDT layout fan-out, AOI-typed tag with hidden-param/ZZZZ-host skips, missing-ExternalAccess default writable, empty-controller no-throw) - [ ] Integration tests — skipped (live PLC required) 🤖 Auto-generated by the Mode-B execution loop. Closes #230. Closes #230
dohertj2 added 1 commit 2026-04-25 18:13:12 -04:00
Adds Import/L5xParser.cs that consumes Studio 5000 L5X (XML) controller
exports via System.Xml.XPath and produces the same L5kDocument bundle as
L5kParser, so L5kIngest handles both formats interchangeably.

- Controller-scope and program-scope <Tag> elements with Name, DataType,
  TagType, ExternalAccess, AliasFor, and <Description> child.
- <DataType>/<Members>/<Member> with Hidden BOOL-host (ZZZZZZZZZZ*) skip.
- AddOnInstructionDefinitions surfaced as L5kDataType entries so AOI-typed
  tags pick up a member layout the same way UDT-typed tags do; hidden
  EnableIn/EnableOut parameters skipped. Full directional Input/Output/InOut
  modelling stays deferred to PR 2.6.

AbCipDriverOptions gains parallel L5xImports collection (mirrors
L5kImports field-for-field). InitializeAsync funnels both through one
shared MergeImport helper that differs only in the parser delegate.

Tests: 8 L5X fixtures cover controller- and program-scope tags, alias skip,
UDT layout fan-out, AOI-typed tag, ZZZZZZZZZZ host skip, hidden AOI param
skip, missing-ExternalAccess default, and an empty-controller no-throw.

Closes #230
dohertj2 merged commit e5b192fcb3 into auto/driver-gaps 2026-04-25 18:13:16 -04:00
dohertj2 deleted branch auto/abcip/2.2 2026-04-25 18:13:17 -04:00
Sign in to join this conversation.