Task #250 — AB CIP + AB Legacy test-client CLIs #204

Merged
dohertj2 merged 1 commits from task-250-abcip-ablegacy-cli into v2 2026-04-21 08:34:51 -04:00
Owner

Second + third of the four driver test-client CLIs. Both consume Driver.Cli.Common from #249.

otopcua-abcip-cli

ControlLogix / CompactLogix / Micro800 / GuardLogix via libplctag. Probe / read / write / subscribe against Logix symbolic paths (controller scope, program scope, array element, UDT member). Value parser covers every AbCipDataType atomic type.

otopcua-ablegacy-cli

SLC 500 / MicroLogix / PLC-5 / LogixPccc via libplctag's PCCC back-end. Same 4 commands. Addresses use PCCC convention (N7:0, F8:0, B3:0/3, L19:0, T4:0.ACC).

Tests

35 new (17 AbCip + 18 AbLegacy); 73 cumulative driver-CLI tests across #249 + #250.

Docs

Per-CLI operator runbook under docs/Driver.{AbCip,AbLegacy}.Cli.md with family ↔ CIP-path cheat sheets + PCCC address primer.

Test plan

Full-solution build clean. --help verified end-to-end on both CLIs.

Next (#251): S7 + TwinCAT CLIs.

Second + third of the four driver test-client CLIs. Both consume Driver.Cli.Common from #249. ## otopcua-abcip-cli ControlLogix / CompactLogix / Micro800 / GuardLogix via libplctag. Probe / read / write / subscribe against Logix symbolic paths (controller scope, program scope, array element, UDT member). Value parser covers every AbCipDataType atomic type. ## otopcua-ablegacy-cli SLC 500 / MicroLogix / PLC-5 / LogixPccc via libplctag's PCCC back-end. Same 4 commands. Addresses use PCCC convention (N7:0, F8:0, B3:0/3, L19:0, T4:0.ACC). ## Tests 35 new (17 AbCip + 18 AbLegacy); 73 cumulative driver-CLI tests across #249 + #250. ## Docs Per-CLI operator runbook under docs/Driver.{AbCip,AbLegacy}.Cli.md with family ↔ CIP-path cheat sheets + PCCC address primer. ## Test plan Full-solution build clean. `--help` verified end-to-end on both CLIs. Next (#251): S7 + TwinCAT CLIs.
dohertj2 added 1 commit 2026-04-21 08:34:39 -04:00
Second + third of the four driver test clients. Both follow the same shape as
otopcua-modbus-cli (#249) and consume Driver.Cli.Common for DriverCommandBase +
SnapshotFormatter.

New projects:
  - src/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Cli/ — otopcua-abcip-cli.
    AbCipCommandBase carries gateway (ab://host[:port]/cip-path) + family
    (ControlLogix/CompactLogix/Micro800/GuardLogix) + timeout.
    Commands: probe, read, write, subscribe.
    Value parser covers every AbCipDataType atomic type (Bool, SInt..LInt,
    USInt..ULInt, Real, LReal, String, Dt); Structure writes refused as
    out-of-scope for the CLI.
  - src/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Cli/ — otopcua-ablegacy-cli.
    AbLegacyCommandBase carries gateway + plc-type (Slc500/MicroLogix/Plc5/
    LogixPccc) + timeout.
    Commands: probe (default address N7:0), read, write, subscribe.
    Value parser covers Bit, Int, Long, Float, AnalogInt, String, and the
    three sub-element types (TimerElement / CounterElement / ControlElement
    all land on int32 at the wire).

Tests (35 new, 73 cumulative across the driver CLI family):
  - AB CIP: 17 tests — ParseValue happy-paths for every Logix atomic type,
    failure cases (non-numeric / bool garbage), tag-name synthesis.
  - AB Legacy: 18 tests — ParseValue coverage (Bit / Int / AnalogInt / Long /
    Float / String / sub-elements), PCCC address round-trip in tag names
    including bit-within-word + sub-element syntax.

Docs:
  - docs/Driver.AbCip.Cli.md — family ↔ CIP-path cheat sheet + examples per
    command + typical workflows.
  - docs/Driver.AbLegacy.Cli.md — PCCC address primer (file letters → CLI
    --type) + known ab_server upstream gap cross-ref to #224 close-out.

Wiring:
  - ZB.MOM.WW.OtOpcUa.slnx grew 4 entries (2 src + 2 tests).

Full-solution build clean. `otopcua-abcip-cli --help` + `otopcua-ablegacy-cli
--help` verified end-to-end.

Next up (#251): S7 + TwinCAT CLIs, same pattern.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dohertj2 merged commit ff50aac59f into v2 2026-04-21 08:34:51 -04:00
dohertj2 referenced this issue from a commit 2026-04-30 08:21:26 -04:00
Doc refresh (task #206) — Client.CLI + Client.UI brand flip + new top-level docs/README.md index. Client.CLI.md: replaced stale LmxOpcUa-OPC UA-server references with OtOpcUa throughout the overview + sample output + applicationUri examples (opc.tcp://localhost:4840/OtOpcUa, urn:localhost:OtOpcUa:instanceN); confirmed against src/ZB.MOM.WW.OtOpcUa.Server/Program.cs:69-71 which sets the live endpoint url + application uri to those exact values. Added a driver-agnostic note in the overview — the CLI is reachable against every shipped driver surface because the OPC UA endpoint abstracts them all. Kept the `lmxopcua-cli` executable name + the `{LocalAppData}/LmxOpcUaClient/pki/` PKI folder name AS-IS because those are real filesystem-level residuals the code still uses (Program.cs SetExecutableName + OpcUaClientService.cs:428) — flipping them requires migration shims so existing dev boxes don't lose their trusted-cert store; added explicit doc text explaining the residual + why it persists so future readers aren't confused. Fixed the sample connect-output "Server: LmxOpcUa" to "Server: OtOpcUa Server" matching the live ApplicationName in OpcUaServerOptions.cs:39. Client.UI.md: replaced the 4 LmxOpcUa references — overview one-liner, status-bar mock (now reads "OtOpcUa Server" matching the server's reported ApplicationName), endpoint-url example, settings persistence path. Same residual-explanation note added under the LmxOpcUaClient/settings.json path pointing at the Client.Shared session-factory literal at OpcUaClientService.cs:428. docs/README.md is new — a top-level index distinguishing the two documentation tiers (current reference at docs/*.md vs implementation history + design notes at docs/v2/*.md). Every current-reference doc gets a one-line role description in a section table (Architecture + data-path / Drivers / Operational / Client tooling / Requirements) so a new reader picking up the repo finds their way in without having to grep file names. Cross-link calls out that load-bearing references from top-level docs (plan.md decisions, admin-ui.md, acl-design.md, config-db-schema.md, driver-specs.md, dev-environment.md, test-data-sources.md) live under v2/. Notes up front that the project was renamed LmxOpcUa → OtOpcUa and that any remaining LmxOpcUa-string in paths is a deliberate residual with a migration follow-up, so readers don't chase phantom bugs. Four parallel doc-refresh agents currently working on the rest of docs/*.md (task #202 core architecture, #203 driver docs split, #204 operational, #205 requirements) — those commits will land on separate worktree branches + get folded in together once complete; this index already lists the docs they'll produce (drivers/README.md, drivers/Galaxy.md, drivers/Galaxy-Repository.md) so the final merge just has the content showing up where the index already points.
Sign in to join this conversation.