[focas] FOCAS — Operator messages + block text #329
Reference in New Issue
Block a user
Delete Branch "auto/focas/F1-e"
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 two FOCAS fixed-tree nodes per device, mirroring f1a-d patterns:
Messages/External/Latest(String) — most recent operator message viacnc_rdopmsg3. Loops 4 message classes (OPMSG / MACRO / EXTERN / REJ-EXT) collecting non-empty trimmed entries.Program/CurrentBlock(String) — currently-executing block text viacnc_rdactpt.Took the simpler "Latest" form over a 4-slot ring buffer per the issue body's permitted minimum.
FocasOperatorMessage,FocasOperatorMessagesInfo,FocasCurrentBlockInforecords + 2 default-nullIFocasClientmethods.FwlibNative.cs—cnc_rdopmsg3+cnc_rdactptP/Invokes plusOPMSG3+ODBACTPTstructs.TrimAnsiPaddinghelper stops at first NUL and trims trailing spaces — guarantees trim-stable round-trip.DeviceStategainsLastMessages/LastCurrentBlock.Test plan
dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.FOCAS— clean (0 / 0)dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests— 229 / 229 passed (6 new inFocasMessagesBlockTextFixedTreeTests: discovery shape, cached read, BadCommunicationError when caches empty, empty-snapshot Good, disconnected client returns null,TrimAnsiPaddingcovers nulls/spaces/empty)🤖 Auto-generated by the Mode-B execution loop. Closes #261.
Closes #261