[ablegacy] AbLegacy — Indirect/indexed addressing parser #324
Reference in New Issue
Block a user
Delete Branch "auto/ablegacy/4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds indirect / indexed addressing parser:
N7:[N7:0]— file letterN, file7, word number resolved at runtime fromN7:0N[N7:0]:5— file letterN, file number resolved at runtime fromN7:0, word5N[N7:0]:[N7:1]), and bit-after-bracket (N7:[N7:0]/3)AbLegacyAddressgains optionalIndirectFileSourceandIndirectWordSource(each itself anAbLegacyAddress) plus anIsIndirectflag.ParseInnerrejects any inner address containing further[/]— recursion capped at 1. Top-level colon/dot detection is bracket-aware. PLC-5 octal-IO rules cascade into the inner address.ToLibplctagName()re-emits the bracket form. libplctag PCCC doesn't decode bracket-form indirection natively, soEnsureTagRuntimeAsyncthrowsNotSupportedExceptionfor indirect addresses with aTODO(#247)note for the two-step resolve-then-read. Runtime resolution intentionally deferred per the issue's guidance.Test plan
dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy— clean (0 / 0)dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Tests— 233 / 233 passed (11 new: indirect positives, depth>1 rejection, malformed brackets, bit-after-bracket, octal-on-inner-PLC-5)🤖 Auto-generated by the Mode-B execution loop. Closes #247.
Closes #247