[focas] FOCAS — Multi-path/multi-channel CNC #355
Reference in New Issue
Block a user
Delete Branch "auto/focas/F2-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
Multi-path / multi-channel CNC support for FOCAS — addresses can target a specific path via
@Nsuffix.FocasAddress— newPathIdfield (default 1) as a 5th positional record field. Parser accepts@Nbetween the address body and any trailing bit/axis marker:R100@3.0(PMC bit on path 3)PARAM:1815@2/0MACRO:500@2DIAG:280@2/1PathId in [1, 10]. Canonical round-trips the suffix.IFocasClient— two new default-method members:GetPathCountAsync(returns 1) andSetPathAsync(no-op). Transports that haven't extended their wire surface (IPC variant, stubs) keep behaving as single-path.FwlibNative+FwlibFocasClient— P/Invoke forcnc_rdpathnumandcnc_setpath+ODBPATHstruct. Single-path controller failures fall back toPathCount=1rather than throwing.FocasDriver—DeviceStategainsPathCountandLastSetPath.EnsureConnectedAsyncqueriesGetPathCountAsyncafter successful connect; resetsLastSetPath=0.ReadAsync/WriteAsynccheckPathId > PathCount(returningBadOutOfRange) and callSetPathAsynconly whenPathId != 1AND differs fromLastSetPath.Default
PathId=1preserves all existing behavior — no extra wire calls.Test plan
dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.FOCAS+ Shared + Host — clean (0 / 0)dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests— 309 / 309 passed (18 new inFocasMultiPathTests: parser positive/negative for all 4 area kinds, canonical round-trip, driver dispatch — default path skips SetPath, non-default triggers it, repeat-on-same-path stays at one call, out-of-range returns BadOutOfRange, DIAG threading through both SetPath and ReadDiagnosticAsync)🤖 Auto-generated by the Mode-B execution loop. Closes #264.
Closes #264