[focas] FOCAS — Figure scaling + diagnostics #330
Reference in New Issue
Block a user
Delete Branch "auto/focas/F1-f"
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
Two related features per the f1-f plan:
Decimal scaling — adds
IFocasClient.GetFigureScalingAsync(default-null) andFwlibFocasClientimpl usingcnc_getfigure(kind=0). NewIODBAXISstruct +MAX_AXIS=8constant. InternalDecodeFigureScaling(byte[], short)is testable in isolation. Cache populated once per session in the probe loop. InternalApplyFigureScaling(host, axisName, raw)helper exposed for future PRs that wireAxes/{name}/AbsolutePositionetc.Diagnostics subtree per device:
Diagnostics/ReadCount(Int64) — increments on every successful probe tickDiagnostics/ReadFailureCount(Int64) — increments on probe failureDiagnostics/ReconnectCount(Int64) — bumped byEnsureConnectedAsyncDiagnostics/LastErrorMessage(String)Diagnostics/LastSuccessfulRead(DateTime)Configuration:
FocasFixedTreeOptions.ApplyFigureScalingflag (defaulttrue) — operators on existing deployments can flip tofalseif they were already compensating client-side. Migration guidance is documentation-only.Test plan
dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.FOCAS— clean (0 / 0)dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests— 236 / 236 passed (7 new inFocasFigureScalingDiagnosticsTests: discovery shape, counters increment on success/failure, scaling math, ApplyFigureScaling=false bypass, unconnected client returns null, DecodeFigureScaling buffer parsing/clamping)🤖 Auto-generated by the Mode-B execution loop. Closes #262.
Closes #262