[focas] FOCAS — Parts count + cycle time #326
Reference in New Issue
Block a user
Delete Branch "auto/focas/F1-b"
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
Per-device
Production/fixed-tree subfolder with 4 read-only Int32 nodes (PartsProduced,PartsRequired,PartsTotal,CycleTimeSeconds), mirroring theStatus/pattern shipped in #325.IFocasClient.cs— newFocasProductionInforecord + default-nullGetProductionAsyncFwlibFocasClient.cs— implements viacnc_rdparam(6711/6712/6713)for parts counters +cnc_rdtimer(type=2)for cycle-time-seconds (best-effort: cycle-time defaults to 0 if rdtimer fails)FwlibNative.cs— addscnc_rdtimerP/Invoke +IODBTMRstructFocasDriver.cs— discoversProduction/, refreshes cache on the existing probe tick, dispatches reads from cache (no extra wire calls).DeviceStategainsLastProduction/LastProductionUtc.Test plan
dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.FOCAS— clean (0 / 0)dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests— 211 / 211 passed (4 new inFocasProductionFixedTreeTests: discovery shape, cached-snapshot read, BadCommunicationError when probe disabled, disconnectedGetProductionAsyncreturns null)🤖 Auto-generated by the Mode-B execution loop. Closes #258.
Closes #258