[ablegacy] AbLegacy — PD/MG/PLS/BT structure files #352
Reference in New Issue
Block a user
Delete Branch "auto/ablegacy/5"
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 PD (PID), MG (Message), PLS (Programmable Limit Switch), BT (Block Transfer) structure files to the AbLegacy PCCC parser.
AbLegacyAddress.cs— newIsStructureFileLetter+StructureFileSupportedper-family gating.AbLegacyDataType.cs— four new enum members (PidElement,MessageElement,PlsElement,BlockTransferElement) + Float/Int/Boolean sub-element catalogue + Rockwell-correct status-bit indices + read-only PLC-set bit list. Reuses the bit-semantics machinery shipped in ablegacy-3.LibplctagLegacyTagRuntime.cs— Decode/Encode dispatch usingGetFloat32for PD non-bit members andGetInt32for MG/BT/PLS;GetBitfor status bits.AbLegacyPlcFamilyProfile.cs— four new per-family flags.Per-family gating:
Test plan
dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy— clean (0 / 0)dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Tests— 296 / 296 passed (7 new test cases / ~28 inline data rows inAbLegacyAddressTests: per-family acceptance + rejection, sub-element bit semantics, Float vs Int dispatch)🤖 Auto-generated by the Mode-B execution loop. Closes #248.
Closes #248
Adds PD (PID), MG (Message), PLS (Programmable Limit Switch) and BT (Block Transfer) file types to the PCCC parser. New AbLegacyDataType enum members (PidElement / MessageElement / PlsElement / BlockTransferElement) plus per-type sub-element catalogue: - PD: SP/PV/CV/KP/KI/KD/MAXS/MINS/DB/OUT as Float32; EN/DN/MO/PE/ AUTO/MAN/SP_VAL/SP_LL/SP_HL as Boolean (word-0 status bits). - MG: RBE/MS/SIZE/LEN as Int32; EN/EW/ER/DN/ST/CO/NR/TO as Boolean. - PLS: LEN as Int32 (bit table varies per PLC). - BT: RLEN/DLEN as Int32; EN/ST/DN/ER/CO/EW/TO/NR as Boolean. Per-family flags on AbLegacyPlcFamilyProfile gate availability: - PD/MG: SLC500 + PLC-5 (operator + status bits both present). - PLS/BT: PLC-5 only (chassis-IO block transfer is PLC-5-specific). - MicroLogix + LogixPccc: rejected — no legacy file-letter form. Status-bit indices match Rockwell DTAM / 1747-RM001 / 1785-6.5.12: PD word 0 bits 0-8, MG/BT word 0 bits 8-15. PLC-set status bits (PE/DN/SP_*; ST/DN/ER/CO/EW/NR/TO) are surfaced as ViewOnly via IsPlcSetStatusBit, matching the Timer/Counter/Control pattern from ablegacy-3. LibplctagLegacyTagRuntime decodes PD non-bit members as Float32 and MG/BT/PLS non-bit members as Int32; status bits route through GetBit with the bit-position encoded by the driver via StatusBitIndex. Tests: parser positive cases per family + negative cases per family, catalogue + bit-index + read-only-bit assertions. Closes #248