AB CIP PR 1 — Extract shared PollGroupEngine into Core.Abstractions #108
Reference in New Issue
Block a user
Delete Branch "abcip-pr1-pollgroupengine"
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
First PR of the AB CIP driver sequence (13 PRs planned). Lifts the Modbus subscription poll loop into a shared
PollGroupEngineclass so AB CIP (and later S7/FOCAS/AB Legacy) can reuse it.Behaviour-preserving refactor:
SubscriptionState+PollLoopAsync+PollOnceAsync+ subscription handle extracted intosrc/ZB.MOM.WW.OtOpcUa.Core.Abstractions/PollGroupEngine.csModbusDriverISubscribable surface now delegates Subscribe/Unsubscribe into the engineShutdownAsynccalls engineDisposeAsyncforceRaise=trueon first poll)Placement rationale
Lives in
Core.Abstractions, notCore. Driver projects only referenceCore.Abstractionsby convention (Modbus, OpcUaClient, S7 csproj shape); putting the engine inCorewould drag EF Core + Serilog + Polly into every driver.PollGroupEnginehas no dependencies beyondSystem.Collections.Concurrent+System.Threading, soCore.Abstractionsstays lightweight.Test plan
Unblocks
ISubscribableconsumes the engineMerges to
v2.